/* ═══════════════════════════════════════════════════════════
   PIXELROOM v3 — Desktop-first clean store
   No libraries · No glassmorphism · No 3D
   Principle: generous whitespace, clear hierarchy, subtle motion
═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Surface */
  --white:      #ffffff;
  --gray-50:    #f7f7f7;
  --gray-100:   #f0f0f0;
  --gray-200:   #e4e4e4;
  --gray-300:   #cccccc;
  --gray-400:   #a0a0a0;
  --gray-500:   #777777;
  --gray-700:   #444444;
  --gray-900:   #111111;

  /* Semantic */
  --bg:           var(--gray-50);
  --surface:      var(--white);
  --border:       var(--gray-200);
  --border-md:    var(--gray-300);
  --text-primary: var(--gray-900);
  --text-body:    #3a3a3a;
  --text-muted:   var(--gray-500);
  --text-faint:   var(--gray-400);

  /* Accent — used sparingly */
  --accent:     #a71f45;
  --accent-dim: rgba(167, 31, 69, 0.08);

  /* Radius */
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  14px;
  --r-xl:  20px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(0,0,0,.05);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
  --shadow-md:  0 6px 24px rgba(0,0,0,.09);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.12);

  /* Layout */
  --header-h:    58px;

  --max-w:       1240px;
  --pad-x:       40px;   /* desktop horizontal padding */
  --pad-x-sm:    20px;   /* mobile */

  /* Motion */
  --ease:        cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Always reserve the scrollbar's space so toggling it (navigating between
     views of different heights, or locking the body for the cart / menu /
     modal) never shifts the centered header, nav, or grid. CLS = 0. */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  overflow-x: clip;            /* clip (not hidden) → keeps position:sticky working */
  min-height: 100dvh;
  /* Footer fix: push footer to bottom when content is short */
  display: flex;
  flex-direction: column;
}

body.locked { overflow: hidden; }

/* App flex-grows to fill remaining height → footer sticks to bottom */
#app { flex: 1; }

a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; font-size: inherit; color: inherit; }
input  { font-family: inherit; }
::selection { background: var(--accent); color: #fff; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════
   HEADER — Glassmorphism · Logo left · Nav center · Actions right
═══════════════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}

.header.elevated {
  box-shadow: 0 2px 24px rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.95);
}

.header__inner {
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* ── Logo ───────────────────────────────────────────────── */
.site-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.site-logo__img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  transition: transform 0.4s var(--ease);
}

.site-logo:hover .site-logo__img {
  transform: scale(1.1) rotate(-4deg);
}

.site-logo__name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1;
  transition: opacity 0.25s var(--ease);
}

.site-logo:hover .site-logo__name {
  opacity: 0.6;
}

/* ── Desktop nav (absolutely centered) ──────────────────── */
.header-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1px;
  white-space: nowrap;
}

.nav-link {
  position: relative;
  padding: 6px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-md);
  letter-spacing: 0.01em;
  transition: color 0.25s var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  width: calc(100% - 20px);
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { transform: translateX(-50%) scaleX(1); }
.nav-link.is-active { color: var(--text-primary); }
.nav-link.is-active::after { transform: translateX(-50%) scaleX(1); }

/* ── Header actions (right) ─────────────────────────────── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  position: relative;
  z-index: 1;
}

/* Action icon buttons */
.hbtn {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--ease);
  position: relative;
  flex-shrink: 0;
}

.hbtn:hover {
  background: var(--gray-100);
  color: var(--gray-900);
  transform: translateY(-1px);
}

.hbtn:active { transform: scale(0.93); }

/* Cart badge */
.cart-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.2s, transform 0.3s var(--ease-spring);
}

.cart-dot.is-visible { opacity: 1; transform: scale(1); }

/* ── Burger (mobile only) ───────────────────────────────── */
.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5.5px;
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  flex-shrink: 0;
  transition: background 0.2s;
}

.burger:hover { background: var(--gray-100); }

.burger__bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: transform 0.32s var(--ease), opacity 0.25s, width 0.3s var(--ease);
  transform-origin: center;
}

.burger.is-open .burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open .burger__bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.is-open .burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Search panel ───────────────────────────────────────── */
.search-panel {
  overflow: hidden;
  max-height: 0;
  border-top: 1px solid transparent;
  transition: max-height 0.3s var(--ease), border-color 0.3s;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
}

.search-panel.is-open {
  max-height: 58px;
  border-color: var(--border);
}

.search-panel__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px var(--pad-x);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-400);
}

.search-panel__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-primary);
  background: transparent;
  caret-color: var(--accent);
}

.search-panel__input::placeholder { color: var(--gray-400); }

.search-panel__close {
  color: var(--gray-400);
  padding: 4px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}

.search-panel__close:hover { color: var(--gray-900); background: var(--gray-100); }

/* ── Mobile nav — full-screen overlay ──────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 90px 24px 24px;
  overflow-y: auto;           /* safety net for short viewports with 7 links */
  /* Hidden state */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.32s var(--ease), visibility 0.32s;
}

.mobile-nav.is-open {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.mnav-link {
  display: block;
  width: 100%;
  max-width: 380px;
  padding: 11px 28px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  border-radius: var(--r-lg);
  text-align: center;
  transition: background 0.22s, transform 0.22s var(--ease), color 0.22s;
}

.mnav-link:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
}

.mnav-link:active {
  transform: translateY(0);
  background: var(--gray-200);
}

.mnav-link.is-active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ═══════════════════════════════════════════════════════════
   VIEW SYSTEM (catalog ↔ product detail)
═══════════════════════════════════════════════════════════ */
#app { position: relative; }

.view { display: block; }

.view[hidden] { display: none; }

/* Animate in */
.view.is-entering {
  animation: viewFadeIn 0.38s var(--ease) both;
}

/* Animate out */
.view.is-exiting {
  animation: viewFadeOut 0.2s ease both;
  pointer-events: none;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes viewFadeOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}


/* ═══════════════════════════════════════════════════════════
   HERO — Cinematic suspended lamp
   The light is the hero. Dark, calm, expensive.
═══════════════════════════════════════════════════════════ */
/* Tall scroll track — its scroll length drives the centre→left transition */
.hero-stage {
  position: relative;
  height: 240vh;
  margin-top: calc(-1 * var(--header-h));   /* sit full-bleed beneath the sticky header */
}

.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  isolation: isolate;                 /* contain blend modes within the hero */
  padding-top: var(--header-h);
  overflow: hidden;
  background: #08090b;          /* fallback behind the image */
  /* Vertical pans scroll the page; horizontal drags are handed to JS so the
     lamp can be grabbed & swung by touch without the browser stealing the
     gesture. Keeps scroll-vs-lamp arbitration reliable on mobile. */
  touch-action: pan-y;
  /* Beam point — overwritten each frame by hero.js (tracks the lamp glow) */
  --beam-x: 50%;
  --beam-y: 62%;
}

