/* Screwmaster storefront — design system
   Register: product/commerce (findability first), premium-but-simple.
   Scene: a joiner on a Tuesday, sawdust on the phone, needs the exact 35mm
   hinge found in three taps and out today. So: high legibility for specs,
   light workshop daylight, one confident accent, fast scanning.
   Colour strategy: restrained — cool off-white + near-black ink + one deep
   workshop green. Deliberately not Screwfix-blue, B&Q-orange, Toolstation-
   yellow, or the AI warm-cream default.
   Brand language: the hex bolt-head. It recurs as the family badge and the
   quiet accent, never as decoration for its own sake. */

:root {
  /* palette (OKLCH) */
  --bg:        oklch(0.985 0.004 160);
  --surface:   oklch(1 0 0);
  --surface-2: oklch(0.975 0.005 160);
  --surface-3: oklch(0.955 0.006 160);
  --ink:       oklch(0.23 0.018 160);
  --ink-2:     oklch(0.30 0.018 160);
  --muted:     oklch(0.44 0.016 160);   /* ~5.6:1 on --bg, AA for body */
  --line:      oklch(0.905 0.008 160);
  --line-soft: oklch(0.94 0.006 160);
  --brand:     oklch(0.43 0.10 158);
  --brand-strong: oklch(0.36 0.10 158);
  --brand-deep:   oklch(0.30 0.085 158);
  --brand-tint: oklch(0.95 0.03 158);
  --brand-tint-2: oklch(0.92 0.045 158);
  --on-brand:  oklch(0.99 0.01 158);
  --price:     oklch(0.33 0.02 160);
  --focus:     oklch(0.55 0.16 250);
  --gold:      oklch(0.78 0.13 85);      /* review stars only */

  /* type */
  --font: "Hanken Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --step--1: clamp(0.82rem, 0.79rem + 0.12vw, 0.88rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.16vw, 1.02rem);
  --step-1:  clamp(1.16rem, 1.08rem + 0.4vw, 1.35rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.7vw, 1.85rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step-4:  clamp(2.5rem, 2.0rem + 2.5vw, 4.0rem);

  /* space + shape */
  --r-sm: 8px;
  --r: 11px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow: 0 1px 2px oklch(0.23 0.02 160 / 0.05), 0 6px 18px oklch(0.23 0.02 160 / 0.06);
  --shadow-lift: 0 2px 6px oklch(0.23 0.02 160 / 0.07), 0 22px 48px oklch(0.23 0.02 160 / 0.12);
  --ring: 0 0 0 1px var(--line);
  --maxw: 1180px;

  /* motion */
  --ease: cubic-bezier(.2, .7, .3, 1);          /* ease-out-quart-ish */
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* ease-out-expo */
  --t-fast: .16s;
  --t: .24s;

  /* z-index scale */
  --z-base: 1;
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-toast: 600;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-tint-2); }

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { text-wrap: pretty; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(16px, 4vw, 32px); }
.section { padding-block: clamp(40px, 6vw, 76px); }
.section-tight { padding-block: clamp(28px, 4vw, 44px); }
.muted { color: var(--muted); }
.lede { font-size: var(--step-1); color: var(--ink-2); max-width: 56ch; line-height: 1.5; }

/* skip link */
.skip { position: absolute; left: -9999px; top: 8px; z-index: var(--z-toast); }
.skip:focus { left: 12px; background: var(--ink); color: var(--on-brand); padding: 0.6em 1em; border-radius: var(--r); }

/* ---------- hex motif primitive ---------- */
.hex {
  display: inline-grid; place-items: center; flex: none;
  width: 2.6em; height: 2.6em; color: var(--brand);
  background: currentColor;
  -webkit-mask: var(--hex-mask) center / contain no-repeat;
          mask: var(--hex-mask) center / contain no-repeat;
}
:root {
  --hex-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M96 50 73 89.84 27 89.84 4 50 27 10.16 73 10.16Z'/%3E%3C/svg%3E");
  --hex-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M96 50 73 89.84 27 89.84 4 50 27 10.16 73 10.16Z' fill='%23cdd8d2'/%3E%3C/svg%3E");
}
/* fallback when a product image fails to load */
.thumb.img-missing, .t-img.img-missing, .gallery .main.img-missing { background: var(--surface-2) var(--hex-bg) center / 40% no-repeat; }
.img-missing img { visibility: hidden; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  border: 1px solid transparent; border-radius: var(--r);
  padding: 0.72em 1.2em; font-weight: 700; font-size: var(--step-0); line-height: 1;
  position: relative; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background-color var(--t) var(--ease),
              border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), color var(--t) var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 oklch(0.30 0.085 158 / 0.5) inset, 0 1px 2px oklch(0.23 0.02 160 / 0.12); }
