/* ==========================================================================
   Chingo Auto — design system
   White surfaces, red accents. Every colour is a token in :root below.
   ========================================================================== */

:root {
  /* Brand tokens — change these to rebrand */
  --brand-name-color: #d81f26;
  --accent: #d81f26;          /* primary red */
  --accent-soft: #b3161c;     /* darker red, used on hover */
  --accent-ink: #ffffff;      /* text/icons sitting on top of the red */
  --accent-tint: #fdeced;     /* faint red wash for hover surfaces */
  --info: #a3151b;            /* deep red, secondary badges */
  --success: #17794a;         /* kept green: functional in-stock signal */
  --danger: #d81f26;

  /* Surfaces — white base */
  --bg: #ffffff;
  --bg-2: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --line: #e2e6ec;
  --line-soft: #eceff3;

  /* Text */
  --ink: #101419;
  --ink-2: #495261;
  /* #79828f measured 3.89:1 on white — below the 4.5:1 minimum for body text,
     and this token carries hints, the top bar, struck-through prices and all
     the small print. #656e7b clears 4.5:1 against every surface we paint it on
     (white 5.16, bg-2 4.86, surface-2 4.72, accent tint 4.52). */
  --ink-3: #656e7b;

  /* Geometry */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --maxw: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 132px;

  --shadow: 0 14px 40px -22px rgba(16, 20, 25, 0.34);
  --shadow-lift: 0 26px 60px -26px rgba(16, 20, 25, 0.42);

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Inter", system-ui, sans-serif;

  /* Native controls (scrollbars, date pickers, form fields) follow this. */
  color-scheme: light dark;
}

/* Dark mode. Applies automatically when the device asks for it, and can also
   be forced with data-theme="dark" on <html>. The palette existed before but
   nothing ever triggered it, so anyone browsing at night got a full-brightness
   white page. The two selectors share one block via :is(). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e12;
    --bg-2: #12151b;
    --surface: #171b23;
    --surface-2: #1d222c;
    --line: #262c38;
    --line-soft: #1e232d;
    --ink: #f2f4f8;
    --ink-2: #b8c0cf;
    --ink-3: #97a1b0;          /* 4.5:1+ on the dark surfaces */
    --accent: #ef3b41;
    --accent-soft: #ff5b60;
    --accent-tint: #2a1416;
    --info: #ef3b41;
    --success: #2ad1a5;
    --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.85);
    --shadow-lift: 0 30px 70px -28px rgba(0, 0, 0, 0.95);
  }
}

/* Explicit override, either direction. */
[data-theme="dark"] {
  --bg: #0c0e12;
  --bg-2: #12151b;
  --surface: #171b23;
  --surface-2: #1d222c;
  --line: #262c38;
  --line-soft: #1e232d;
  --ink: #f2f4f8;
  --ink-2: #b8c0cf;
  --ink-3: #7d8797;
  --accent: #ef3b41;
  --accent-soft: #ff5b60;
  --accent-tint: #2a1416;
  --info: #ef3b41;
  --success: #2ad1a5;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.85);
  --shadow-lift: 0 30px 70px -28px rgba(0, 0, 0, 0.95);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* 100%, not a pixel value. A fixed px root ignores a reader who has raised
     the default font size in their browser — the web equivalent of not
     supporting Dynamic Type. Everything below is in rem, so it now follows. */
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto is not optional here. The width/height attributes on an <img>
   map to CSS presentational hints, so a rule that sets only width leaves the
   height hint in force — a 640x480 attribute pair plus `width:72%` renders
   72% wide by a hard 480px tall. On a phone that is a violently stretched
   photo. Setting height:auto lets the intrinsic ratio win. Anything that
   genuinely needs to fill a box (hero and banner backgrounds) sets
   height:100% explicitly, which still overrides this. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.4em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; color: var(--ink-2); }

/* Safe areas. With viewport-fit=cover the page paints edge to edge, including
   under the notch and the home indicator, so horizontal padding has to grow by
   whatever the device reserves. env() resolves to 0 everywhere else, so this
   costs nothing on a normal screen. */
