/* ============================================================
   MOTIONARY SPORTS — design tokens
   Identity: kinetic / motion-graphics — diagonal speed-lines,
   angled dividers, a bold electric-blue + crimson duotone.
   ============================================================ */
:root {
  --field: #0b0f1a;
  --field-deep: #05070c;
  --field-mid: #131a2b;
  --surge: #2f6bff;
  --surge-light: #6a93ff;
  --surge-text: #1d47b8; /* AA-safe surge for small text/links on light bg */
  --pulse: #ff3d5a;
  --pulse-light: #ff7a8f;
  --pulse-text: #c81f3a; /* AA-safe pulse for small text on light bg */
  --mist: #f4f6fb;
  --mist-deep: #e7eaf5;
  --panel: #ffffff;
  --line: #dfe3ee;
  --muted: #565f74; /* AA-safe muted text on mist/panel */
  --ink: #0b0f1a;
  --white: #ffffff;
  --radius: 6px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 12px rgba(11, 15, 26, 0.08);
  --shadow-md: 0 20px 42px rgba(11, 15, 26, 0.16);
  --font-display: "Rajdhani", "Arial Narrow", sans-serif;
  --font-body: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Chivo Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pulse-text);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--pulse);
  transform: skewX(-20deg);
}
section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--dark {
  background: var(--field);
  color: var(--mist);
}
.section--dark .eyebrow { color: var(--surge-light); }
.section--dark .eyebrow::before { background: var(--surge-light); }
.section--panel { background: var(--panel); }
.section--split {
  background: linear-gradient(180deg, var(--mist) 0%, var(--mist-deep) 100%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--pulse); color: var(--white); }
.btn--primary:hover { box-shadow: 0 12px 24px rgba(255, 61, 90, 0.35); }
.btn--ghost {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.section--panel .btn--ghost, .section--split .btn--ghost { color: var(--ink); }
.section--panel .btn--ghost:hover, .section--split .btn--ghost:hover { background: rgba(11, 15, 26, 0.06); }

/* ===================== Header / nav ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 26, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.brand svg { flex-shrink: 0; }
.brand span { color: var(--surge-light); }
.brand-logo { height: 34px; width: auto; display: block; }
.footer-brand .brand-logo { height: 30px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--surge-light); border-color: var(--surge-light); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-actions .btn { padding: 10px 20px; font-size: 0.82rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); display: block; }

/* ===================== Hero ===================== */
.hero {
  position: relative;
  background: var(--field);
  color: var(--white);
  overflow: hidden;
  padding: 96px 0 80px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(-24deg, rgba(47, 107, 255, 0.14) 0 2px, transparent 2px 64px),
    radial-gradient(circle at 82% 18%, rgba(255, 61, 90, 0.28), transparent 55%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  color: var(--surge-light);
}
.hero-lead {
  font-size: 1.08rem;
  color: rgba(244, 246, 251, 0.8);
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.hero-stats-line {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(244, 246, 251, 0.65);
  letter-spacing: 0.02em;
}
.hero-stats-line strong { color: var(--white); }
.hero-stats-line .divider { margin: 0 10px; color: var(--pulse-light); }

.hero-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 32px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
}
.hero-panel__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--surge-light);
  margin-bottom: 18px;
}
.hero-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.hero-panel__grid dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 246, 251, 0.55);
  margin-bottom: 4px;
}
.hero-panel__grid dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ===================== Feature strip ===================== */
.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature-item {
  background: var(--panel);
  padding: 28px 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-item__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(47, 107, 255, 0.1);
  color: var(--surge-text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.feature-item p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ===================== Category grid ===================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.category-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--surge-light);
}
.category-card__badge {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--field);
  color: var(--surge-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.category-card h4 { font-size: 1.02rem; margin-bottom: 8px; }
.category-card p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* ===================== Program / partnership cards ===================== */
.program-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.program-card {
  position: relative;
  background: var(--field-mid);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  color: var(--mist);
  overflow: hidden;
}
.program-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 90px; height: 90px;
  background: linear-gradient(135deg, transparent 48%, rgba(47, 107, 255, 0.35) 50%, transparent 52%);
}
.program-card__index {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--pulse-light);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.program-card h4 { font-size: 1.1rem; margin-bottom: 10px; }
.program-card p { font-size: 0.9rem; color: rgba(244, 246, 251, 0.72); margin: 0; }

/* ===================== Speed rail (process) ===================== */
.speed-rail {
  position: relative;
  margin-top: 48px;
  padding-left: 28px;
  border-left: 3px solid var(--surge);
}
.speed-step { position: relative; padding: 0 0 40px 24px; }
.speed-step:last-child { padding-bottom: 0; }
.speed-step::before {
  content: attr(data-step);
  position: absolute;
  left: -40px;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--field);
  color: var(--surge-light);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.speed-step h4 { font-size: 1rem; margin-bottom: 6px; }