.btn-primary:hover { background: var(--brand-strong); box-shadow: var(--shadow-lift); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); background: var(--surface-2); }
.btn-sm { padding: 0.55em 0.85em; font-size: var(--step--1); border-radius: var(--r-sm); }
.btn-block { width: 100%; }

/* add-to-basket success state (set by JS, auto-clears) */
.btn.is-added { background: var(--brand-deep); color: var(--on-brand); }
.btn.is-added::after {
  content: "✓ Added"; position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--brand-deep); border-radius: inherit; font-size: inherit; font-weight: 700;
  animation: pop var(--t) var(--ease-out);
}
.btn-sm.is-added::after { content: "✓"; }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: oklch(1 0 0 / 0.82); backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; letter-spacing: -0.03em; font-size: 1.25rem; }
.logo .mark { width: 32px; height: 32px; display: block; transition: transform var(--t) var(--ease-out); }
.logo:hover .mark { transform: rotate(-8deg) scale(1.05); }
.search { flex: 1; position: relative; max-width: 540px; }
.search input {
  width: 100%; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 0.64em 1em 0.64em 2.5em; font: inherit; color: var(--ink);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.search input:hover { border-color: oklch(0.85 0.01 160); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.search input::placeholder { color: var(--muted); }
.search .ico { position: absolute; left: 0.95em; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.1em; pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-link { padding: 0.5em 0.7em; border-radius: var(--r-sm); font-weight: 600; color: var(--ink); transition: background-color var(--t-fast) var(--ease); }
.header-link:hover { background: var(--surface-2); }
.basket-btn { position: relative; }
.basket-count {
  position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--brand); color: var(--on-brand); border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--surface);
}
.basket-count[hidden] { display: none; }
.basket-count.bump { animation: bump .35s var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- grouped category nav (families) ---------- */
.cat-nav { border-bottom: 1px solid var(--line); background: var(--surface); position: relative; z-index: var(--z-dropdown); }
.family-bar { display: flex; align-items: stretch; gap: 2px; }
.family { position: relative; display: flex; }
.family-btn, .family-link {
  display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap;
  padding: 0.8em 0.9em; font-size: var(--step--1); font-weight: 600; color: var(--ink-2);
  background: none; border: 0; border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.family-btn .caret { width: 0.7em; transition: transform var(--t) var(--ease); color: var(--muted); }
.family-btn:hover, .family-link:hover,
.family:hover .family-btn, .family:focus-within .family-btn { color: var(--ink); }
.family-link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.family[data-open] .family-btn, .family:hover .family-btn { border-bottom-color: var(--brand); color: var(--ink); }
.family[data-open] .caret { transform: rotate(180deg); }

.family-menu {
  position: absolute; top: 100%; left: 0; z-index: var(--z-dropdown);
  min-width: 230px; padding: 8px; margin-top: -1px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lift);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility var(--t);
}
.family:hover .family-menu, .family:focus-within .family-menu, .family[data-open] .family-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.family-menu a {
  display: flex; justify-content: space-between; gap: 1.5em; align-items: baseline;
  padding: 0.5em 0.7em; border-radius: var(--r-sm); color: var(--ink); font-size: var(--step-0); font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.family-menu a:hover { background: var(--brand-tint); color: var(--brand-strong); }
.family-menu a .n { color: var(--muted); font-size: 0.78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.family-menu a:hover .n { color: var(--brand); }
.family-link { margin-left: auto; }
.family-link.advisor { color: var(--brand-strong); font-weight: 700; }
.family[data-active] .family-btn { color: var(--ink); border-bottom-color: var(--brand); }
.family-menu a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-strong); }
.family-menu a[aria-current="page"] .n { color: var(--brand); }

/* ---------- trust bar ---------- */
.trustbar { background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.trustbar .wrap { display: flex; flex-wrap: wrap; gap: clamp(12px, 3vw, 32px); justify-content: center;
  padding-block: 0.7rem; font-size: var(--step--1); color: var(--muted); }
.trustbar span { display: inline-flex; align-items: center; gap: 0.5em; }
.trustbar .tick { color: var(--brand); font-weight: 800; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(80% 120% at 88% -10%, var(--brand-tint) 0%, transparent 55%),
    radial-gradient(60% 90% at 0% 110%, oklch(0.96 0.02 158) 0%, transparent 50%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero .lede { margin-top: 1rem; }
.hero-search { margin-top: 1.7rem; display: flex; gap: 10px; max-width: 30rem; }
.hero-search input {
  flex: 1; border: 1px solid var(--line); border-radius: var(--r); padding: 0.85em 1em;
  font-size: var(--step-0); background: var(--surface); color: var(--ink);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.hero-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.hero-quick { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hero-quick .q-label { font-size: var(--step--1); color: var(--muted); margin-right: 0.2rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.7rem; }

/* hero advisor panel */
.hero-aside, .hero-panel {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(20px, 3vw, 30px); box-shadow: var(--shadow); overflow: hidden;
}
.hero-panel .panel-badge { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 700; font-size: var(--step--1);
  color: var(--brand-strong); background: var(--brand-tint); padding: 0.35em 0.7em; border-radius: 999px; }
.hero-panel .hex { width: 1.4em; height: 1.4em; }
.hero-panel h2 { font-size: var(--step-1); margin-top: 0.9rem; }
.hero-aside h2 { font-size: var(--step-1); }
.advisor-mini { margin-top: 1rem; }
.advisor-mini form { display: flex; gap: 8px; }
.advisor-mini input {
  flex: 1; border: 1px solid var(--line); border-radius: var(--r); padding: 0.7em 0.9em; font: inherit; background: var(--surface-2);
}
.advisor-mini input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.examples { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: var(--step--1); color: var(--brand-strong); background: var(--brand-tint);
  border: 1px solid transparent; border-radius: 999px; padding: 0.4em 0.8em; font-weight: 600;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--brand); background: var(--brand-tint-2); transform: translateY(-1px); }

/* ---------- section headings ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 30px); }
.section-head h1, .section-head h2 { font-size: var(--step-2); }
.section-head p { margin: 0.4rem 0 0; }
.link-more { color: var(--brand-strong); font-weight: 700; display: inline-flex; align-items: center; gap: 0.3em; }
.link-more::after { content: "→"; transition: transform var(--t) var(--ease); }
.link-more:hover::after { transform: translateX(3px); }

/* ---------- category families (home) ---------- */
.families { display: grid; grid-template-columns: 1fr; gap: clamp(14px, 2vw, 20px); }
@media (min-width: 560px) { .families { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .families { grid-template-columns: repeat(3, 1fr); } }
.fam-card {
  position: relative; display: flex; flex-direction: column; gap: 0.85rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(18px, 2.4vw, 24px);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.fam-card:hover { border-color: oklch(0.85 0.02 158); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.fam-card .fam-head { display: flex; align-items: center; gap: 0.7rem; }
.fam-card .hex { width: 2.4rem; height: 2.4rem; color: var(--brand); }
.fam-card .fam-ico { width: 2.9rem; height: 2.9rem; flex: none; }
.fam-card .fam-head h3 { font-size: var(--step-1); }
.fam-card .fam-links { display: flex; flex-wrap: wrap; gap: 6px 7px; }
.fam-card .fam-links a {
  font-size: var(--step--1); font-weight: 600; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: 999px; padding: 0.35em 0.7em;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.fam-card .fam-links a:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-strong); }
.fam-card .fam-count { margin-top: auto; font-size: var(--step--1); color: var(--muted); }

/* legacy category grid (kept for any flat listing) */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.1rem; transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease); min-height: 92px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cat-card:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-card .name { font-weight: 700; }
.cat-card .count { color: var(--muted); font-size: var(--step--1); margin-top: 0.35rem; }

/* ---------- product grid + cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(218px, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; position: relative; display: flex; flex-direction: column;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}
.card:hover { border-color: oklch(0.86 0.02 158); box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.card .thumb { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 9%; mix-blend-mode: multiply;
  transition: transform var(--t) var(--ease-out); }
.card:hover .thumb img { transform: scale(1.05); }
.card-body { padding: 0.85rem 0.9rem 0.95rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card .title { font-weight: 600; font-size: var(--step-0); line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .title::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card .title:hover { color: var(--brand-strong); }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; position: relative; z-index: 2; }
.card .price { font-weight: 800; color: var(--price); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.card .sku { color: var(--muted); font-size: 0.74rem; }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.gallery { position: sticky; top: 92px; }
.gallery .main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; padding: 7%; mix-blend-mode: multiply; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery .thumbs button { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 4px; overflow: hidden;
  transition: border-color var(--t-fast) var(--ease); }
.gallery .thumbs button:hover { border-color: var(--ink); }
.gallery .thumbs button[aria-current="true"] { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.crumbs { color: var(--muted); font-size: var(--step--1); margin-bottom: 1rem; }
.crumbs a { transition: color var(--t-fast) var(--ease); }
.crumbs a:hover { color: var(--ink); }
.product .cat-tag { display: inline-flex; align-items: center; gap: 0.4em; color: var(--brand-strong); font-weight: 700; font-size: var(--step--1); }
.product .cat-tag .hex { width: 1.1em; height: 1.1em; }
.product h1 { font-size: var(--step-2); margin: 0.5rem 0 0.8rem; max-width: 20ch; }
.buy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem; margin-top: 1.2rem; box-shadow: var(--shadow); }
.buy .price { font-size: var(--step-2); font-weight: 800; color: var(--price); font-variant-numeric: tabular-nums; }
.buy .vat { color: var(--muted); font-size: var(--step--1); }
.buy .row { display: flex; gap: 10px; align-items: center; margin-top: 1.1rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.qty button { width: 40px; height: 44px; background: var(--surface); border: 0; font-size: 1.2rem; color: var(--ink); transition: background-color var(--t-fast) var(--ease); }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 44px; height: 44px; text-align: center; border: 0; border-inline: 1px solid var(--line); font: inherit; font-weight: 600; background: var(--surface); }
.reassure { display: grid; gap: 0.55rem; margin-top: 1.1rem; }
.reassure li { display: flex; gap: 0.6em; align-items: flex-start; list-style: none; font-size: var(--step--1); color: var(--ink-2); }
.reassure .tick { color: var(--brand); font-weight: 800; flex: none; }
.reassure ul { margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.spec { margin-top: 1.6rem; }
.spec h2 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.spec p { color: var(--ink); max-width: 70ch; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 0.4rem; font-size: var(--step-0); }
.spec-table th, .spec-table td { text-align: left; padding: 0.6em 0.2em; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec-table th { color: var(--muted); font-weight: 600; width: 38%; }
.spec-table td { color: var(--ink); font-weight: 600; }
.advisor-nudge { margin-top: 1.4rem; background: var(--brand-tint); border: 1px solid transparent; border-radius: var(--r); padding: 1rem 1.1rem; font-size: var(--step-0); }
.advisor-nudge a { color: var(--brand-strong); font-weight: 700; }
.advisor-nudge a:hover { text-decoration: underline; }

/* ---------- advisor page ---------- */
.advisor-hero { background:
    radial-gradient(70% 120% at 90% -20%, var(--brand-tint) 0%, transparent 55%),
    var(--surface); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.advisor-box { max-width: 760px; margin-inline: auto; position: relative; }
.advisor-box h1 { font-size: var(--step-3); }
.advisor-form { display: flex; gap: 10px; margin-top: 1.4rem; }
.advisor-form input { flex: 1; border: 1px solid var(--line); border-radius: var(--r); padding: 0.95em 1.1em; font-size: var(--step-1); background: var(--bg); }
.advisor-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
#advisor-results { max-width: 900px; margin-inline: auto; }
.reason { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.2rem 1.3rem; font-size: var(--step-1); line-height: 1.45; box-shadow: var(--shadow); }
.reason .tag { display: flex; width: fit-content; align-items: center; gap: 0.4em; color: var(--brand-strong); font-weight: 700; font-size: var(--step--1); letter-spacing: 0.02em; text-transform: capitalize; margin-bottom: 0.6rem; }
.reason .tag .hex { width: 1em; height: 1em; }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; max-width: 46ch; margin-inline: auto; }

/* ---------- trade strip ---------- */
.trade {
  position: relative; overflow: hidden;
  background:
    radial-gradient(90% 140% at 100% 0%, oklch(0.34 0.09 158) 0%, transparent 55%),
    var(--ink);
  color: oklch(0.96 0.01 160); border-radius: var(--r-xl);
  padding: clamp(26px, 4vw, 48px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center;
}
.trade::before { content: ""; position: absolute; right: -3%; bottom: -30%; width: 280px; aspect-ratio: 1; opacity: 0.08;
  background: var(--on-brand); -webkit-mask: var(--hex-mask) center/contain no-repeat; mask: var(--hex-mask) center/contain no-repeat; pointer-events: none; }
.trade h2 { color: oklch(0.99 0.01 160); font-size: var(--step-2); }
.trade p { color: oklch(0.88 0.01 160); margin-top: 0.6rem; max-width: 48ch; }
.trade .btn-primary { background: var(--on-brand); color: var(--brand-strong); box-shadow: none; }
.trade .btn-primary:hover { background: oklch(0.92 0.02 158); }
.trade .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; position: relative; }
.trade .trade-call { color: oklch(0.9 0.01 160); font-weight: 600; }

/* ---------- basket ---------- */
.basket-layout { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 32px; align-items: start; }
.basket-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.basket-line .t-img { width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 6px; }
.basket-line .t-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.basket-line .rm { color: var(--muted); font-size: var(--step--1); background: none; border: 0; padding: 0; margin-top: 0.3rem; transition: color var(--t-fast) var(--ease); }
.basket-line .rm:hover { color: oklch(0.5 0.13 25); text-decoration: underline; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.4rem; position: sticky; top: 92px; box-shadow: var(--shadow); }
.summary .line { display: flex; justify-content: space-between; padding: 0.4rem 0; }
.summary .total { font-weight: 800; font-size: var(--step-1); border-top: 1px solid var(--line); margin-top: 0.5rem; padding-top: 0.8rem; }
.note { font-size: var(--step--1); color: var(--muted); margin-top: 1rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: clamp(40px, 6vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 28px; padding-block: clamp(34px, 4vw, 56px); }
.footer-grid .foot-h { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.8rem; }
.footer-grid a { color: var(--ink-2); display: block; padding: 0.22rem 0; transition: color var(--t-fast) var(--ease); }
.footer-grid a:hover { color: var(--brand-strong); }
.footer-bottom { border-top: 1px solid var(--line); padding-block: 1.1rem; color: var(--muted); font-size: var(--step--1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--on-brand); padding: 0.85em 1.3em; border-radius: 999px;
  z-index: var(--z-toast); box-shadow: var(--shadow-lift); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.6em;
  transition: transform .4s var(--ease-out);
}
.toast .tick { color: oklch(0.85 0.12 158); font-weight: 800; }
.toast.show { transform: translate(-50%, 0); }
.toast-action { background: none; border: 0; color: oklch(0.85 0.12 158); font-weight: 700; text-decoration: underline; padding: 0 0.1em 0 0.4em; }
.toast-action:hover { color: oklch(0.92 0.1 158); }

/* ---------- entrance motion (enhances an already-visible default) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: fade-up .6s var(--ease-out) both; }
  .product-grid > *, .families > * { animation: fade-up .5s var(--ease-out) both; }
  .product-grid > :nth-child(2), .families > :nth-child(2) { animation-delay: .04s; }
  .product-grid > :nth-child(3), .families > :nth-child(3) { animation-delay: .08s; }
  .product-grid > :nth-child(4), .families > :nth-child(4) { animation-delay: .12s; }
  .product-grid > :nth-child(5), .families > :nth-child(5) { animation-delay: .16s; }
  .product-grid > :nth-child(n+6) { animation-delay: .2s; }
}
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .product, .trade, .basket-layout { grid-template-columns: 1fr; }
  .gallery, .summary { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-row { flex-wrap: wrap; height: auto; padding-block: 10px; }

  /* nav families collapse to a horizontal scroll of accordion toggles */
  .family-bar { overflow-x: auto; scrollbar-width: none; }
  .family-bar::-webkit-scrollbar { display: none; }
  .family-menu { position: fixed; left: 8px; right: 8px; min-width: 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .advisor-form, .advisor-mini form, .hero-search { flex-direction: column; }
  .families { grid-template-columns: 1fr; }
  .trade { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
