/* =====================================================================
   Micro Center — redesign demo  ·  styles.css
   Vibe: Soft Structuralism (white/near-black + real MC red #cc0000)
   Type: Chakra Petch (display — squared MC-logotype feel) + Barlow (UI/body)
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* brand — real Micro Center palette (sampled from microcenter.com CSS + logo) */
  --mc-red:      #cc0000;  /* signature red — .text-red / #c00 on microcenter.com */
  --mc-red-deep: #990000;  /* darker hover red — #900 on microcenter.com */
  --mc-red-tint: #fdecec;
  --mc-burnt:    #c4551f;  /* secondary burnt-orange accent from MC site */

  /* neutrals — warm-cool near-white base, deep ink */
  --ink:      #14161a;
  --ink-soft: #3a3f47;
  --ink-mute: #6b7280;
  --line:     #e7e9ee;
  --line-soft:#eef0f4;
  --paper:    #ffffff;
  --paper-2:  #f6f7f9;
  --paper-3:  #f0f2f5;

  /* stock signal */
  --ok:   #157f4a;
  --ok-bg:#e7f6ec;
  --warn: #8a5200;
  --warn-bg:#fbf1de;
  --bad:  #cc0000;
  --bad-bg:#fdecec;

  /* structure */
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 34px;

  /* soft, diffused, color-mixed shadows (no harsh 2015 drops) */
  --sh-1: 0 1px 2px rgba(20,22,26,.04), 0 8px 24px -12px rgba(20,22,26,.14);
  --sh-2: 0 2px 6px rgba(20,22,26,.05), 0 24px 48px -20px rgba(20,22,26,.20);
  --sh-red: 0 12px 34px -14px color-mix(in oklch, var(--mc-red) 55%, transparent);

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --wrap: 1240px;
  --header-h: 74px;

  /* Chakra Petch = free Google-Fonts stand-in for MC's squared Eurostile/Microgramma logotype;
     Barlow = clean retail-grade grotesque for body/UI */
  --font-display: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --font-ui: 'Barlow', system-ui, -apple-system, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }

/* view-transitions floor for MPA */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .32s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.6rem); }
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.eyebrow {
  font-family: var(--font-ui);
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--mc-red);
}
.lead { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 54ch; }

:focus-visible {
  outline: 2.5px solid var(--mc-red);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- HEADER ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.header-inner {
  height: var(--header-h);
  max-width: var(--wrap); margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.6rem);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
/* Real Micro Center wordmark (vectorized from the official logotype) */
.brand__logo {
  height: 22px; width: auto; display: block;
  color: var(--ink);
  transition: color .25s var(--ease), transform .3s var(--ease);
}
.brand:hover .brand__logo { color: var(--mc-red); }
.brand:active .brand__logo { transform: scale(.97); }
.brand__accent { color: var(--mc-red); }

.nav { display: flex; gap: .35rem; margin-left: .5rem; }
.nav__link {
  position: relative;
  font-size: .92rem; font-weight: 500; color: var(--ink-soft);
  padding: .5rem .8rem; border-radius: 10px;
  transition: color .3s var(--ease), background .3s var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--paper-2); }
.nav__link.is-active { color: var(--mc-red); }
.nav__link.is-active::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: 2px; height: 2px;
  background: var(--mc-red); border-radius: 2px;
}

.header-tools { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

/* store picker — the hero feature */
.store-picker { position: relative; }
.store-btn {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .7rem .45rem .7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--sh-1);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  min-height: 46px;
}
.store-btn:hover { border-color: color-mix(in srgb, var(--mc-red) 40%, var(--line)); box-shadow: var(--sh-2); }
.store-btn:active { transform: scale(.98); }
.store-btn__pin { width: 20px; height: 20px; fill: none; stroke: var(--mc-red); stroke-width: 1.6; }
.store-btn__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.store-btn__lbl { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
.store-btn__val { font-size: .86rem; font-weight: 600; }
.store-btn__chev { width: 16px; height: 16px; fill: none; stroke: var(--ink-mute); stroke-width: 1.8; transition: transform .3s var(--ease); }
.store-btn[aria-expanded="true"] .store-btn__chev { transform: rotate(180deg); }

.store-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 288px; padding: .5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-2);
  z-index: 120;
  animation: menu-in .3s var(--ease-out) both;
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.store-menu__head { font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-mute); padding: .5rem .7rem .3rem; }
.store-menu__note { font-size: .72rem; color: var(--ink-mute); padding: .5rem .7rem .3rem; line-height: 1.4; }
.store-opt {
  display: flex; align-items: baseline; justify-content: space-between;
  width: 100%; padding: .7rem .7rem; border-radius: 11px;
  transition: background .2s var(--ease);
}
.store-opt:hover { background: var(--paper-2); }
.store-opt[aria-selected="true"] { background: var(--mc-red-tint); }
.store-opt[aria-selected="true"] .store-opt__name { color: var(--mc-red-deep); }
.store-opt__name { font-weight: 600; font-size: .92rem; }
.store-opt__reg { font-size: .72rem; color: var(--ink-mute); letter-spacing: .08em; }