.wrap {
  width: min(100% - (var(--gutter) * 2), var(--maxw));
  margin-inline: auto;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 0 0 10px 10px; font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

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

/* ---------------------------------------------------------------- header */
.topbar {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-soft);
  font-size: .82rem;
  color: var(--ink-3);
}
.topbar__inner {
  display: flex; gap: 20px; align-items: center; justify-content: space-between;
  min-height: 40px; flex-wrap: wrap;
}
.topbar__list { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.topbar__list li { display: flex; align-items: center; gap: 6px; }

/* On a phone the strip used to wrap into a five-line stack that pushed the
   logo down the page. Below 860px only the two items worth the space survive
   — the dispatch promise and the phone number — on a single tidy line. */
@media (max-width: 860px) {
  .topbar { font-size: .76rem; }
  .topbar__inner { flex-wrap: nowrap; gap: 12px; min-height: 34px; }
  .topbar__list { flex-wrap: nowrap; gap: 12px; min-width: 0; }
  .topbar__list li:not(.tb-key) { display: none; }
  .topbar__list li.tb-key { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__list li.tb-key a { color: var(--accent); font-weight: 700; }
}
@media (max-width: 480px) {
  .topbar .tb-long { display: none; }   /* "2–5 days GCC-wide" is the first to go */
}

.site-header {
  position: sticky; top: 0; z-index: 60;
  padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px; align-items: center; min-height: 76px;
}
.logo { display: flex; align-items: center; gap: 11px; font-family: var(--font-display); }
.logo__mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #8f1116);
  color: var(--accent-ink); font-weight: 800; font-size: 1.35rem; flex: none;
}
.logo__text { font-size: 1.42rem; font-weight: 700; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.logo__text span { color: var(--accent); }
.logo__sub { display: block; font-family: var(--font); font-size: .6rem; letter-spacing: .28em; color: var(--ink-3); text-transform: uppercase; }

.searchbar { position: relative; }
.searchbar input {
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); border-radius: 999px; padding: 12px 46px 12px 44px; font-size: .93rem;
}
.searchbar input::placeholder { color: var(--ink-3); }
.searchbar__icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.searchbar__go {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  width: 36px; height: 36px; display: grid; place-items: center; font-weight: 700;
}
/* The visible pill stays small so it fits inside the field, but the tappable
   area is padded out to 44x44 with a transparent overlay. Visual size and hit
   size are different problems and should be solved separately. */
.searchbar__go::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 999px;
}
.suggest {
  position: absolute; inset-inline: 0; top: calc(100% + 8px); z-index: 80;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); overflow: hidden; display: none;
}
.suggest.is-open { display: block; }
.suggest a { display: flex; justify-content: space-between; gap: 14px; padding: 11px 16px; font-size: .9rem; border-bottom: 1px solid var(--line-soft); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover { background: var(--accent-tint); }
.suggest small { color: var(--ink-3); }

.header__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; position: relative;
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  font-size: .68rem; font-weight: 800; display: grid; place-items: center;
}
.nav-toggle { display: none; }

.mainnav { border-top: 1px solid var(--line-soft); }
.mainnav__list {
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; align-items: center;
}
.mainnav__list > li > a {
  display: block; padding: 13px 15px; font-size: .87rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2);
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.mainnav__list > li > a:hover,
.mainnav__list > li > a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.mainnav .pill { color: var(--accent) !important; }

