/* ==========================================================================
   Storefront styles
   1. Tokens  2. Base  3. Layout  4. Buttons & controls  5. Header & search
   6. Components  7. Home  8. Listing  9. Product  10. Compare  11. Cart
   12. Footer  13. Utilities & a11y  14. Responsive
   ========================================================================== */

/* 1. Tokens ----------------------------------------------------------------
   Every colour in this file is a variable. Themed values are defined twice for
   dark mode: once for visitors whose OS is dark (unless they chose light) and
   once for an explicit dark choice. Keep the two dark blocks identical.
   -------------------------------------------------------------------------- */
:root {
    /* Fixed colours – identical in both themes. Used inside areas that are always
       dark (announcement bar, hero, footer) and on saturated brand fills. */
    --white: #fff;
    --black: #14161a;
    --on-dark: #fff;
    --on-dark-muted: #b9bec7;
    --on-dark-soft: #e9ebef;
    --dark-border: #4a4e56;
    --dark-line: #2a2d33;
    --eyebrow-on-dark: oklch(0.8 0.1 260);
    --hero-navy: #101a33;
    --hero-graphite: #22252b;
    --hero-stripe-a: rgba(255, 255, 255, .035);
    --hero-stripe-b: rgba(255, 255, 255, .07);
    --hero-caption-bg: rgba(0, 0, 0, .4);
    --hero-caption-text: #c6cad1;
    --hero-control-bg: rgba(20, 22, 26, .35);
    --hero-control-border: rgba(255, 255, 255, .28);
    --hero-bullet: rgba(255, 255, 255, .45);
    --star: #e0a526;

    /* Themed colours (light values) */
    color-scheme: light;
    --bg: #f7f8fa;
    --surface: #fff;
    --surface-2: #f4f5f7;
    --ink: #14161a;
    --ink-2: #3d424b;
    --muted: #5d6470;
    --subtle: #666c77;
    --line: #e6e8ec;
    --line-strong: #d6d9df;
    --line-soft: #f0f1f3;
    --header-bg: rgba(255, 255, 255, .94);
    --inverse: #14161a;
    --on-inverse: #fff;
    --inverse-muted: #b9bec7;
    --disabled: #9ba0a8;
    --dark-surface: #14161a;
    --dark-surface-edge: transparent;
    --accent: oklch(0.52 0.19 260);
    --accent-hover: oklch(0.42 0.19 260);
    --accent-fill: oklch(0.52 0.19 260);
    --on-accent: #fff;
    --on-accent-muted: #e8edff;
    --accent-soft: #e9edf8;
    --accent-soft-text: oklch(0.45 0.19 260);
    --deal: oklch(0.52 0.19 25);
    --deal-fill: oklch(0.52 0.19 25);
    --deal-soft: #fbece8;
    --deal-soft-text: oklch(0.48 0.19 25);
    --success: oklch(0.5 0.13 150);
    --media-bg: #fff;
    --media-dim: 1;
    --stripe-a: #f1f2f5;
    --stripe-b: #eaecf0;
    --media-caption-bg: rgba(255, 255, 255, .75);
    --media-caption-text: #666c77;
    --swatch-border: rgba(0, 0, 0, .14);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2314161a' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
    --shadow-card: 0 12px 32px rgba(20, 22, 26, .08);
    --shadow-pop: 0 20px 40px rgba(20, 22, 26, .12);
    --shadow-tray: 0 16px 40px rgba(20, 22, 26, .3);
    --shadow-drawer: -20px 0 40px rgba(20, 22, 26, .15);
    --shadow-sticky: 6px 0 8px -6px rgba(20, 22, 26, .18);
    --backdrop: rgba(20, 22, 26, .45);

    --stripes: repeating-linear-gradient(135deg, var(--stripe-a) 0 10px, var(--stripe-b) 10px 20px);

    --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Sora', var(--font-body);
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius-sm: 10px;
    --radius: 14px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --pill: 999px;

    --gutter: 24px;
    --max: 1280px;
    --header-h: 118px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0f1114;
        --surface: #171a1f;
        --surface-2: #1f2329;
        --ink: #eceef1;
        --ink-2: #c9cdd4;
        --muted: #a9afb8;
        --subtle: #979da8;
        --line: #272b32;
        --line-strong: #363b44;
        --line-soft: #20242a;
        --header-bg: rgba(15, 17, 20, .9);
        --inverse: #eceef1;
        --on-inverse: #14161a;
        --inverse-muted: #50565f;
        --disabled: #3f444c;
        --dark-surface: #08090b;
        --dark-surface-edge: #23272d;
        --accent: oklch(0.76 0.12 260);
        --accent-hover: oklch(0.84 0.09 260);
        --accent-fill: oklch(0.52 0.19 260);
        --on-accent: #fff;
        --on-accent-muted: #e8edff;
        --accent-soft: #172038;
        --accent-soft-text: oklch(0.8 0.1 260);
        --deal: oklch(0.74 0.14 25);
        --deal-fill: oklch(0.52 0.19 25);
        --deal-soft: #2e1c19;
        --deal-soft-text: oklch(0.82 0.1 25);
        --success: oklch(0.76 0.13 150);
        --media-bg: #e8eaed;
        --media-dim: .92;
        --stripe-a: #dde0e5;
        --stripe-b: #d4d8dd;
        --media-caption-bg: rgba(255, 255, 255, .7);
        --media-caption-text: #4d535d;
        --swatch-border: rgba(255, 255, 255, .24);
        --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23eceef1' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
        --shadow-card: 0 12px 32px rgba(0, 0, 0, .45);
        --shadow-pop: 0 20px 40px rgba(0, 0, 0, .55);
        --shadow-tray: 0 16px 40px rgba(0, 0, 0, .6);
        --shadow-drawer: -20px 0 40px rgba(0, 0, 0, .5);
        --shadow-sticky: 6px 0 8px -6px rgba(0, 0, 0, .7);
        --backdrop: rgba(0, 0, 0, .6);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1114;
    --surface: #171a1f;
    --surface-2: #1f2329;
    --ink: #eceef1;
    --ink-2: #c9cdd4;
    --muted: #a9afb8;
    --subtle: #979da8;
    --line: #272b32;
    --line-strong: #363b44;
    --line-soft: #20242a;
    --header-bg: rgba(15, 17, 20, .9);
    --inverse: #eceef1;
    --on-inverse: #14161a;
    --inverse-muted: #50565f;
    --disabled: #3f444c;
    --dark-surface: #08090b;
    --dark-surface-edge: #23272d;
    --accent: oklch(0.76 0.12 260);
    --accent-hover: oklch(0.84 0.09 260);
    --accent-fill: oklch(0.52 0.19 260);
    --on-accent: #fff;
    --on-accent-muted: #e8edff;
    --accent-soft: #172038;
    --accent-soft-text: oklch(0.8 0.1 260);
    --deal: oklch(0.74 0.14 25);
    --deal-fill: oklch(0.52 0.19 25);
    --deal-soft: #2e1c19;
    --deal-soft-text: oklch(0.82 0.1 25);
    --success: oklch(0.76 0.13 150);
    --media-bg: #e8eaed;
    --media-dim: .92;
    --stripe-a: #dde0e5;
    --stripe-b: #d4d8dd;
    --media-caption-bg: rgba(255, 255, 255, .7);
    --media-caption-text: #4d535d;
    --swatch-border: rgba(255, 255, 255, .24);
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23eceef1' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
    --shadow-card: 0 12px 32px rgba(0, 0, 0, .45);
    --shadow-pop: 0 20px 40px rgba(0, 0, 0, .55);
    --shadow-tray: 0 16px 40px rgba(0, 0, 0, .6);
    --shadow-drawer: -20px 0 40px rgba(0, 0, 0, .5);
    --shadow-sticky: 6px 0 8px -6px rgba(0, 0, 0, .7);
    --backdrop: rgba(0, 0, 0, .6);
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.5 var(--font-body);
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
/* :where() keeps this reset at zero specificity so component classes can add their own padding. */
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* 3. Layout ---------------------------------------------------------------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.main { flex: 1; padding-top: 24px; padding-bottom: 72px; outline: none; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack--xs { gap: 8px; }
.stack--sm { gap: 10px; }
.stack--lg { gap: 24px; }
.stack--xl { gap: 56px; }

.page-header { display: flex; flex-direction: column; gap: 8px; }
.page-header--row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.page-title { font: 600 clamp(30px, 3.6vw, 44px)/1.05 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.page-lead { max-width: 640px; font-size: 15.5px; color: var(--muted); text-wrap: pretty; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-title { font: 600 26px/1.1 var(--font-display); letter-spacing: -.02em; }
.section-title--sm { font-size: 22px; }
.section-header__aside { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.eyebrow { font: 600 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); }
.eyebrow--on-dark { color: var(--eyebrow-on-dark); }
.text-link { font: 600 14px/1 var(--font-body); color: var(--accent); }
.text-link--sm { font-size: 12.5px; }

/* 4. Buttons & controls ---------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 22px;
    border: 1px solid transparent; border-radius: var(--pill);
    font: 600 14.5px/1 var(--font-body); white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn .icon { width: 16px; height: 16px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 52px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--inverse); color: var(--on-inverse); }
.btn--primary:hover { background: var(--accent-fill); color: var(--on-accent); }
.btn--primary:disabled { background: var(--disabled); color: var(--on-inverse); cursor: not-allowed; }
.btn--light { background: var(--white); color: var(--black); }
.btn--light:hover { background: var(--on-dark-soft); color: var(--black); }
.btn--ghost-dark { border-color: var(--dark-border); color: var(--on-dark); }
.btn--ghost-dark:hover { border-color: var(--on-dark); color: var(--on-dark); }
.btn--outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover, .btn--outline[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); }

.round-button {
    position: relative; z-index: 2;
    flex: none; display: grid; place-items: center;
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: var(--inverse); color: var(--on-inverse);
    transition: background-color .15s ease;
}
.round-button:hover { background: var(--accent-fill); color: var(--on-accent); }
.round-button--ghost { background: var(--surface-2); color: var(--ink); }
.round-button--ghost:hover { background: var(--line); color: var(--ink); }
.round-button .icon { width: 20px; height: 20px; }

.icon-button {
    display: grid; place-items: center; width: 44px; height: 44px;
    border: 1px solid var(--line); border-radius: 50%; background: var(--surface);
}
.icon-button:hover { border-color: var(--ink); }

.link-button {
    border: 0; background: none; padding: 4px 0;
    font: 500 13px/1 var(--font-body); color: var(--subtle); text-decoration: underline; text-underline-offset: 2px;
}
.link-button:hover { color: var(--ink); }

.select {
    height: 44px; padding: 0 36px 0 12px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    background: var(--surface) var(--select-arrow) no-repeat right 12px center;
    appearance: none; font-size: 14px; cursor: pointer;
}

.check { display: flex; align-items: center; gap: 10px; min-height: 32px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }
.check__label { flex: 1; }
.check__count { font-size: 12.5px; color: var(--subtle); }
.check--divided { padding-top: 14px; border-top: 1px solid var(--line); font-weight: 500; }

/* Visually-hidden native input + styled label: keeps keyboard & SR support. */
.pill-option input, .swatch input, .storage-option input {
    position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.pill-options { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-option { position: relative; }
.pill-option span {
    display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
    font: 500 13px/1 var(--font-body); cursor: pointer;
}
.pill-option input:checked + span { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.pill-option input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
    font: 500 13.5px/1 var(--font-body); color: var(--ink);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.chip__count { opacity: .65; }

.stepper {
    display: inline-flex; align-items: center; height: 52px;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
}
.stepper__btn { display: grid; place-items: center; width: 48px; height: 100%; border: 0; background: none; border-radius: var(--pill); }
.stepper__btn .icon { width: 18px; height: 18px; }
.stepper__input, .stepper__value {
    width: 36px; border: 0; background: none; text-align: center;
    font: 600 15px/1 var(--font-body); -moz-appearance: textfield;
}
.stepper__input::-webkit-outer-spin-button, .stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--sm { height: 36px; }
.stepper--sm .stepper__btn { width: 36px; }
.stepper--sm .stepper__btn .icon { width: 14px; height: 14px; }
.stepper--sm .stepper__value { width: 24px; font-size: 13px; }

/* 5. Header & search ------------------------------------------------------- */
.skip-link {
    position: absolute; left: 16px; top: -100px; z-index: 100;
    padding: 12px 18px; border-radius: var(--radius-sm); background: var(--inverse); color: var(--on-inverse); font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-inverse); }

.announcement { background: var(--dark-surface); color: var(--on-dark-soft); text-align: center; padding: 9px 16px; font: 500 12.5px/1.4 var(--font-body); }

.site-header {
    position: sticky; top: 0; z-index: 30;
    background: var(--header-bg);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding-top: 14px; padding-bottom: 10px; }

.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo__mark { width: 14px; height: 22px; border-radius: 4px; background: var(--accent-fill); }
.logo__text { font: 700 22px/1 var(--font-display); letter-spacing: -.02em; }
.logo--light, .logo--light:hover { color: var(--on-dark); }
.logo--light .logo__text { font-size: 20px; }

.search { position: relative; flex: 1 1 180px; max-width: 640px; margin: 0 auto; }
.search__input {
    width: 100%; height: 44px; padding: 0 116px 0 18px;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface-2);
    font-size: 15px; outline: none; transition: border-color .15s, background-color .15s;
}
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus { border-color: var(--ink); background: var(--surface); }
.search__input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--pill); }
.search__submit {
    position: absolute; right: 4px; top: 4px; height: 36px; padding: 0 18px;
    display: inline-flex; align-items: center; gap: 6px;
    border: 0; border-radius: var(--pill); background: var(--inverse); color: var(--on-inverse); font: 600 13px/1 var(--font-body);
}
.search__submit:hover { background: var(--accent-fill); color: var(--on-accent); }
.search__icon { display: none; width: 18px; height: 18px; }
.search__panel {
    position: absolute; top: 52px; left: 0; right: 0; z-index: 5;
    display: flex; flex-direction: column; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop);
}
.search__list { list-style: none; margin: 0; padding: 0; }
.search__option {
    display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer;
}
.search__option[aria-selected="true"], .search__option:hover { background: var(--surface-2); }
.search__option-media { width: 40px; height: 40px; flex: none; border-radius: 8px; overflow: hidden; background: var(--stripes); }
.search__option-media img { width: 100%; height: 100%; object-fit: contain; background: var(--media-bg); }
.search__option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.search__option-name { font: 600 14px/1.25 var(--font-body); }
.search__option-meta { font-size: 12px; color: var(--subtle); }
.search__option-price { font: 600 14px/1 var(--font-display); white-space: nowrap; }
.search__empty { padding: 14px 12px; font-size: 13.5px; color: var(--subtle); }
.search__all { margin-top: 4px; padding: 12px 10px; border-top: 1px solid var(--line); font: 600 13px/1 var(--font-body); }

.cart-button {
    flex: none; display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface); font: 600 14px/1 var(--font-body);
}
.cart-button:hover { border-color: var(--ink); }

.theme-toggle {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink);
}
.theme-toggle:hover { border-color: var(--ink); }
.theme-toggle .icon { width: 20px; height: 20px; }
/* Show the icon for the theme you would switch TO. */
.theme-toggle__sun { display: none; }
.theme-toggle[aria-pressed="true"] .theme-toggle__sun { display: block; }
.theme-toggle[aria-pressed="true"] .theme-toggle__moon { display: none; }
.no-js .theme-toggle { display: none; }
.cart-button__icon { width: 20px; height: 20px; }
.cart-button__count {
    min-width: 28px; height: 28px; padding: 0 8px; border-radius: var(--pill);
    display: grid; place-items: center; background: var(--inverse); color: var(--on-inverse); font: 600 12.5px/1 var(--font-body);
}
.cart-button.is-bumped .cart-button__count { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.25); background: var(--accent-fill); color: var(--on-accent); } }