/* Background image — behind the transparent canvas, darkened + softly blurred */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #08090b url('img/background_hero.jpg') center center / cover no-repeat;
  transform: scale(1.06);                 /* hide blur edge bleed */
  filter: blur(2px) brightness(0.46) saturate(1.05);
}
.hero__bg::after {                          /* extra contrast for the typography */
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 70% 0%, transparent 30%, rgba(6,7,10,0.7) 100%),
    linear-gradient(90deg, rgba(6,7,10,0.78) 0%, rgba(6,7,10,0.35) 45%, transparent 75%);
}

/* The WebGL canvas is created by hero.js and appended to <body> as a
   position:fixed full-viewport element (z-index:1). Opacity, pointer-
   events, and cursor are managed entirely by JS (no CSS needed here). */

/* Atmosphere: vignette + faint film grain */
.hero__atmos {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(135% 105% at 50% -10%, transparent 38%, rgba(0,0,0,0.6) 100%);
}
.hero__atmos::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
}

/* Light layers — follow the lamp's swing, brighten whatever they fall on */
.hero__light { position: absolute; inset: 0; pointer-events: none; }
.hero__light--warm {
  z-index: 4;
  mix-blend-mode: screen;
  background: radial-gradient(circle 42vmax at var(--beam-x) var(--beam-y),
    rgba(255,236,200,0.20), rgba(255,224,182,0.06) 34%, transparent 62%);
}
.hero__light--core {
  z-index: 5;
  mix-blend-mode: soft-light;
  background: radial-gradient(circle 26vmax at var(--beam-x) var(--beam-y),
    rgba(255,248,236,0.55), transparent 54%);
}

/* Scroll-story panels — right column, one stage active at a time.
   Stage classes are toggled by hero.js (state machine), CSS animates. */
.hero__panels { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero__panels-inner {
  position: relative;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.hero__panel {
  position: absolute;
  top: 50%;
  right: var(--pad-x);
  width: min(46%, 520px);
  opacity: 0;
  transform: translate3d(0, calc(-50% + 30px), 0);   /* future: waiting below */
  transition: opacity 0.55s var(--ease), transform 0.65s var(--ease);
  pointer-events: none;
  will-change: opacity, transform;
}
.hero__panel.is-active { opacity: 1; transform: translate3d(0, -50%, 0); }
.hero__panel.is-past   { opacity: 0; transform: translate3d(0, calc(-50% - 30px), 0); }  /* exited upward */

/* The panels NEVER capture pointer events — so a drag (or touch) over the
   text reaches the lamp canvas underneath. Only the ACTIVE panel's real
   interactive controls opt back in, so links/buttons still work. */
.hero__panel.is-active .hero__btn-primary,
.hero__panel.is-active .hero__btn-secondary,
.hero__panel.is-active .hero__card-cta { pointer-events: auto; }

.hero__panel-title {
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f4efe8;
  margin-bottom: 16px;
}
.hero__panel-text {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.7;
  color: rgba(228,224,218,0.6);
}

.hero__kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.34);
  margin-bottom: 22px;
}

.hero__headline {
  font-size: clamp(40px, 5vw, 74px);
  font-weight: 900;
  line-height: 0.97;
  letter-spacing: -0.045em;
  color: rgba(238,233,226,0.62);         /* dim — the beam lifts it toward white */
  text-shadow: 0 0 30px rgba(255,228,190,0.06);
  margin-bottom: 22px;
}

.hero__sub {
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.72;
  color: rgba(228,224,218,0.5);
  margin: 0 0 34px;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Primary CTA — premium light pill (pointer-events enabled only when its
   panel is active — see the scoped rule above) */
.hero__btn-primary {
  padding: 16px 32px;
  border-radius: 999px;
  background: #f4f1ec;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.005em;
  box-shadow: 0 10px 40px rgba(255,233,200,0.12), 0 2px 10px rgba(0,0,0,0.45);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.25s;
}
.hero__btn-primary:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 18px 54px rgba(255,233,200,0.24), 0 4px 14px rgba(0,0,0,0.5);
}
.hero__btn-primary:active { transform: translateY(0) scale(0.98); }

/* Secondary — minimal text link + arrow reveal */
.hero__btn-secondary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
  background: none;
  color: rgba(238,234,228,0.82);
  font-size: 14.5px;
  font-weight: 600;
}
.hero__btn-secondary svg { transition: transform 0.3s var(--ease); }
.hero__btn-secondary:hover { color: #fff; }
.hero__btn-secondary:hover svg { transform: translateX(5px); }
.hero__btn-secondary::after {
  content: '';
  position: absolute;
  left: 2px;
  bottom: 2px;
  width: calc(100% - 26px);
  height: 1px;
  background: currentColor;
  opacity: 0.55;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.hero__btn-secondary:hover::after { transform: scaleX(1); }

/* Stage-3 product cards (glass panels) */
.hero__card {
  position: relative;
  background: rgba(18,20,26,0.5);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 22px;
  padding: 34px 32px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}
.hero__card-no {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgba(255,202,133,0.85);
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.hero__card-title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f4efe8;
  margin-bottom: 12px;
}
.hero__card-text {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(228,224,218,0.62);
}
.hero__card-cta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  background: #f4f1ec;
  color: #111;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 36px rgba(255,233,200,0.14), 0 2px 10px rgba(0,0,0,0.4);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.25s;
}
.hero__card-cta svg { transition: transform 0.3s var(--ease); }
.hero__card-cta:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 16px 50px rgba(255,233,200,0.24), 0 4px 14px rgba(0,0,0,0.5);
}
.hero__card-cta:hover svg { transform: translateX(5px); }

/* Stage rail — bottom-centre progress through the stages */
.hero__rail {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  gap: 8px;
  pointer-events: none;   /* decorative — never blocks a drag */
}
.hero__rail span {
  width: 24px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255,255,255,0.16);
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}
.hero__rail span.is-active { background: rgba(255,202,133,0.9); width: 34px; }

/* Loading progress bar */
.hero__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  z-index: 8;
  background: rgba(255,255,255,0.06);
  transition: opacity 0.5s var(--ease);
  pointer-events: none;   /* decorative — never blocks a drag */
}
.hero__progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(255,228,190,0.5), rgba(255,246,228,0.95));
  transition: width 0.3s var(--ease);
}
.hero__progress.is-done { opacity: 0; }

