/* ==========================================================================
   Lumina — Design System
   Premium light theme · warm neutrals · single evergreen accent
   Loaded after Bootstrap 5 (local) — Bootstrap provides grid & utilities,
   this file provides the visual identity.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted)
   -------------------------------------------------------------------------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-latin-500-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-latin-700-normal.woff2') format('woff2');
}
/* Manrope (headings) — official Google Fonts variable file, self-hosted.
   One 24 KB file covers every weight from 200–800. */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/manrope-latin-variable.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Design tokens
   -------------------------------------------------------------------------- */
:root {
    /* Color */
    --color-background: #FAF9F7;
    --color-surface: #FFFFFF;
    --color-surface-sunken: #F3F1ED;
    --color-text-primary: #1D1C1A;
    --color-text-secondary: #6D6963;
    --color-text-tertiary: #767169;
    --color-border: #E9E6E1;
    --color-border-strong: #D9D5CE;
    --color-primary: #0B5E4A;
    --color-primary-hover: #094D3D;
    --color-primary-soft: #EDF4F1;
    --color-primary-soft-border: #D4E4DD;
    --color-on-primary: #FFFFFF;
    --color-sale: #AE4526;
    --color-sale-soft: #F9EFEA;
    --color-star: #C8912A;
    --color-focus-ring: rgba(11, 94, 74, 0.22);

    /* ------------------------------------------------------------------
       Typography system — one global scale, two families:
       Manrope  = headings (600 / 700 / 800)
       Inter    = body, UI, forms, tables (400 / 500 / 600)

       Scale map:
         Display XL     --text-display   (hero, fluid)
         Display Large  --text-4xl
         Heading 1      --text-3xl       Heading 2   --text-2xl
         Heading 3      --text-xl        Heading 4   --text-lg
         Heading 5/6    --text-base
         Body Large     --text-lg        Body        --text-base
         Body Small     --text-sm        Caption/Label/Badge  --text-xs
       ------------------------------------------------------------------ */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-sans: var(--font-body);
    --font-heading: 'Manrope', var(--font-body);
    --font-display: var(--font-heading); /* legacy alias — same premium stack */

    --text-xs: 0.78125rem;   /* 12.5px — caption, label, badge */
    --text-sm: 0.875rem;     /* 14px   — body small, helper text */
    --text-base: 1rem;       /* 16px   — body */
    --text-lg: 1.125rem;     /* 18px   — body large / h4 */
    --text-xl: 1.375rem;     /* 22px   — h3 */
    --text-2xl: 1.75rem;     /* 28px   — h2 */
    --text-3xl: 2.25rem;     /* 36px   — h1 */
    --text-4xl: clamp(2.25rem, 1.9rem + 1.8vw, 3rem); /* display large, mobile-safe */
    --text-display: clamp(2.5rem, 1.9rem + 3.8vw, 4.75rem); /* display XL, fluid */

    /* Rhythm & tracking */
    --leading-tight: 1.15;
    --leading-snug: 1.3;
    --leading-body: 1.65;
    --tracking-heading: -0.022em;
    --tracking-display: -0.032em;
    --tracking-caps: 0.08em;

    /* Spacing & shape */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-7: 3rem;
    --space-8: 4rem;
    --space-section: clamp(4rem, 3rem + 4vw, 6.5rem);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-pill: 999px;

    /* Elevation — deliberately soft */
    --shadow-xs: 0 1px 2px rgba(29, 28, 26, 0.05);
    --shadow-sm: 0 2px 8px rgba(29, 28, 26, 0.05);
    --shadow-md: 0 10px 30px -10px rgba(29, 28, 26, 0.12);
    --shadow-lg: 0 24px 60px -20px rgba(29, 28, 26, 0.18);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --duration-fast: 160ms;
    --duration-base: 240ms;

    /* Layout */
    --header-height: 4.5rem;
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-body);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    font-weight: 700;
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-heading);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-primary-hover); }

::selection {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

.container-xl { max-width: 1240px; }

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 2000;
    padding: 0.6rem 1rem;
    background: var(--color-text-primary);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --------------------------------------------------------------------------
   4. Typography helpers
   -------------------------------------------------------------------------- */
.font-display { font-family: var(--font-heading); font-weight: 700; letter-spacing: var(--tracking-heading); }

.text-display {
    font-family: var(--font-heading);
    font-size: var(--text-display);
    font-weight: 800;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-display);
}