.hamburger { display: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.hamburger span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .35s var(--ease), opacity .25s var(--ease); }
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; padding: .5rem clamp(1.1rem, 4vw, 2.6rem) 1.2rem; border-top: 1px solid var(--line); }
.mobile-menu__link { padding: .85rem .2rem; font-weight: 600; border-bottom: 1px solid var(--line-soft); }
.mobile-menu__link.is-active { color: var(--mc-red); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .85rem 1.05rem .85rem 1.4rem;
  border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
  min-height: 48px;
}
.btn--primary { background: var(--mc-red); color: #fff; box-shadow: var(--sh-red); }
.btn--primary:hover { background: var(--mc-red-deep); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0) scale(.98); }
.btn--ghost { background: var(--paper); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--sh-1); padding-left: 1.4rem; padding-right: 1.4rem; }
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--ink-mute); }
.btn__icon {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px;
  background: rgba(255,255,255,.18);
  transition: transform .35s var(--ease);
}
.btn--ghost .btn__icon { background: var(--paper-3); }
.btn:hover .btn__icon { transform: translateX(3px); }
.btn__icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- STOCK BADGE ---------- */
.stock {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 600; letter-spacing: -.005em;
  padding: .34rem .6rem; border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stock .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.stock--high { color: var(--ok); background: var(--ok-bg); }
.stock--high .dot { background: var(--ok); }
.stock--mid { color: var(--ok); background: var(--ok-bg); }
.stock--mid .dot { background: var(--ok); }
.stock--low { color: var(--warn); background: var(--warn-bg); }
.stock--low .dot { background: var(--warn); animation: blink 1.6s var(--ease) infinite; }
.stock--out { color: var(--bad); background: var(--bad-bg); }
.stock--out .dot { background: var(--bad); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.stock.just-updated { animation: stock-pop .5s var(--ease-out); }
@keyframes stock-pop { 0% { transform: scale(.82); opacity: .4; } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ---------- PRODUCT CARD ---------- */
.card {
  position: relative;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 6px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--mc-red) 22%, var(--line)); }
.card__link { display: block; }
.card__media {
  position: relative;
  border-radius: calc(var(--r-lg) - 6px);
  background: var(--paper);
  padding: 1.4rem;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.6);
  overflow: hidden;
}
.card__media svg { width: 100%; height: auto; aspect-ratio: 1; transition: transform .6s var(--ease); }
.card:hover .card__media svg { transform: scale(1.05) rotate(-1deg); }

/* --- real product photos: sit on a clean white tile, contain-fit --- */
.product-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-img.is-broken { display: none; } /* onerror guard — never a broken icon */
.card__media .product-img { aspect-ratio: 1; background: #fff; border-radius: inherit;
  transition: transform .6s var(--ease); }
.card:hover .card__media .product-img { transform: scale(1.05); }
.gallery__stage .product-img { aspect-ratio: 1; }
.thumb .product-img,
.opt__art .product-img,
.hero-item__art .product-img { background: #fff; }

.card__body { padding: 1rem .85rem .7rem; }
.card__eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-mute); }
.card__title { font-size: 1.02rem; font-weight: 600; margin-top: .45rem; line-height: 1.2; letter-spacing: -.01em; }
.card:hover .card__title { color: var(--mc-red-deep); }
.card__spec { font-size: .82rem; color: var(--ink-mute); margin-top: .35rem; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.card__price { font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; font-variant-numeric: tabular-nums; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==============================================================
   HOMEPAGE
   ============================================================== */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 55% at 78% 12%, color-mix(in srgb, var(--mc-red) 12%, transparent), transparent 70%),
    radial-gradient(50% 50% at 12% 90%, color-mix(in srgb, var(--mc-red) 7%, transparent), transparent 70%);
  z-index: -1; pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.9rem); line-height: .98; }