/* Scroll cue */
.hero__scroll {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.32);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;   /* decorative — never blocks a drag */
}
/* Scroll cue only shows on the first stage */
.hero:not([data-stage="0"]) .hero__scroll { opacity: 0; pointer-events: none; }
.hero__scroll svg { animation: heroScroll 2.1s var(--ease) infinite; }
@keyframes heroScroll {
  0%, 100% { transform: translateY(0);  opacity: 0.45; }
  50%      { transform: translateY(4px); opacity: 1; }
}

/* Model-loading indicator — visible ring + label roughly where the lamp
   appears, so slow networks (mobile) see progress instead of a blank stage.
   Hidden the moment the hero gains .is-ready (model ready OR static
   fallback); pointer-events:none so it never blocks the drag zone. */
.hero__loader {
  position: absolute;
  top: 44%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.hero__loader-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.14);
  border-top-color: rgba(255,224,178,0.85);   /* matches the lamp's warm glow */
  animation: heroLoaderSpin 0.9s linear infinite;
}
@keyframes heroLoaderSpin { to { transform: rotate(360deg); } }
.hero.is-ready .hero__loader { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .hero__loader-ring { animation: none; }
}

/* Honesty note — the 3D lamp is an illustration, not a product photo.
   Small caption pinned to the bottom-left corner, out of the scroll cue's
   and rail's way; the link stays clickable (the note itself is tiny). */
.hero__note {
  position: absolute;
  bottom: 22px;
  left: clamp(18px, 3vw, 40px);
  z-index: 8;
  max-width: 300px;
  margin: 0;
  color: rgba(255,255,255,0.34);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.01em;
}
.hero__note a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s var(--ease);
}
.hero__note a:hover { color: rgba(255,255,255,0.85); }

@media (max-width: 899px) {
  .hero__scroll { display: none; }
  /* On phones the panels stack bottom-centre (bottom ≥ 40px) and the rail sits
     at 16px — the note lives in the strip between them, centred, one line. */
  .hero__note {
    left: 50%;
    transform: translateX(-50%);
    bottom: 26px;
    max-width: 92%;
    text-align: center;
    font-size: 10px;
    line-height: 1.35;
  }
  /* Taller scroll runway (was 420vh): one thumb-flick covers a smaller share
     of the story, so moving on takes a longer, deliberate gesture. Content
     stays pinned by the sticky stage — extra height is pure scroll distance. */
  .hero-stage { height: 1000vh; }

  /* Lamp sits near centre; panels stack centred in the lower area */
  .hero__panel {
    top: auto;
    bottom: clamp(40px, 8vh, 88px);
    right: auto;
    left: 50%;
    width: min(90%, 440px);
    text-align: center;
    transform: translate3d(-50%, 30px, 0);
  }
  .hero__panel.is-active { transform: translate3d(-50%, 0, 0); }
  .hero__panel.is-past   { transform: translate3d(-50%, -30px, 0); }
  .hero__cta { justify-content: center; }
  .hero__card { padding: 26px 24px; }
  .hero__rail { bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__scroll svg { animation: none; }
  /* Canvas opacity is JS-controlled; reduced-motion shows it immediately via finishLoading() */
}

/* ═══════════════════════════════════════════════════════════
   HOME — EDITORIAL SECTION (lamp's final destination)
   The lamp settles here permanently. The section background is
   semi-transparent at the top so the fixed canvas lamp glows
   through as an ambient centerpiece. Text lives in the dark
   lower portion where it is always readable.
═══════════════════════════════════════════════════════════ */

/* Dark ground for the home view — prevents the light body
   background from showing through the transparent editorial section. */
#viewHome { background: #08090b; }

/* Footer sits above the fixed canvas (z-index:1) so the lamp
   never bleeds over footer text as the user reaches the bottom. */
.footer { position: relative; z-index: 2; }

/* ─────────────────────────────────────────────────────────────
   EDITORIAL COMPOSITION — the lamp's final, art-directed scene

   • The section is TALLER than the viewport; its inner is STICKY, so the
     composition is HELD pinned in view (the lamp's permanent stop) for a
     comfortable beat before the whole scene scrolls away. hero.js holds
     the lamp pinned for exactly the same scroll range (lockOffset = 0
     until releaseScroll), so lamp + typography stay locked together.
   • The sticky stage has an EDGE-ONLY transparent fade — dark only at the
     top/bottom seams, clear through the middle — so the section never
     paints over (darkens) the lamp on the fixed canvas behind it.
   • Layer order: backdrop → lamp (canvas z1) → typography (z3). The
     oversized headline overlaps the lamp's right silhouette; a soft
     text-shadow keeps it crisp where it crosses the glow.
───────────────────────────────────────────────────────────── */
.home-next {
  position: relative;
  z-index: 2;
  /* Long pinned section: the sticky stage holds the lamp while the user scrolls
     the Stage-2 intro → Stage-3 product breakdown (4 callouts) → ending CTA.
     Hold length = (height − 100vh). */
  height: 520vh;
  color: #fff;
}

/* Stage-2 headline/copy fade out the moment the breakdown begins */
.home-next__lead,
.home-next__aside,
.home-next__feature {
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.home-next.is-revealing .home-next__lead,
.home-next.is-revealing .home-next__aside,
.home-next.is-revealing .home-next__feature {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}
.home-next.is-revealing .home-next__lead { transform: translateY(calc(-50% - 12px)); }

.home-next__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  /* Edge-only fade: clear through the middle so the lamp is never darkened */
  background: linear-gradient(
    to bottom,
    #08090b          0%,
    rgba(8,9,11,0)  12%,
    rgba(8,9,11,0)  88%,
    #08090b        100%
  );
}

.home-next__inner {
  position: relative;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── Headline block — right, vertically centred, wraps the lamp ── */
.home-next__lead {
  position: absolute;
  top: 47%;
  right: var(--pad-x);
  transform: translateY(-50%);
  width: min(60%, 720px);
  z-index: 3;
}

.home-next__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,202,133,0.72);
  margin-bottom: 26px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}

/* Oversized mixed-type headline: Inter bold caps + a Playfair italic accent.
   Overlaps the lamp's right edge; text-shadow guarantees legibility. */
.home-next__title {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(62px, 9.2vw, 150px);
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: #fff;
  /* Tight dark halo + soft falloff → stays crisp even where a line crosses
     the lamp's warm glow. */
  text-shadow: 0 0 28px rgba(8,9,11,0.85), 0 6px 60px rgba(0,0,0,0.55), 0 2px 18px rgba(0,0,0,0.5);
}
.home-next__ln { display: block; }
.home-next__title em {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
  color: #f0d7b3;                /* warm accent — echoes the lamp glow */
}