.primary-nav { overflow-x: auto; scrollbar-width: none; padding-inline: 14px; }
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav__list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.primary-nav__item { flex: none; display: flex; align-items: center; }
.primary-nav__item--group-start::before { content: ""; width: 4px; height: 4px; margin: 0 6px; border-radius: 50%; background: var(--line-strong); }
.primary-nav__link {
    display: block; padding: 10px 10px 12px; border-bottom: 2px solid transparent;
    font: 500 14px/1 var(--font-body); color: var(--muted); white-space: nowrap;
}
.primary-nav__link:hover { color: var(--ink); }
.primary-nav__link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.primary-nav__link:focus-visible { outline-offset: -3px; }

/* 6. Components ------------------------------------------------------------ */
.media { display: block; width: 100%; height: 100%; object-fit: contain; }
.media--placeholder {
    position: relative; display: flex; align-items: flex-end; justify-content: center;
    padding: 12px; background: var(--stripes); border-radius: inherit;
}
.media__caption {
    max-width: 100%; padding: 4px 8px; border-radius: 6px; background: var(--media-caption-bg);
    font: 500 10.5px/1.3 var(--font-mono); color: var(--media-caption-text); text-align: center;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.badge {
    display: inline-block; padding: 4px 9px; border-radius: var(--pill);
    font: 600 11px/1.2 var(--font-body); color: var(--on-inverse); background: var(--inverse);
}
.badge--deal { background: var(--deal-fill); color: var(--white); }
.badge--muted { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }

.price { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.price__old { font-size: 12.5px; color: var(--subtle); }
.price__now { font: 600 18px/1 var(--font-display); text-decoration: none; white-space: nowrap; }

.rating { display: flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--subtle); }
.rating__star { width: 14px; height: 14px; color: var(--star); }
.rating__value { color: var(--ink-2); font-weight: 600; }

/* Product card */
.product-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.product-card__media { position: relative; aspect-ratio: 1 / 1; background: var(--stripes); }
.product-card__media > img.media { background: var(--media-bg); padding: 14px; }
.product-card__badge { position: absolute; top: 12px; left: 12px; }
.product-card__stock { position: absolute; top: 12px; right: 12px; }
.product-card--oos .product-card__media > * { opacity: .75; }
.product-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 14px 16px 16px; }
.product-card__brand { font: 600 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.product-card__title { font: 600 15px/1.35 var(--font-body); text-wrap: pretty; }
.product-card__link { color: var(--ink); }
.product-card__link:hover { color: var(--ink); }
.product-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.product-card__link:focus-visible { outline: none; }
.product-card__link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; }
.product-card__footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }

