/* ================================================================
   BELISSE GEMS — Collections Hub Stylesheet (v3 — MOBILE FIXES + SEARCH)
   ----------------------------------------------------------------
   v3 CHANGES:
   - FIXED horizontal overflow (no more empty space on right)
   - FIXED mobile drawer (proper close button, scrollable, fixed slider)
   - NEW elegant search bar
   - 5 house cards optimized for mobile (no text cut-off)
   - Slider thumb fixed across browsers
   ================================================================ */


/* ================================================================
   0. GLOBAL OVERFLOW FIX (prevents horizontal scroll on mobile)
   ================================================================ */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}


/* ================================================================
   1. COLLECTIONS HERO
   ================================================================ */
.collections-hero {
    background: linear-gradient(135deg, #FAF6EE 0%, #EFE7D8 100%);
    padding: 120px 40px 100px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-decor-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: orbFloat 16s ease-in-out infinite;
}

.orb-emerald    { width: 320px; height: 320px; background: rgba(14, 83, 64, 0.3);   top: 8%;   left: 4%;   animation-delay: 0s; }
.orb-ruby       { width: 260px; height: 260px; background: rgba(122, 16, 36, 0.25); top: 55%;  left: 16%;  animation-delay: 2s; }
.orb-sapphire   { width: 300px; height: 300px; background: rgba(15, 46, 90, 0.25);  top: 12%;  right: 6%;  animation-delay: 4s; }
.orb-aqua       { width: 220px; height: 220px; background: rgba(60, 143, 167, 0.3); top: 60%;  right: 12%; animation-delay: 1s; }
.orb-tourmaline { width: 200px; height: 200px; background: rgba(156, 58, 110, 0.25); top: 3%;  left: 48%;  animation-delay: 3s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(40px, -25px) scale(1.08); }
    50%      { transform: translate(-25px, 35px) scale(0.95); }
    75%      { transform: translate(25px, 20px) scale(1.04); }
}

.collections-hero-inner {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    animation: fadeUp 1s ease 0.2s both;
}

.collections-hero .hero-eyebrow {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--gold-deep, #8C6E3F);
    margin-bottom: 28px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    font-weight: 500;
}

.collections-hero .hero-eyebrow::before,
.collections-hero .hero-eyebrow::after {
    content: '';
    width: 44px;
    height: 1px;
    background: var(--gold);
}

.collections-hero h1 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(56px, 9vw, 140px);
    line-height: 0.95;
    margin-bottom: 32px;
    color: var(--ink);
    letter-spacing: -0.02em;
}

.collections-hero h1 em {
    font-style: italic;
    color: var(--emerald);
    font-weight: 400;
}

.collections-hero .lead {
    font-size: 18px;
    line-height: 1.8;
    color: var(--ink-soft);
    max-width: 640px;
    margin: 0 auto 64px;
    font-weight: 300;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: 640px;
    margin: 0 auto;
    padding-top: 44px;
    border-top: 1px solid var(--line);
}

.stat-item .stat-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(40px, 5.5vw, 60px);
    font-weight: 300;
    color: var(--emerald);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-item .stat-label {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}


/* ================================================================
   2. SECTION HEADERS
   ================================================================ */
.section-head-centered {
    text-align: center;
    margin-bottom: 70px;
}

.section-head-centered .label {
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.45em;
    text-transform: uppercase;
    color: var(--gold-deep, #8C6E3F);
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
}

.section-head-centered .label::before,
.section-head-centered .label::after {
    content: '';
    width: 34px;
    height: 1px;
    background: var(--gold);
}

.section-head-centered h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(40px, 6vw, 84px);
    line-height: 1;
    color: var(--ink);
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}

.section-head-centered h2 em {
    font-style: italic;
    color: var(--emerald);
    font-weight: 400;
}

.section-head-centered .head-desc {
    font-size: 17px;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 300;
}


/* ================================================================
   3. FEATURED COLLECTIONS — HOUSE CARDS
   ================================================================ */
.featured-collections {
    padding: 120px 40px 100px;
    background: var(--ivory);
}

.houses-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
    max-width: 1440px;
    margin: 0 auto;
}