.speed-step p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ===================== Stat strip ===================== */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 44px;
  text-align: center;
}
.stat-strip__item { padding: 18px 12px; border-left: 1px solid rgba(255,255,255,0.12); }
.stat-strip__item:first-child { border-left: none; }
.stat-strip__value {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--surge-light);
}
.stat-strip__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 246, 251, 0.6);
  margin-top: 6px;
}

/* ===================== Vision / mission panel ===================== */
.vm-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--field);
  color: var(--mist);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 44px;
}
.vm-panel__col { padding: 40px 36px; }
.vm-panel__col:first-child { border-right: 1px solid rgba(255,255,255,0.12); }
.vm-panel__col .eyebrow { color: var(--pulse-light); }
.vm-panel__col .eyebrow::before { background: var(--pulse-light); }
.vm-panel__col p { color: rgba(244, 246, 251, 0.78); margin: 0; }

/* ===================== Info table (legal / contact facts) ===================== */
.info-table {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 24px;
}
.info-table dt, .info-table dd {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.info-table dt {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--mist);
}
.info-table dt:last-of-type, .info-table dd:last-of-type { border-bottom: none; }

/* ===================== Contact layout ===================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}
.contact-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.contact-card + .contact-card { margin-top: 20px; }
.contact-card__row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contact-card__row:last-child { margin-bottom: 0; }
.contact-card__icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(47, 107, 255, 0.1); color: var(--surge-text);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-card__row h4 { font-size: 0.85rem; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-card__row p, .contact-card__row a { font-size: 0.95rem; margin: 0; color: var(--muted); }
.contact-card__row a:hover { color: var(--surge-text); }

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--mist);
  color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: 2px solid var(--surge);
  outline-offset: 1px;
  background: var(--white);
}
.form-field textarea { resize: vertical; min-height: 120px; }

/* ===================== Legal pages ===================== */
.legal-doc { max-width: 820px; margin: 0 auto; }
.legal-doc h2 { font-size: 1.6rem; margin-top: 2em; }
.legal-doc h2:first-of-type { margin-top: 0; }
.legal-doc p, .legal-doc li { color: var(--muted); font-size: 0.96rem; }
.legal-doc li { margin-bottom: 0.5em; padding-left: 1.4em; position: relative; }
.legal-doc li::before {
  content: "";
  position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 6px; background: var(--pulse);
}
.clause-no {
  font-family: var(--font-mono);
  color: var(--surge-text);
  margin-right: 8px;
}
.legal-toc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 40px;
}
.legal-toc h4 { font-size: 0.85rem; margin-bottom: 12px; }
.legal-toc ol { list-style: decimal; padding-left: 20px; margin: 0; }
.legal-toc li { padding-left: 0; color: var(--surge-text); font-size: 0.9rem; margin-bottom: 6px; }
.legal-toc li::before { display: none; }
.legal-toc a:hover { text-decoration: underline; }
.updated-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ===================== CTA band ===================== */
.cta-band {
  background: linear-gradient(120deg, var(--surge) 0%, var(--pulse) 100%);
  color: var(--white);
  text-align: center;
  padding: 72px 0;
}
.cta-band h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.cta-band p { max-width: 56ch; margin: 0 auto 32px; color: rgba(255,255,255,0.9); }
.cta-band .btn--primary { background: var(--field); }
.cta-band .btn--ghost { border-color: rgba(255,255,255,0.6); }

/* ===================== Footer ===================== */
.site-footer {
  background: var(--field-deep);
  color: rgba(244, 246, 251, 0.7);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; max-width: 34ch; }
.footer-col h4 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.88rem; }
.footer-col a:hover { color: var(--surge-light); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.78rem;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .reg-no { font-family: var(--font-mono); color: rgba(244, 246, 251, 0.5); }

/* ===================== Scroll reveal ===================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .program-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .vm-panel { grid-template-columns: 1fr; }
  .vm-panel__col:first-child { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--field);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    gap: 18px;
    display: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-actions .btn-text { display: none; }
  section { padding: 56px 0; }
  .feature-strip { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .info-table { grid-template-columns: 1fr; }
  .info-table dt { border-bottom: none; padding-bottom: 4px; }
  .info-table dd { padding-top: 4px; }
}

@media (max-width: 560px) {
  .hero-panel__grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
}

/* Form input zoom-prevent on iOS */
@media (max-width: 720px) {
  .form-field input, .form-field textarea, .form-field select { font-size: 16px; }
}

/* ============================================================
   SHOP — cart, catalog, product detail, checkout
   ============================================================ */

/* Cart toggle (nav) */
.cart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--mist);
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.cart-toggle:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }
.cart-toggle.has-items { border-color: var(--pulse-light); color: var(--pulse-light); }
.cart-toggle.has-items:hover { background: var(--pulse); color: var(--white); }
.cart-toggle__icon { flex-shrink: 0; }
.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--surge-light);
  color: var(--field-deep);
  font-size: 0.66rem;
  font-weight: 700;
  margin-left: -2px;
}
.cart-toggle__total { letter-spacing: 0.02em; }
.cart-toggle--pulse { animation: cartPulse 0.4s ease; }
@keyframes cartPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* Cart toast */
.cart-toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
}
.cart-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 320px;
  padding: 12px 16px;
  background: var(--field-deep);
  border: 1px solid var(--surge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s ease;
}
.cart-toast.is-visible { opacity: 1; transform: translateY(0); }
.cart-toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surge-light);
  color: var(--field-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}