.compare-toggle {
    position: relative; z-index: 2; align-self: flex-start;
    display: inline-flex; align-items: center; gap: 7px; padding: 4px 0;
    font: 500 12.5px/1 var(--font-body); color: var(--muted); cursor: pointer;
}
.compare-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-grid--narrow { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }

/* Tiles */
.tile {
    display: flex; flex-direction: column; height: 100%;
    border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink);
    transition: border-color .15s ease;
}
.tile:hover { border-color: var(--ink); color: var(--ink); }
.tile--category { gap: 12px; padding: 12px 12px 16px; }
.tile__media { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--stripes); }
.tile__media img.media { background: var(--media-bg); object-fit: contain; padding: 6px; }
.tile__body { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.tile__title { font: 600 15px/1.2 var(--font-body); }
.tile__meta { font-size: 12.5px; color: var(--subtle); }
.tile--brand { min-height: 96px; padding: 16px 12px; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.tile__brand-name { font: 600 19px/1 var(--font-display); letter-spacing: -.01em; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--subtle); }
.breadcrumbs li { display: flex; gap: 8px; }
.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }
.breadcrumbs a { color: var(--subtle); }
.breadcrumbs a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink); }

.pagination { margin-top: 16px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.pagination__link {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px;
    border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--surface);
    font: 600 14px/1 var(--font-body); color: var(--ink);
}
a.pagination__link:hover { border-color: var(--ink); color: var(--ink); }
.pagination__link.is-current { background: var(--inverse); border-color: var(--inverse); color: var(--on-inverse); }
.pagination__link.is-disabled { opacity: .45; }
.pagination__gap { display: inline-flex; align-items: center; height: 44px; padding: 0 4px; color: var(--subtle); }