/* ── Supporting copy + actions — lower-right, beneath the headline ── */
.home-next__aside {
  position: absolute;
  right: var(--pad-x);
  bottom: 12%;
  width: min(40%, 380px);
  z-index: 3;
}
.home-next__body {
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.65;
  color: rgba(255,255,255,0.52);
  margin-bottom: 26px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
.home-next__actions {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.home-next__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 15px 30px;
  border-radius: 999px;
  background: #f4f1ec;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 40px rgba(255,233,200,0.12), 0 2px 10px rgba(0,0,0,0.45);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease), background 0.25s;
}
.home-next__cta svg { transition: transform 0.3s var(--ease); }
.home-next__cta:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 18px 54px rgba(255,233,200,0.24), 0 4px 14px rgba(0,0,0,0.5);
}
.home-next__cta:hover svg { transform: translateX(5px); }

.home-next__secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  transition: color 0.22s var(--ease);
}
.home-next__secondary:hover { color: rgba(255,255,255,0.85); }
.home-next__secondary svg { transition: transform 0.3s var(--ease); }
.home-next__secondary:hover svg { transform: translateX(4px); }

/* ── Small editorial accent — lower-left, in the lamp's negative space ── */
.home-next__feature {
  position: absolute;
  left: var(--pad-x);
  bottom: 11%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.42);
  text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.home-next__feature svg { color: rgba(255,202,133,0.7); }

/* ═══════════════════════════════════════════════════════════
   STAGE 3 — INTERACTIVE PRODUCT BREAKDOWN (callout annotations)
   One annotation at a time. JS positions each callout's dot/line/label
   from the parked lamp; CSS animates the draw / marker / label / CTA.
   Lines & labels never capture pointer events (only the CTA does).
═══════════════════════════════════════════════════════════ */
.home-reveal {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.reveal-callout {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.reveal-callout.is-active { opacity: 1; }

/* The thin premium line — drawn via scaleX when its callout activates */
.reveal-line {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  transform: rotate(var(--ang, 0deg)) scaleX(0);
  background: linear-gradient(to right,
    rgba(255,255,255,0.55), rgba(255,255,255,0.14));
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}
.reveal-callout.is-active .reveal-line {
  transform: rotate(var(--ang, 0deg)) scaleX(1);
}

/* Minimal marker dot on the component — appears once the line has drawn */
.reveal-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;          /* centre on the anchor point */
  border-radius: 50%;
  background: #fff5e6;
  box-shadow: 0 0 0 4px rgba(255,236,205,0.12), 0 0 12px 2px rgba(255,224,180,0.5);
  transform: scale(0);
  transition: transform 0.45s var(--ease-spring) 0.35s;
}
.reveal-callout.is-active .reveal-dot { transform: scale(1); }

/* Label — fades + rises in after the line draws */
.reveal-label {
  position: absolute;
  width: min(300px, 32vw);
  transform: translateY(-50%);     /* vertical-centre on the line end (desktop) */
}
/* .reveal-label__in is a static container; its children stagger in individually.
   Editorial hierarchy: small label → large title → short description, each
   fading + rising in sequence AFTER the line has drawn (staggered delays). */
.reveal-kicker,
.reveal-title,
.reveal-text {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal-callout.is-active .reveal-kicker,
.reveal-callout.is-active .reveal-title,
.reveal-callout.is-active .reveal-text {
  opacity: 1;
  transform: translateY(0);
}
/* line draws (~0.8s) → kicker → title → description */
.reveal-callout.is-active .reveal-kicker { transition-delay: 0.42s; }
.reveal-callout.is-active .reveal-title  { transition-delay: 0.54s; }
.reveal-callout.is-active .reveal-text   { transition-delay: 0.70s; }

.reveal-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,202,133,0.78);          /* warm accent — matches the CTA kicker */
  margin-bottom: 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}