.cart-toast__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cart-toast__title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--surge-light);
}
.cart-toast__name {
  font-size: 0.85rem;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 560px) {
  .cart-toast-wrap { left: 16px; right: 16px; bottom: 16px; }
  .cart-toast { min-width: 0; max-width: none; }
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--mist);
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
  z-index: 91;
  display: flex;
  flex-direction: column;
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.cart-drawer__head h3 { font-size: 1.15rem; margin: 0; }
.cart-drawer__close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}
.cart-drawer__close:hover { color: var(--ink); }

.cart-drawer__body { flex: 1; overflow-y: auto; padding: 12px 24px; background: var(--panel); }
.cart-empty { color: var(--muted); font-size: 0.92rem; padding: 24px 0; }

.cart-line {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px dashed var(--line);
}
.cart-line__thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--mist);
}
.cart-line__thumb--empty {
  background: var(--field);
  background-image: linear-gradient(135deg, var(--surge) 0%, var(--surge) 8%, transparent 8%, transparent 50%, var(--pulse) 50%, var(--pulse) 58%, transparent 58%, transparent 100%);
  background-size: 12px 12px;
  opacity: 0.5;
}
.cart-line__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cart-line__info { display: flex; flex-direction: column; gap: 3px; }
.cart-line__name { font-size: 0.9rem; font-weight: 600; }
.cart-line__sku { font-size: 0.7rem; color: var(--muted); font-family: var(--font-mono); }
.cart-line__controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cart-line__price { font-size: 0.86rem; font-weight: 700; font-family: var(--font-mono); }
.cart-line__remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 6px;
}
.cart-line__remove:hover { color: var(--pulse); }

.cart-drawer__foot {
  padding: 20px 24px 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--panel);
}
.cart-drawer__subtotal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
}
.cart-drawer__subtotal span { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.cart-drawer__subtotal strong { font-size: 1.3rem; color: var(--ink); }
.cart-drawer__clear {
  background: none;
  border: none;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  align-self: center;
  font-family: var(--font-body);
}
.cart-drawer__clear:hover { color: var(--pulse-text); }

body.cart-open { overflow: hidden; }

/* Quantity stepper */
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.qty-btn {
  background: var(--panel);
  border: none;
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.15s ease;
}
.qty-btn:hover { background: var(--mist-deep); }
.qty-input {
  width: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  height: 30px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--panel);
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-stepper--sm .qty-btn { width: 26px; height: 26px; }
.qty-stepper--sm .qty-input { width: 38px; height: 26px; }

/* Size select — shown only on products with a sizes[] entry */
.size-select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
}
.size-select:focus { outline: none; border-color: var(--surge); }
.product-detail__buy .size-select { height: 46px; padding: 0 14px; font-size: 0.88rem; }

/* Grid utility */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* Shop toolbar + sidebar filter */
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.search-bar { display: flex; gap: 10px; max-width: 360px; margin: 0; }
.search-bar input {
  flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.92rem; background: var(--panel); color: var(--ink);
}
.search-bar input:focus { outline: none; border-color: var(--surge); box-shadow: 0 0 0 3px rgba(47,107,255,0.14); }
.shop-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); white-space: nowrap; }

.shop-layout { display: grid; grid-template-columns: 224px 1fr; gap: 44px; align-items: start; }
.shop-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.shop-sidebar button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; text-align: left; padding: 11px 4px; border: none; background: none; cursor: pointer;
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.shop-sidebar button:hover { color: var(--ink); }
.shop-sidebar button.is-active { color: var(--pulse-text); }
.shop-sidebar button .count { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--muted); }

.product-category { margin-bottom: 52px; scroll-margin-top: 90px; }
.product-category:last-child { margin-bottom: 0; }
.product-category__head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--field);
}
.product-category__head .tag-code { color: var(--pulse-text); font-weight: 700; font-family: var(--font-mono); font-size: 0.78rem; }
.product-category__head h2 { font-size: 1.3rem; margin: 0; }

