:root {
  --bg: #111214;
  --surface: #1e2023;
  --surface2: #2a2d31;
  --border: #333640;
  --accent: #f5a623;
  --text: #e8eaed;
  --text-muted: #9aa0aa;
  --text-dim: #636b75;
  --green: #4caf84;
  --radius: 8px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SIDE PANELS (wide screens only) ── */
@media (min-width: 1400px) {
  body::before,
  body::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: calc((100vw - 1100px) / 2 - 24px);
    opacity: 0.45;
    pointer-events: none;
    z-index: 0;
    background-size: cover;
    background-repeat: no-repeat;
  }

  body::before {
    left: 0;
    background-image: url('TRUCK PICS/W250 front.png');
    background-position: right center;
  }

  body::after {
    right: 0;
    background-image: url('TRUCK PICS/W250 back.jpg');
    background-position: left center;
  }
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #0d0f11 0%, #1a1d22 55%, #0f1215 100%);
  padding: 72px 24px 0;
  text-align: center;
}


.hero-rule {
  width: min(1100px, calc(100% - 48px));
  height: 2px;
  background: var(--accent);
  margin: 0 auto;
}

.hero-inner { max-width: 900px; margin: 0 auto; padding-bottom: 56px; }

.hero-badge {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 10px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 48px;
  letter-spacing: 0.02em;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: nowrap;
  max-width: 1300px;
  margin: 0 auto;
  overflow-x: auto;
}

.hero-stat { display: flex; flex-direction: column; align-items: center; }

.hero-val {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}

.hero-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-top: 4px;
}

/* ── NAV ── */
.section-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 1100px;
  margin: 0 auto;
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 14px 22px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.section-nav a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── BUILD PHOTOS ── */
.build-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 36px;
}

.build-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  background: var(--surface2);
}

.build-card--wide {
  grid-column: span 2;
  aspect-ratio: 16 / 7;
}

.build-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.build-card:hover img {
  transform: scale(1.04);
}

.build-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.28) 0%,
    transparent 35%,
    transparent 55%,
    rgba(0,0,0,0.84) 100%
  );
  pointer-events: none;
}

.build-date {
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.55);
  padding: 3px 10px;
  border-radius: 20px;
}

.build-caption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  color: #fff;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.35;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* ── TRUCK FEATURE PHOTO ── */
.truck-feature-photo {
  margin: 0 -24px;
  border-top: 1px solid var(--border);
}

.truck-feature-photo img {
  width: 100%;
  display: block;
  max-height: 520px;
  object-fit: cover;
  object-position: center center;
}

/* ── LAYOUT ── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-child { border-bottom: none; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin-top: 10px;
  border-radius: 2px;
}

.section-desc {
  color: var(--text-muted);
  margin-top: 14px;
  margin-bottom: 32px;
  font-size: 1.3rem;
}

/* ── UPGRADES ── */
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 36px;
}

.upgrade-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}

.upgrade-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.upgrade-icon {
  font-size: 1.4rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-style: normal;
}

.upgrade-card h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.upgrade-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── TIMELINE ── */
.timeline {
  position: relative;
  margin-top: 44px;
  padding-left: 128px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 108px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  margin-bottom: 36px;
}

.tl-date {
  position: absolute;
  left: -128px;
  width: 108px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 18px;
}

.tl-dot {
  position: absolute;
  left: -8px;
  top: 22px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--bg);
  z-index: 1;
}

.tl-recent .tl-dot { background: var(--green); }

.tl-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-left: 24px;
}

.tl-shop {
  font-weight: 600;
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.tl-miles {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.tl-content ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.tl-content ul li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 3px 0 3px 16px;
  position: relative;
}

.tl-content ul li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

.tl-cost {
  display: inline-block;
  background: rgba(245, 166, 35, 0.12);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-top: 14px;
}

/* ── GALLERY ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.gallery-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: transform 0.18s, border-color 0.18s;
  position: relative;
}

.gallery-thumb:hover {
  transform: scale(1.03);
  border-color: var(--accent);
  z-index: 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-count {
  display: inline-block;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.93);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
}

.lb-close {
  position: fixed;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: background 0.2s;
}

.lb-close:hover { background: rgba(255,255,255,0.2); }

.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 12px 18px;
  border-radius: var(--radius);
  z-index: 1001;
  line-height: 1;
  transition: background 0.2s;
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.18); }

.lb-caption {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 14px;
  text-align: center;
}

/* ── SPECS ── */
.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.specs-table th {
  width: 42%;
  padding: 11px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.specs-table td {
  padding: 11px 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }

.mono {
  font-family: 'SF Mono', Consolas, 'Courier New', monospace;
  font-size: 0.8rem !important;
  letter-spacing: 0.04em;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-dim);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

footer p + p { margin-top: 6px; }

.footer-vin {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.footer-hits {
  margin-top: 16px;
}

.footer-qr {
  display: inline-block;
  margin-top: 16px;
  opacity: 0.7;
  transition: opacity 0.2s;
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
}

.footer-qr:hover { opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero { padding: 40px 16px 0; }
  .hero-sub { font-size: 0.85rem; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; overflow-x: unset; }
  .hero-val { font-size: 1.3rem; }
  .hero-lbl { font-size: 0.65rem; }
  .section { padding: 48px 0; }
  .section-desc { font-size: 1rem; }
  .section-nav { flex-wrap: wrap; justify-content: center; border-radius: 0; overflow-x: visible; }
  .section-nav a { padding: 10px 12px; font-size: 0.8rem; flex-shrink: 0; }
  .upgrade-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .timeline { padding-left: 84px; }
  .timeline::before { left: 64px; }
  .tl-date { left: -84px; width: 64px; font-size: 0.78rem; }
  .specs-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .build-grid { grid-template-columns: 1fr; }
  .build-card--wide { grid-column: span 1; aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
  main { padding: 0 14px; }
  .truck-feature-photo { margin: 0 -14px; }
  .hero { padding: 32px 14px 0; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-val { font-size: 1.2rem; }
  .upgrade-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 0; }
  .timeline::before { display: none; }
  .tl-date { position: static; width: auto; text-align: left; padding: 0 0 6px; display: block; font-size: 0.82rem; }
  .tl-dot { display: none; }
  .tl-content { margin-left: 0; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