/* mega menu */
.has-mega { position: relative; }
.mega {
  position: absolute; top: 100%; left: 0; z-index: 70; width: min(92vw, 940px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 22px; display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 26px;
}
.has-mega:hover .mega, .has-mega:focus-within .mega { display: grid; }
.mega h4 { font-size: .74rem; letter-spacing: .18em; color: var(--ink-3); margin: 0 0 10px; font-family: var(--font); }
.mega ul { list-style: none; margin: 0 0 16px; padding: 0; }
.mega a { display: block; padding: 5px 0; font-size: .88rem; color: var(--ink-2); }
.mega a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .9rem; letter-spacing: .03em; text-transform: uppercase;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px -12px var(--accent); }
.btn--primary:hover { background: var(--accent-soft); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
/* min-height, not padding. Padding alone can't guarantee the target size once
   the label wraps or the font scales. 44px is the documented minimum. */
.btn--sm { padding: 9px 16px; font-size: .78rem; min-height: 44px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero__slides { position: relative; min-height: clamp(460px, 62vh, 640px); }
.hero__slide {
  position: absolute; inset: 0; display: grid; align-items: center;
  opacity: 0; visibility: hidden;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img, .hero__bg svg { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 72%, transparent) 48%, transparent 82%);
}
.hero__content { position: relative; z-index: 2; max-width: 620px; padding-block: 60px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent-ink);
  background: var(--accent); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero__title { margin-bottom: .35em; }
.hero__body { font-size: 1.06rem; max-width: 52ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero__dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; z-index: 5; }
.hero__dots button {
  width: 34px; height: 5px; border-radius: 999px; border: 0; background: var(--line); padding: 0;
  position: relative;
}
.hero__dots button::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px;
}
.hero__dots button[aria-selected="true"] { background: var(--accent); }

/* ---------------------------------------------------------------- finder */
.finder {
  position: relative; z-index: 8; margin-top: -46px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lift);
}
.finder__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.finder__head h2 { margin: 0; font-size: 1.35rem; }
.finder__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.field select, .field input {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 11px; padding: 12px 13px; font-size: .93rem; width: 100%;
}
.field select:disabled { opacity: .5; }

/* ---------------------------------------------------------------- sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--tight { padding-block: clamp(36px, 5vw, 56px); }
.section__head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
  flex-wrap: wrap; margin-bottom: 30px;
}
.section__head p { margin: 0; max-width: 60ch; }
.eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 10px;
}

/* ---------------------------------------------------------------- banners */
.banner {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  border: 1px solid var(--line); background: var(--surface); min-height: 210px;
  display: grid; align-items: center;
}
.banner__bg { position: absolute; inset: 0; z-index: 0; opacity: .85; }
.banner__bg img, .banner__bg svg { width: 100%; height: 100%; object-fit: cover; }
.banner__inner { position: relative; z-index: 2; padding: 30px; max-width: 60ch; }
.banner__eyebrow {
  font-size: .68rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px; display: block;
}
.banner h3 { margin-bottom: .3em; }
.banner p { font-size: .95rem; margin-bottom: 16px; }
.banner-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.leaderboard { min-height: 150px; }
.leaderboard .banner__inner { display: flex; align-items: center; gap: 26px; max-width: none; flex-wrap: wrap; }
.leaderboard h3 { font-size: 1.3rem; margin: 0; }
.ad-label {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  font-size: .58rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}

/* ---------------------------------------------------------------- brand grid */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.brand-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 18px; display: flex; flex-direction: column; gap: 6px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.brand-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.brand-card__logo {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); font-family: var(--font-display); font-weight: 800;
  font-size: 1.15rem; color: var(--accent); margin-bottom: 8px;
}
.brand-card strong { font-size: 1.04rem; }
.brand-card small { color: var(--ink-3); font-size: .78rem; }

/* ---------------------------------------------------------------- category tiles */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.cat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 16px; text-align: center; transition: transform .25s, border-color .25s, background .25s;
}
.cat-tile:hover { transform: translateY(-5px); border-color: var(--accent); background: var(--accent-tint); }
.cat-tile svg { margin: 0 auto 10px; color: var(--accent); }
.cat-tile span { display: block; font-weight: 600; font-size: .9rem; }
.cat-tile small { color: var(--ink-3); font-size: .74rem; }