.reveal-title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.12;
  text-shadow: 0 2px 24px rgba(0,0,0,0.6);
}
.reveal-text {
  font-size: clamp(14px, 1.1vw, 15.5px);
  line-height: 1.6;
  color: rgba(255,255,255,0.62);
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
/* opacity is the only fade now; text mutedness comes from its rgba color */
.reveal-callout.is-active .reveal-text { opacity: 1; }

/* Ending CTA — centred, revealed after the four components */
.reveal-cta {
  position: absolute;
  left: 50%;
  bottom: clamp(60px, 12vh, 130px);
  transform: translate(-50%, 14px);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-cta.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.reveal-cta__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,202,133,0.72);
  margin-bottom: 18px;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE — purpose-built stacked composition (not a scaled desktop)
   Text sits in the TOP dark band; the lamp parks LOWER (portrait drop
   in hero.js) and glows in the clear lower half. Strong hierarchy,
   generous whitespace, the lamp always clearly visible.
═══════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  /* Tall section → long sticky HOLD covering the Stage-2 intro + the
     Stage-3 breakdown + the ending CTA (the lamp reaches its stop FASTER
     on mobile, then lingers through the whole presentation). */
  /* Taller hold (was 480vh) — same idea as .hero-stage above. */
  .home-next { height: 1000vh; }

  /* Edge-only fade: dark at the TOP (headline) and BOTTOM (copy), CLEAR
     through the middle where the bulb glows — the lamp is never darkened
     and the text always sits on a readable dark band. */
  .home-next__stage {
    background: linear-gradient(
      to bottom,
      #08090b           0%,
      rgba(8,9,11,0.72) 16%,
      rgba(8,9,11,0)    34%,
      rgba(8,9,11,0)    62%,
      rgba(8,9,11,0.80) 82%,
      #08090b          100%
    );
  }

  /* Vertical composition: headline TOP · lamp glows in the MIDDLE gap ·
     copy + CTA BOTTOM. The type wraps the lamp above and below — the desktop
     left/right flank, rotated for a portrait viewport. Centred to balance
     the centred lamp. */
  .home-next__inner {
    padding: clamp(78px, 12vh, 112px) var(--pad-x-sm) clamp(40px, 7vh, 70px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }

  .home-next__lead {
    position: static;
    transform: none;
    width: 100%;
  }
  .home-next__kicker { margin-bottom: 15px; }
  .home-next__title {
    font-size: clamp(38px, 11vw, 58px);
    line-height: 0.97;
    letter-spacing: -0.03em;
  }

  .home-next__aside {
    position: static;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }
  .home-next__body {
    margin: 0 auto 22px;
    max-width: 330px;
    line-height: 1.62;
    color: rgba(255,255,255,0.56);
  }
  .home-next__actions {
    gap: 16px;
    justify-content: center;
  }

  /* Keep the lamp zone clean on mobile */
  .home-next__feature { display: none; }

  /* Stage-3 callouts: labels centred at the bottom (JS sets top via labelY),
     lines drop from the part down to the label. */
  .reveal-label {
    transform: translateX(-50%);
    width: min(320px, 82vw);
    text-align: center;
  }
  .reveal-title { font-size: clamp(20px, 6vw, 26px); }
  .reveal-text  { font-size: 14px; max-width: 320px; margin: 0 auto; }
  .reveal-cta   { bottom: clamp(48px, 9vh, 90px); }
}

/* Very small phones (≤360px): tighten type & padding so nothing crowds */
@media (max-width: 360px) {
  .home-next__inner { padding-top: clamp(64px, 10vh, 88px); }
  .home-next__title { font-size: clamp(34px, 10.5vw, 44px); }
  .home-next__body  { font-size: 14.5px; }
}

/* ═══════════════════════════════════════════════════════════
   CATALOG SECTION + PRODUCT GRID
═══════════════════════════════════════════════════════════ */
.catalog-section {
  /* Wider than the 1240 content rail so 4 capped cards can sit
     centered with breathing room on large monitors, rather than
     being stretched to fill the space. */
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px var(--pad-x) 80px;
}

/* Cards are capped narrow (never wider than 280px) and the whole group
   is centered — on wide desktops/laptops the leftover width becomes side
   whitespace instead of stretching the cards edge-to-edge.
   minmax(0, …) lets tracks shrink gracefully on narrower desktops. */
.product-grid {
  display: grid;
  justify-content: center;
  gap: 32px;
  /* auto-fit collapses empty tracks, so the grid stays centered and symmetric
     for ANY number of cards (2, 3, or 4) — no leftover holes, capped at 280px. */
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
}

/* ── Empty state — illustrated, with recovery CTA ────────── */
.empty-state {
  padding: 90px 24px 100px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin-bottom: 24px;
  border-radius: 50%;
  color: var(--text-muted);
  background: radial-gradient(120% 120% at 50% 0%, var(--white), var(--gray-50));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.empty-state__title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.empty-state__text {
  max-width: 420px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.empty-state__btn {
  min-height: 46px;
  padding: 12px 26px;
  border-radius: 13px;
  background: var(--gray-900);
  color: #fff;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.empty-state__btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(167,31,69,0.5);
}

.empty-state__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT CARD — Editorial / quiet-luxury
   Near-flat at rest (Aesop/Linear restraint) · 4:5 gallery image ·
   hairline "price ledger" · ghost→fill CTA.
   Hover: composed elevation + soft top-light + image zoom + 3D tilt.
   NOTE: the composite transform + CSS vars (--enter-y/--lift/--sc/
   --rx/--ry) and the .is-visible / .is-tilting / .is-media-ready /
   .is-loaded hooks are driven by script.js — do not rename them.
═══════════════════════════════════════════════════════════ */
.product-card {
  /* Composable transform tokens — entrance, hover lift, tilt */
  --enter-y: 30px;
  --lift: 0px;
  --sc: 1;
  --rx: 0deg;
  --ry: 0deg;

  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(17, 17, 17, 0.07);
  /* NO overflow:hidden here — clipping a 3D-transformed, composited layer
     makes Chrome drop the rounded-corner mask mid-animation (corners flash
     square on hover). The media area below does its own rounded clipping. */
  border-radius: 20px;
  cursor: pointer;
  opacity: 0;
  transform:
    perspective(1100px)
    translate3d(0, calc(var(--enter-y) + var(--lift)), 0)
    rotateX(var(--rx)) rotateY(var(--ry))
    scale(var(--sc));
  /* Almost flat at rest — elegance comes from restraint */
  box-shadow: 0 1px 2px rgba(17,17,17,0.03);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease),
    box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);
  will-change: transform;
}

.product-card.is-visible {
  --enter-y: 0px;
  opacity: 1;
}

/* While actively tilting, transform tracks the cursor snappily */
.product-card.is-tilting {
  transition:
    transform 0.12s ease-out,
    box-shadow 0.45s var(--ease),
    border-color 0.45s var(--ease);
}

.product-card:hover {
  --lift: -10px;
  --sc: 1.012;
  border-color: rgba(17,17,17,0.13);
  /* Neutral, layered elevation — no color tint */
  box-shadow:
    0 2px 4px rgba(17,17,17,0.04),
    0 26px 46px -22px rgba(17,17,17,0.26);
}

.product-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Media area — the gallery frame ─────────────────────── */
.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--white);                        /* clean gallery surface */
  overflow: hidden;
  /* Rounded clip lives HERE (a non-transformed element) so the card's
     corners stay rounded at every frame of the hover animation.
     19px = card's 20px outer radius − 1px border. */
  border-radius: 19px 19px 0 0;
  isolation: isolate;                              /* stable clip for the scaling image */
  flex-shrink: 0;
  border-bottom: 1px solid rgba(17,17,17,0.05);   /* hairline frame line */
  transition: background 0.45s var(--ease);
}

/* Background subtly changes tone on hover */
.product-card:hover .card-media { background: #fbfbfb; }

/* Animated shimmer placeholder until the image decodes */
.card-media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg,
    var(--gray-100) 0%, var(--gray-50) 22%, var(--gray-100) 44%, var(--gray-100) 100%);
  background-size: 200% 100%;
  animation: pr-shimmer 1.3s ease-in-out infinite;
  transition: opacity 0.45s var(--ease);
}

.card-media.is-media-ready::after {
  opacity: 0;
  animation: none;
}

@keyframes pr-shimmer {
  0%   { background-position: 150% 0; }
  100% { background-position: -150% 0; }
}

.card-media__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Emoji products genuinely float on the plinth — gallery treatment:
   generous negative space + a soft contact shadow that deepens as the
   piece lifts on hover. */
.card-media__emoji {
  font-size: 92px;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 18px 26px rgba(0,0,0,0.18));
  transition: transform 0.5s var(--ease), filter 0.5s var(--ease);
}

.product-card:hover .card-media__emoji {
  transform: translateY(-6px) scale(1.04);
  filter: drop-shadow(0 30px 34px rgba(0,0,0,0.22));
}

.card-media__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* Product-shot cards: square images → square media area, no portrait stretch */
.card-media--square {
  aspect-ratio: 1 / 1;
}

.card-media__img--contain {
  object-fit: contain;
  padding: 8%;
  transform: scale(1.0);
}
.product-card:hover .card-media__img--contain.is-loaded { transform: scale(1.03); }

.card-media__img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.product-card:hover .card-media__img.is-loaded {
  transform: scale(1.04);
}

/* Badges — top-left, editorial chips (brand neutrals + one accent pop) */
.card-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.4;
  border: 1px solid transparent;
}

