/* ═══════════════════════════════════════════════════════════
   CarBlitz — Midnight Theme v2.0
   Fixed: Header, Sticky, Hero, Light sections, Forms, Listing
   ═══════════════════════════════════════════════════════════ */

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f8fafc; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::selection { background: rgba(0,96,191,0.18); color: #1e293b; }

/* ── Body ── */
body.midnight-theme {
  background-color: #ffffff;
  color: #1e293b;
  font-family: 'Inter', 'Satoshi', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════ */
.midnight-topbar {
  background: #070E1C;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ══════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════ */
.midnight-nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  z-index: 50;
}
.midnight-nav.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
  border-bottom-color: #e2e8f0;
}
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.25s ease;
  text-decoration: none;
}
.nav-link:hover { color: #0f172a; background: #f1f5f9; }
.nav-link.active { color: #0060BF; background: rgba(0,96,191,0.06); }

/* Logo text in nav (light mode) */
.midnight-nav .font-heading span.grad-blue {
  background: linear-gradient(135deg, #0060BF, #0095FF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.midnight-nav .font-heading { color: #0f172a; }

/* Nav dropdown */
.midnight-nav [x-show] .absolute {
  background: rgba(255,255,255,0.98) !important;
  border: 1px solid #e2e8f0 !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08) !important;
}
.midnight-nav [x-show] .absolute a {
  color: #475569 !important;
}
.midnight-nav [x-show] .absolute a:hover {
  color: #0060BF !important;
  background: #f1f5f9 !important;
}
.midnight-nav [x-show] .absolute hr {
  border-color: #e2e8f0 !important;
}

/* Auth dropdown in nav */
.midnight-nav .relative > [x-show] {
  background: rgba(255,255,255,0.98) !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08) !important;
}
.midnight-nav .relative > [x-show] a,
.midnight-nav .relative > [x-show] button {
  color: #475569 !important;
}
.midnight-nav .relative > [x-show] a:hover { color: #0060BF !important; }
.midnight-nav .relative > [x-show] button:hover { color: #ef4444 !important; }

/* User avatar in nav */
.midnight-nav .w-7.h-7 {
  background: rgba(0,96,191,0.08);
  border-color: rgba(0,96,191,0.2);
}
.midnight-nav .w-7.h-7 span { color: #0060BF; }
.midnight-nav span.text-slate-300 { color: #475569 !important; }
.midnight-nav i.text-slate-500 { color: #94a3b8 !important; }
.midnight-nav span.text-slate-400 { color: #64748b !important; }

/* Mobile menu (dark) */
.midnight-nav .lg\\:hidden.border-t {
  border-color: #e2e8f0;
  background: #fff;
}
.midnight-nav .lg\\:hidden .text-slate-300 { color: #475569 !important; }

/* ══════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════ */
.btn-electric {
  background: linear-gradient(135deg, #0060BF, #0095FF);
  color: #fff;
  font-weight: 700; font-size: 14px;
  padding: 12px 28px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative; overflow: hidden; border: none; cursor: pointer;
  text-decoration: none;
}
.btn-electric::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.btn-electric:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(0,96,191,0.32); color: #fff; }
.btn-electric:hover::after { opacity: 1; }

.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #B8971F);
  color: #fff; font-weight: 700; font-size: 14px;
  padding: 12px 28px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(212,175,55,0.32); }

.btn-outline {
  background: transparent;
  border: 1px solid #e2e8f0;
  color: #475569; font-weight: 500; font-size: 14px;
  padding: 11px 26px; border-radius: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.3s ease; text-decoration: none; cursor: pointer;
}
.btn-outline:hover { border-color: #0060BF; color: #0060BF; background: rgba(0,96,191,0.04); }

/* dark-variant for sections with dark bg */
.section-dark .btn-outline {
  border-color: rgba(255,255,255,0.15);
  color: #94a3b8;
}
.section-dark .btn-outline:hover {
  border-color: rgba(0,212,255,0.45); color: #00D4FF; background: rgba(0,212,255,0.06);
}

/* ══════════════════════════════════════
   GRADIENT TEXT
   ══════════════════════════════════════ */
.grad-blue {
  background: linear-gradient(135deg, #0060BF 0%, #0095FF 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #E8C670 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════
   HERO SECTION (Dark with bg image)
   ══════════════════════════════════════ */
.hero-section {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden;
  color: #fff;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(108deg, rgba(7,14,28,0.95) 0%, rgba(10,20,40,0.85) 45%, rgba(10,20,40,0.4) 100%);
  z-index: 1;
}
.hero-radial {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 65% 50%, rgba(0,96,191,0.1) 0%, transparent 70%);
  z-index: 1;
}
.hero-content { position: relative; z-index: 5; }

/* Search glass in hero */
.search-glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(28px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px; padding: 8px;
}
.search-glass select,
.search-glass input[type="text"] {
  background: transparent !important; border: none !important;
  color: #fff; outline: none;
  font-size: 13.5px; padding: 11px 14px; width: 100%;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 10;
}
.search-glass select option { background: #0D1B35; color: #fff; }
.search-glass input::placeholder { color: rgba(255,255,255,0.4); }
.search-divider {
  width: 1px; background: rgba(255,255,255,0.1);
  align-self: stretch; margin: 8px 0;
}

/* Noise overlay (hero only) */
.noise-overlay { position: relative; overflow: hidden; }
.noise-overlay::after {
  content: ''; position: absolute; inset: 0;
  opacity: 0.025; pointer-events: none; z-index: 0; mix-blend-mode: overlay;
}
.noise-overlay > * { position: relative; z-index: 1; }

/* ══════════════════════════════════════
   SECTION LIGHT (default for most sections)
   ══════════════════════════════════════ */
.section-light {
  background: #ffffff;
  color: #1e293b;
}
.section-light-alt {
  background: #f8fafc;
  color: #1e293b;
}

/* ══════════════════════════════════════
   SECTION DARK (hero, CTA, footer)
   ══════════════════════════════════════ */
.section-dark {
  background: #070E1C;
  color: #fff;
}

/* ══════════════════════════════════════
   EYEBROW & SECTION LINE
   ══════════════════════════════════════ */
.eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #0060BF; display: inline-block;
}
.section-dark .eyebrow { color: #00D4FF; }
.section-line {
  width: 48px; height: 3px;
  background: linear-gradient(90deg, #0060BF, #0095FF);
  border-radius: 2px; margin-top: 14px;
}

/* ══════════════════════════════════════
   STATS BAR (dark)
   ══════════════════════════════════════ */
.stat-number {
  font-family: 'Satoshi', 'Inter', sans-serif;
  font-size: 2.6rem; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, #0060BF, #0095FF);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════
   CAR CARD (light version)
   ══════════════════════════════════════ */
.car-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  display: block;
  text-decoration: none;
  color: #1e293b;
}
.car-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  border-color: #0060BF;
}
.car-card-img { overflow: hidden; position: relative; }
.car-card-img img {
  width: 100%; height: 215px; object-fit: cover;
  transition: transform 0.65s ease;
}
.car-card:hover .car-card-img img { transform: scale(1.05); }

/* Badges */
.badge-verified {
  background: rgba(0,96,191,0.08);
  border: 1px solid rgba(0,96,191,0.2);
  color: #0060BF;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.09em;
  padding: 3px 9px; border-radius: 6px;
  text-transform: uppercase; white-space: nowrap;
}
.badge-warranty {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: #059669;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.09em;
  padding: 3px 9px; border-radius: 6px;
  text-transform: uppercase; white-space: nowrap;
}
.badge-new {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.25);
  color: #059669;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.09em;
  padding: 3px 9px; border-radius: 6px;
  text-transform: uppercase; white-space: nowrap;
}
.badge-discount {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.25);
  color: #dc2626;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.09em;
  padding: 3px 9px; border-radius: 6px;
  text-transform: uppercase; white-space: nowrap;
}
.badge-sold {
  background: rgba(100,116,139,0.08);
  border: 1px solid rgba(100,116,139,0.2);
  color: #64748b;
  font-size: 9.5px; font-weight: 800;
  letter-spacing: 0.09em;
  padding: 3px 9px; border-radius: 6px;
  text-transform: uppercase; white-space: nowrap;
}

/* ══════════════════════════════════════
   CATEGORY CARD (light)
   ══════════════════════════════════════ */
.cat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px; padding: 26px 18px;
  text-align: center; cursor: pointer;
  transition: all 0.38s ease;
  text-decoration: none; display: block;
  color: #1e293b;
}
.cat-card:hover {
  background: #f0f7ff;
  border-color: #0060BF;
  transform: translateY(-5px);
  box-shadow: 0 18px 52px rgba(0,0,0,0.06);
}
.cat-icon {
  width: 58px; height: 58px;
  background: rgba(0,96,191,0.08); border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  transition: all 0.38s ease;
  color: #0060BF;
}
.cat-card:hover .cat-icon { background: rgba(0,96,191,0.14); transform: scale(1.1); }

/* ══════════════════════════════════════
   MAKE PILL (light)
   ══════════════════════════════════════ */
.make-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 50px; color: #475569;
  font-size: 13px; font-weight: 500;
  white-space: nowrap;
  transition: all 0.28s ease; text-decoration: none;
}
.make-pill:hover {
  background: #f0f7ff;
  border-color: #0060BF; color: #0f172a;
}

/* ══════════════════════════════════════
   GLASS CARD (light variant)
   ══════════════════════════════════════ */
.glass-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.06);
}
/* dark section glass cards */
.section-dark .glass-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.section-dark .glass-card:hover {
  background: rgba(255,255,255,0.065);
  border-color: rgba(0,212,255,0.22);
  box-shadow: 0 28px 72px rgba(0,0,0,0.45);
}

/* ══════════════════════════════════════
   REVIEW CARD (light)
   ══════════════════════════════════════ */
.review-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px; padding: 28px;
}
.stars { color: #D4AF37; letter-spacing: 2px; }

/* ══════════════════════════════════════
   FILTER SIDEBAR (light)
   ══════════════════════════════════════ */
.filter-sidebar {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px; padding: 22px;
}
.filter-group-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: #94a3b8; margin-bottom: 12px;
}

/* ══════════════════════════════════════
   INPUT (light)
   ══════════════════════════════════════ */
.input-dark {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px; color: #1e293b;
  padding: 10px 14px; font-size: 13.5px; width: 100%;
  transition: border-color 0.25s ease; outline: none;
  font-family: 'Inter', sans-serif;
}
.input-dark:focus { border-color: #0060BF; background: #fff; box-shadow: 0 0 0 3px rgba(0,96,191,0.08); }
.input-dark option { background: #fff; color: #1e293b; }

/* ══════════════════════════════════════
   GALLERY (listing show)
   ══════════════════════════════════════ */
.gallery-main { border-radius: 18px; overflow: hidden; position: relative; }
.gallery-main img { width: 100%; height: 460px; object-fit: cover; display: block; }
.gallery-thumb {
  border-radius: 10px; height: 76px; width: 100%;
  object-fit: cover; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.25s ease, opacity 0.25s ease;
  opacity: 0.65;
}
.gallery-thumb:hover, .gallery-thumb.active {
  border-color: #0060BF; opacity: 1;
}

/* ══════════════════════════════════════
   SPEC CARD (light)
   ══════════════════════════════════════ */
.spec-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.spec-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; }
.spec-value { font-size: 14.5px; font-weight: 600; color: #1e293b; }

/* ══════════════════════════════════════
   LEASING BOX (light)
   ══════════════════════════════════════ */
.leasing-box {
  background: #f0f7ff;
  border: 1px solid rgba(0,96,191,0.15);
  border-radius: 18px; padding: 26px;
}

/* ══════════════════════════════════════
   PRICE PANEL (light)
   ══════════════════════════════════════ */
.price-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 18px; padding: 26px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

/* ══════════════════════════════════════
   RANGE SLIDER
   ══════════════════════════════════════ */
input[type="range"] {
  -webkit-appearance: none; width: 100%; height: 3px;
  background: #e2e8f0; border-radius: 2px; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: #0060BF; cursor: pointer;
  box-shadow: 0 0 8px rgba(0,96,191,0.3);
}

/* ══════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════ */
.page-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b; font-size: 13px; font-weight: 500;
  transition: all 0.25s ease; text-decoration: none;
}
.page-btn:hover, .page-btn.active {
  background: rgba(0,96,191,0.06);
  border-color: #0060BF; color: #0060BF;
}

/* ══════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }
.reveal-d5 { transition-delay: 0.5s; }

/* ══════════════════════════════════════
   DIVIDER
   ══════════════════════════════════════ */
.midnight-divider { border: none; height: 1px; background: #e2e8f0; }

/* ══════════════════════════════════════
   FOOTER (always dark)
   ══════════════════════════════════════ */
.midnight-footer {
  background: linear-gradient(180deg, #070E1C 0%, #050B17 100%);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: #94a3b8;
}

/* ══════════════════════════════════════
   SCROLL-X (brands)
   ══════════════════════════════════════ */
.scroll-x { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.scroll-x::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════
   LISTING LIST VIEW
   ══════════════════════════════════════ */
.car-card-list {
  display: flex; gap: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none; color: #1e293b;
}
.car-card-list:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
  border-color: #0060BF;
}
.car-card-list .car-card-img { width: 320px; min-width: 320px; }
.car-card-list .car-card-img img { height: 100%; min-height: 200px; }
.car-card-list .car-card-body { flex: 1; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; }

@media (max-width: 768px) {
  .car-card-list { flex-direction: column; }
  .car-card-list .car-card-img { width: 100%; min-width: 100%; }
  .car-card-list .car-card-img img { height: 200px; }
}

/* ══════════════════════════════════════
   VIEW TOGGLE
   ══════════════════════════════════════ */
.view-toggle-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid #e2e8f0;
  color: #94a3b8; background: #fff;
  transition: all 0.2s ease; cursor: pointer;
}
.view-toggle-btn:hover { border-color: #0060BF; color: #0060BF; }
.view-toggle-btn.active { background: #0060BF; border-color: #0060BF; color: #fff; }

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(1.08); }
}
.pulse-glow { animation: pulse-glow 6s ease-in-out infinite; }

/* ══════════════════════════════════════
   CHECKBOX STYLING
   ══════════════════════════════════════ */
.filter-sidebar input[type="checkbox"] {
  accent-color: #0060BF;
}

/* ══════════════════════════════════════
   DARK SECTION OVERRIDES
   ══════════════════════════════════════ */
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #94a3b8; }
.section-dark .text-slate-400 { color: #94a3b8; }
.section-dark .text-slate-500 { color: #64748b; }

/* CTA section dark override */
.section-dark .eyebrow { color: #00D4FF; }

/* ══════════════════════════════════════
   LISTING SHOW PAGE — LIGHT OVERRIDES
   ══════════════════════════════════════ */
.listing-show-page .text-white { color: #1e293b; }
.listing-show-page .text-slate-400 { color: #64748b; }
.listing-show-page .text-slate-500 { color: #94a3b8; }
.listing-show-page .text-slate-600 { color: #94a3b8; }
.listing-show-page .badge-verified { color: #0060BF; }

/* Inquiry form on listing show */
.listing-show-page .price-panel .text-white { color: #1e293b; }
.listing-show-page .price-panel .text-slate-500 { color: #94a3b8; }
.listing-show-page .leasing-box .text-white { color: #1e293b; }
.listing-show-page .leasing-box .text-slate-500 { color: #94a3b8; }
.listing-show-page .leasing-box .text-slate-600 { color: #94a3b8; }

/* Prose in description */
.listing-show-page .prose-invert { color: #475569; }