.hero h1 .accent { color: var(--mc-red); }
.hero__sub { margin-top: 1.4rem; font-size: clamp(1.05rem, 1.5vw, 1.22rem); color: var(--ink-soft); max-width: 42ch; }
.hero__cta { display: flex; gap: .8rem; margin-top: 2rem; flex-wrap: wrap; }
.hero__proof { display: flex; gap: 1.8rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero__proof div { }
.hero__proof strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.hero__proof span { font-size: .8rem; color: var(--ink-mute); }

/* hero store card — showcases the availability feature */
.hero-card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 8px;
  box-shadow: var(--sh-2);
}
.hero-card__inner {
  background: var(--paper);
  border-radius: calc(var(--r-xl) - 8px);
  padding: 1.6rem;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.7);
}
.hero-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.2rem; }
.hero-card__label { font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-mute); font-weight: 600; }
.hero-card__store { font-family: var(--font-display); font-weight: 700; color: var(--mc-red); font-size: .95rem; }
.hero-item { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; border-top: 1px solid var(--line-soft); }
.hero-item:first-of-type { border-top: none; }
.hero-item__art { width: 52px; height: 52px; border-radius: 13px; overflow: hidden; flex-shrink: 0; background: var(--paper-2); }
.hero-item__art svg { width: 100%; height: 100%; }
.hero-item__name { font-size: .88rem; font-weight: 600; line-height: 1.2; }
.hero-item__price { font-size: .8rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.hero-item__stock { margin-left: auto; }
.hero-card__foot { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); font-size: .8rem; color: var(--ink-soft); display: flex; align-items: center; gap: .5rem; }
.hero-card__foot svg { width: 16px; height: 16px; stroke: var(--ok); fill: none; stroke-width: 2; flex-shrink: 0; }

/* proof strip */
.proof-strip { border-block: 1px solid var(--line); background: var(--paper-2); }
.proof-strip .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; padding-block: 1.6rem; }
.proof-item { display: flex; align-items: center; gap: .7rem; }
.proof-item svg { width: 24px; height: 24px; stroke: var(--mc-red); fill: none; stroke-width: 1.6; flex-shrink: 0; }
.proof-item b { font-size: .92rem; font-weight: 600; }
.proof-item span { display: block; font-size: .78rem; color: var(--ink-mute); }

/* departments mega grid */
.dept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.2rem; }
.dept {
  position: relative;
  display: flex; flex-direction: column; gap: .8rem;
  padding: 1.4rem;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
  overflow: hidden;
}
.dept:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--mc-red) 25%, var(--line)); }
.dept__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--mc-red-tint); }
.dept__icon svg { width: 24px; height: 24px; stroke: var(--mc-red); fill: none; stroke-width: 1.7; }
.dept__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.dept__count { font-size: .78rem; color: var(--ink-mute); }
.dept__arrow { position: absolute; top: 1.4rem; right: 1.4rem; opacity: 0; transform: translateX(-4px); transition: all .35s var(--ease); }
.dept:hover .dept__arrow { opacity: 1; transform: none; }
.dept__arrow svg { width: 18px; height: 18px; stroke: var(--mc-red); fill: none; stroke-width: 2; }

/* section head */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.sec-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.sec-head p { color: var(--ink-soft); margin-top: .5rem; }
.link-more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--mc-red); font-size: .92rem; }
.link-more svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .3s var(--ease); }
.link-more:hover svg { transform: translateX(4px); }

.grid-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: clamp(2.5rem, 5vw, 4rem); }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 120% at 85% 20%, color-mix(in srgb, var(--mc-red) 45%, transparent), transparent 65%); }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.cta-band p { color: rgba(255,255,255,.72); margin-top: .8rem; max-width: 46ch; }
.cta-band .btn--ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.cta-band .btn--ghost .btn__icon { background: rgba(255,255,255,.14); }

/* ==============================================================
   CATEGORY PAGE
   ============================================================== */
.cat-head { padding-block: clamp(2rem, 4vw, 3.2rem) 0; }
.crumbs { font-size: .82rem; color: var(--ink-mute); display: flex; gap: .5rem; align-items: center; }
.crumbs a:hover { color: var(--mc-red); }
.cat-title { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-top: .8rem; }
.cat-sub { color: var(--ink-soft); margin-top: .6rem; }