/* Accent pop — the only colour, reserved for the deal */
.badge--sale {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(167,31,69,0.5);
}
/* Dark chip */
.badge--new {
  background: var(--gray-900);
  color: #fff;
}
/* Frosted neutral chips */
.badge--popular,
.badge--sold-out {
  background: rgba(255,255,255,0.82);
  color: var(--text-primary);
  border-color: rgba(17,17,17,0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(17,17,17,0.08);
}
.badge--sold-out { color: var(--text-muted); }

/* Discount — the hero badge, a dark price tag anchored to the image's
   bottom-left (brand neutral, not a random colour). */
.card-save {
  position: absolute;
  left: 0;
  bottom: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  padding: 7px 13px 7px 14px;
  background: var(--gray-900);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 0 9px 9px 0;
  box-shadow: 0 6px 16px -6px rgba(17,17,17,0.5);
  transition: transform 0.35s var(--ease);
}
.product-card:hover .card-save { transform: translateX(3px); }

/* ── Card body — centered, minimal (name + price) ──────────── */
.card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  text-align: center;
}

/* Editorial restraint: surface only the name + price on the card face.
   (Kept in the DOM — and in the product detail page — for SEO/search;
   simply not shown on the minimal card.) */
.card-tag,
.card-desc,
.card-rating { display: none; }

/* Product sub-type tag — a quiet editorial kicker (echoes the hero) */
.card-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Product name — the focal point, centered under the image */
.card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.32;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Rating row */
.card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.star-row {
  display: flex;
  gap: 1px;
  align-items: center;
}

.star {
  width: 12px;
  height: 12px;
}

.star--full  { fill: #f59e0b; }
.star--empty { fill: var(--gray-200); }

.card-review-count {
  font-size: 11.5px;
  color: var(--text-faint);
  font-weight: 500;
}

/* Price — centered, reading "original → now" (DOM order is now→original,
   so row-reverse renders the struck original first, the new price last). */
.card-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-direction: row-reverse;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
}

.card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.card-old-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

/* CTA wrapper — pinned to the card foot; the button itself rests hidden
   and fades up on hover/focus (see the hover-capable block below). */
.card-cta {
  margin-top: auto;
  padding-top: 20px;
}

/* On hover-capable devices the CTA rests hidden and fades up on hover or
   keyboard focus — gallery restraint. Touch devices (no hover) always
   show it. Space is reserved either way, so there is no layout shift. */
@media (hover: hover) and (pointer: fine) {
  .card-cta {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  }
  .product-card:hover .card-cta,
  .product-card:focus-within .card-cta {
    opacity: 1;
    transform: translateY(0);
  }
}

.card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-md);   /* ghost at rest */
  border-radius: 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  user-select: none;
  transition:
    background 0.3s var(--ease),
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.card-btn__icon {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

/* Ghost → dark fill (echoes the hero), arrow glides forward */
.product-card:hover .card-btn {
  background: var(--gray-900);
  border-color: var(--gray-900);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(17,17,17,0.5);
}

.product-card:hover .card-btn__icon {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
   Design: 2-column sticky gallery | scrollable info
   Matches pixel-room.net product page structure
═══════════════════════════════════════════════════════════ */

/* Wrapper */
.pd-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 80px;
}

/* Back button */
.pd-back {
  padding: 20px 0 28px;
}

.pd-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 7px 14px 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--white);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pd-back-btn:hover {
  color: var(--text-primary);
  border-color: var(--gray-300);
  background: var(--gray-50);
}

.pd-back-btn svg { flex-shrink: 0; }

/* Main 2-column layout */
.pd-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

/* ── Gallery column ──────────────────────────────────────── */
.pd-gallery {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
}

.pd-img-main {
  aspect-ratio: 1 / 1;
  background: var(--gray-100);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  position: relative;
}

.pd-img-main__emoji {
  font-size: 160px;
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,0.16));
  transition: transform 0.4s var(--ease), opacity 0.2s;
}

.pd-img-main img,
.pd-img-main__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.18s ease;
}

/* Product-shot gallery: show full image, no cropping */
.pd-img-main--contain img,
.pd-img-main--contain .pd-img-main__photo {
  object-fit: contain;
  padding: 8%;
  background: var(--white);
}

/* Gallery badge (sold out overlay) */
.pd-img-badge {
  position: absolute;
  top: 16px;
  left: 16px;
}

/* Thumbnails */
.pd-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.pd-thumbs::-webkit-scrollbar { display: none; }

.pd-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  background: var(--gray-100);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s;
}

.pd-thumb:hover   { border-color: var(--gray-400); }
.pd-thumb.is-active { border-color: var(--gray-900); }

.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Info column ─────────────────────────────────────────── */
.pd-info { padding-top: 4px; }

/* Tag */
.pd-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 10px;
}

/* Title */
.pd-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.12;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
}

/* Rating */
.pd-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Price row */
/* Vertical price hierarchy: struck original → bold current → savings accent */
.pd-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 20px;
}

.pd-old-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pd-price {
  font-size: clamp(30px, 3.8vw, 40px);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pd-save-detail {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin-top: 2px;
}

/* Keep old pill class harmless if referenced elsewhere */
.pd-save-pill { display: none; }

/* Stock status */
.pd-stock-row {
  margin-bottom: 22px;
}

/* Feature bullets */
.pd-bullets {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 26px;
}

.pd-bullet {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.45;
}

.pd-bullet__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-top: 1px;
}

.pd-bullet__icon svg { width: 15px; height: 15px; }

/* Accordion SVG icon (same size as bullet) */
.pd-acc-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.pd-acc-svg svg { width: 15px; height: 15px; }

.pd-bullet b { font-weight: 700; color: var(--text-primary); }

/* Divider with label */
.pd-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pd-divider::before,
.pd-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Bundle selector */
.pd-bundles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.bundle-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
}

.bundle-opt:hover { border-color: var(--gray-300); }

.bundle-opt.is-selected {
  border-color: var(--gray-900);
  background: var(--gray-50);
}

/* Radio circle */
.bundle-radio {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s;
}

.bundle-opt.is-selected .bundle-radio {
  border-color: var(--gray-900);
}

.bundle-radio::after {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gray-900);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.15s, transform 0.2s var(--ease-spring);
}

.bundle-opt.is-selected .bundle-radio::after {
  opacity: 1;
  transform: scale(1);
}

/* Bundle info */
.bundle-info { flex: 1; min-width: 0; }

.bundle-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.bundle-save {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.bundle-prices {
  text-align: right;
  flex-shrink: 0;
}

.bundle-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.2px;
}

.bundle-old {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  text-decoration: line-through;
  display: block;
  font-variant-numeric: tabular-nums;
}