/* ---------------------------------------------------------------- product cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 20px; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(258px, 1fr);
  gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }

.product-card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.product-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.product-card__media {
  aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center;
  border-bottom: 1px solid var(--line-soft); overflow: hidden;
}
.product-card__media img, .product-card__media svg {
  max-width: 86%; max-height: 86%; width: auto; height: auto; object-fit: contain;
}
.product-card__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.product-card__meta { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.product-card__title { font-size: .96rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.product-card__fit { font-size: .78rem; color: var(--ink-3); }
.product-card__foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 8px; }
.price { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--ink); line-height: 1; }
.price small { font-size: .62rem; letter-spacing: .1em; color: var(--ink-3); display: block; text-transform: uppercase; }
.price-was { font-size: .82rem; color: var(--ink-3); text-decoration: line-through; margin-inline-start: 6px; }

.badges { position: absolute; top: 11px; left: 11px; display: flex; flex-direction: column; gap: 5px; z-index: 3; }
.badge {
  font-size: .62rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.badge--sale { background: var(--danger); color: #fff; border-color: transparent; }
.badge--oem { background: var(--info); color: #fff; border-color: transparent; }
.badge--desert { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.badge--ev { background: var(--success); color: #fff; border-color: transparent; }

.stock { font-size: .76rem; display: inline-flex; align-items: center; gap: 6px; }
.stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.stock--in { color: var(--success); }
.stock--low { color: var(--accent); }
.stock--low::before { background: var(--accent); }
.stock--out { color: var(--ink-3); }
.stock--out::before { background: var(--ink-3); }

/* ---------------------------------------------------------------- shop layout */
.shop-layout { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 30px; align-items: start; }
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: sticky; top: calc(var(--header-h) + 14px);
  max-height: calc(100vh - var(--header-h) - 30px); overflow-y: auto;
}
.filters h2 { font-size: 1.05rem; margin-bottom: 4px; }
.filter-group { border-top: 1px solid var(--line-soft); padding-block: 14px; }
.filter-group:first-of-type { border-top: 0; }
.filter-group > h3 { font-size: .74rem; letter-spacing: .18em; color: var(--ink-3); font-family: var(--font); margin-bottom: 10px; }
.check { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: .88rem; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.check .count { margin-inline-start: auto; font-size: .74rem; color: var(--ink-3); }
.filter-scroll { max-height: 220px; overflow-y: auto; padding-inline-end: 4px; }

.shop-toolbar {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: .8rem;
}
.chip button {
  background: none; border: 0; color: var(--ink-3); padding: 0; line-height: 1; font-size: 1rem;
  position: relative; display: grid; place-items: center; width: 20px; height: 20px;
}
.chip button::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px;
}
.chip button:hover { color: var(--danger); }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.pagination button {
  min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
}
.pagination button[aria-current="true"] { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }

.empty { text-align: center; padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------------------------------------------------------------- product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.pdp__gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.pdp__main-img { aspect-ratio: 4/3; display: grid; place-items: center; background: var(--surface-2); border-radius: var(--radius); }
.pdp__main-img svg, .pdp__main-img img {
  max-width: 82%; max-height: 82%; width: auto; height: auto; object-fit: contain;
}
.pdp__thumbs { display: flex; gap: 10px; margin-top: 14px; }
.pdp__thumbs button {
  width: 72px; height: 62px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface-2); display: grid; place-items: center; padding: 6px;
}
.pdp__thumbs button[aria-current="true"] { border-color: var(--accent); }
.pdp__thumbs button img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pdp__price { display: flex; align-items: baseline; gap: 12px; margin: 10px 0 6px; }
.pdp__price .price { font-size: 2.6rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin-block: 18px; }
.spec-table th, .spec-table td { text-align: start; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec-table th { color: var(--ink-3); font-weight: 600; width: 44%; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.qty button { width: 42px; height: 46px; background: none; border: 0; color: var(--ink); font-size: 1.1rem; }
.qty input { width: 54px; text-align: center; background: none; border: 0; color: var(--ink); font-weight: 700; }
.trust-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 22px; }
.trust-row div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: .82rem; }
.trust-row strong { display: block; font-size: .88rem; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-block: 40px 0; flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; padding: 13px 18px;
  color: var(--ink-3); font-weight: 600; font-size: .9rem;
}
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.tabpanel { padding-top: 26px; }
.tabpanel[hidden] { display: none; }

/* accordion / FAQ */
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 0; font-size: .93rem; }