.cat-layout { display: grid; grid-template-columns: 264px 1fr; gap: 2rem; align-items: start; margin-top: 2.2rem; }

.facets { position: sticky; top: calc(var(--header-h) + 1rem); }
.facets__inner { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .5rem; }
.facet { border-top: 1px solid var(--line-soft); padding: 1.1rem 1rem; }
.facet:first-child { border-top: none; }
.facet__title { font-family: var(--font-display); font-weight: 600; font-size: .95rem; margin-bottom: .8rem; display: flex; justify-content: space-between; align-items: center; }
.facet__title .clr { font-size: .72rem; color: var(--mc-red); font-family: var(--font-ui); font-weight: 600; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.facet.has-active .facet__title .clr { opacity: 1; pointer-events: auto; }
.check { display: flex; align-items: center; gap: .6rem; padding: .38rem .3rem; border-radius: 8px; cursor: pointer; font-size: .88rem; transition: background .2s var(--ease); }
.check:hover { background: var(--paper); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check__box { width: 19px; height: 19px; border-radius: 6px; border: 1.6px solid var(--line); display: grid; place-items: center; flex-shrink: 0; transition: all .2s var(--ease); background: var(--paper); }
.check__box svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 3; opacity: 0; transform: scale(.6); transition: all .2s var(--ease); }
.check input:checked + .check__box { background: var(--mc-red); border-color: var(--mc-red); }
.check input:checked + .check__box svg { opacity: 1; transform: none; }
.check input:focus-visible + .check__box { outline: 2.5px solid var(--mc-red); outline-offset: 2px; }
.check__count { margin-left: auto; font-size: .76rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.range { padding-top: .3rem; }
.range input[type="range"] { width: 100%; accent-color: var(--mc-red); }
.range__vals { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-soft); margin-top: .5rem; font-variant-numeric: tabular-nums; }

.cat-main { min-width: 0; }
.cat-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.cat-count { font-size: .9rem; color: var(--ink-soft); }
.cat-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sort { display: flex; align-items: center; gap: .5rem; }
.sort label { font-size: .82rem; color: var(--ink-mute); }
.sort select { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); font: inherit; font-size: .86rem; font-weight: 500; }

.filter-toggle { display: none; }

.grid-cat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.grid-cat .card { animation: card-in .5s var(--ease-out) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
.empty-msg { grid-column: 1 / -1; text-align: center; padding: 4rem 1rem; color: var(--ink-mute); }
.empty-msg svg { width: 40px; height: 40px; stroke: var(--line); fill: none; stroke-width: 1.5; margin: 0 auto 1rem; }

/* ==============================================================
   PRODUCT DETAIL PAGE
   ============================================================== */
.pdp { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 3.5rem); margin-top: 2rem; align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 1.4rem); }
.gallery__main { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 8px; box-shadow: var(--sh-1); }
.gallery__stage { background: var(--paper); border-radius: calc(var(--r-xl) - 8px); padding: clamp(2rem, 5vw, 4rem); box-shadow: inset 0 1px 1px rgba(255,255,255,.7); }
.gallery__stage svg { width: 100%; height: auto; aspect-ratio: 1; }
.gallery__thumbs { display: flex; gap: .7rem; margin-top: .9rem; }
.thumb { width: 74px; height: 74px; border-radius: 15px; border: 1px solid var(--line); background: var(--paper-2); padding: 6px; cursor: pointer; transition: border-color .25s var(--ease), transform .25s var(--ease); }
.thumb svg { width: 100%; height: 100%; }
.thumb:hover { transform: translateY(-2px); }
.thumb.is-active { border-color: var(--mc-red); box-shadow: 0 0 0 1px var(--mc-red); }

.pdp-info .eyebrow { display: block; }
.pdp-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-top: .6rem; }
.pdp-rating { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; font-size: .88rem; color: var(--ink-soft); }
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 16px; height: 16px; }
.pdp-price { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); margin-top: 1.2rem; font-variant-numeric: tabular-nums; }
.pdp-blurb { color: var(--ink-soft); margin-top: 1rem; max-width: 52ch; }