.house-card {
    position: relative;
    aspect-ratio: 0.62;
    min-height: 420px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.6s ease;
    text-decoration: none;
    border-radius: 2px;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.25);
}

.house-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.house-card-bg {
    position: absolute;
    inset: 0;
    transition: opacity 0.6s ease;
}

.house-emerald .house-card-bg    { background: linear-gradient(160deg, #1F8567 0%, #0E5340 50%, #042818 100%); }
.house-ruby .house-card-bg       { background: linear-gradient(160deg, #E84662 0%, #7A1024 50%, #3F0612 100%); }
.house-sapphire .house-card-bg   { background: linear-gradient(160deg, #3D6FB8 0%, #0F2E5A 50%, #06173A 100%); }
.house-aqua .house-card-bg       { background: linear-gradient(160deg, #9FD6E3 0%, #3C8FA7 50%, #1E5C6F 100%); }
.house-tourmaline .house-card-bg { background: linear-gradient(160deg, #E36BA3 0%, #9C3A6E 50%, #4D1638 100%); }

.house-card-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.3), transparent 55%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.house-card:hover .house-card-bg::before { opacity: 1; }

.house-card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 100%, rgba(0, 0, 0, 0.35), transparent 50%);
    pointer-events: none;
}

.house-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 28px 22px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff;
}

.house-num {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.1em;
}

.house-card-content::before { content: ''; flex: 1 1 auto; }

.house-gem {
    width: 100px;
    height: 130px;
    transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    filter: drop-shadow(0 25px 30px rgba(0, 0, 0, 0.35));
    flex-shrink: 0;
}

.house-card:hover .house-gem {
    transform: scale(1.12) rotate(-4deg);
}

.house-gem svg { width: 100%; height: 100%; }

.house-card-content::after { content: ''; flex: 1 1 auto; }

/* NEW: text wrapper for cleaner layout */
.house-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.house-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 30px;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: 0.01em;
    line-height: 1;
}

.house-card p {
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 20px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.house-arrow {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.house-card:hover .house-arrow {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
    transform: rotate(-45deg);
}

.house-arrow svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}


/* ================================================================
   4. CATALOG LAYOUT
   ================================================================ */
.catalog-section {
    padding: 100px 40px 140px;
    background: var(--cream);
    position: relative;
}


/* ================================================================
   5. ✨ NEW: ELEGANT SEARCH BAR
   ================================================================ */
.catalog-search-wrap {
    max-width: 700px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

.catalog-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px -10px rgba(0, 0, 0, 0.08);
}

.catalog-search:focus-within {
    border-color: var(--gold);
    box-shadow: 0 8px 30px -10px rgba(176, 140, 83, 0.25);
}

.search-icon {
    width: 18px;
    height: 18px;
    margin: 0 18px;
    color: var(--muted);
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.catalog-search:focus-within .search-icon {
    color: var(--gold-deep, #8C6E3F);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 18px 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    color: var(--ink);
    outline: none;
    font-style: italic;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.search-clear {
    background: none;
    border: none;
    padding: 0;
    margin-right: 14px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: var(--line);
    color: var(--ink);
}

.search-clear svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}


/* ================================================================
   6. CATALOG LAYOUT GRID
   ================================================================ */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 60px;
    max-width: 1500px;
    margin: 0 auto;
    align-items: start;
}


/* ================================================================
   7. FILTER SIDEBAR
   ================================================================ */
.filter-sidebar {
    position: sticky;
    top: 100px;
    background: transparent;
}

.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--ink);
}

.filter-sidebar-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 26px;
    letter-spacing: 0.02em;
}

.filter-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.clear-filters {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color 0.3s ease;
    font-weight: 500;
}

.clear-filters:hover { color: var(--emerald); }

/* Mobile close button — hidden on desktop */
.filter-mobile-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: background 0.2s ease;
}

.filter-mobile-close:hover { background: var(--line); }

.filter-mobile-close svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

/* Mobile-only "View Results" button at bottom of drawer */
.filter-mobile-footer {
    display: none;
}

.filter-apply-btn {
    width: 100%;
    background: var(--ink) !important;
    color: var(--cream) !important;
    padding: 16px !important;
    font-size: 12px !important;
    letter-spacing: 0.25em !important;
}

/* Filter group */
.filter-group {
    border-bottom: 1px solid var(--line);
}

.filter-group-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 20px 0;
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group-toggle svg {
    width: 14px;
    height: 14px;
    stroke: var(--ink);
    stroke-width: 1.5;
    fill: none;
    transition: transform 0.3s ease;
}

.filter-group-toggle.active svg { transform: rotate(180deg); }

.filter-group-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding-left: 2px;
}

.filter-group-toggle.active + .filter-group-body {
    max-height: 500px;
    padding-bottom: 22px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--ink-soft);
    transition: color 0.2s ease;
    user-select: none;
}

.filter-option:hover { color: var(--ink); }

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkmark,
.radiomark {
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--line);
    background: var(--cream);
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 1px;
}