.text-secondary-soft { color: var(--color-text-secondary) !important; }
.text-tertiary-soft { color: var(--color-text-tertiary) !important; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.lead-soft {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
    --bs-btn-border-radius: var(--radius-pill);
    font-weight: 500;
    letter-spacing: 0.005em;
    transition: background-color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.btn:focus-visible {
    box-shadow: none;
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn-ink {
    background-color: var(--color-text-primary);
    border: 1px solid var(--color-text-primary);
    color: #FFFFFF;
    padding: 0.7rem 1.5rem;
}
.btn-ink:hover, .btn-ink:focus-visible {
    background-color: #000000;
    border-color: #000000;
    color: #FFFFFF;
    transform: translateY(-1px);
}
.btn-ink:active { transform: translateY(0); background-color: #000; color: #fff; }

.btn-accent {
    background-color: var(--color-primary);
    border: 1px solid var(--color-primary);
    color: var(--color-on-primary);
    padding: 0.7rem 1.5rem;
}
.btn-accent:hover, .btn-accent:focus-visible {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-on-primary);
    transform: translateY(-1px);
}
.btn-accent:active { transform: translateY(0); background: var(--color-primary-hover); color: #fff; }

.btn-quiet {
    background-color: transparent;
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-primary);
    padding: 0.7rem 1.5rem;
}
.btn-quiet:hover, .btn-quiet:focus-visible {
    border-color: var(--color-text-primary);
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.btn-soft {
    background-color: var(--color-primary-soft);
    border: 1px solid transparent;
    color: var(--color-primary);
    padding: 0.7rem 1.5rem;
}
.btn-soft:hover, .btn-soft:focus-visible {
    background-color: #E2EDE8;
    color: var(--color-primary-hover);
}

.btn-lg { padding: 0.9rem 2rem; font-size: var(--text-base); }
.btn-sm { padding: 0.45rem 1.1rem; font-size: var(--text-sm); }

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: rgba(250, 249, 247, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--duration-base) var(--ease-out),
                background-color var(--duration-base) var(--ease-out);
}
.site-header.is-scrolled {
    border-bottom-color: var(--color-border);
    background: rgba(250, 249, 247, 0.94);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}
.brand-mark:hover { color: var(--color-text-primary); }
.brand-mark .brand-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.7rem;
    background: var(--color-primary);
    color: #fff;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-links .nav-item-link {
    display: inline-block;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-pill);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out);
}
.nav-links .nav-item-link:hover { color: var(--color-text-primary); background: var(--color-surface-sunken); }
.nav-links .nav-item-link.is-active { color: var(--color-text-primary); background: var(--color-surface-sunken); }

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-primary);
    transition: border-color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out);
}
.header-icon-btn:hover { border-color: var(--color-border-strong); background: var(--color-surface-sunken); color: var(--color-text-primary); }

/* Mobile nav (offcanvas) */
.offcanvas.mobile-nav {
    background: var(--color-background);
    max-width: 20rem;
}
.mobile-nav .offcanvas-header {
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.mobile-nav .nav-item-link {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--text-lg);
    font-weight: 500;
}
.mobile-nav .nav-item-link:hover,
.mobile-nav .nav-item-link.is-active { background: var(--color-surface-sunken); }

/* --------------------------------------------------------------------------
   7. Search box
   -------------------------------------------------------------------------- */
.search-shell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.4rem 0.4rem 1.25rem;
    transition: border-color var(--duration-fast) var(--ease-out);
}
.search-shell:focus-within {
    border-color: var(--color-primary);
}
.search-shell .search-icon { color: var(--color-text-tertiary); flex-shrink: 0; }
.search-shell input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: var(--text-base);
    color: var(--color-text-primary);
    padding: 0.55rem 0.25rem;
}
.search-shell input[type="search"]::placeholder { color: var(--color-text-tertiary); }
.search-shell input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-shell .btn { flex-shrink: 0; }

.search-shell--hero {
    padding: 0.55rem 0.55rem 0.55rem 1.5rem;
}
.search-shell--hero input[type="search"] {
    font-size: var(--text-lg);
    padding: 0.8rem 0.25rem;
}

/* Suggestion chips */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 1.05rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: border-color var(--duration-fast) var(--ease-out),
                color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.chip:hover {
    border-color: var(--color-primary-soft-border);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   8. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    padding: var(--space-section) 0 calc(var(--space-section) * 0.8);
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto;
    height: 130%;
    background:
        radial-gradient(42rem 26rem at 18% 8%, rgba(11, 94, 74, 0.07), transparent 60%),
        radial-gradient(38rem 24rem at 85% 20%, rgba(200, 145, 42, 0.06), transparent 60%);
    pointer-events: none;
}
.hero > * { position: relative; }

/* --------------------------------------------------------------------------
   8b. Brand strip — live brands drifting left under the hero search
   -------------------------------------------------------------------------- */
.brand-strip {
    padding: 0.85rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
    overflow: hidden;
    /* Fade the edges so items appear/disappear softly. */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.brand-strip-track {
    display: flex;
    width: max-content;
    animation: brandMarquee 36s linear infinite;
}
.brand-strip:hover .brand-strip-track { animation-play-state: paused; }
.brand-strip-group {
    display: flex;
    align-items: center;
    gap: 2.75rem;
    padding-right: 2.75rem;
}
.brand-strip-item {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    white-space: nowrap;
    color: var(--color-text-tertiary);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.brand-strip-item:hover { color: var(--color-text-primary); }
.brand-strip-item img {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: var(--radius-pill);
    object-fit: cover;
    border: 1px solid var(--color-border);
}
.brand-strip-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: var(--radius-pill);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}
@keyframes brandMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .brand-strip-track { animation: none; }
}
@media (max-width: 575.98px) {
    .brand-strip { padding: 0.65rem 0; }
    .brand-strip-track { animation-duration: 26s; }
    .brand-strip-group { gap: 1.9rem; padding-right: 1.9rem; }
    .brand-strip-item { font-size: var(--text-xs); }
}

/* --------------------------------------------------------------------------
   9. Sections
   -------------------------------------------------------------------------- */
.section { padding: calc(var(--space-section) * 0.72) 0; }
.section--tight { padding: calc(var(--space-section) * 0.5) 0; }

.section-heading { margin-bottom: var(--space-6); }
.section-heading h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-2xl);
    letter-spacing: -0.015em;
    margin-bottom: 0.35rem;
}
.section-heading .section-sub {
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    margin-bottom: 0;
}
.section-link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.section-link svg { transition: transform var(--duration-fast) var(--ease-out); }
.section-link:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   10. Product card
   -------------------------------------------------------------------------- */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out),
                border-color var(--duration-base) var(--ease-out);
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}