/* availability panel — reimagined */
.avail {
  margin-top: 1.6rem;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 7px;
}
.avail__inner { background: var(--paper); border-radius: calc(var(--r-lg) - 7px); padding: 1.4rem; box-shadow: inset 0 1px 1px rgba(255,255,255,.7); }
.avail__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.avail__here { display: flex; align-items: center; gap: .75rem; }
.avail__here-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--mc-red-tint); display: grid; place-items: center; flex-shrink: 0; }
.avail__here-icon svg { width: 22px; height: 22px; stroke: var(--mc-red); fill: none; stroke-width: 1.7; }
.avail__store-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-mute); font-weight: 600; }
.avail__store-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.pickup {
  display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; padding: .85rem 1rem;
  background: var(--ok-bg); border-radius: 13px; font-size: .9rem; color: var(--ok); font-weight: 600;
}
.pickup.is-out { background: var(--bad-bg); color: var(--bad); }
.pickup svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; flex-shrink: 0; }
.pickup b { font-weight: 700; }
.nearby { margin-top: 1.2rem; }
.nearby__head { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-mute); font-weight: 600; margin-bottom: .6rem; }
.nearby__row { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; border-top: 1px solid var(--line-soft); }
.nearby__row:first-of-type { border-top: none; }
.nearby__name { font-size: .9rem; font-weight: 500; }
.nearby__name span { color: var(--ink-mute); font-size: .78rem; margin-left: .3rem; }
.pdp-actions { display: flex; gap: .8rem; margin-top: 1.6rem; flex-wrap: wrap; }
.pdp-actions .btn { flex: 1; justify-content: center; min-width: 190px; }

.specs { margin-top: 3rem; }
.specs h2 { font-size: 1.5rem; margin-bottom: 1.2rem; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper-2); }
.spec-row { display: flex; justify-content: space-between; gap: 1rem; padding: .95rem 1.3rem; border-bottom: 1px solid var(--line-soft); background: var(--paper); }
.spec-row dt { color: var(--ink-mute); font-size: .88rem; }
.spec-row dd { font-weight: 600; font-size: .88rem; text-align: right; }

.related { margin-top: 3.5rem; }

/* ==============================================================
   PC BUILDER PAGE
   ============================================================== */
