/*
Theme Name: E-Bikes Compare
Theme URI: https://e-bikes.newfortech.com
Description: A techy, data-driven e-bike comparison theme. Presentation only — all bike data comes from the companion "E-Bikes Data" plugin, which must be active.
Author: (your site)
Version: 1.0.0
Requires Plugins: ebikes-data
Text Domain: ebikes-compare
*/

/* ============================================================
   Design tokens — deep navy-slate base, electric teal ("charge")
   + amber ("value") accents. Space Grotesk display / Inter body.
   ============================================================ */

:root {
  --bg: #0E1420;
  --panel: #141C2B;
  --panel-2: #182238;
  --border: #26324A;
  --text: #E7ECF3;
  --text-muted: #8B98AC;
  --teal: #2FD9C4;
  --teal-dim: #1C8577;
  --amber: #FFB454;
  --red: #FF6B6B;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --maxw: 1180px;
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }

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

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(14, 20, 32, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.brand .bolt { color: var(--teal); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.95rem; transition: color 0.15s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { background: var(--teal); color: #06181B; padding: 9px 18px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; }
.nav-cta:hover { background: #4be6d1; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--radius-sm); font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--teal); color: #06181B; }
.btn-primary:hover { background: #4be6d1; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-buy { background: var(--amber); color: #241300; width: 100%; justify-content: center; padding: 13px 18px; }
.btn-buy:hover { background: #ffc373; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--border); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero .eyebrow-note { color: var(--teal); font-size: 0.85rem; font-weight: 600; margin-bottom: 14px; }
.hero p.lead { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; }

.race { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 22px 18px; }
.race-title { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.race-row { margin-bottom: 14px; }
.race-row:last-child { margin-bottom: 0; }
.race-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.race-label .num { font-family: var(--font-display); color: var(--teal); font-variant-numeric: tabular-nums; }
.race-track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.race-fill { height: 100%; width: 0%; border-radius: 4px; background: linear-gradient(90deg, var(--teal-dim), var(--teal)); transition: width 1.1s cubic-bezier(.22,.9,.3,1); }

/* ---------- Section shell ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 20px; flex-wrap: wrap; }
.section-head p { margin: 0; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Bike grid & card ---------- */
.bike-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bike-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.15s ease; }
.bike-card:hover { border-color: var(--teal-dim); }
.bike-card .photo { aspect-ratio: 4/3; overflow: hidden; background: var(--panel-2); }
.bike-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.bike-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bike-card .brand-row { display: flex; justify-content: space-between; align-items: baseline; }
.bike-card .brand-row .brand { color: var(--text-muted); font-size: 0.82rem; }
.bike-card h3 { margin: 0; font-size: 1.05rem; }
.bike-card .tagline { font-size: 0.88rem; margin: 0; }
.spec-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 4px; }
.chip { font-size: 0.76rem; color: var(--text-muted); background: var(--panel-2); border: 1px solid var(--border); padding: 4px 9px; border-radius: 20px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 10px; }
.price { font-family: var(--font-display); font-size: 1.15rem; }
.rating { font-size: 0.82rem; color: var(--amber); }
.card-actions { display: flex; gap: 8px; }

/* ---------- Category strip ---------- */
.cat-strip { display: flex; gap: 12px; flex-wrap: wrap; }
.cat-pill { padding: 10px 18px; border: 1px solid var(--border); border-radius: 30px; font-size: 0.9rem; color: var(--text-muted); transition: border-color 0.15s, color 0.15s; }
.cat-pill:hover { border-color: var(--teal); color: var(--text); }

/* ---------- Compare page ---------- */
.compare-toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding: 18px 0; border-bottom: 1px solid var(--border); margin-bottom: 28px; }
.picker { position: relative; flex: 1; min-width: 240px; }
.picker input { width: 100%; background: var(--panel); border: 1px solid var(--border); color: var(--text); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 0.95rem; font-family: var(--font-body); }
.picker input:focus { border-color: var(--teal); }
.picker-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; z-index: 20; max-height: 280px; overflow-y: auto; display: none; }
.picker-results.open { display: block; }
.picker-result { padding: 10px 14px; cursor: pointer; font-size: 0.9rem; display: flex; justify-content: space-between; }
.picker-result:hover { background: var(--panel); }
.picker-result .muted { color: var(--text-muted); font-size: 0.8rem; }
.selected-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sel-chip { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--teal-dim); padding: 6px 8px 6px 12px; border-radius: 20px; font-size: 0.85rem; }
.sel-chip button { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px; }
.sel-chip button:hover { color: var(--red); }

.compare-heads { display: grid; gap: 16px; margin-bottom: 8px; }
.compare-head-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; text-align: center; }
.compare-head-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 10px; }
.compare-head-card h3 { font-size: 0.98rem; margin-bottom: 2px; }
.compare-head-card .price { display: block; margin: 6px 0 10px; }

.spec-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.spec-table th { text-align: left; padding: 10px 0; color: var(--text-muted); font-size: 0.8rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.spec-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--border); vertical-align: top; font-size: 0.92rem; }
.spec-table tr.section-row td { padding-top: 26px; padding-bottom: 6px; color: var(--teal); font-family: var(--font-display); font-size: 0.85rem; border-bottom: none; }
.spec-row-label { color: var(--text-muted); white-space: nowrap; padding-right: 20px; }
.spec-bar-wrap { display: flex; flex-direction: column; gap: 5px; }
.spec-bar-track { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.spec-bar-fill { height: 100%; width: 0%; background: var(--teal-dim); border-radius: 3px; transition: width 0.8s cubic-bezier(.22,.9,.3,1); }
.spec-bar-fill.best { background: var(--teal); }
.spec-bar-num { font-variant-numeric: tabular-nums; font-size: 0.88rem; }
.spec-bar-num.best { color: var(--teal); font-weight: 600; }
.empty-compare { padding: 60px 20px; text-align: center; border: 1px dashed var(--border); border-radius: var(--radius-lg); color: var(--text-muted); }

/* ---------- Detail page ---------- */
.detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding: 44px 0; align-items: start; }
.detail-hero .photo { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.detail-hero .brand-line { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 6px; }
.detail-hero .price-block { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 22px; }
.detail-hero .price-block .price { font-size: 2rem; }
.buy-panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 18px; margin-top: 8px; }
.buy-panel .note { font-size: 0.8rem; margin: 10px 0 0; }
.quick-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0; }
.quick-spec { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.quick-spec .v { font-family: var(--font-display); font-size: 1.25rem; color: var(--teal); }
.quick-spec .l { font-size: 0.78rem; color: var(--text-muted); }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.pc-col h4 { margin-bottom: 10px; }
.pc-col ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; }
.pc-col.pros li::marker { color: var(--teal); }
.pc-col.cons li::marker { color: var(--red); }
.full-specs { width: 100%; border-collapse: collapse; margin-top: 10px; }
.full-specs td { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.full-specs td:first-child { color: var(--text-muted); width: 45%; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.site-footer p { font-size: 0.82rem; max-width: 46ch; }
.foot-links { display: flex; gap: 20px; }
.foot-links a { color: var(--text-muted); font-size: 0.9rem; }
.foot-links a:hover { color: var(--teal); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .bike-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { grid-template-columns: 1fr; }
  .pc-grid { grid-template-columns: 1fr; }
  .quick-specs { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .bike-grid { grid-template-columns: 1fr; }
  .quick-specs { grid-template-columns: 1fr; }
}