.product-card .card-media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}
.product-card .card-media .product-visual {
    transition: transform 600ms var(--ease-out);
}
.product-card:hover .card-media .product-visual { transform: scale(1.045); }

.product-card .card-body-area {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.1rem 1.2rem;
    flex-grow: 1;
}
.product-card .card-brand {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
}
.product-card .card-category {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    white-space: nowrap;
    flex-shrink: 0;
}
.product-card .card-title-link {
    font-family: var(--font-heading);
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: var(--text-base);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card .card-title-link:hover { color: var(--color-primary); }
/* Stretch the title link over the whole card */
.product-card .card-title-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.product-card .card-price-row {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Favorite button sits above the stretched link */
.fav-btn {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--color-text-secondary);
    transition: color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-out);
}
.fav-btn:hover { color: var(--color-sale); border-color: var(--color-border-strong); transform: scale(1.06); }
.fav-btn.is-active { color: var(--color-sale); }
.fav-btn.is-active svg { fill: currentColor; }

/* Inline variant used beside the product-detail CTA */
.fav-btn--inline {
    position: static;
    width: auto;
    height: auto;
    padding: 0.9rem 1.4rem;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--color-surface);
    border-color: var(--color-border-strong);
}
.fav-btn--inline:hover { transform: none; }

/* Price */
.price-current { font-weight: 600; font-size: 1.05rem; color: var(--color-text-primary); }
.price-current.is-sale { color: var(--color-sale); }
.price-original {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    text-decoration: line-through;
}

/* Badges */
.badge-soft {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.badge-soft--sale { background: var(--color-sale-soft); color: var(--color-sale); }
.badge-soft--accent { background: var(--color-primary-soft); color: var(--color-primary); }
.badge-soft--neutral { background: var(--color-surface-sunken); color: var(--color-text-secondary); }

.card-media .badge-soft {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    z-index: 2;
    box-shadow: var(--shadow-xs);
}

/* Product visual placeholder (acts as product photography) */
.product-visual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.product-visual svg.product-glyph {
    width: 34%;
    height: auto;
    opacity: 0.85;
}
.product-visual::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 12%;
    width: 46%;
    height: 7%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(29, 28, 26, 0.10), transparent 68%);
}

/* --------------------------------------------------------------------------
   11. Category & brand cards
   -------------------------------------------------------------------------- */
.category-tile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    /* Fill the column so tiles in the same row always match height,
       even when one label wraps and its neighbor doesn't. */
    height: 100%;
    padding: 1.1rem 1.25rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
    font-weight: 500;
    transition: border-color var(--duration-fast) var(--ease-out),
                transform var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out);
}
.category-tile:hover {
    color: var(--color-text-primary);
    border-color: var(--color-border-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.category-tile .tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-primary);
    flex-shrink: 0;
}
.category-tile .tile-count {
    display: block;
    font-size: var(--text-xs);
    font-weight: 400;
    color: var(--color-text-tertiary);
}

.brand-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: transform var(--duration-base) var(--ease-out),
                box-shadow var(--duration-base) var(--ease-out),
                border-color var(--duration-base) var(--ease-out);
}
.brand-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-md);
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
/* Real logo (branding images come in by URL) */
.brand-logo--img {
    background: var(--color-surface-sunken);
    border: 1px solid var(--color-border);
    overflow: hidden;
}
.brand-logo--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.brand-tagline {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}
/* Two lines for everyone — cards in a row stay the same height no
   matter how chatty a brand's description is. */
.brand-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1.1rem;
    min-height: calc(var(--text-sm) * 1.6 * 2);
}
.brand-card-foot {
    border-top: 1px solid var(--color-border);
    padding-top: 0.9rem;
}
.brand-card-foot .section-link { font-size: var(--text-xs); }
.brand-logo--lg {
    width: 5rem;
    height: 5rem;
    border-radius: var(--radius-lg);
    font-size: 2rem;
}
.brand-card .brand-name-link {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: var(--text-lg);
}
.brand-card .brand-name-link::after {
    content: "";
    position: absolute;
    inset: 0;
}
.brand-card .brand-name-link:hover { color: var(--color-primary); }

/* --------------------------------------------------------------------------
   12. Search results page
   -------------------------------------------------------------------------- */
.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}
.sort-select {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236D6963' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center;
    padding: 0.55rem 2.5rem 0.55rem 1.15rem;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out);
}
.sort-select:hover { border-color: var(--color-text-primary); }
.sort-select:focus-visible {
    border-color: var(--color-primary);
    box-shadow: none;
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.query-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary-soft);
    border: 1px solid var(--color-primary-soft-border);
    color: var(--color-primary);
    font-weight: 500;
    font-size: var(--text-sm);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   13. Product detail
   -------------------------------------------------------------------------- */
/* The summary under the price is a TEASER: the same words in full sit
   in the Description tab below. Clamped only on phones, a desktop
   reader met the whole of "FIT : Straight The Iconic Fit…" twice on
   one screen. Three lines at every width. */