.radiomark { border-radius: 50%; }

.filter-option input:checked + .checkmark,
.filter-option input:checked + .radiomark {
    background: var(--ink);
    border-color: var(--ink);
}

.filter-option input:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.filter-option input:checked + .radiomark::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: #fff;
    border-radius: 50%;
}

.filter-option .dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dot-emerald    { background: radial-gradient(circle at 30% 30%, #3FAA86, #0E5340 60%, #042818); }
.dot-ruby       { background: radial-gradient(circle at 30% 30%, #D33952, #7A1024 60%, #3F0612); }
.dot-sapphire   { background: radial-gradient(circle at 30% 30%, #3D6FB8, #0F2E5A 60%, #06173A); }
.dot-aqua       { background: radial-gradient(circle at 30% 30%, #9FD6E3, #3C8FA7 60%, #1E5C6F); }
.dot-tourmaline { background: radial-gradient(circle at 30% 30%, #E36BA3, #9C3A6E 60%, #4D1638); }

.filter-option .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}


/* ================================================================
   8. PRICE RANGE SLIDER (FIXED THUMB ACROSS BROWSERS)
   ================================================================ */
.price-slider-body { padding: 14px 4px 22px !important; }

.price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 22px;
    color: var(--ink);
    letter-spacing: 0.01em;
}

.price-current-min,
.price-current-max {
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.price-slider-wrap {
    position: relative;
    height: 34px;
    margin: 0 10px 10px;
}

.price-slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--line);
    border-radius: 999px;
    transform: translateY(-50%);
    pointer-events: none;
}

.price-slider-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--gold) 0%, #C5A263 100%);
    border-radius: 999px;
    left: 0%;
    right: 0%;
    transition: left 0.15s ease, right 0.15s ease;
}

/* The two range inputs sit on top of each other on the track */
.price-range-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    outline: none;
    margin: 0;
    padding: 0;
    border: none;
}

/* WebKit thumb (Chrome, Safari, Edge) */
.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 2.5px solid var(--gold);
    border-radius: 50%;
    cursor: grab;
    box-shadow:
        0 4px 14px rgba(176, 140, 83, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    z-index: 2;
    /* Reset any default OS thumb appearance */
    margin-top: 0;
}

.price-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.18);
    border-color: var(--gold-deep, #8C6E3F);
    box-shadow:
        0 8px 20px rgba(176, 140, 83, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

.price-range-input::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.12);
}

.price-range-input::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
    height: 100%;
    -webkit-appearance: none;
}

/* Firefox thumb */
.price-range-input::-moz-range-thumb {
    pointer-events: auto;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 2.5px solid var(--gold);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 4px 14px rgba(176, 140, 83, 0.4);
    transition: transform 0.15s ease, border-color 0.15s ease;
    -moz-appearance: none;
}

.price-range-input::-moz-range-thumb:hover {
    transform: scale(1.18);
    border-color: var(--gold-deep, #8C6E3F);
}

.price-range-input::-moz-range-thumb:active { cursor: grabbing; }

.price-range-input::-moz-range-track {
    background: transparent;
    border: none;
    height: 100%;
}

/* Hide focus outlines that some browsers add */
.price-range-input::-moz-focus-outer { border: 0; }

.price-bounds {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}


/* ================================================================
   9. TOOLBAR & ACTIVE CHIPS
   ================================================================ */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 26px;
    margin-bottom: 36px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.active-chips {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-height: 38px;
}

.result-count {
    font-family: 'Jost', sans-serif;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    padding-right: 14px;
    border-right: 1px solid var(--line);
    margin-right: 4px;
    font-weight: 500;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--ink);
    color: var(--cream);
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: capitalize;
    border-radius: 999px;
    animation: chipIn 0.3s ease;
    font-weight: 500;
}

@keyframes chipIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chip button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.chip button:hover { color: #fff; }

.chip svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-mobile-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--ink);
    padding: 11px 18px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    cursor: pointer;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-weight: 500;
}

.filter-mobile-toggle svg { width: 16px; height: 16px; }

.sort-control {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

.sort-control select {
    background: transparent;
    border: 1px solid var(--line);
    padding: 11px 38px 11px 18px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1612' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    font-weight: 500;
    transition: border-color 0.2s ease;
}

.sort-control select:focus {
    outline: none;
    border-color: var(--ink);
}


.catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}


/* ================================================================
   10. EMPTY STATE
   ================================================================ */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--muted);
}