.empty-state {
    display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 24px; text-align: center;
    background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
}
.empty-state__title { font: 600 18px/1.2 var(--font-display); }
.empty-state__text { max-width: 420px; color: var(--muted); font-size: 15px; }

/* Product imagery stays light in both themes; in dark mode it is dimmed a touch
   so white photo backgrounds sit calmly on the dark page. */
img.media, .search__option-media img, .cart-item__media img, .gallery__thumb img { filter: brightness(var(--media-dim)); }

/* 7. Home ------------------------------------------------------------------ */
.hero { display: flex; flex-wrap: wrap; gap: 16px; }
.hero-slider {
    flex: 2 1 520px; min-width: 0; position: relative;
    border-radius: var(--radius-xl); overflow: hidden; background: var(--dark-surface); color: var(--on-dark);
    box-shadow: inset 0 0 0 1px var(--dark-surface-edge);
}
.hero-slide { display: flex; flex-wrap: wrap; height: auto; min-height: 440px; background: var(--dark-surface); }
/* Before Swiper boots (or without JS) show only the first slide. */
.hero-slider:not(.swiper-initialized) .hero-slide:not(:first-child) { display: none; }
.hero-slide--navy { background: var(--hero-navy); }
.hero-slide--graphite { background: var(--hero-graphite); }
.hero-slide__copy { flex: 1 1 280px; padding: 44px 40px 96px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.hero-slide__title { font: 600 clamp(32px, 4.2vw, 54px)/1.03 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.hero-slide__text { max-width: 380px; color: var(--on-dark-muted); line-height: 1.55; }
.hero-slide__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-slide__media { flex: 1 1 260px; min-height: 260px; position: relative; }
.hero-slide__media .media--placeholder { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--hero-stripe-a) 0 12px, var(--hero-stripe-b) 12px 24px); }
.hero-slide__media .media__caption { background: var(--hero-caption-bg); color: var(--hero-caption-text); }
.hero-slide__media img.media { position: absolute; inset: 0; object-fit: cover; }