.pd-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pd-gallery-main {
    position: relative;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

/* Gallery carousel: arrows over the main image + "2 / 6" counter */
.pd-gal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: var(--color-text-primary);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: border-color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out);
}
.pd-gal-nav:hover { border-color: var(--color-border-strong); background: #fff; }
.pd-gal-nav--prev { left: 0.75rem; }
.pd-gal-nav--next { right: 0.75rem; }
.pd-gal-nav[hidden] { display: none; }

.pd-gal-count {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    z-index: 2;
    padding: 0.18rem 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(29, 28, 26, 0.62);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
}
.pd-gal-count[hidden] { display: none; }

@media (max-width: 575.98px) {
    .pd-gal-nav { width: 2.35rem; height: 2.35rem; }
    .pd-gal-nav--prev { left: 0.5rem; }
    .pd-gal-nav--next { right: 0.5rem; }
}
.pd-thumb {
    aspect-ratio: 1;
    width: 4.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out);
}
.pd-thumb.is-active { border-color: var(--color-text-primary); }
.pd-thumb:hover { border-color: var(--color-border-strong); }
.pd-thumb.is-active:hover { border-color: var(--color-text-primary); }

.option-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.9rem;
    height: 2.9rem;
    padding: 0 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out);
}
.option-swatch:hover { border-color: var(--color-text-primary); }
.option-swatch.is-selected {
    border-color: var(--color-text-primary);
    background: var(--color-text-primary);
    color: #fff;
}
.color-dot {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: var(--radius-pill);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--color-border-strong);
    cursor: pointer;
    transition: box-shadow var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.color-dot:hover { transform: scale(1.08); }
.color-dot.is-selected { box-shadow: 0 0 0 2px var(--color-text-primary); }

/* Colorway swatches on the product page: bigger, image-capable, honest
   about sold-out colors. */
.color-dot--swatch {
    width: 2.6rem;
    height: 2.6rem;
    background-size: cover;
    background-position: top center;
}
.color-dot.is-oos { opacity: 0.45; }
.color-dot.is-oos::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, transparent calc(50% - 1px), var(--color-text-primary) 50%, transparent calc(50% + 1px));
    border-radius: inherit;
}

/* Option values that can't combine with the current selection. */
.option-swatch.is-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
    background: var(--color-surface);
    color: var(--color-text-primary);
    border-color: var(--color-border);
}
.option-swatch.is-oos:not(.is-selected) { border-style: dashed; }

/* Color swatches on product cards */
.card-swatches {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.55rem;
}
.card-swatch {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: var(--radius-pill);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--color-border-strong);
    padding: 0;
    cursor: pointer;
    background-size: cover;
    background-position: top center;
    transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.card-swatch:hover { transform: scale(1.15); }
.card-swatch.is-selected { box-shadow: 0 0 0 2px var(--color-text-primary); }
.card-swatch-more {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    font-weight: 600;
    margin-left: 0.1rem;
}

.spec-table { width: 100%; font-size: var(--text-sm); }
.spec-table th {
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: 0.8rem 1rem 0.8rem 0;
    white-space: nowrap;
    vertical-align: top;
    width: 34%;
}
.spec-table td { padding: 0.8rem 0; color: var(--color-text-primary); }
.spec-table tr + tr { border-top: 1px solid var(--color-border); }

.rating-stars { color: var(--color-star); display: inline-flex; gap: 0.1rem; }

/* Product title scales with the screen — 36px on desktop would eat
   three lines of a phone. */
.pd-title { font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.25rem); }

/* Sticky product summary on desktop */
@media (min-width: 992px) {
    .pd-sticky { position: sticky; top: calc(var(--header-height) + 1.5rem); }
}

/* Tabs (detail page) */
.nav-tabs-clean {
    border-bottom: 1px solid var(--color-border);
    gap: 0.5rem;
}
.nav-tabs-clean .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: var(--text-sm);
    padding: 0.85rem 0.25rem;
    margin: 0 0.85rem -1px 0;
    background: transparent;
}
.nav-tabs-clean .nav-link:hover { color: var(--color-text-primary); }
.nav-tabs-clean .nav-link.active {
    color: var(--color-text-primary);
    border-bottom-color: var(--color-text-primary);
    background: transparent;
}

/* --------------------------------------------------------------------------
   14. Brand pages
   -------------------------------------------------------------------------- */
.brand-hero {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.75rem, 1.5rem + 2vw, 3rem);
}
.stat-block .stat-value {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.1;
}
.stat-block .stat-label {
    font-size: var(--text-xs);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   15. Empty states & 404
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    max-width: 34rem;
    margin: 0 auto;
}
.empty-state .empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-surface-sunken);
    color: var(--color-text-tertiary);
    margin-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-8) 0 var(--space-6);
    margin-top: var(--space-section);
}
.site-footer .footer-heading {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: 1rem;
}
.site-footer .footer-link {
    display: inline-block;
    padding: 0.28rem 0;
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}
.site-footer .footer-link:hover { color: var(--color-text-primary); }

/* --------------------------------------------------------------------------
   17. How it works / About
   -------------------------------------------------------------------------- */