.empty-state svg {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    color: var(--line);
    stroke: currentColor;
}

.empty-state p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 28px;
    color: var(--ink);
    margin-bottom: 10px;
}

.empty-state span {
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    letter-spacing: 0.12em;
    color: var(--muted);
    display: block;
    margin-bottom: 28px;
}


/* ================================================================
   11. RESPONSIVE — Carefully tuned
   ================================================================ */

/* Large tablet */
@media (max-width: 1100px) {
    .houses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet → Mobile breakpoint */
@media (max-width: 1000px) {
    .collections-hero {
        padding: 70px 20px 60px;
    }
    .featured-collections {
        padding: 80px 20px;
    }
    .catalog-section {
        padding: 70px 20px 100px;
    }

    /* Smaller orbs to prevent overflow */
    .orb-emerald    { width: 220px; height: 220px; }
    .orb-ruby       { width: 180px; height: 180px; }
    .orb-sapphire   { width: 200px; height: 200px; }
    .orb-aqua       { width: 160px; height: 160px; }
    .orb-tourmaline { width: 150px; height: 150px; }

    /* Sidebar becomes slide-in drawer */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 340px;
        max-width: 88%;
        height: 100vh;
        background: var(--cream);
        padding: 24px 24px 100px;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
        overflow-y: auto;
        box-shadow: 20px 0 60px -30px rgba(0, 0, 0, 0.3);
    }

    .filter-sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Show close button on mobile */
    .filter-mobile-close {
        display: flex;
    }

    /* Show the apply button at bottom of drawer */
    .filter-mobile-footer {
        display: block;
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 16px 0 0;
        margin-top: 30px;
        background: var(--cream);
        border-top: 1px solid var(--line);
    }

    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .filter-mobile-toggle {
        display: inline-flex;
    }
}