.hero-slider__controls {
    position: absolute; left: 40px; bottom: 28px; z-index: 2;
    display: flex; align-items: center; gap: 8px;
}
.no-js .hero-slider__controls { display: none; }
.hero-slider__btn {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--hero-control-border); border-radius: 50%; background: var(--hero-control-bg); color: var(--on-dark);
    transition: background-color .15s, border-color .15s;
}
.hero-slider__btn:hover { background: var(--white); border-color: var(--white); color: var(--black); }
.hero-slider__btn .icon { width: 18px; height: 18px; }
.hero-slider__btn:focus-visible { outline-color: var(--white); }
.hero-slider__btn.swiper-button-disabled { opacity: .4; cursor: default; }
/* Swiper's CSS gives horizontal bullet paginations width:100% (and absolute offsets); keep ours inline. */
.hero-slider .hero-slider__pagination { position: static; width: auto; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 4px; }
.hero-slider .hero-slider__pagination .swiper-pagination-bullet {
    width: 24px; height: 24px; margin: 0; opacity: 1; background: none; border-radius: 50%;
    display: grid; place-items: center; cursor: pointer;
}
.hero-slider .hero-slider__pagination .swiper-pagination-bullet::before {
    content: ""; width: 8px; height: 8px; border-radius: var(--pill); background: var(--hero-bullet);
    transition: width .25s ease, background-color .25s ease;
}
.hero-slider .hero-slider__pagination .swiper-pagination-bullet-active { width: 36px; border-radius: var(--pill); }
.hero-slider .hero-slider__pagination .swiper-pagination-bullet-active::before { width: 24px; background: var(--white); }
.hero-slider .swiper-pagination-bullet:focus-visible { outline: 2px solid var(--white); outline-offset: 0; }
.hero__side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.hero-card {
    position: relative; flex: 1; min-height: 212px; padding: 28px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
    border-radius: var(--radius-xl); transition: transform .2s ease;
}
.hero-card:hover { transform: translateY(-2px); }
.hero-card--blue { background: var(--accent-soft); }
.hero-card--blue .eyebrow { color: var(--accent-soft-text); }
.hero-card--coral { background: var(--deal-soft); }
.hero-card--coral .eyebrow { color: var(--deal-soft-text); }
.hero-card__title { font: 600 26px/1.1 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.hero-card__link { color: var(--ink); }
.hero-card__link:hover { color: var(--ink); }
.hero-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-xl); }
.hero-card__link:focus-visible { outline: none; }
.hero-card__link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 2px; }
.hero-card__cta { font: 600 14px/1 var(--font-body); }
.countdown { display: flex; align-items: center; gap: 10px; font: 500 13px/1 var(--font-body); color: var(--muted); }
.countdown__clock { padding: 6px 9px; border-radius: 8px; background: var(--deal-fill); color: var(--white); font: 500 14px/1 var(--font-mono); font-variant-numeric: tabular-nums; }

.promo-split { display: flex; flex-wrap: wrap; gap: 16px; }
.promo-card {
    position: relative; flex: 1 1 380px; min-height: 300px; display: flex; flex-wrap: wrap; overflow: hidden;
    border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--surface);
    transition: border-color .15s ease;
}
.promo-card:hover { border-color: var(--ink); }
.promo-card__body { flex: 1 1 200px; padding: 32px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; }
.promo-card__title { font: 600 30px/1.05 var(--font-display); letter-spacing: -.02em; }
.promo-card__link { color: var(--ink); }
.promo-card__link:hover { color: var(--ink); }
.promo-card__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius-xl); }
.promo-card__link:focus-visible { outline: none; }
.promo-card__link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: -3px; }
.promo-card__text { font-size: 14.5px; color: var(--muted); }
.promo-card__cta { font: 600 14px/1 var(--font-body); color: var(--accent); }
.promo-card__media { flex: 1 1 180px; min-height: 200px; position: relative; }
.promo-card__media .media { position: absolute; inset: 0; object-fit: cover; }