.step-card {
    height: 100%;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
}
.step-number {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.query-demo {
    background: var(--color-text-primary);
    color: #E8E6E1;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    font-size: var(--text-sm);
    line-height: 1.8;
    white-space: pre;
    overflow-x: auto;
}
@media (max-width: 575.98px) {
    .query-demo { font-size: var(--text-xs); padding: 1.1rem; }
}
.query-demo .qd-key { color: #9BC4B5; }
.query-demo .qd-val { color: #E6C286; }

/* --------------------------------------------------------------------------
   18. Utilities & animation
   -------------------------------------------------------------------------- */
.divider-soft { border-top: 1px solid var(--color-border); }

.surface-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
}

/* Reveal-on-scroll only ever hides content when JS is confirmed present */
.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
}

/* Breadcrumb */
.breadcrumb-clean {
    --bs-breadcrumb-divider: '·';
    font-size: var(--text-sm);
    margin-bottom: 0;
}
.breadcrumb-clean .breadcrumb-item a { color: var(--color-text-secondary); }
.breadcrumb-clean .breadcrumb-item a:hover { color: var(--color-text-primary); }
.breadcrumb-clean .breadcrumb-item.active { color: var(--color-text-tertiary); }

/* Make tap targets comfortable on touch devices (min 44px) */
@media (pointer: coarse) {
    .nav-links .nav-item-link { padding: 0.65rem 1rem; }
    .fav-btn { width: 2.75rem; height: 2.75rem; }
    .sort-select { padding-top: 0.7rem; padding-bottom: 0.7rem; }
    .chip { padding-top: 0.62rem; padding-bottom: 0.62rem; }
    .pd-thumb { width: 5rem; }
}

/* Mobile refinements */
@media (max-width: 575.98px) {
    /* Every page breathes less on a phone — sections, hero and the
       footer gap all key off this one token. */
    :root { --space-section: 2.75rem; }

    .hero { padding-top: 2.25rem; }

    .search-shell--hero { padding: 0.4rem 0.4rem 0.4rem 1.05rem; }
    .search-shell--hero input[type="search"] { font-size: var(--text-base); padding: 0.6rem 0.25rem; }
    .search-shell .btn-search-label { display: none; }
    .search-shell .btn { padding-left: 0.95rem; padding-right: 0.95rem; }
    .search-shell--hero .btn-lg { padding-top: 0.7rem; padding-bottom: 0.7rem; }
    /* Section titles: phone-sized type, one-line subtitle, compact
       "View all" — so the title never wraps against the link. */
    .section-heading { margin-bottom: var(--space-4); }
    .section-heading h2 { font-size: 1.25rem; margin-bottom: 0.1rem; }
    .section-heading .section-sub {
        font-size: var(--text-sm);
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .section-heading .section-link { font-size: var(--text-xs); }

    /* Category tiles: compact two-up cards — smaller icon, tighter
       padding, phone-sized label, no ragged row heights. */
    .category-tile {
        gap: 0.6rem;
        padding: 0.85rem 0.9rem;
        font-size: var(--text-sm);
        line-height: 1.35;
    }
    .category-tile .tile-icon { width: 2.35rem; height: 2.35rem; }
    .category-tile .tile-icon svg, .category-tile .tile-icon .product-glyph { width: 1.25rem !important; }
    .category-tile .tile-count { margin-top: 0.1rem; }

    /* Brand cards: tighter frame + smaller logo tile on phones. */
    .brand-card { padding: 1.1rem 1.15rem; }
    .brand-logo { width: 2.9rem; height: 2.9rem; font-size: 1.15rem; }

    /* Product page: detail tabs become one swipeable line, and a long
       product name can't blow up the breadcrumb. (.pd-desc clamps at
       every width — see the rule beside the gallery.) */
    .nav-tabs-clean {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-tabs-clean::-webkit-scrollbar { display: none; }
    .nav-tabs-clean .nav-link { white-space: nowrap; }
    .breadcrumb-clean .breadcrumb-item.active {
        display: inline-block;
        max-width: 11rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        vertical-align: bottom;
    }

    /* Footer: phone-scale spacing, three link columns side by side,
       links sized to fit a third of the screen. */
    .site-footer { padding: 2.5rem 0 1.4rem; }
    .site-footer .footer-heading { margin-bottom: 0.55rem; }
    .site-footer .footer-link {
        font-size: var(--text-xs);
        padding: 0.26rem 0;
        line-height: 1.4;
    }

    /* Trending chips: one compact swipeable line on phones — chip
       text comes from live search terms, so stacked wrapping would
       always end up ragged. */
    .chip {
        padding: 0.4rem 0.75rem;
        font-size: var(--text-xs);
        gap: 0.35rem;
    }
    .trend-chips {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
        padding-bottom: 0.25rem;
    }
    .trend-chips::-webkit-scrollbar { display: none; }
    .trend-chips > * { flex: 0 0 auto; }
    .trend-chips .chip { white-space: nowrap; }

    /* Homepage product rails swipe sideways on phones — one big card
       in focus with a peek of the next — instead of stacking 8 tall
       cards per section (the page was ~22 screens long otherwise). */
    .product-rail {
        flex-wrap: nowrap;
        overflow-x: auto;
        /* overflow-x alone silently turns the rail into a vertical
           scroller too (visible → auto) — the row's negative top
           gutter then eats the first ~14px of every up/down swipe.
           Lock the Y axis so vertical swipes always scroll the page. */
        overflow-y: hidden;
        --bs-gutter-y: 0;
        touch-action: pan-x pan-y;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        scroll-padding-left: calc(var(--bs-gutter-x) * 0.5);
    }
    .product-rail::-webkit-scrollbar { display: none; }
    .product-rail > [class*="col-"] {
        flex: 0 0 80%;
        max-width: 80%;
        scroll-snap-align: start;
    }
    /* Reveal-on-scroll slides cards down 14px before they animate in —
       inside a Y-locked rail that becomes phantom scroll slack (and a
       clipped card bottom). Rail cards just fade, no slide. */
    .product-rail .reveal { transform: none; }
}

/* --------------------------------------------------------------------------
   18. AI search demo (homepage + how-it-works)
   -------------------------------------------------------------------------- */
.ai-demo {
    background: linear-gradient(135deg, var(--color-surface) 55%, var(--color-primary-soft) 160%);
    transition: border-color 0.3s ease;
}
.ai-demo:hover { border-color: var(--color-primary-soft-border); }

.ai-demo-input {
    border: 1px solid var(--color-border);
    border-radius: 2rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
    transition: border-color 0.35s ease, background 0.35s ease;
}
.ai-demo.is-typing .ai-demo-input {
    border-color: var(--color-primary);
    background: var(--color-surface);
}
.ai-demo-input:hover { border-color: var(--color-primary); }
.ai-demo-input:hover .ai-demo-try { color: var(--color-primary); }
.ai-demo-input:hover .ai-demo-try svg { transform: translateX(3px); }

.ai-demo-glass { color: var(--color-text-tertiary); }
.ai-demo.is-typing .ai-demo-glass { color: var(--color-primary); }

.ai-demo-query { font-size: var(--text-sm); white-space: nowrap; overflow: hidden; }

.ai-demo-caret {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    margin-left: 1px;
    background: var(--color-primary);
    border-radius: 1px;
    animation: aiCaretBlink 1.05s steps(1) infinite;
}

.ai-demo-try {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-text-tertiary);
    transition: color 0.25s ease;
}
.ai-demo-try svg { transition: transform 0.25s ease; }

.ai-demo-label {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.ai-demo-sparkle { color: var(--color-primary); animation: aiSparklePulse 2.6s ease-in-out infinite; }

.ai-demo .query-pill.pill-pop {
    animation: aiPillPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ai-demo .query-pill.pill-out {
    animation: aiPillOut 0.22s ease both;
}

@keyframes aiCaretBlink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes aiSparklePulse {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50% { transform: scale(1.25) rotate(12deg); opacity: 1; }
}
@keyframes aiPillPop {
    from { opacity: 0; transform: scale(0.55) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes aiPillOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.7); }
}

@media (prefers-reduced-motion: reduce) {
    .ai-demo-caret, .ai-demo-sparkle { animation: none; }
    .ai-demo .query-pill.pill-pop, .ai-demo .query-pill.pill-out { animation: none; }
}

/* --------------------------------------------------------------------------
   19. Pagination (public storefront)
   -------------------------------------------------------------------------- */
.pagination {
    gap: 0.35rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: center;
    --bs-pagination-focus-box-shadow: 0 0 0 3px var(--color-focus-ring);
}
.pagination .page-link {
    min-width: 2.5rem;
    padding: 0.45rem 0.7rem;
    text-align: center;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    transition: color var(--duration-fast) var(--ease-out),
                background-color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out);
}
.pagination .page-link:hover {
    color: var(--color-primary);
    background: var(--color-primary-soft);
    border-color: var(--color-primary-soft-border);
}
.pagination .page-link:focus {
    color: var(--color-primary);
    background: var(--color-primary-soft);
}
.pagination .page-item.active .page-link {
    color: var(--color-on-primary);
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.pagination .page-item.disabled .page-link {
    color: var(--color-border-strong);
    background: var(--color-surface-sunken);
    border-color: var(--color-border);
}

/* "Showing 1 to 24 of 810 results" line above the links */
nav > .d-flex .small.text-muted,
nav .small.text-muted {
    color: var(--color-text-tertiary) !important;
    font-size: var(--text-sm);
}
nav .small.text-muted .fw-semibold { color: var(--color-text-secondary); }

/* --------------------------------------------------------------------------
   20. Lead capture modal (before first outbound click)
   Class-driven transitions (opacity/transform only) — no keyframes, no
   layout properties, so opening is buttery even on slow devices.
   -------------------------------------------------------------------------- */
.lead-modal { position: fixed; inset: 0; z-index: 1600; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.lead-modal[hidden] { display: none; }

.lead-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(29, 28, 26, 0.5);
    opacity: 0;
    transition: opacity 200ms ease;
}
.lead-modal-card {
    position: relative;
    width: 100%;
    max-width: 23.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.25rem 2rem 1.75rem;
    text-align: center;
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
    will-change: transform, opacity;
}
.lead-modal.is-open .lead-modal-backdrop { opacity: 1; }
.lead-modal.is-open .lead-modal-card { opacity: 1; transform: none; }

.lead-modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.lead-modal-close:hover { background: var(--color-surface-sunken); color: var(--color-text-primary); }

.lead-modal-head { margin-bottom: 0.9rem; }
.lead-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 50%;
    background: var(--color-primary-soft);
    border: 1px solid var(--color-primary-soft-border);
    color: var(--color-primary);
    margin-bottom: 0.9rem;
}
.lead-modal-eyebrow {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
}
.lead-modal-head h2 { font-size: var(--text-2xl); line-height: 1.2; overflow-wrap: anywhere; }

.lead-modal-copy {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 18.5rem;
    margin: 0 auto 1.4rem;
}
.lead-modal-copy strong { color: var(--color-text-primary); font-weight: 600; }

.lead-modal-input {
    height: 3.1rem;
    text-align: center;
    font-size: var(--text-base);
    border-radius: var(--radius-md);
}
.lead-modal-input::placeholder { color: var(--color-text-tertiary); font-size: var(--text-sm); }
.lead-modal-input:focus {
    border-color: var(--color-primary);
    box-shadow: none;
    outline: 3px solid var(--color-focus-ring);
    outline-offset: 0;
}

.lead-modal-fine {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin: 1.1rem 0 0;
}

@media (prefers-reduced-motion: reduce) {
    .lead-modal-backdrop, .lead-modal-card { transition: none; }
}

/* Search facets — the panel that narrows a result set ------------------ */

.facets {
    position: sticky;
    top: calc(var(--header-height) + var(--space-4));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    padding: var(--space-4);
}

.facets__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.facets__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    margin: 0;
}

.facets__clear {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    text-decoration: underline;
}

.facets__clear:hover { color: var(--color-primary); }

.facets__group {
    border: 0;
    padding: 0;
    margin: 0 0 var(--space-4);
    /* Long brand lists scroll instead of pushing Apply off-screen. */
    max-height: 15rem;
    overflow-y: auto;
}

.facets__legend {
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-2);
    padding: 0;
}

