.estoreware-idx-shell,
.estoreware-idx-widget {
  margin: 28px 0;
}

.estoreware-idx-shell--contained,
.estoreware-idx-widget--contained {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
}

.estoreware-idx-hero,
.estoreware-idx-widget__header {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.estoreware-idx-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.estoreware-idx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.estoreware-idx-hero h1,
.estoreware-idx-widget__header h2 {
  margin: 0;
  color: #111827;
  font-weight: 800;
  line-height: 1.1;
}

.estoreware-idx-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.estoreware-idx-widget__header h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.estoreware-idx-hero p,
.estoreware-idx-widget__header p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 16px;
  line-height: 1.55;
}

.estoreware-idx-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.estoreware-idx-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.estoreware-idx-nav a:hover {
  border-color: #9ca3af;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
}

.estoreware-idx-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.estoreware-idx-empty {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  color: #7c2d12;
  padding: 18px;
  margin-bottom: 18px;
}

.estoreware-idx-disclaimer {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .estoreware-idx-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .estoreware-idx-nav {
    justify-content: flex-start;
  }

  .estoreware-idx-card {
    padding: 12px;
  }
}

.estoreware-idx-lead-card h2 {
    margin-top: 0;
}

.estoreware-idx-success {
    padding: 12px 15px;
    margin-bottom: 18px;
    border: 1px solid #b7dfb9;
    background: #edf8ed;
    border-radius: 6px;
}

.estoreware-idx-lead-form {
    margin-top: 18px;
}

.estoreware-idx-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.estoreware-idx-field {
    margin-bottom: 16px;
}

.estoreware-idx-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.estoreware-idx-field label span {
    color: #b00020;
}

.estoreware-idx-field input,
.estoreware-idx-field textarea {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.estoreware-idx-field textarea {
    min-height: 120px;
}

.estoreware-idx-submit {
    min-width: 150px;
}

@media (max-width: 767px) {
    .estoreware-idx-form-grid {
        grid-template-columns: 1fr;
    }
}

.estoreware-idx-provider-badge {
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fafafa;
}

/* Phase 7B - CRMLS IDX Link Generator embeds */
.idx-crmls-frame {
    display: block;
    max-width: 100%;
    min-height: 600px;
    background: #fff;
}

.idx-crmls-link-button {
    display: inline-block;
    margin: 12px 0;
    text-align: center;
}

/* Phase 9 - Public real estate polish and header/menu integration */
.estoreware-idx-shell {
    --idx-navy: #0f2438;
    --idx-blue: #214c72;
    --idx-gold: #b58a45;
    --idx-cream: #f7f3ec;
    --idx-border: #e7e2d8;
    --idx-text: #243142;
    color: var(--idx-text);
}

.estoreware-idx-hero--realty {
    position: relative;
    overflow: hidden;
    align-items: stretch;
    padding: clamp(26px, 4vw, 44px);
    border: 0;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(15, 36, 56, 0.96), rgba(33, 76, 114, 0.92)),
        radial-gradient(circle at top right, rgba(181, 138, 69, 0.4), transparent 36%);
    color: #fff;
    box-shadow: 0 22px 48px rgba(15, 36, 56, 0.18);
}

.estoreware-idx-hero--realty:after {
    content: "";
    position: absolute;
    inset: auto -80px -120px auto;
    width: 300px;
    height: 300px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
}

.estoreware-idx-hero__content,
.estoreware-idx-hero__panel {
    position: relative;
    z-index: 1;
}

.estoreware-idx-hero__content {
    flex: 1 1 auto;
}

.estoreware-idx-hero--realty .estoreware-idx-eyebrow {
    background: rgba(255,255,255,0.12);
    color: #f6dca5;
    border: 1px solid rgba(255,255,255,0.18);
}

.estoreware-idx-hero--realty h1 {
    color: #fff;
    max-width: 820px;
    letter-spacing: -0.035em;
}

.estoreware-idx-hero--realty p {
    color: rgba(255,255,255,0.86);
    max-width: 760px;
}

.estoreware-idx-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.estoreware-idx-primary-link,
.estoreware-idx-secondary-link,
.estoreware-idx-header-nav a {
    text-decoration: none;
}