.cta-band {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
    padding: 40px; border-radius: var(--radius-xl); background: var(--accent-fill); color: var(--on-accent);
}
.cta-band__copy { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.cta-band__title { font: 600 30px/1.1 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.cta-band__text { color: var(--on-accent-muted); font-size: 15.5px; }

/* Carousels (home rails) -------------------------------------------------- */
.carousel { --per-view: 4; --gap: 16px; }
.carousel--categories { --per-view: 7; --gap: 12px; }
.carousel--brands { --per-view: 8; --gap: 12px; }
.carousel-nav { display: flex; gap: 8px; }
.carousel-nav__btn {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--ink);
    transition: border-color .15s, background-color .15s, color .15s;
}
.carousel-nav__btn:hover { border-color: var(--inverse); background: var(--inverse); color: var(--on-inverse); }
.carousel-nav__btn .icon { width: 18px; height: 18px; }
.carousel-nav__btn.swiper-button-disabled { opacity: .35; pointer-events: none; }
.carousel-nav__btn.swiper-button-lock, .no-js .carousel-nav { display: none; }
/* Room for hover lift, shadows and focus rings that overflow:hidden would clip. */
.carousel__track { padding: 4px; margin: -4px; }
.carousel__track .swiper-wrapper { list-style: none; margin: 0; padding: 0; }
.carousel__slide { width: calc((100% - var(--gap) * (var(--per-view) - 1)) / var(--per-view)); height: auto; }
.carousel__slide > * { height: 100%; }
/* Before Swiper boots (or without JS): a native, snap-scrolling row. */
.carousel__track:not(.swiper-initialized) { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel__track:not(.swiper-initialized) .swiper-wrapper { gap: var(--gap); }
.carousel__track:not(.swiper-initialized) .carousel__slide { scroll-snap-align: start; }

/* 8. Listing --------------------------------------------------------------- */
.listing { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.filters {
    flex: 1 1 220px; display: flex; flex-direction: column; gap: 18px;
    padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.filters__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.filters__title { font: 600 15px/1 var(--font-display); }
.filters__toggle { display: none; }
.filters__panel { display: flex; flex-direction: column; gap: 22px; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group__title { margin-bottom: 6px; font: 600 12px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.js .filters__apply { display: none; }
.listing__results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.listing__toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.listing__count { font: 500 14px/1 var(--font-body); color: var(--muted); }
.sort { display: flex; align-items: center; gap: 10px; }
.sort__label { font: 500 13.5px/1 var(--font-body); color: var(--muted); }
.is-loading .listing__results { opacity: .55; transition: opacity .2s; }

/* 9. Product --------------------------------------------------------------- */
.product { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.gallery { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.gallery__stage { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-xl); overflow: hidden; background: var(--stripes); }
.gallery__stage img.media { background: var(--media-bg); padding: 22px; }
.gallery__stage .media--placeholder { padding: 22px; }
.gallery__badge { position: absolute; top: 18px; left: 18px; padding: 6px 12px; font-size: 12.5px; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.gallery__thumb {
    width: 100%; aspect-ratio: 1 / 1; padding: 6px; overflow: hidden;
    display: flex; align-items: flex-end; justify-content: center;
    border: 2px solid transparent; border-radius: var(--radius); background: var(--stripes);
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--media-bg); border-radius: 8px; }
.gallery__thumb[aria-pressed="true"] { border-color: var(--ink); }
.gallery__thumb-label { font: 500 9.5px/1.2 var(--font-mono); color: var(--subtle); }

.product__info { flex: 1 1 380px; min-width: 0; }
.product__brand { align-self: flex-start; font: 600 12.5px/1 var(--font-body); letter-spacing: .1em; text-transform: uppercase; }
.product__title { font: 600 clamp(28px, 3.2vw, 40px)/1.08 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.product__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.product__meta .rating { font-size: 14px; }
.stock { font-weight: 600; }
.stock--in { color: var(--success); }
.stock--out { color: var(--deal); }
.product__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.product__price-now { font: 600 34px/1 var(--font-display); letter-spacing: -.02em; }
.product__price-old { font-size: 17px; color: var(--subtle); }
.product__save { font: 600 13px/1 var(--font-body); color: var(--deal); }

.purchase { padding-top: 22px; border-top: 1px solid var(--line); }
.option-group { display: flex; flex-direction: column; gap: 12px; }
.option-group__legend { margin-bottom: 12px; font: 500 14px/1 var(--font-body); }
.option-group__value { color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px; }
.swatch { position: relative; cursor: pointer; }
.swatch__dot {
    display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--swatch);
    box-shadow: inset 0 0 0 1px var(--swatch-border);
}
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.swatch input:focus-visible + .swatch__dot { outline: 3px solid var(--accent); outline-offset: 6px; }
.storage-options { display: flex; flex-wrap: wrap; gap: 10px; }
.storage-option { position: relative; cursor: pointer; }
.storage-option__box {
    min-width: 100px; height: 56px; padding: 0 16px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--surface);
}
.storage-option input:checked + .storage-option__box { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.storage-option input:focus-visible + .storage-option__box { outline: 3px solid var(--accent); outline-offset: 2px; }
.storage-option__label { font: 600 14px/1 var(--font-body); }
.storage-option__delta { font-size: 11.5px; color: var(--subtle); }
.purchase__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.purchase__add { flex: 1 1 220px; }

.assurances {
    display: flex; flex-direction: column; gap: 12px; padding: 18px;
    border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface);
    font-size: 14px; line-height: 1.45; color: var(--ink-2);
}
.assurances li { display: flex; gap: 12px; align-items: flex-start; }
.assurances .icon { flex: none; width: 20px; height: 20px; color: var(--muted); }
.assurances strong { font-weight: 600; color: var(--ink); }

.product-details { display: flex; flex-wrap: wrap; gap: 40px; padding-top: 40px; border-top: 1px solid var(--line); }
.product-details > :first-child { flex: 1 1 360px; }
.product-details > :last-child { flex: 1 1 420px; }
.prose-text { font-size: 16px; line-height: 1.65; color: var(--ink-2); text-wrap: pretty; }
.spec-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.spec-list__row { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 14px 18px; font-size: 14px; line-height: 1.45; }
.spec-list__row + .spec-list__row { border-top: 1px solid var(--line-soft); }
.spec-list dt { flex: 0 0 130px; color: var(--subtle); }
.spec-list dd { flex: 1 1 200px; font-weight: 500; }

/* 10. Compare -------------------------------------------------------------- */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
/* Fixed layout: every product column gets the same width regardless of its text. */
/* border-collapse must be "separate": sticky cells in collapsed tables don't paint over scrolled cells (WebKit/Blink). */
.compare-table { width: 100%; min-width: calc(130px + var(--cols, 3) * 190px); table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.45; }
.compare-table__label-col { width: 130px; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.compare-table tbody tr:last-child > * { border-bottom: 0; }
.compare-table__label-row { display: none; }
.compare-table thead th { font-weight: 400; }
.compare-table tbody th { font-weight: 400; color: var(--subtle); overflow-wrap: anywhere; }
.compare-table td { overflow-wrap: anywhere; }
.compare-table tr > :first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); background-clip: padding-box; }
.table-scroll.is-scrolled .compare-table tr > :first-child { box-shadow: var(--shadow-sticky); }
.compare-table tbody td { font-weight: 500; }
.compare-table__product { display: flex; flex-direction: column; gap: 10px; }
/* Same image height in every column (images are contained, never cropped). */
.compare-table__img { width: 100%; height: 240px; border-radius: 12px; background: var(--stripes); }
img.compare-table__img { background: var(--media-bg); }
.compare-table__name {
    font: 600 15px/1.3 var(--font-body); color: var(--ink);
    min-height: 2.6em;   /* two lines, so prices and buttons line up across columns */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.compare-table .price__now { white-space: normal; }
.compare-table__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.compare-tray {
    position: fixed; left: 50%; bottom: 16px; z-index: 40; transform: translateX(-50%);
    width: min(640px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px;
    padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--inverse); color: var(--on-inverse);
    box-shadow: var(--shadow-tray);
}
.compare-tray__names { flex: 1; min-width: 0; font: 500 13.5px/1.35 var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compare-tray__clear { border: 0; background: none; color: var(--inverse-muted); font: 500 13px/1 var(--font-body); padding: 10px 6px; }
.compare-tray__clear:hover { color: var(--on-inverse); }
.compare-tray__go {
    display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 12px;
    background: var(--on-inverse); color: var(--inverse); font: 600 13.5px/1 var(--font-body); white-space: nowrap;
}
.compare-tray__go:hover { color: var(--accent); }
.compare-tray__go:focus-visible, .compare-tray__clear:focus-visible { outline-color: var(--on-inverse); }

/* 11. Cart drawer ---------------------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: flex-end; }
.drawer__backdrop { position: absolute; inset: 0; background: var(--backdrop); animation: fade .2s ease; }
.drawer__panel {
    position: relative; width: min(420px, 100%); height: 100%; display: flex; flex-direction: column;
    background: var(--surface); box-shadow: var(--shadow-drawer); outline: none; animation: slide-in .25s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer__header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer__title { font: 600 20px/1 var(--font-display); }
.drawer__count { color: var(--subtle); font-weight: 500; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 24px; display: flex; flex-direction: column; }
.drawer__footer { padding: 20px 24px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cart-item__media { width: 72px; height: 72px; flex: none; border-radius: 12px; overflow: hidden; background: var(--stripes); }
.cart-item__media img { width: 100%; height: 100%; object-fit: contain; background: var(--media-bg); }
.cart-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-item__top { display: flex; justify-content: space-between; gap: 10px; }
.cart-item__name { font: 600 14.5px/1.3 var(--font-body); color: var(--ink); }
.cart-item__total { font: 600 14.5px/1.3 var(--font-display); white-space: nowrap; }
.cart-item__variant { font-size: 12.5px; color: var(--subtle); }
.cart-item__actions { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.cart-empty { margin: auto; padding: 40px 0; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.cart-empty__title { font: 600 17px/1.2 var(--font-display); }
.cart-summary { display: flex; flex-direction: column; gap: 12px; }
.cart-summary__row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.cart-summary__row--total { font: 600 18px/1 var(--font-display); color: var(--ink); }
.cart-summary__note { font-size: 12.5px; color: var(--subtle); }
body.has-drawer { overflow: hidden; }

/* 12. Footer --------------------------------------------------------------- */
.site-footer { background: var(--dark-surface); color: var(--on-dark-muted); font-size: 14px; border-top: 1px solid var(--dark-surface-edge); }
.site-footer a { color: var(--on-dark-muted); }
.site-footer a:hover { color: var(--on-dark); }
.site-footer :focus-visible { outline-color: var(--on-dark); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding-top: 48px; padding-bottom: 40px; }
.site-footer__about { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; gap: 12px; line-height: 1.6; }
.site-footer__tagline { color: var(--on-dark); font-weight: 500; }
.site-footer__contact { font-style: normal; }
.site-footer__columns { display: flex; flex-wrap: wrap; gap: 48px; }
.site-footer__heading { margin-bottom: 14px; font: 600 14px/1 var(--font-body); color: var(--on-dark); }
.site-footer__column ul { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.site-footer__legal { padding-top: 18px; padding-bottom: 24px; border-top: 1px solid var(--dark-line); font-size: 13px; }
.has-compare-tray .site-footer__legal { padding-bottom: 96px; }

/* Content & error pages */
.content-page { max-width: 760px; display: flex; flex-direction: column; gap: 20px; }
.prose { font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.6em; font: 600 20px/1.2 var(--font-display); color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.error-page { max-width: 560px; margin: 40px auto; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.error-page__code { font: 700 88px/1 var(--font-display); letter-spacing: -.04em; color: var(--line-strong); }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* Toast */
.toast {
    position: fixed; left: 50%; top: 20px; z-index: 60; transform: translateX(-50%);
    padding: 12px 18px; border-radius: 12px; background: var(--inverse); color: var(--on-inverse);
    font: 500 14px/1.3 var(--font-body); box-shadow: var(--shadow-pop); animation: fade .2s ease;
}

/* 13. Utilities & a11y ----------------------------------------------------- */
.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { flex: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .product-card:hover, .hero-card:hover { transform: none; }
}

@media (forced-colors: active) {
    .pill-option input:checked + span, .chip.is-active, .pagination__link.is-current { forced-color-adjust: none; }
    .swatch input:checked + .swatch__dot { outline: 3px solid CanvasText; outline-offset: 3px; }
}

/* 14. Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
    .carousel { --per-view: 3; }
    .carousel--categories { --per-view: 5; }
    .carousel--brands { --per-view: 6; }
}

@media (max-width: 899px) {
    .js .filters__toggle { display: inline-flex; }
    .js .filters__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .js .filters { padding: 12px; }
    .js .filters__panel:not(.is-open) { display: none; }
    .js .filters__panel.is-open { padding: 8px; }
    .js .filters__apply { display: inline-flex; }
}

@media (max-width: 720px) {
    :root { --gutter: 16px; }
    .stack--xl { gap: 44px; }
    .site-header__bar { gap: 10px 12px; padding-top: 12px; }
    .search { order: 3; flex-basis: 100%; max-width: none; }
    .theme-toggle { margin-left: auto; }
    .cart-button { padding-left: 12px; }
    .cart-button__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .search__input { padding-right: 56px; }
    .search__submit { padding: 0 12px; }
    .search__submit-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .search__icon { display: block; }
    .hero-slide { min-height: 0; }
    .hero-slide__media { order: -1; min-height: 220px; }
    .hero-slide__copy { padding: 28px 24px 88px; }
    .hero-slider__controls { left: 24px; bottom: 24px; }
    .hero-card { min-height: 170px; padding: 24px; }
    .hero-card__title, .section-title { font-size: 22px; }
    .promo-card__body { padding: 24px; }
    .promo-card__title, .cta-band__title { font-size: 24px; }
    .cta-band { padding: 28px 24px; }
    .product { gap: 28px; }
    .product__price-now { font-size: 28px; }
    .purchase__actions .stepper { flex: 1 0 auto; justify-content: space-between; }
    .purchase__add { flex-basis: 100%; }
    .product-details { gap: 32px; padding-top: 32px; }
}

@media (max-width: 600px) {
    /* Show a sliver of the next slide so it's obvious the row scrolls. */
    .carousel { --per-view: 2.15; --gap: 10px; }
    .carousel--categories { --per-view: 2.6; }
    .carousel--brands { --per-view: 2.8; }
    .carousel-nav { display: none; }
    .product-grid, .product-grid--narrow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .product-card__body { padding: 12px; gap: 5px; }
    .product-card__title { font-size: 14px; }
    .product-card__badge { top: 8px; left: 8px; }
    .product-card__stock { top: 8px; right: 8px; }
    .price__now { font-size: 15px; letter-spacing: -.01em; }
    .product-card__footer { gap: 6px; }
    .round-button { width: 36px; height: 36px; }
    .round-button .icon { width: 18px; height: 18px; }
    .listing__toolbar { align-items: stretch; }
    .sort { flex: 1; justify-content: flex-end; }
    .page-header--row .btn { width: 100%; }
    .spec-list dt { flex-basis: 100%; }
    /* Phones: drop the label column; each spec name becomes a heading row above its values. */
    .compare-table { min-width: calc(var(--cols, 3) * 140px); font-size: 13.5px; }
    .compare-table th, .compare-table td { padding: 12px; }
    .compare-table__label-col { width: 0; }
    .compare-table tr > :first-child { position: static; padding: 0; border: 0; box-shadow: none !important; }
    .compare-table__row-label {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    .compare-table__label-row { display: table-row; }
    .compare-table__label-row td {
        padding: 10px 12px 0 !important; border-bottom: 0;
        font: 600 11px/1 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--subtle);
    }
    /* Keep the heading visible while the row scrolls sideways. */
    .compare-table__label-row span { position: sticky; left: 12px; }
    .compare-table__label-row + tr > * { padding-top: 6px; }
    .compare-table__img { height: 140px; }
    .compare-table .price__now { font-size: 15px; }
    .compare-table__name { font-size: 14px; }
}

@media (max-width: 360px) {
    .product-grid, .product-grid--narrow { grid-template-columns: 1fr; }
}
