/* ==========================================================================
   eBikeBeast — shared styles
   Brand: bold, dark, electric. "Ride Something Wild"
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --card: #1a1a1a;
  --accent: #e8ff00;
  --text: #ffffff;
  --muted: #9a9a9a;
  --border: #2a2a2a;
  --radius: 14px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.accent { color: var(--accent); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #0a0a0a; }
.btn-primary:hover { background: #f2ff4d; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.logo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
  line-height: 1;
}
.logo b { color: var(--accent); }
.logo-mark { display: block; width: 36px; height: 36px; flex-shrink: 0; }
.logo-text { display: inline-block; }
.site-footer .logo { color: var(--text); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .95rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-links .btn { padding: 9px 18px; }

/* ---- Hero (full-bleed action photo + dark gradient overlay) ---- */
.hero {
  position: relative;
  /* Sized so the ~70%-width photo displays near its native resolution
     (crisp, not upscaled) while still showing the full helmet + jump. */
  min-height: clamp(440px, 50vw, 1000px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: #080808;
}
.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  /* ~70% width: the photo shows ~30% smaller and at near-native resolution
     (crisp), bleeding off the right edge. The dark overlay covers its left
     edge so there's no hard seam. */
  width: 70%;
  height: 100%;
  object-fit: cover;
  /* Top-aligned: keep all the sky above the helmet so it never gets cut. */
  object-position: 50% 0%;
  /* Feather the left edge so the photo melts into the black panel instead
     of meeting it at a hard vertical line. */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%);
  mask-image: linear-gradient(to right, transparent 0%, #000 40%);
  z-index: 0;
}
/* Single dark overlay: left side solid for the text, fading to reveal the
   bike on the right; plus a bottom fade into the page. */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to right,
      #080808 0%,
      #080808 22%,
      rgba(8, 8, 8, 0.8) 38%,
      rgba(8, 8, 8, 0.35) 52%,
      transparent 68%
    ),
    linear-gradient(to bottom, transparent 88%, #080808 100%);
}
.hero-text {
  position: relative;
  z-index: 5;
  width: 50%;
  padding: 3rem;
}
@media (max-width: 767px) {
  /* On mobile the photo fills the full width behind a stronger wash. */
  .hero { min-height: 78vh; text-align: center; }
  .hero-image { width: 100%; }
  .hero-text { width: 100%; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-overlay {
    background:
      linear-gradient(to bottom, rgba(8,8,8,0.62) 0%, rgba(8,8,8,0.5) 45%, rgba(8,8,8,0.8) 80%, #080808 100%);
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  /* TABLET / small laptop: the 50/70 split is too cramped here, so the photo
     goes full-bleed behind a left-weighted overlay (like mobile but left-
     aligned). The wider text column keeps the headline on 2 lines and stops
     it overlapping the rider; the height is capped so the hero can't balloon. */
  .hero { min-height: clamp(440px, 62vw, 600px); }
  .hero-image {
    width: 100%;
    object-position: 50% 0%;       /* top-aligned: helmet never cut */
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-text { width: 70%; max-width: 560px; padding: 2.5rem; }
  .hero-overlay {
    background:
      linear-gradient(
        to right,
        #080808 0%,
        rgba(8, 8, 8, 0.92) 40%,
        rgba(8, 8, 8, 0.5) 62%,
        transparent 82%
      ),
      linear-gradient(to bottom, transparent 82%, #080808 100%);
  }
}
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero p.lead { font-size: 1.25rem; color: var(--muted); max-width: 520px; margin: 0 0 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---- Trust bar ---- */
.trustbar { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #0d0d0d; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 26px 0;
}
.trust-item { display: flex; align-items: center; gap: 12px; justify-content: center; }
.trust-item svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.trust-item span { font-weight: 600; font-size: .95rem; }

/* ---- Section ---- */
section { padding: 78px 0; }
.section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.badge {
  align-self: flex-start;
  background: rgba(232, 255, 0, .14);
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 6px; }
.price { font-size: 1.9rem; font-weight: 800; margin: 6px 0 12px; }
.card p { color: var(--muted); font-size: .96rem; flex: 1; }
.card .btn { margin-top: 18px; }
/* Product render at the top of a grid card (transparent PNG on the dark card — homepage, untouched). */
.card-img { width: 100%; height: 168px; object-fit: contain; margin: -4px 0 16px; }

/* ---- Steps (how it works) ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.step-num {
  font-size: 2.6rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 14px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; }

/* ---- Three-column feature ---- */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.col h3 { color: var(--accent); }
.col p { color: var(--muted); margin: 0; }

/* ---- FAQ ---- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
  margin-bottom: 14px;
  background: var(--card);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.5rem; font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding-bottom: 16px; margin: 0; }

/* ---- Product detail page ---- */
.product-hero { padding-top: 56px; }
.product-hero .price { font-size: 2.6rem; }
.product-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; }
/* Product-hero: copy on the left, official product render on the right. */
.product-hero .container { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.product-hero-copy { flex: 1 1 340px; min-width: 0; }
/* All PLP product photos: standardized feathered photo in a subtle bordered card
   (matches the Light Bee X gallery stage) for a consistent, professional look. */
.product-hero-img {
  flex: 1 1 360px; max-width: 520px; width: 100%; height: 340px;
  object-fit: contain;
  padding: 16px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}
@media (max-width: 760px) { .product-hero-img { order: -1; max-width: 100%; } }

/* ---- Product gallery (PDP: transparent render + thumbnail carousel) ---- */
.product-gallery { flex: 1 1 360px; max-width: 520px; width: 100%; min-width: 0; }
/* Subtle bordered card holding the original product photo on the dark page. */
.gallery-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 340px;
  padding: 16px;
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
}
/* "click to enlarge" hint badge in the corner of the card */
.gallery-stage::after {
  content: "Click to enlarge";
  position: absolute; bottom: 10px; right: 12px;
  font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted);
  background: rgba(0,0,0,0.5);
  padding: 4px 9px; border-radius: 999px;
  pointer-events: none; opacity: .8;
}
/* PLP main product image: the ORIGINAL photo with a smooth feather baked into the
   image itself — gently dissolves into the dark card and never touches the bike.
   No CSS mask (baking it gives a far finer, smoother gradient). */
.gallery-main { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* thumbnail carousel */
.gallery-carousel { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.carousel-arrow {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.25rem; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .15s, color .15s;
}
.carousel-arrow:hover { border-color: var(--accent); color: var(--accent); }
.carousel-track {
  display: flex; gap: 10px;
  flex: 1 1 auto;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px;
}
.carousel-track::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex: 0 0 auto;
  width: 88px; height: 66px;
  padding: 4px;
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb:hover { transform: translateY(-2px); border-color: var(--muted); }
.gallery-thumb.is-active { border-color: var(--accent); }
/* Empty slots until more photos arrive: faint dashed tile, blends with the page. */
.thumb-placeholder { background: #141414; border-style: dashed; cursor: default; }
.thumb-placeholder:hover { transform: none; border-color: var(--border); }
@media (max-width: 760px) { .product-gallery { order: -1; max-width: 100%; } }

/* ---- Click-to-enlarge lightbox ---- */
.gallery-main.is-zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  background: rgba(6,6,6,0.94);
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; }
.lightbox-img {
  max-width: 94vw; max-height: 92vh;
  width: auto; height: auto; object-fit: contain;
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #fff; font-size: 1.7rem; line-height: 1;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

.specs-table { width: 100%; border-collapse: collapse; max-width: 560px; }
.specs-table th, .specs-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.specs-table th { color: var(--muted); font-weight: 600; width: 45%; }
.specs-table td { font-weight: 700; }
.info-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.info-box h3 { margin-bottom: 8px; }
.info-box p { color: var(--muted); margin: 0; }
.prose p { color: #cfcfcf; max-width: 720px; }

/* ---- Checkout ---- */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 7px; color: var(--muted); }
.form-field input, .form-field select {
  width: 100%;
  padding: 13px 15px;
  background: #111;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.form-field input:focus, .form-field select:focus { outline: none; border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: sticky;
  top: 88px;
}
.summary h3 { margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-row.total { border-bottom: none; font-size: 1.3rem; font-weight: 800; padding-top: 16px; }
.summary-row.total .accent { color: var(--accent); }

/* ---- Confirmation ---- */
.confirm { min-height: 70vh; display: flex; align-items: center; }
.confirm-card {
  max-width: 560px; margin: 0 auto; text-align: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px 36px;
}
.confirm-check {
  width: 70px; height: 70px; margin: 0 auto 24px; border-radius: 50%;
  background: rgba(232, 255, 0, .14); display: flex; align-items: center; justify-content: center;
}
.confirm-check svg { width: 36px; height: 36px; color: var(--accent); }
.order-ref {
  display: inline-block; background: #111; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 16px; font-family: monospace; font-size: 1.05rem;
  color: var(--accent); margin: 12px 0 24px;
}

/* ---- Page header band (for sub-pages) ---- */
.page-band { padding: 64px 0 24px; border-bottom: 1px solid var(--border); }
.page-band p { color: var(--muted); font-size: 1.1rem; max-width: 640px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); background: #0c0c0c; padding: 54px 0 34px; margin-top: 40px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; margin-bottom: 30px; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--muted); font-size: .95rem; margin-top: 10px; }
.footer-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 14px; }
.footer-col a { display: block; color: var(--muted); padding: 5px 0; font-size: .95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---- Utilities ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 14px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .cols { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .form-row { grid-template-columns: 1fr; }
  section { padding: 56px 0; }
}

/* ==========================================================================
   VoltBot chat widget
   ========================================================================== */
.voltbot { position: fixed; right: 20px; bottom: 20px; z-index: 940; font-family: var(--font); }
.voltbot-launcher {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #0a0a0a;
  border: none; border-radius: 999px;
  padding: 12px 20px; font-size: 1rem; font-weight: 800; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
  transition: transform .15s, box-shadow .15s;
}
.voltbot-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(232, 255, 0, .25); }
.voltbot-launcher svg { display: block; }

.voltbot-panel {
  position: absolute; right: 0; bottom: 0;
  width: min(370px, calc(100vw - 32px));
  height: min(540px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6); overflow: hidden;
}
.voltbot-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--card); border-bottom: 1px solid var(--border);
}
.voltbot-title { font-weight: 800; font-size: 1.05rem; display: inline-flex; align-items: center; gap: 6px; }
.voltbot-spark { color: var(--accent); }
.voltbot-close { background: none; border: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.voltbot-close:hover { color: var(--accent); }

.voltbot-log { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.voltbot-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: .94rem; line-height: 1.45; word-wrap: break-word; }
.voltbot-bot { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; color: var(--text); }
.voltbot-user { align-self: flex-end; background: var(--accent); color: #0a0a0a; border-bottom-right-radius: 4px; font-weight: 600; }
.voltbot-bot a { color: var(--accent); text-decoration: underline; word-break: break-all; }
.voltbot-typing { color: var(--muted); letter-spacing: 2px; animation: voltbot-pulse 1.1s infinite; }
@keyframes voltbot-pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

.voltbot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--card); }
.voltbot-input {
  flex: 1 1 auto; min-width: 0; padding: 11px 14px; font-size: .95rem; font-family: inherit;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 999px;
}
.voltbot-input:focus { outline: none; border-color: var(--accent); }
.voltbot-send {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent); color: #0a0a0a; border: none; font-size: 1.2rem; font-weight: 800; cursor: pointer;
}
.voltbot-send:hover { filter: brightness(1.05); }

@media (max-width: 480px) {
  .voltbot { right: 14px; bottom: 14px; }
  .voltbot-launcher span { display: none; }
  .voltbot-launcher { padding: 14px; }
}