.facets__option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
}

.facets__option:hover { color: var(--color-text-primary); }

.facets__option input {
    flex: 0 0 auto;
    accent-color: var(--color-primary);
    width: 0.95rem;
    height: 0.95rem;
    cursor: pointer;
}

.facets__option > span:first-of-type {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facets__count {
    flex: 0 0 auto;
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    font-variant-numeric: tabular-nums;
}

.facets__price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.facets__input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    padding: 0.45rem 0.6rem;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

.facets__input:focus-visible {
    outline: 2px solid var(--color-focus-ring);
    outline-offset: 1px;
}

@media (max-width: 991.98px) {
    .facets { position: static; margin-bottom: var(--space-4); }
    .facets__group { max-height: 11rem; }
}

/* --------------------------------------------------------------------------
   Near-match notice — shown when a query matched nothing exactly and the
   engine had to set a promise aside to find anything at all.
   -------------------------------------------------------------------------- */
.near-match {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1.05rem;
    border: 1px solid var(--color-primary-soft-border);
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.55;
}

.near-match-icon {
    display: inline-flex;
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: var(--color-primary);
}

.near-match strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* An "Understood" chip the ladder had to give up. Struck through rather
   than hidden: the shopper still needs to see that we read the word. */
.query-pill--aside {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-text-tertiary);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

/* --------------------------------------------------------------------------
   Search trace panel — a development diagnostic, rendered only for a
   viewer allowed to see it. Open/close is CSS-only so it survives with
   JavaScript off and never fights the page's own scripts.
   -------------------------------------------------------------------------- */
.trace-toggle { position: fixed; opacity: 0; pointer-events: none; }

.trace-tab {
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2.75rem;
    transform: translateY(-50%);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    background: #14171c;
    color: #9fe8c8;
    cursor: pointer;
    box-shadow: 0 2px 12px rgb(0 0 0 / 0.25);
}

.trace-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    width: min(56rem, 100vw);
    height: 100dvh;
    transform: translateX(100%);
    transition: transform var(--duration-fast) var(--ease-out);
    background: #0f1216;
    color: #cfd6e0;
    font-size: 0.75rem;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    box-shadow: -8px 0 30px rgb(0 0 0 / 0.35);
}