.estoreware-idx-primary-link,
.estoreware-idx-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.estoreware-idx-primary-link {
    background: var(--idx-gold);
    color: #111827;
    box-shadow: 0 12px 22px rgba(0,0,0,0.16);
}

.estoreware-idx-secondary-link {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.22);
}

.estoreware-idx-primary-link:hover,
.estoreware-idx-secondary-link:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.estoreware-idx-hero__panel {
    flex: 0 0 280px;
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
}

.estoreware-idx-hero-stat {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.1);
}

.estoreware-idx-hero-stat span {
    display: block;
    color: #f6dca5;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.estoreware-idx-hero-stat strong {
    display: block;
    margin-top: 3px;
    color: #fff;
    font-size: 18px;
}

.estoreware-idx-hero-note {
    color: rgba(255,255,255,0.78);
    font-size: 13px;
    line-height: 1.45;
}

.estoreware-idx-nav {
    margin: 18px 0;
    justify-content: flex-start;
}

.estoreware-idx-nav a.is-active {
    background: var(--idx-navy);
    color: #fff;
    border-color: var(--idx-navy);
}

.estoreware-idx-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.estoreware-idx-action-card {
    display: block;
    padding: 22px;
    border: 1px solid var(--idx-border);
    border-radius: 20px;
    background: #fff;
    color: var(--idx-text);
    box-shadow: 0 12px 30px rgba(15, 36, 56, 0.08);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.estoreware-idx-action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(181, 138, 69, 0.55);
    box-shadow: 0 18px 38px rgba(15, 36, 56, 0.12);
    text-decoration: none;
}

.estoreware-idx-action-card span {
    display: inline-flex;
    margin-bottom: 14px;
    color: var(--idx-gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
}

.estoreware-idx-action-card strong {
    display: block;
    color: var(--idx-navy);
    font-size: 20px;
}

.estoreware-idx-action-card em {
    display: block;
    margin-top: 8px;
    color: #627084;
    font-style: normal;
    line-height: 1.45;
}

.estoreware-idx-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.estoreware-idx-content-layout--single {
    display: block;
}

.estoreware-idx-card {
    border-color: var(--idx-border);
    border-radius: 20px;
}

.estoreware-idx-contact-box h2,
.estoreware-idx-mini-links h3 {
    margin: 6px 0 8px;
    color: var(--idx-navy);
}

.estoreware-idx-contact-box p {
    color: #627084;
    line-height: 1.55;
}

.estoreware-idx-full-link {
    width: 100%;
    margin-top: 8px;
}

.estoreware-idx-mini-links a {
    display: block;
    padding: 10px 0;
    border-top: 1px solid var(--idx-border);
    color: var(--idx-blue);
    font-weight: 800;
    text-decoration: none;
}

.estoreware-idx-mini-links a:hover {
    color: var(--idx-navy);
}

.estoreware-idx-lead-card {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.idx-crmls-frame {
    border-radius: 14px;
}

.idx-crmls-frame--widget {
    min-height: 480px;
}

.estoreware-idx-header-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 8px;
    vertical-align: middle;
}

.estoreware-idx-header-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #1f2937;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.estoreware-idx-header-nav a:hover {
    background: #f3f4f6;
    color: #111827;
}

.estoreware-idx-header-nav__main {
    background: var(--idx-navy) !important;
    color: #fff !important;
}

.estoreware-idx-header-nav__cta {
    background: var(--idx-gold) !important;
    color: #111827 !important;
}