/* ---------------------------------------------------------------- cart drawer */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(3, 5, 9, .68); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; inset-inline-end: 0; height: 100%; width: min(420px, 100%);
  background: var(--bg-2); border-inline-start: 1px solid var(--line); z-index: 95;
  transform: translateX(100%); transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px; padding-top: calc(20px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
.drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.drawer__foot {
  border-top: 1px solid var(--line);
  padding: 18px 20px; padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.cart-line { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.cart-line__img { background: var(--surface-2); border-radius: 9px; display: grid; place-items: center; padding: 6px; }
.cart-line__img img { max-width: 100%; max-height: 46px; width: auto; height: auto; object-fit: contain; }
.cart-line__name { font-size: .87rem; font-weight: 600; }
.cart-line small { color: var(--ink-3); font-size: .74rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: 6px; }
.cart-total strong { font-family: var(--font-display); font-size: 1.5rem; }

/* ---------------------------------------------------------------- footer */
.site-footer {
  background: var(--bg-2); border-top: 1px solid var(--line); margin-top: 40px;
  padding-top: 56px;
  padding-bottom: calc(26px + env(safe-area-inset-bottom));
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
.footer-grid h4 { font-family: var(--font); font-size: .76rem; letter-spacing: .2em; color: var(--ink-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { font-size: .89rem; color: var(--ink-2); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .8rem; color: var(--ink-3);
}
.newsletter { display: flex; gap: 8px; margin-top: 14px; }
.newsletter input { flex: 1; background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 11px 16px; }

/* ---------------------------------------------------------------- misc */
.breadcrumbs { font-size: .82rem; color: var(--ink-3); padding-block: 18px; }
.breadcrumbs ol { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--line); }
.breadcrumbs a:hover { color: var(--accent); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.5rem; line-height: 1; color: var(--accent); }
.stat span { font-size: .84rem; color: var(--ink-3); }

.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { color: var(--ink-2); }

.toast {
  position: fixed; bottom: calc(22px + env(safe-area-inset-bottom));
  inset-inline-start: 50%; transform: translate(-50%, 120%);
  background: var(--surface); border: 1px solid var(--accent); color: var(--ink);
  padding: 13px 22px; border-radius: 999px; z-index: 120; box-shadow: var(--shadow-lift);
  transition: transform .35s cubic-bezier(.2,1.2,.4,1); font-size: .9rem; font-weight: 600;
}
.toast.is-open { transform: translate(-50%, 0); }

/* GSAP entry states.
   IMPORTANT: content is NEVER hidden by CSS. GSAP sets the "from" opacity on the
   elements themselves at tween time, so if the CDN is blocked, a script throws,
   or JavaScript is off entirely, everything still renders. A blank page can no
   longer be caused by an animation failure. */
.js-reveal { will-change: transform, opacity; }
.hero__slide.is-active { opacity: 1; visibility: visible; }

/* ---------------------------------------------------------------- blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.post-card {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.post-card__media { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.post-card__meta { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.post-card h3 { font-family: var(--font); font-size: 1.12rem; text-transform: none; line-height: 1.3; margin: 0; }
.post-card p { font-size: .92rem; margin: 0; }
.post-card__more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .85rem; color: var(--accent); }

.tagbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tagbar a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; font-weight: 600;
  color: var(--ink-2); background: var(--surface); transition: border-color .2s, color .2s;
}
.tagbar a:hover { border-color: var(--accent); color: var(--accent); }
.tagbar a[aria-current="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); }

/* article */
.article { max-width: 74ch; margin-inline: auto; }
.article__hero { aspect-ratio: 21 / 9; background: var(--surface-2); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 30px; }
.article__hero img { width: 100%; height: 100%; object-fit: cover; }
.article__meta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  font-size: .85rem; color: var(--ink-3); margin-bottom: 10px; }
.article h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); text-transform: none; line-height: 1.12; }
.article__lede { font-size: 1.12rem; color: var(--ink-2); margin-bottom: 26px; }
.article__body { font-size: 1.03rem; line-height: 1.75; }
.article__body h2 {
  font-family: var(--font); font-size: 1.35rem; text-transform: none; letter-spacing: 0;
  margin: 1.9em 0 .5em; padding-top: .5em; border-top: 1px solid var(--line-soft);
}
.article__body p { margin: 0 0 1.1em; }
.article__body ul { margin: 0 0 1.3em; padding-left: 1.25em; }
.article__body li { margin-bottom: .5em; color: var(--ink-2); }
.article__body strong { color: var(--ink); font-weight: 700; }
.article__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.article__cta {
  margin: 40px 0 0; padding: 22px 24px; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface-2);
}
.article__cta h3 { font-family: var(--font); font-size: 1.08rem; text-transform: none; margin-bottom: .4em; }
.article__cta p { font-size: .93rem; margin-bottom: 14px; }

.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); padding-block: 14px; }
.marquee__track { display: flex; gap: 54px; width: max-content; }
.marquee__track span {
  font-family: var(--font-display); font-size: 1.2rem; letter-spacing: .08em;
  color: var(--ink-3); text-transform: uppercase; white-space: nowrap;
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .finder__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder__grid .btn { grid-column: 1 / -1; }
  .pdp { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .header__inner { grid-template-columns: auto auto; }
  .searchbar { grid-column: 1 / -1; order: 3; }
  .nav-toggle { display: grid; }
  .mainnav { display: none; }
  .mainnav.is-open { display: block; }
  .mainnav__list { flex-direction: column; align-items: stretch; }
  .mega { position: static; width: auto; display: none !important; }
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; }
  .banner-pair { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .finder__grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero__content { padding-block: 44px; }
  /* Photos get more of the frame on a small screen — the surrounding padding
     costs proportionally more there. */
  .product-card__media img, .product-card__media svg { max-width: 94%; max-height: 94%; }
  .pdp__main-img svg, .pdp__main-img img { max-width: 92%; max-height: 92%; }
  .pdp__thumbs button { width: 62px; height: 54px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html.gsap-ready .js-reveal { opacity: 1 !important; transform: none !important; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .site-footer, .topbar, .drawer, .drawer-backdrop, .banner { display: none !important; }
}

/* ==========================================================================
   CHECKOUT
   Two columns on a wide screen, one on a phone, with the summary and its pay
   button moving above the form on mobile so the price is never hidden below
   three fieldsets of typing.
   ========================================================================== */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; align-items: start; }

.checkout__form { display: grid; gap: 20px; min-width: 0; }

.co-block {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: 22px; margin: 0;
}
.co-block--flat { background: var(--surface-2); }
.co-block legend {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 1.15rem; font-weight: 700; letter-spacing: .01em;
  padding: 0 8px; margin-inline-start: -8px;
}
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.co-block .field + .field, .co-row + .field { margin-top: 16px; }
.co-block textarea {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 11px; padding: 12px 13px; font: inherit; font-size: .93rem;
  width: 100%; resize: vertical; min-height: 84px;
}
.req { color: var(--accent); }

.field .err { color: var(--accent); font-size: .8rem; min-height: 1em; }
.field .hint, .co-block .hint { color: var(--ink-3); font-size: .8rem; }
.is-invalid { border-color: var(--accent) !important; }

.co-check { display: flex; gap: 12px; align-items: flex-start; font-size: .9rem; line-height: 1.55; }
.co-check input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.co-check a { color: var(--accent); }

/* ------------------------------------------------------------- summary */
.checkout__summary { position: sticky; top: 96px; min-width: 0; }
.co-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); padding: 22px; box-shadow: var(--shadow-lift);
}
.co-card h2 { margin: 0 0 14px; font-size: 1.2rem; }