#trace-open:checked ~ .trace-panel { transform: none; }
#trace-open:checked ~ .trace-tab { display: none; }

/* Full width, for reading a long SQL statement without wrapping. */
#trace-wide:checked ~ .trace-panel { width: 100vw; }
#trace-wide:checked ~ .trace-panel .trace-btn--wide { background: #2c3a34; color: #9fe8c8; }

.trace-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid #232830;
}

.trace-head strong { display: block; color: #eef2f7; font-size: 0.8rem; word-break: break-word; }

.trace-eyebrow {
    display: block;
    color: #6f7b8c;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.trace-actions { display: flex; gap: 0.3rem; flex: 0 0 auto; }

.trace-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: var(--radius-sm);
    background: #1b2029;
    color: #9aa6b6;
    text-decoration: none;
    cursor: pointer;
}
.trace-btn:hover { background: #262d38; color: #eef2f7; }

.trace-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.9rem;
    padding: 0.5rem 0.9rem;
    border-bottom: 1px solid #232830;
    color: #8b97a8;
}
.trace-stats b { color: #9fe8c8; }

.trace-body { flex: 1 1 auto; overflow-y: auto; padding: 0.4rem 0.9rem 3rem; }

.trace-body details { border-bottom: 1px solid #1c2129; padding: 0.35rem 0; }
.trace-body details details { border-bottom: 0; padding-left: 0.6rem; }

.trace-body summary {
    cursor: pointer;
    padding: 0.25rem 0;
    color: #d8e2ee;
    font-weight: 600;
    list-style-position: outside;
}
.trace-body details details > summary { color: #8b97a8; font-weight: 500; }

.trace-body pre {
    margin: 0.35rem 0;
    padding: 0.55rem 0.65rem;
    max-height: 22rem;
    overflow: auto;
    border-radius: var(--radius-sm);
    background: #161b22;
    color: #b9c6d6;
    white-space: pre-wrap;
    word-break: break-word;
}

.trace-kv { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.1rem 0.6rem; margin: 0.35rem 0; }
.trace-kv dt { color: #6f7b8c; }
.trace-kv dd { margin: 0; color: #cfd6e0; word-break: break-word; }

.trace-step { padding: 0.2rem 0; color: #a9b4c4; }
.trace-step b { color: #eef2f7; }
.trace-step em { display: block; color: #6f7b8c; font-style: normal; }
.trace-step code { color: #8fa7c4; word-break: break-all; }
.trace-step--out b { color: #9fe8c8; }
.trace-num { color: #f0c674; }
.trace-warn { color: #f0a0a0; }

/* Capped so the columns stay readable together when the panel is
   opened to full width — a table stretched across 1600px is unreadable. */
.trace-table { width: 100%; max-width: 46rem; border-collapse: collapse; margin: 0.35rem 0; }
.trace-table th { color: #6f7b8c; font-weight: 600; text-align: left; }
.trace-table th, .trace-table td { padding: 0.15rem 0.3rem; border-bottom: 1px solid #1c2129; }
.trace-table td { color: #b9c6d6; }

.trace-note {
    margin: 0.4rem 0 0;
    max-width: 46rem;
    color: #6f7b8c;
}
.trace-note b { color: #8b97a8; font-weight: 600; }

@media (max-width: 575.98px) {
    .trace-panel { width: 100vw; }
}

/* ==========================================================================
   V2 REDESIGN — full-ecommerce polish for home + search
   (Appended layer: every earlier class keeps working; these sharpen them.)
   ========================================================================== */

/* --- Hero: split layout -------------------------------------------------- */
.hero--split { padding: 3.5rem 0 3rem; text-align: left; }
.hero--split .text-display { font-size: clamp(2.2rem, 4.2vw, 3.4rem); line-height: 1.06; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: 'Manrope', sans-serif; font-size: var(--text-xl); color: var(--color-text-primary); }
.hero-stats span { font-size: var(--text-sm); color: var(--color-text-tertiary); }

.hero-collage {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
    gap: 0.9rem; aspect-ratio: 4 / 3;
}
.hero-collage-item {
    position: relative; border-radius: 1.1rem; overflow: hidden; display: block;
    background: var(--color-surface-sunken); box-shadow: 0 1px 2px rgba(29,28,26,0.06);
    transition: transform .25s ease, box-shadow .25s ease;
}
.hero-collage-item:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(29,28,26,0.14); }
.hero-collage-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-collage-item.item-1 { grid-row: span 2; }
.hero-collage-item.item-4 { grid-column: span 1; }
.hero-collage-badge {
    position: absolute; top: .6rem; left: .6rem; background: var(--color-sale); color: #fff;
    font-size: .72rem; font-weight: 700; padding: .18rem .5rem; border-radius: 99px;
}

/* --- Deals band ----------------------------------------------------------- */
.deals-band {
    background: linear-gradient(180deg, var(--color-sale-soft), transparent 88%);
    border-top: 1px solid #F1E2DA; border-bottom: 1px solid transparent;
    padding-top: 2.6rem;
}

/* --- Product card polish --------------------------------------------------- */
.product-card {
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(29,28,26,0.10);
    border-color: var(--color-border-strong);
}
.product-card .card-media { position: relative; overflow: hidden; }
.product-card .product-visual { transition: transform .5s ease; }
.product-card:hover .product-visual { transform: scale(1.045); }
.product-card .fav-btn { opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease; }
.product-card:hover .fav-btn, .product-card .fav-btn:focus-visible, .product-card .fav-btn[aria-pressed="true"] { opacity: 1; transform: none; }
@media (hover: none) { .product-card .fav-btn { opacity: 1; transform: none; } }

/* --- Search page ----------------------------------------------------------- */
.search-band {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1.35rem 0;
    position: sticky; top: 0; z-index: 30;
    box-shadow: 0 1px 0 rgba(29,28,26,0.02);
}
.results-title { font-family: 'Manrope', sans-serif; font-size: var(--text-2xl); font-weight: 700; margin-bottom: .15rem; }
.results-count { font-size: var(--text-sm); color: var(--color-text-secondary); }

.understood-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .45rem;
    background: var(--color-primary-soft); border: 1px solid var(--color-primary-soft-border);
    border-radius: .9rem; padding: .55rem .8rem;
}
.understood-label {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: var(--text-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
    color: var(--color-primary);
}

.facets-panel { position: sticky; top: 5.4rem; }
@media (max-width: 991.98px) { .facets-panel { position: static; margin-bottom: .5rem; } }
.facets {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 1rem; padding: 1.1rem 1.15rem;
    max-height: calc(100vh - 6.5rem); overflow-y: auto;
}
@media (max-width: 991.98px) { .facets { max-height: none; } }

/* --- Rails: tighter 2-up on phones ---------------------------------------- */
@media (max-width: 575.98px) {
    .product-rail .card-title-link { font-size: var(--text-sm); }
}

/* ------------------------------------------------------------------
   Product card image loading — a calm skeleton instead of a grey
   flash while the lazy image decodes, then a soft fade-in. If JS is
   absent the image simply shows (no class = fully opaque), so this can
   never hide a product photo.
   ------------------------------------------------------------------ */
@keyframes cardSkeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.product-card .card-media { background-color: var(--color-surface-sunken); }
.product-card .card-media.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: linear-gradient(100deg,
        rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0) 60%);
    background-size: 200% 100%;
    animation: cardSkeletonShimmer 1.3s ease-in-out infinite;
}
.product-card .card-media.is-loading img[data-card-image] { opacity: 0; }
.product-card .card-media.is-loaded  img[data-card-image] { opacity: 1; }
.product-card .card-media img[data-card-image] {
    position: relative;
    z-index: 1;
    transition: opacity 350ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
    .product-card .card-media.is-loading::before { animation: none; }
    .product-card .card-media img[data-card-image] { transition: none; }
}