/* Bundle pill badge */
.bundle-pill {
  position: absolute;
  top: -10px;
  right: 14px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.bundle-pill--popular { background: var(--accent); color: #fff; }
.bundle-pill--best    { background: #1d4ed8;        color: #fff; }

/* CTA buttons */
.pd-cta-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.btn-cta {
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s, color 0.18s, transform 0.12s, opacity 0.18s;
  cursor: pointer;
}

.btn-cta {
  background: var(--gray-900);
  color: #fff;
}

.btn-cta:hover { background: #222; }

.btn-cta:active { transform: scale(0.98); }

.btn-cta:disabled {
  background: var(--gray-200);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-cta--secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-md);
}

.btn-cta--secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

.btn-cta--secondary:disabled {
  background: transparent;
  color: var(--text-faint);
  border-color: var(--border);
}

/* Accordion features (guarantee, shipping, etc.) */
.pd-accordion {
  border-top: 1px solid var(--border);
}

.pd-accordion-item {
  border-bottom: 1px solid var(--border);
}

.pd-accordion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  gap: 12px;
  text-align: left;
  transition: color 0.15s;
}

.pd-accordion-btn:hover { color: var(--accent); }

.pd-accordion-btn__icon {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pd-accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.25s var(--ease);
  color: var(--text-faint);
}

.pd-accordion-item.is-open .pd-accordion-chevron {
  transform: rotate(180deg);
}

.pd-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}

.pd-accordion-item.is-open .pd-accordion-body {
  max-height: 200px;
}

.pd-accordion-body p {
  padding-bottom: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Related products section ───────────────────────────── */
.pd-related {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.pd-related__title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  margin-bottom: 28px;
}

.pd-related__grid {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(220px, 300px));
  gap: 20px;
}

/* ═══════════════════════════════════════════════════════════
   CART SIDEBAR
═══════════════════════════════════════════════════════════ */
.cart-scrim {
  position: fixed;
  inset: 0;
  z-index: 148;
  background: rgba(0,0,0,0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.cart-scrim.is-open { opacity: 1; pointer-events: auto; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 149;
  width: min(390px, 100vw);
  background: var(--white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-sidebar.is-open { transform: translateX(0); }

.cart-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-hd__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.cart-hd__close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.cart-hd__close:hover { background: var(--gray-100); color: var(--text-primary); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 48px 0;
  color: var(--text-faint);
  font-size: 14px;
  text-align: center;
}

/* Cart item */
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: cartItemIn 0.3s var(--ease) both;
}

@keyframes cartItemIn {
  from { opacity: 0; transform: translateX(14px); }
  to   { opacity: 1; transform: translateX(0); }
}

.cart-item.is-removing {
  animation: cartItemOut 0.25s var(--ease) forwards;
}

@keyframes cartItemOut {
  to { opacity: 0; transform: translateX(14px); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

.cart-item__thumb {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: var(--r-sm);
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item__thumb-emoji { font-size: 26px; line-height: 1; }
/* Image covers the emoji when it loads; on error the JS removes it → emoji shows. */
.cart-item__thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.cart-item__info { flex: 1; min-width: 0; }

.cart-item__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.cart-item__price {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: 9px;
}

/* Quantity stepper */
.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
}

.cart-qty__btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  transition: background 0.15s, color 0.15s;
}

.cart-qty__btn:hover { background: var(--gray-100); color: var(--text-primary); }
.cart-qty__btn:active { transform: scale(0.9); }
.cart-qty__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.cart-qty__val {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Right column — line total + remove */
.cart-item__end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
  align-self: stretch;
}

.cart-item__total {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cart-item__remove {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.cart-item__remove:hover { color: #dc2626; background: #fef2f2; }

/* Cart footer */
.cart-ft {
  padding: 18px 22px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex-shrink: 0;
}

.cart-ft[hidden] { display: none; }

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.cart-subtotal strong {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ═══════════════════════════════════════════════════════════
   CHECKOUT MODAL
═══════════════════════════════════════════════════════════ */
.checkout {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.checkout.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.checkout__scrim {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.checkout__dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 18px;
  padding: 26px 24px 24px;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.4);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s var(--ease);
}
.checkout.is-open .checkout__dialog { transform: translateY(0) scale(1); }

.checkout__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.checkout__close:hover { background: var(--gray-100); color: var(--text-primary); }

.checkout__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-right: 30px;
}

.checkout__form { display: flex; flex-direction: column; gap: 13px; }

.co-field { display: flex; flex-direction: column; gap: 5px; }
.co-field label { font-size: 12.5px; font-weight: 600; color: var(--text-body); }
.co-field input,
.co-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text-primary);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.co-field textarea { resize: vertical; min-height: 44px; }
.co-field input:focus,
.co-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(167, 31, 69, 0.12);
}
.co-field input.is-invalid,
.co-field textarea.is-invalid { border-color: #dc2626; }
.co-error { font-size: 11.5px; color: #dc2626; }
.co-error:empty { display: none; }

.checkout__summary {
  margin-top: 4px;
  padding: 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.co-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  color: var(--text-muted);
}
.co-sum-row strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.co-pay { margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-body); }
.co-note { margin-top: 4px; font-size: 11.5px; color: var(--text-faint); line-height: 1.4; }

.checkout__formError {
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 9px;
  padding: 9px 12px;
}
.checkout__formError[hidden] { display: none; }

#placeOrderBtn { margin-top: 4px; }
#placeOrderBtn.is-loading { opacity: 0.75; cursor: progress; }

/* Mobile: checkout becomes a bottom sheet */
@media (max-width: 519px) {
  .checkout { padding: 0; align-items: flex-end; }
  .checkout__dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    transform: translateY(100%);
  }
  .checkout.is-open .checkout__dialog { transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.8);
  padding-top: 56px;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x) 56px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}

.footer-logo {
  display: block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 2px 2px 0 rgba(167,31,69,0.35);
}

.footer-tagline {
  font-size: 13.5px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
}

.footer-heading {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 18px;
}

.footer-links { display: flex; flex-direction: column; gap: 11px; }

.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}

.footer-links a:hover { color: #fff; }

.footer__bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--pad-x);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}

/* ═══════════════════════════════════════════════════════════
   LANGUAGE SWITCHER
   Custom dropdown (desktop) + pill buttons (mobile menu).
   Logical properties (inset-inline / margin-inline) keep it RTL-ready.
═══════════════════════════════════════════════════════════ */
.lang-switch {
  position: relative;
  display: inline-flex;
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding-inline: 11px 9px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
              box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.lang-switch__btn:hover {
  background: #fff;
  border-color: var(--border-md);
  box-shadow: var(--shadow-sm);
}
.lang-switch__btn:active { transform: translateY(1px); }
.lang-switch__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lang-switch__flag { font-size: 15px; line-height: 1; }
.lang-switch__code { letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.lang-switch__chevron { color: var(--text-muted); transition: transform 0.25s var(--ease); }
/* Globe shown only on mobile (compact pill); desktop uses flag + chevron. */
.lang-switch__globe { display: none; color: var(--text-muted); flex-shrink: 0; }
.lang-switch.is-open .lang-switch__chevron { transform: rotate(180deg); }

.lang-switch__menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  min-width: 190px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 120;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top var(--logical-end, right);
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.lang-switch.is-open .lang-switch__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.lang-switch__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  cursor: pointer;
  text-align: start;
  transition: background 0.15s var(--ease);
}
.lang-switch__opt:hover { background: var(--gray-50); }
.lang-switch__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lang-switch__opt[aria-selected="true"] { color: var(--text-primary); font-weight: 650; }
.lang-switch__opt-flag { font-size: 17px; line-height: 1; }
.lang-switch__opt-name { white-space: nowrap; }
.lang-switch__check { margin-inline-start: auto; color: var(--accent); opacity: 0; transition: opacity 0.15s var(--ease); }
.lang-switch__opt[aria-selected="true"] .lang-switch__check { opacity: 1; }

/* ── Mobile switcher (inside the slide-out menu) ── */
.mnav-lang {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.mnav-lang__opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.85);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.mnav-lang__opt:hover { background: rgba(255,255,255,0.09); color: #fff; }
.mnav-lang__opt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.mnav-lang__opt[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: var(--gray-900);
}

/* ── Language-swap transition ──
   Engine adds .i18n-swapping for ~150ms while text is replaced, so the
   change reads as a soft crossfade instead of a flash or layout jump. */
.i18n-swapping [data-i18n],
.i18n-swapping [data-i18n-html],
.i18n-swapping #productGrid,
.i18n-swapping #viewProduct,
.i18n-swapping #cartBody {
  transition: opacity 0.16s var(--ease);
  opacity: 0.35;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */

/* Ultra-wide desktop: keep the 320px cap, widen the gaps, stay centered.
   Cards never grow into giant rectangles — the monitor's extra width
   turns into balanced side whitespace. */
@media (min-width: 1440px) {
  .product-grid { gap: 40px; }
}

/* Large tablet: auto-fit so 2 cards stay centered (no empty 3rd column),
   and it still flows to 3 across when more cards are present. */
@media (min-width: 800px) and (max-width: 1099px) {
  .product-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 280px)); gap: 24px; }
}

/* Header nav now carries 7 links (Home, Catalog + 5 legal pages) —
   give it a generous, dedicated breakpoint so the flat nav only
   ever renders once header__inner is at its full max-width and
   there's guaranteed clearance from the logo/actions on each side.
   Below this, every page (SPA + all 5 standalone legal pages)
   falls back to the identical burger/mobile-nav overlay. */
@media (max-width: 1239px) {
  .header-nav { display: none; }
  .burger     { display: flex; }

  /* Language switcher STAYS in the mobile header — always visible and
     discoverable as a compact globe pill, reusing the same dropdown and
     visual language as desktop (just globe + code instead of flag + chevron). */
  .lang-switch { display: inline-flex; }
  .lang-switch__btn { gap: 5px; padding-inline: 9px; min-height: 40px; }
  .lang-switch__globe { display: block; }
  .lang-switch__flag,
  .lang-switch__chevron { display: none; }
  .lang-switch__opt { padding: 12px; min-height: 44px; }   /* comfortable touch targets */
}

/* Smallest phones: drop the language code so the header row never crowds the
   logo/actions — the globe alone signals language, and the open menu shows
   the active choice with a checkmark. */
@media (max-width: 360px) {
  .lang-switch__code { display: none; }
  .lang-switch__btn { padding-inline: 8px; }
}

/* Tablet */
@media (max-width: 899px) {
  :root { --pad-x: var(--pad-x-sm); }

  .catalog-section { padding: 24px var(--pad-x-sm) 60px; }

  /* Product detail stacks */
  .pd-wrap { padding: 0 var(--pad-x-sm) 60px; }
  .pd-body { grid-template-columns: 1fr; gap: 32px; }
  .pd-gallery { position: static; }
  .pd-title { font-size: 26px; }
  .pd-price { font-size: 28px; }
}

/* Tablet: 2 columns */
@media (min-width: 520px) and (max-width: 799px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* Mobile — ALWAYS two cards per row, intentionally tuned (not shrunk) */
@media (max-width: 519px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Square hero reads better in the narrow two-up layout */
  .card-media   { aspect-ratio: 1 / 1; border-radius: 17px 17px 0 0; }  /* radius follows the tighter card */
  .card-media__emoji { font-size: 60px; }

  .product-card { border-radius: 18px; }
  .card-body    { padding: 12px 12px 13px; }
  .card-tag     { font-size: 9.5px; letter-spacing: 0.07em; margin-bottom: 5px; }
  .card-name    { font-size: 13.5px; margin-bottom: 4px; }
  .card-desc    { display: none; }            /* protect hierarchy on small screens */
  .card-rating  { margin-bottom: 9px; }
  .star         { width: 11px; height: 11px; }
  .card-price-row { gap: 8px; }
  .card-price   { font-size: 16px; }
  .card-old-price { font-size: 12px; }
  .card-cta     { padding-top: 12px; }
  .card-btn     { min-height: 42px; padding: 10px 12px; font-size: 12.5px; border-radius: 11px; gap: 6px; }
  .card-save    { bottom: 10px; padding: 5px 10px 5px 11px; font-size: 9.5px; }
  .card-badges  { top: 9px; left: 9px; gap: 4px; }
  .badge        { padding: 3px 8px; font-size: 9px; }

  .footer__inner { grid-template-columns: 1fr; gap: 32px; padding: 0 var(--pad-x-sm) 40px; }
  .pd-bundles { gap: 8px; }
}

/* Very small phones — still two product cards, never one giant card */
@media (max-width: 380px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body    { padding: 11px 11px 12px; }
  .pd-related__grid { grid-template-columns: 1fr; }
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .pd-img-main__emoji { animation: none !important; }

  /* Cards: no entrance offset, no tilt, no shimmer — just present */
  .product-card     { opacity: 1 !important; transform: none !important; }
  .card-media__img  { opacity: 1 !important; transform: none !important; }
  .card-media::after { display: none; }
}

/* ════════════════════════════════════════════════════════════
   FAQ SECTION
════════════════════════════════════════════════════════════ */
.faq-section {
  padding: 56px 0 0;
}
.faq-section__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  transition: color 0.15s;
}
.faq-btn:hover { color: var(--accent); }
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.28s var(--ease);
}
.faq-item.is-open .faq-chevron { transform: rotate(180deg); }
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s var(--ease);
}
.faq-body-inner {
  padding: 0 0 20px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.75;
}

@media (max-width: 599px) {
  .faq-section__title { font-size: 19px; }
}