.co-lines { display: grid; gap: 14px; max-height: 46vh; overflow: auto; padding-inline-end: 4px; }
.co-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.co-line img { border-radius: 9px; background: var(--surface-2); object-fit: contain; }
.co-line__body { min-width: 0; }
.co-line__name { display: block; font-weight: 600; font-size: .89rem; line-height: 1.35; }
.co-line__body small { color: var(--ink-3); font-size: .76rem; }
.co-line__qty { transform: scale(.82); transform-origin: left; margin-top: 4px; }
.co-line__price { text-align: end; font-size: .9rem; white-space: nowrap; }
.co-line__remove {
  display: block; margin-top: 4px; margin-inline-start: auto;
  background: none; border: 0; color: var(--ink-3); font-size: .76rem;
  text-decoration: underline; cursor: pointer; padding: 4px 0;
}
.co-line__remove:hover { color: var(--accent); }

.co-totals { margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 9px; }
.co-totals > div { display: flex; justify-content: space-between; gap: 14px; font-size: .92rem; }
.co-totals dt, .co-totals dd { margin: 0; }
.co-totals dt small { color: var(--ink-3); font-weight: 400; }
.co-totals__grand { border-top: 1px solid var(--line); padding-top: 12px; font-size: 1.12rem !important; font-weight: 800; }
.co-totals__vat { color: var(--ink-3); font-size: .8rem !important; margin-top: -4px; }