/* Tablet portrait & large mobile */
@media (max-width: 720px) {
    .collections-hero {
        padding: 60px 16px 50px;
    }
    .featured-collections {
        padding: 70px 16px 60px;
    }

    /* House cards: 2 columns, 5th card spans full width with horizontal layout */
    .houses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .house-card {
        aspect-ratio: 0.78;
        min-height: 340px;
    }

    .house-card .house-gem {
        width: 80px;
        height: 105px;
    }

    .house-card h3 { font-size: 24px; }
    .house-card p { font-size: 9px; letter-spacing: 0.28em; margin-bottom: 16px; }

    .house-card-content {
        padding: 22px 18px 24px;
    }

    /* 5th card spans both columns — horizontal layout for clean fit */
    .house-card:nth-child(5) {
        grid-column: 1 / -1;
        aspect-ratio: auto;
        min-height: 180px;
    }

    .house-card:nth-child(5) .house-card-content {
        flex-direction: row;
        align-items: center;
        padding: 24px 28px;
        gap: 24px;
        text-align: left;
    }

    .house-card:nth-child(5) .house-card-content::before,
    .house-card:nth-child(5) .house-card-content::after {
        display: none;
    }

    .house-card:nth-child(5) .house-num {
        position: absolute;
        top: 14px;
        right: 22px;
    }

    .house-card:nth-child(5) .house-gem {
        width: 80px;
        height: 100px;
        flex-shrink: 0;
    }

    .house-card:nth-child(5) .house-text {
        align-items: flex-start;
        flex: 1;
    }

    .house-card:nth-child(5) p { margin-bottom: 0; }
    .house-card:nth-child(5) .house-arrow {
        margin-left: auto;
    }

    /* Hero stats — tighten gaps */
    .hero-stats {
        gap: 20px;
    }

    /* Smaller section gap */
    .section-head-centered {
        margin-bottom: 50px;
    }

    /* Search bar slightly smaller */
    .catalog-search-wrap {
        margin-bottom: 40px;
        padding: 0 4px;
    }

    .search-input {
        font-size: 15px;
        padding: 16px 0;
    }

    .search-icon { margin: 0 14px; }

    /* Toolbar wraps better */
    .catalog-toolbar {
        gap: 16px;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* Phone */
@media (max-width: 560px) {
    .houses-grid {
        gap: 12px;
    }

    .house-card {
        aspect-ratio: 0.82;
        min-height: 280px;
    }

    .house-card .house-gem {
        width: 70px;
        height: 90px;
    }

    .house-card h3 { font-size: 22px; }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .stat-item .stat-num {
        font-size: 30px;
    }

    .stat-item .stat-label {
        font-size: 9px;
        letter-spacing: 0.2em;
    }

    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .filter-sidebar {
        width: 100%;
        max-width: 100%;
    }
}

/* ================================================================
   MOBILE DRAWER FIX
   ================================================================ */
@media (max-width: 1000px) {

    /* 1. FIX: Drawer must appear ABOVE the dark overlay
       (was getting grayed out and made unclickable) */
    .filter-sidebar {
        z-index: 1100 !important;
        padding-bottom: 100px !important;
    }

    /* 2. FIX: Overlay sits behind the drawer */
    .overlay {
        z-index: 1050;
    }

    /* 3. FIX: "View Results" footer — properly pinned + full width
       + opaque background so it doesn't overlap the price slider */
    .filter-mobile-footer {
        display: block;
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        margin-left: -24px;
        margin-right: -24px;
        margin-top: 24px;
        padding: 18px 24px 22px;
        background: var(--cream);
        border-top: 1px solid var(--line);
        box-shadow: 0 -16px 24px -8px rgba(0, 0, 0, 0.08);
        z-index: 5;
    }

    /* 4. FIX: Apply button looks proper at full width */
    .filter-apply-btn {
        display: block;
        width: 100%;
        background: var(--ink) !important;
        color: var(--cream) !important;
        padding: 16px !important;
        font-size: 12px !important;
        letter-spacing: 0.25em !important;
        text-align: center;
        border: none;
        cursor: pointer;
    }
}

/* ================================================================
   MOBILE-ONLY OVERRIDES (added after main rules)
   ================================================================ */

/* 1. REMOVE filter feature entirely on mobile
   (mobile users navigate via search + gem cards above) */
@media (max-width: 1000px) {

    /* Hide the filter sidebar, button, and all related UI */
    .filter-sidebar,
    .filter-mobile-toggle,
    .filter-mobile-close,
    .filter-mobile-footer {
        display: none !important;
    }

    /* Products grid takes the FULL width */
    .catalog-layout {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    /* Toolbar shows just count + sort (no filter button) */
    .toolbar-right {
        justify-content: flex-end;
    }
}


/* 2. FIX equal left/right spacing for the 5 house cards on mobile */
@media (max-width: 720px) {

    /* Reset container — symmetric padding only on the section */
    .featured-collections {
        padding: 70px 16px 60px !important;
    }

    .featured-collections .container {
        padding-left: 16px;
        padding-right: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .houses-grid {
        width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    /* Same fix for the catalog (search + products) */
    .catalog-section {
        padding: 60px 0 100px !important;
    }

    .catalog-section .container {
        padding-left: 16px;
        padding-right: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Search bar respects the section padding now */
    .catalog-search-wrap {
        padding: 0;
        margin-bottom: 36px;
    }

    /* Ensure cards/grid items can't overflow */
    .houses-grid > *,
    .catalog-grid > * {
        min-width: 0;
    }
}


/* 3. Tighter spacing on very small screens */
@media (max-width: 480px) {
    .featured-collections .container,
    .catalog-section .container,
    .collections-hero {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}