/* ===== Tokens ===== */
:root {
  --bg: #0c0e12;
  --bg-soft: #12151c;
  --surface: #171b24;
  --surface-2: #1e232e;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --line: #262c38;
  --accent: #ff6a2b;
  --accent-2: #2bd4ff;
  --accent-grad: linear-gradient(120deg, #ff6a2b, #ff2bb4);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.7);
  --header-bg: rgba(12, 14, 18, 0.72);
  --maxw: 1140px;
}

/* ===== Light theme ===== */
html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-soft: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --text: #14171f;
  --muted: #5b6470;
  --line: #e2e6ef;
  --shadow: 0 18px 44px -22px rgba(20, 30, 60, 0.28);
  --header-bg: rgba(246, 247, 251, 0.78);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-text { font-family: "Space Grotesk", sans-serif; line-height: 1.1; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(255, 106, 43, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(255, 106, 43, 0.7); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { color: var(--accent); letter-spacing: -3px; font-size: 1.1rem; }
.brand-text { font-size: 1.25rem; font-weight: 700; }
.brand-text span { color: var(--accent); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 84px 0 64px; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 80% 10%, rgba(255, 106, 43, 0.18), transparent 60%),
    radial-gradient(500px 300px at 10% 80%, rgba(43, 212, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; position: relative; }
.hero-copy { max-width: 720px; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  margin: 0 0 16px;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 0 0 20px; font-weight: 700; }
.hero h1 .accent { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 30em; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { list-style: none; display: flex; gap: 36px; padding: 0; margin: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: "Space Grotesk"; font-size: 1.6rem; }
.hero-stats span { color: var(--muted); font-size: 0.85rem; }

/* Hero art */
.hero-art { display: flex; justify-content: center; }
.hero-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 4 / 3.4;
  background: linear-gradient(160deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.layer-lines {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 7px);
  pointer-events: none;
}
.hero-card-tag { position: absolute; left: 20px; bottom: 16px; margin: 0; color: var(--muted); font-size: 0.85rem; }
.hero-card-tag strong { color: var(--text); }

/* Hero photo slideshow */
.hero-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-photo.is-active { opacity: 1; }

/* CSS-drawn e-bike */
.hero-bike { position: absolute; inset: 0; margin: auto; width: 300px; height: 180px; top: -10px; }
.wheel { position: absolute; bottom: 36px; width: 96px; height: 96px; border-radius: 50%; border: 7px solid #2f3645; background: radial-gradient(circle, #1a1f29 38%, transparent 40%); }
.wheel span { position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed #495063; }
.wheel-rear { left: 18px; }
.wheel-front { right: 18px; }
.frame {
  position: absolute; left: 78px; bottom: 92px; width: 150px; height: 8px;
  background: var(--accent-grad); border-radius: 6px;
  transform: rotate(-6deg);
  box-shadow: 0 0 22px rgba(255,106,43,0.5);
}
.frame::after {
  content: ""; position: absolute; left: 30px; top: 4px; width: 8px; height: 64px;
  background: var(--accent); border-radius: 6px; transform: rotate(26deg); transform-origin: top;
}
.battery { position: absolute; left: 120px; bottom: 70px; width: 54px; height: 18px; background: #2bd4ff; border-radius: 4px; transform: rotate(-6deg); box-shadow: 0 0 18px rgba(43,212,255,0.6); }
.seat { position: absolute; left: 70px; bottom: 104px; width: 40px; height: 12px; background: #3a4252; border-radius: 8px 8px 4px 4px; transform: rotate(-6deg); }
.handlebar { position: absolute; right: 36px; bottom: 104px; width: 8px; height: 46px; background: #3a4252; border-radius: 6px; transform: rotate(18deg); }
.handlebar::after { content: ""; position: absolute; top: -4px; right: -16px; width: 30px; height: 7px; background: #3a4252; border-radius: 6px; }

/* ===== Model quick-view ===== */
.model-preview {
  padding: 56px 0; border-top: 1px solid var(--line); background: var(--bg-soft);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}
.model-preview.is-visible { opacity: 1; transform: none; }
.preview-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: center; }
.preview-photo {
  aspect-ratio: 4 / 3; border-radius: var(--radius);
  background-size: cover; background-position: center;
  border: 1px solid var(--line);
}
.preview-tagline { color: var(--muted); margin: 0 0 20px; font-size: 1.05rem; }
.preview-desc { color: var(--muted); font-size: 0.95rem; margin: 16px 0 28px; line-height: 1.7; }
.preview-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .preview-grid { grid-template-columns: 1fr; } }

/* ===== Marquee ===== */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-soft); padding: 14px 0; }
.marquee-track { display: flex; gap: 28px; white-space: nowrap; width: max-content; animation: scroll 26s linear infinite; }
.marquee-track span { font-family: "Space Grotesk"; font-weight: 600; letter-spacing: 0.1em; color: var(--muted); font-size: 0.95rem; }
.marquee-track span:nth-child(odd) { color: var(--text); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ===== Sections ===== */
.section { padding: 84px 0; }
.section-muted { background: var(--bg-soft); }
.section-head { max-width: 620px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin: 0 0 12px; }
.section-head p { color: var(--muted); margin: 0; }
.grid { display: grid; gap: 22px; }

/* ===== Models ===== */
.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}
.nav-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}
.search-input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px 9px 38px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  width: 200px;
  transition: border-color 0.2s, box-shadow 0.2s, width 0.25s ease;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,106,43,0.18); width: 260px; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.chip {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 0.88rem; cursor: pointer;
  transition: 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { background: var(--accent-grad); color: #fff; border-color: transparent; }

.models-grid { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--shadow); }
.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
}
.card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 6px);
  mix-blend-mode: overlay;
}
.media-1 { background: linear-gradient(135deg, #ff6a2b, #ff2bb4); }
.media-2 { background: linear-gradient(135deg, #2bd4ff, #2b6bff); }
.media-3 { background: linear-gradient(135deg, #7c5cff, #ff5cc0); }
.media-4 { background: linear-gradient(135deg, #ffb02b, #ff5e2b); }
.media-5 { background: linear-gradient(135deg, #00d68f, #00b3ff); }
.media-6 { background: linear-gradient(135deg, #ff4d6d, #7c2bff); }
.media-7 { background: linear-gradient(135deg, #f4d03f, #16a085); }
.media-8 { background: linear-gradient(135deg, #5d6d7e, #283747); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: rgba(12,14,18,0.8); color: #fff; font-size: 0.72rem; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; letter-spacing: 0.04em;
  border: 1px solid rgba(255,255,255,0.18);
}
.badge-alt { background: rgba(43,212,255,0.92); color: #04121a; border-color: transparent; }
.card-body { padding: 18px 18px 20px; }
.card-body h3 { margin: 0 0 6px; font-size: 1.12rem; }
.card-body p { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: "Space Grotesk"; font-weight: 700; font-size: 1.15rem; color: var(--accent); }
.scale { font-size: 0.8rem; color: var(--muted); }
.card.is-hidden { display: none; }

.coming-soon { grid-column: 1 / -1; text-align: center; padding: 4rem 1rem; color: var(--muted); font-size: 1.25rem; font-family: "Space Grotesk"; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.coming-soon.is-hidden { display: none; }

/* ===== Steps ===== */
.steps-grid { grid-template-columns: repeat(4, 1fr); }
.step {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; position: relative;
}
.step-num { font-family: "Space Grotesk"; font-size: 2rem; font-weight: 700; color: var(--accent); opacity: 0.85; }
.step h3 { margin: 8px 0 8px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.about-art { position: relative; height: 320px; display: flex; align-items: center; justify-content: center; }
.spool {
  width: 200px; height: 200px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  animation: spin 14s linear infinite;
}
.spool-core { width: 70px; height: 70px; border-radius: 50%; background: var(--bg); border: 8px solid var(--surface-2); }
.spool-2 { position: absolute; width: 120px; height: 120px; top: 30px; right: 40px; animation-duration: 9s; opacity: 0.9; }
@keyframes spin { to { transform: rotate(360deg); } }
.about-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 6px 0 16px; }
.about-copy p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 22px 0 28px; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-grad); color: #fff; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ===== CTA ===== */
.cta { background: var(--bg-soft); }
.cta-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  background: linear-gradient(150deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line); border-radius: 24px; padding: 44px;
}
.cta-copy h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 14px; }
.cta-copy p { color: var(--muted); margin: 0; }
.cta-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input, .field textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); font: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,106,43,0.18); }
.cta-form .btn-block { grid-column: 1 / -1; }
.form-note { grid-column: 1 / -1; margin: 0; font-size: 0.88rem; color: var(--accent-2); min-height: 1em; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
.footer-brand p { color: var(--muted); margin: 12px 0 0; max-width: 26em; }
.footer-col h4 { margin: 0 0 14px; font-size: 0.95rem; }
.footer-col a { display: block; color: var(--muted); margin-bottom: 9px; font-size: 0.92rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: 22px 24px; color: var(--muted); font-size: 0.85rem;
}
.footer-bottom p { margin: 0; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .models-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; }
  .cta-inner { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links, .nav-search { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 70px; left: 0; right: 0;
    background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 22px 24px;
  }
  .hero-stats { gap: 24px; }
  .models-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .cta-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track, .spool { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===== Theme toggle ===== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: border-color 0.2s, transform 0.15s, background 0.2s;
}
.theme-toggle:hover { border-color: var(--accent); transform: translateY(-1px); }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }
html[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
html[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ===== Cart button ===== */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.cart-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* ===== Cart overlay ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-overlay.is-open { opacity: 1; pointer-events: all; }

/* ===== Cart drawer ===== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 100vw);
  background: var(--bg-soft);
  border-left: 1px solid var(--line);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -12px 0 48px rgba(0, 0, 0, 0.35);
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.cart-title { margin: 0; font-size: 1.15rem; }

.cart-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}
.cart-close:hover { border-color: var(--accent); color: var(--text); }

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

.cart-empty { color: var(--muted); text-align: center; margin-top: 40px; font-size: 0.95rem; }

.cart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { margin: 0 0 4px; font-size: 0.95rem; font-weight: 600; }
.cart-item-meta { margin: 0 0 3px; font-size: 0.82rem; color: var(--muted); }
.cart-item-price { margin: 6px 0 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--accent); font-size: 1rem; }

.cart-colors { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.cart-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.cart-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}

.cart-item-unit {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
}

.cart-item-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
}
.qty-btn:hover { border-color: var(--accent); background: var(--bg); }
.qty-val { font-weight: 700; font-size: 0.95rem; font-family: "Space Grotesk", sans-serif; }

.remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s;
}
.remove-btn:hover { color: #ff4d6d; border-color: #ff4d6d; }

.cart-footer {
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--muted);
}
.cart-total strong { font-family: "Space Grotesk", sans-serif; font-size: 1.25rem; color: var(--text); }

.cart-checkout-note { margin: 0; font-size: 0.85rem; color: var(--accent-2); min-height: 1.2em; text-align: center; }

.delivery-form { display: flex; flex-direction: column; gap: 12px; }
.delivery-form .field { display: flex; flex-direction: column; gap: 5px; }
.delivery-form .field label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.delivery-form .field input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}
.delivery-form .field input:focus, .delivery-form .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,106,43,0.15); }
.delivery-form .field select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.delivery-toggle { display: flex; gap: 8px; }
.delivery-opt {
  flex: 1;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.delivery-opt:hover { border-color: var(--accent); color: var(--text); }
.delivery-opt.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); }

.order-confirm { padding: 8px 0; }
.order-confirm-title { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: var(--text); }
.order-confirm-sub { margin: 0 0 14px; font-size: 0.88rem; color: var(--muted); }
.order-summary-pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  font-family: monospace;
}

/* ===== Product detail page ===== */
.product-page { padding: 40px 24px 80px; }
.product-loading, .product-missing { padding: 80px 0; text-align: center; color: var(--muted); }
.product-missing h1 { color: var(--text); margin-bottom: 12px; }
.product-missing .btn { margin-top: 18px; }

.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--muted); margin-bottom: 28px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .crumb-current { color: var(--text); font-weight: 600; }

.product-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: start; }

/* Gallery */
.gallery-main {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.gallery-main::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.05) 0 2px, transparent 2px 7px);
  mix-blend-mode: overlay;
}
.gallery-photo {
  background-size: contain !important;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--surface-2);
}
.thumb-photo {
  background-size: cover;
  background-position: center;
  border: none;
  cursor: pointer;
}
.gallery-cat {
  position: absolute; bottom: 16px; left: 18px; z-index: 2;
  background: rgba(0,0,0,0.45); color: #fff; backdrop-filter: blur(6px);
  padding: 6px 14px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.2);
}
.gallery-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb {
  flex: 1; aspect-ratio: 4 / 3; border-radius: 12px; cursor: pointer;
  border: 2px solid transparent; opacity: 0.7; transition: 0.2s;
  background-size: cover; background-position: center;
}
.thumb:hover { opacity: 1; }
.thumb.is-active { border-color: var(--accent); opacity: 1; }
.gallery-note { color: var(--muted); font-size: 0.82rem; margin: 14px 0 0; }

/* Info column */
.product-info h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 6px 0 12px; }
.product-tagline { color: var(--muted); font-size: 1.05rem; margin: 0 0 20px; }
.product-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 26px; }
.product-price { font-family: "Space Grotesk"; font-weight: 700; font-size: 2rem; color: var(--accent); }
.product-scale { color: var(--muted); font-size: 0.9rem; }

.swatches { display: flex; gap: 10px; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  background: var(--sw); border: 2px solid var(--line); padding: 0;
  transition: transform 0.15s, box-shadow 0.2s;
}
.swatch:hover { transform: scale(1.1); }
.swatch.is-selected { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* ===== Per-part color picker ===== */
.parts-picker { margin-bottom: 24px; }
.parts-title { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 14px; }
.part-row { margin-bottom: 16px; }
.part-row:last-child { margin-bottom: 0; }
.part-label-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.part-name { font-size: 0.88rem; font-weight: 600; color: var(--text); min-width: 130px; }
.part-preview { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; transition: background 0.2s; }
.part-swatches { display: flex; flex-wrap: wrap; gap: 9px; padding-left: 2px; }

/* ===== Logo color picker ===== */
.logo-color-picker { margin-bottom: 24px; }
.logo-color-options { display: flex; flex-wrap: wrap; gap: 10px; }
.logo-color-opt {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 2px;
}
.logo-color-preview {
  width: 38px; height: 38px; border-radius: 10px;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s;
}
.logo-color-opt:hover .logo-color-preview { transform: scale(1.1); }
.logo-color-opt.is-selected .logo-color-preview {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
.logo-color-label { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

/* ===== Wheel type picker ===== */
.wheel-picker { margin-bottom: 24px; }
.wheel-options { display: flex; gap: 8px; }
.wheel-option {
  padding: 8px 20px; border-radius: 20px; border: 2px solid var(--line);
  background: transparent; color: var(--text); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.wheel-option:hover { border-color: var(--accent); }
.wheel-option.is-selected { border-color: var(--accent); background: var(--accent); color: #fff; }

/* ===== Build option picker ===== */
.build-picker { margin-bottom: 24px; }
.build-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.build-option {
  display: flex; flex-direction: column; gap: 5px;
  padding: 14px 16px; border-radius: 10px;
  border: 2px solid var(--line); cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  user-select: none;
}
.build-option:hover { border-color: var(--accent); }
.build-option.is-selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.build-opt-name { font-size: 0.92rem; font-weight: 700; color: var(--text); }
.build-opt-price { font-size: 1.2rem; font-weight: 700; color: var(--accent); font-family: "Space Grotesk"; }
.build-opt-note { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ===== MakerWorld block (in detail section) ===== */
.makerworld-block {
  margin-top: 28px; padding: 20px 22px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
}
.makerworld-block h3 { margin: 0 0 8px; font-size: 1rem; }
.makerworld-block p { font-size: 0.9rem; color: var(--muted); margin: 0 0 14px; }
.makerworld-block p:last-child { margin-bottom: 0; }
.makerworld-search { font-size: 0.88rem !important; }

/* ===== Star rating ===== */
.star-rating-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.rating-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; }
.star-rating { display: flex; gap: 4px; }
.star { font-size: 1.8rem; background: none; border: none; cursor: pointer; color: var(--line); padding: 0; line-height: 1; transition: color 0.1s, transform 0.1s; }
.star:hover { transform: scale(1.2); }
.star.is-filled { color: #f5c800; }
.rating-note { font-size: 0.85rem; color: var(--accent); margin: 8px 0 0; min-height: 1.2em; }

.product-actions { display: grid; gap: 12px; margin: 28px 0 12px; }
.product-note { min-height: 1.2em; margin: 0 0 8px; font-size: 0.88rem; color: var(--accent-2); }
.product-perks { list-style: none; padding: 18px 0 0; margin: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.product-perks li { padding-left: 26px; position: relative; color: var(--muted); font-size: 0.9rem; }
.product-perks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Detail + specs */
.product-detail-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; margin-top: 72px; }
.detail-block h2 { font-size: 1.5rem; margin: 0 0 14px; }
.detail-block h3 { font-size: 1.05rem; margin: 24px 0 12px; }
.detail-block p { color: var(--muted); margin: 0; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.spec-table th { color: var(--muted); font-weight: 500; width: 45%; }
.spec-table td { color: var(--text); font-weight: 600; }

/* Related */
.related-section { margin-top: 80px; }
.related-grid { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 960px) {
  .product-grid { grid-template-columns: 1fr; gap: 32px; }
  .product-detail-grid { grid-template-columns: 1fr; gap: 36px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
}