.co-pay { width: 100%; margin-top: 18px; padding-block: 14px; font-size: 1rem; }
.co-pay:disabled { opacity: .65; cursor: progress; }

.co-error {
  margin: 14px 0 0; padding: 12px 14px; border-radius: 11px;
  background: var(--accent-tint); border: 1px solid var(--accent);
  color: var(--accent-soft); font-size: .86rem; line-height: 1.5;
}

.co-trust { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 7px; }
.co-trust li { color: var(--ink-3); font-size: .79rem; padding-inline-start: 20px; position: relative; }
.co-trust li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--success); font-weight: 700; }

.co-back { margin: 16px 0 0; font-size: .86rem; }
.co-back a { color: var(--ink-3); }
.co-back a:hover { color: var(--accent); }

/* --------------------------------------------------------- confirmation */
.order-done { max-width: 660px; margin-inline: auto; text-align: center; padding-block: 20px; }
.order-done__mark {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 20px; font-size: 2rem; background: var(--surface-2); border: 2px solid var(--line);
}
.order-done--ok .order-done__mark { border-color: var(--success); color: var(--success); }
.order-done--warn .order-done__mark { border-color: var(--accent); color: var(--accent); }
.order-done h1 { margin: 0 0 12px; }
.order-done .ref {
  display: inline-block; margin: 14px 0 22px; padding: 10px 18px;
  border: 1px dashed var(--line); border-radius: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 700;
}
.order-done__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 1000px) {
  .checkout { grid-template-columns: 1fr; }
  /* Price and pay button first, so nobody types an address before seeing the
     total. The form keeps its DOM order for screen readers and tabbing. */
  .checkout__summary { position: static; order: -1; }
  .co-lines { max-height: none; }
}
@media (max-width: 620px) {
  .co-row { grid-template-columns: 1fr; }
  .co-block { padding: 18px 16px; }
}

/* --------------------------------------------------- out of stock notice */
/* We do not take backorders, so a zero-stock part needs to explain itself
   rather than just presenting a dead button. */
.notice-oos {
  margin: 0 0 18px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .88rem; line-height: 1.55; max-width: 60ch;
}
.notice-oos strong { color: var(--accent); }

/* A basket line the customer can no longer have — sold out under them, or
   more than we hold. Marked rather than silently removed. */
.co-line--problem { opacity: .72; }
.co-line__warn {
  grid-column: 1 / -1; margin: 2px 0 0; font-size: .78rem; line-height: 1.45;
  color: var(--accent); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.co-line__warn button {
  background: none; border: 0; padding: 0; font-size: .78rem;
  color: var(--ink-3); text-decoration: underline; cursor: pointer;
}
.co-line__warn button:hover { color: var(--accent); }

/* ------------------------------------------------------ fulfilment choice */
.fulfil { display: grid; gap: 10px; }
.fulfil__opt {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  cursor: pointer; background: var(--surface-2);
}
.fulfil__opt:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.fulfil__opt input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--accent); }
.fulfil__opt strong { display: block; font-size: .95rem; }
.fulfil__opt small { color: var(--ink-3); font-size: .82rem; line-height: 1.45; display: block; margin-top: 2px; }
.fulfil__price { font-weight: 700; white-space: nowrap; }
.fulfil__price--free { color: var(--success); }

.pickup-where {
  margin: 14px 0 0; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px dashed var(--line); font-size: .88rem; line-height: 1.6;
}
.pickup-where strong { display: block; margin-bottom: 4px; }