.builder-head { padding-block: clamp(2rem, 4vw, 3.2rem) 0; }
.builder-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; margin-top: 2rem; }
.build-steps { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.step {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px;
  transition: border-color .35s var(--ease);
}
.step.is-filled { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.step__inner { background: var(--paper); border-radius: calc(var(--r-lg) - 6px); padding: 1.2rem 1.3rem; box-shadow: inset 0 1px 1px rgba(255,255,255,.7); }
.step__head { display: flex; align-items: center; gap: .9rem; }
.step__num { width: 30px; height: 30px; border-radius: 9px; background: var(--paper-3); color: var(--ink-mute); display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: .85rem; flex-shrink: 0; transition: all .3s var(--ease); }
.step.is-filled .step__num { background: var(--ok); color: #fff; }
.step__label { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.step__sel { margin-left: auto; font-size: .82rem; color: var(--ink-mute); }
.step__options { margin-top: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.opt {
  display: flex; align-items: center; gap: .8rem; padding: .75rem .8rem;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper);
  cursor: pointer; text-align: left; transition: all .3s var(--ease); position: relative;
}
.opt:hover { border-color: var(--ink-mute); transform: translateY(-1px); box-shadow: var(--sh-1); }
.opt.is-selected { border-color: var(--mc-red); box-shadow: 0 0 0 1px var(--mc-red); background: var(--mc-red-tint); }
.opt.is-incompatible { opacity: .42; cursor: not-allowed; }
.opt.is-incompatible:hover { transform: none; box-shadow: none; border-color: var(--line); }
.opt__art { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; flex-shrink: 0; background: var(--paper-2); }
.opt__art svg { width: 100%; height: 100%; }
.opt__name { font-size: .84rem; font-weight: 600; line-height: 1.15; }
.opt__meta { font-size: .74rem; color: var(--ink-mute); margin-top: .15rem; font-variant-numeric: tabular-nums; }
.opt__price { margin-left: auto; font-weight: 700; font-size: .86rem; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.opt__flag { position: absolute; top: -8px; right: 10px; font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .16rem .45rem; border-radius: 6px; background: var(--bad-bg); color: var(--bad); }

.build-summary { position: sticky; top: calc(var(--header-h) + 1rem); }
.summary-card { background: var(--ink); color: #fff; border-radius: var(--r-xl); padding: 1.6rem; box-shadow: var(--sh-2); }
.summary-card h3 { color: #fff; font-size: 1.2rem; }
.summary-list { margin: 1.2rem 0; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .86rem; }
.summary-row:first-child { border-top: none; }
.summary-row span:first-child { color: rgba(255,255,255,.6); }
.summary-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.summary-row .empty { color: rgba(255,255,255,.3); font-style: normal; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.16); }
.summary-total span { color: rgba(255,255,255,.6); font-size: .85rem; }
.summary-total b { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.checks { margin-top: 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.compat {
  display: flex; align-items: flex-start; gap: .6rem; padding: .7rem .85rem; border-radius: 13px; font-size: .82rem;
  background: rgba(255,255,255,.06); line-height: 1.35;
}
.compat svg { width: 17px; height: 17px; stroke-width: 2; fill: none; flex-shrink: 0; margin-top: 1px; }
.compat--ok { color: #7fe3a8; } .compat--ok svg { stroke: #7fe3a8; }
.compat--warn { color: #ffcf8a; } .compat--warn svg { stroke: #ffcf8a; }
.compat--bad { color: #ff9a8a; } .compat--bad svg { stroke: #ff9a8a; }
.compat--idle { color: rgba(255,255,255,.4); } .compat--idle svg { stroke: rgba(255,255,255,.4); }
.summary-card .btn { width: 100%; justify-content: center; margin-top: 1.3rem; background: var(--mc-red); color: #fff; }
.summary-card .btn:disabled { opacity: .4; cursor: not-allowed; }
.wattage-bar { margin-top: 1rem; }
.wattage-bar__label { display: flex; justify-content: space-between; font-size: .76rem; color: rgba(255,255,255,.6); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
.wattage-bar__track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden; }
.wattage-bar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7fe3a8, #ffcf8a); transition: width .6s var(--ease); }
.wattage-bar__fill.is-over { background: linear-gradient(90deg, #ffcf8a, #ff6a5a); }

/* ---------- FOOTER ---------- */
.site-footer { margin-top: clamp(4rem, 8vw, 7rem); border-top: 1px solid var(--line); background: var(--paper-2); }
.footer-inner { max-width: var(--wrap); margin-inline: auto; padding: clamp(2.5rem, 5vw, 4rem) clamp(1.1rem, 4vw, 2.6rem) 2rem; display: grid; grid-template-columns: 1.2fr 2fr; gap: 2rem; }
.footer-logo { height: 26px; width: auto; display: block; color: var(--ink); }
.footer-tag { color: var(--ink-mute); margin-top: .8rem; max-width: 32ch; font-size: .9rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer-cols h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-mute); margin-bottom: .8rem; }
.footer-cols a { display: block; padding: .3rem 0; font-size: .9rem; color: var(--ink-soft); transition: color .2s; }
.footer-cols a:hover { color: var(--mc-red); }
.footer-legal { max-width: var(--wrap); margin-inline: auto; padding: 1.4rem clamp(1.1rem, 4vw, 2.6rem); border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: .78rem; color: var(--ink-mute); }

/* ==============================================================
   RESPONSIVE
   ============================================================== */
@media (max-width: 1080px) {
  .grid-cards, .grid-cat { grid-template-columns: repeat(3, 1fr); }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .hamburger { display: flex; }
  .mobile-menu:not([hidden]) { display: flex; animation: menu-in .3s var(--ease-out) both; }
  .store-btn__txt { display: none; }
  .store-btn { padding: .55rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 460px; }
  .pdp { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .builder-layout { grid-template-columns: 1fr; }
  .build-summary { position: static; order: -1; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cat-layout { grid-template-columns: 1fr; }
  .facets { position: fixed; inset: 0; z-index: 150; background: var(--paper); padding: 1rem; overflow-y: auto; transform: translateX(-100%); transition: transform .4s var(--ease); }
  .facets.is-open { transform: none; }
  .facets__close { display: flex; }
  .filter-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: .86rem; background: var(--paper); }
  .filter-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.8; }
  .grid-cards, .grid-cat { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  .step__options { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  .hero__proof { gap: 1.2rem; }
}
@media (max-width: 460px) {
  .grid-cards, .grid-cat, .dept-grid { grid-template-columns: 1fr; }
  .proof-strip .wrap { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
.facets__close { display: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); align-items: center; justify-content: center; margin-left: auto; margin-bottom: .5rem; }
.facets__close svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 2; }