@media (max-width: 1024px) {
    .estoreware-idx-content-layout {
        grid-template-columns: 1fr;
    }

    .estoreware-idx-side-panel {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .estoreware-idx-hero--realty {
        padding: 24px;
    }

    .estoreware-idx-hero__panel {
        width: 100%;
        flex-basis: auto;
    }

    .estoreware-idx-action-grid,
    .estoreware-idx-side-panel {
        grid-template-columns: 1fr;
    }

    .estoreware-idx-header-nav {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin: 8px 0;
    }
}

/* Phase 10 - Manual property listings and homepage featured property cards */
.estoreware-idx-featured-properties,
.estoreware-idx-featured-widget {
    margin: 22px 0;
}

.estoreware-idx-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.estoreware-idx-section-heading span {
    display: block;
    margin-bottom: 6px;
    color: var(--idx-gold, #b58a45);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.estoreware-idx-section-heading h2 {
    margin: 0;
    color: var(--idx-navy, #0f2438);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.02em;
}

.estoreware-idx-section-heading p {
    margin: 8px 0 0;
    max-width: 680px;
    color: #627084;
    line-height: 1.55;
}

.estoreware-idx-section-heading > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--idx-navy, #0f2438);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.estoreware-idx-property-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.estoreware-idx-property-card {
    overflow: hidden;
    border: 1px solid var(--idx-border, #e7e2d8);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 36, 56, .09);
}

.estoreware-idx-property-card__image {
    position: relative;
    display: block;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #e9eef4, #f8fafc);
    color: #6b7280;
    text-decoration: none;
}

.estoreware-idx-property-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.estoreware-idx-property-card:hover .estoreware-idx-property-card__image img {
    transform: scale(1.035);
}

.estoreware-idx-property-card__image > span {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.estoreware-idx-property-card__image em {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 36, 56, .92);
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.estoreware-idx-property-card__body {
    padding: 18px;
}

.estoreware-idx-property-card__body > strong {
    display: block;
    color: var(--idx-navy, #0f2438);
    font-size: 24px;
    line-height: 1.1;
}

.estoreware-idx-property-card__body h3 {
    margin: 10px 0 5px;
    color: var(--idx-navy, #0f2438);
    font-size: 18px;
    line-height: 1.25;
}

.estoreware-idx-property-card__body h3 a {
    color: inherit;
    text-decoration: none;
}

.estoreware-idx-property-card__body p {
    margin: 0;
    color: #627084;
}

.estoreware-idx-property-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.estoreware-idx-property-meta span {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f3f6f9;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.estoreware-idx-property-link {
    display: inline-flex;
    color: var(--idx-blue, #214c72);
    font-weight: 900;
    text-decoration: none;
}

.estoreware-idx-listing-detail {
    margin-top: 28px;
}

.estoreware-idx-detail-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.estoreware-idx-detail-nav a {
    color: var(--idx-blue, #214c72);
    font-weight: 800;
    text-decoration: none;
}

.estoreware-idx-detail-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: clamp(24px, 4vw, 42px);
    border-radius: 24px;
    background: linear-gradient(135deg, #0f2438, #214c72);
    color: #fff;
    margin-bottom: 18px;
}

.estoreware-idx-detail-hero h1 {
    margin: 8px 0 6px;
    max-width: 900px;
    color: #fff;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.06;
}

.estoreware-idx-detail-hero p {
    margin: 0;
    color: rgba(255,255,255,.82);
    font-size: 18px;
}

.estoreware-idx-detail-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: #f6dca5;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.estoreware-idx-detail-price {
    color: #f6dca5;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    white-space: nowrap;
}

.estoreware-idx-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.estoreware-idx-detail-gallery {
    overflow: hidden;
    border: 1px solid var(--idx-border, #e7e2d8);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 36, 56, .09);
    margin-bottom: 18px;
}

.estoreware-idx-detail-main-photo {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.estoreware-idx-detail-photo-empty {
    display: flex;
    min-height: 320px;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 800;
}

.estoreware-idx-detail-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
}

.estoreware-idx-detail-thumbs img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
}

.estoreware-idx-detail-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.estoreware-idx-detail-facts span,
.estoreware-idx-listing-id {
    display: inline-flex;
    padding: 8px 11px;
    border-radius: 999px;
    background: #f3f6f9;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.estoreware-idx-detail-overview h2 {
    margin: 0 0 8px;
    color: var(--idx-navy, #0f2438);
}

.estoreware-idx-detail-overview p {
    color: #465568;
    font-size: 16px;
    line-height: 1.7;
}

@media (max-width: 1024px) {
    .estoreware-idx-property-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .estoreware-idx-detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .estoreware-idx-section-heading,
    .estoreware-idx-detail-hero,
    .estoreware-idx-detail-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .estoreware-idx-property-grid {
        grid-template-columns: 1fr;
    }

    .estoreware-idx-detail-price {
        white-space: normal;
    }

    .estoreware-idx-detail-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