/* Product card */
.product-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2,0.7,0.3,1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--surge-light); }
.product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--field) 0%, var(--field-mid) 100%);
  color: var(--surge-light);
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card__media-sku { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: rgba(244,246,251,0.55); }
.product-card__media .tag-code {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(5,7,12,0.7);
  color: var(--mist);
  padding: 4px 9px;
  border-radius: 4px;
  font-size: 0.64rem;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}
.product-card__body { padding: 16px 20px 20px; display: flex; flex-direction: column; flex-grow: 1; }
.product-card h3 { font-size: 1rem; margin: 0 0 8px; text-transform: none; font-family: var(--font-body); font-weight: 700; letter-spacing: normal; }
.product-card h3:hover { color: var(--surge-text); }
.product-card__body > p { font-size: 0.86rem; color: var(--muted); flex-grow: 1; margin-bottom: 18px; }

.product-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}
.product-price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}
.product-price small { font-weight: 400; font-size: 0.72rem; color: var(--muted); margin-left: 3px; }

.product-card--link { text-decoration: none; }
.product-card--link:hover h3 { color: var(--surge-text); }

/* Product detail page */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: rgba(244,246,251,0.6); flex-wrap: wrap; font-family: var(--font-mono); }
.breadcrumb a { color: rgba(244,246,251,0.6); }
.breadcrumb a:hover { color: var(--surge-light); }
.breadcrumb span[aria-hidden] { color: rgba(244,246,251,0.3); }

.product-detail {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 56px;
}
.product-detail__media {
  background: linear-gradient(135deg, var(--field) 0%, var(--field-mid) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--surge-light);
}
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-detail__media .tag-code {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(5,7,12,0.7);
  color: var(--mist);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}
.product-detail__media-label { font-size: 0.8rem; color: rgba(244,246,251,0.6); max-width: 240px; text-align: center; padding: 0 24px; }

.product-detail__info h1 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); margin: 10px 0 14px; }
.product-detail__short { color: var(--muted); font-size: 1rem; margin-bottom: 26px; }
.product-detail__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.product-detail__buy .product-price { font-size: 1.3rem; }

.product-detail__body { max-width: 780px; margin: 0 auto 64px; }
.product-detail__body h2 { font-size: 1.2rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.product-detail__body > p#detail-description { font-size: 1rem; line-height: 1.8; color: var(--ink); margin-bottom: 40px; text-transform: none; }
.product-detail__body .info-table--specs { margin-bottom: 20px; width: 100%; border-collapse: collapse; table-layout: fixed; }
.product-detail__body .info-table--specs th, .product-detail__body .info-table--specs td { text-align: left; padding: 14px 12px; font-size: 0.92rem; vertical-align: top; border-bottom: 1px dotted var(--line); }
.product-detail__body .info-table--specs th { width: 220px; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.product-detail__body .info-table--specs td { word-break: break-word; }

.product-detail__related { border-top: 1px solid var(--line); padding-top: 48px; }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
.checkout-form-section { margin-bottom: 28px; }
.checkout-form-section:last-of-type { margin-bottom: 0; }
.checkout-form-section h3 { font-size: 1.02rem; margin-bottom: 16px; text-transform: none; }
.form-divider { border: none; border-top: 1px dashed var(--line); margin: 28px 0; }

.payment-notice { display: flex; gap: 14px; align-items: flex-start; background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.payment-notice .icon { color: var(--surge-text); flex-shrink: 0; margin-top: 2px; }
.payment-notice p { font-size: 0.92rem; color: var(--ink); margin: 0; }
.payment-notice p + p { margin-top: 6px; color: var(--muted); font-size: 0.85rem; }

.terms-row { display: flex; gap: 10px; align-items: flex-start; margin: 26px 0 20px; }
.terms-row input[type="checkbox"] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--surge); flex-shrink: 0; }
.terms-row label { font-size: 0.86rem; color: var(--muted); }
.terms-row a { color: var(--surge-text); text-decoration: underline; text-underline-offset: 2px; }

.order-summary-card { position: sticky; top: 96px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.order-summary-card h3 { font-size: 1.1rem; margin-bottom: 16px; }
.order-summary-lines { max-height: 400px; overflow-y: auto; }
.order-summary-totals { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.order-summary-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.9rem; color: var(--muted); }
.order-summary-row.total { font-size: 1.15rem; color: var(--ink); font-weight: 700; font-family: var(--font-mono); padding-top: 10px; border-top: 1px dashed var(--line); margin-top: 4px; }

@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-sidebar { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .shop-sidebar button { width: auto; border-bottom: none; padding: 6px 0; }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .cart-toggle__total { display: none; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* Reuse existing .form-field for checkout — add a 2-col row variant */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid-2 .form-field { margin-bottom: 0; }
