/* ── SUV Scout India · Shared Styles ── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Serif+Display&display=swap');

:root {
  --bg: #0e0f11;
  --bg2: #15171a;
  --bg3: #1c1f24;
  --bg4: #22262d;
  --border: rgba(255,255,255,0.08);
  --border2: rgba(255,255,255,0.14);
  --text: #f0f0f0;
  --muted: #888;
  --accent: #e8c36a;
  --accent-dim: rgba(232,195,106,0.12);
  --ev: #4fc38a;
  --ev-dim: rgba(79,195,138,0.12);
  --info: #5b9cf6;
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── NAV ── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nav-logo small {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}
.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  border: 1px solid transparent;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }
.nav-link.active { color: var(--accent); border-color: var(--border); background: var(--accent-dim); }
.nav-link.ev { color: var(--ev); }
.nav-link.ev.active { color: var(--ev); border-color: rgba(79,195,138,0.2); background: var(--ev-dim); }
.nav-compare-btn {
  background: var(--accent);
  color: #0e0f11;
  border: none;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-left: 8px;
  transition: opacity 0.15s;
}
.nav-compare-btn:hover { opacity: 0.85; }

/* ── PAGE LAYOUT ── */
.page-wrap { max-width: 1200px; margin: 0 auto; padding: 48px 24px; }

.page-hero { margin-bottom: 48px; }
.page-hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.page-hero h1 span { color: var(--accent); }
.page-hero h1 span.ev { color: var(--ev); }
.page-hero p { color: var(--muted); font-size: 14px; max-width: 540px; }

/* ── SECTION HEADER ── */
.section-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.section-hd h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
}
.section-hd .badge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--muted);
}

/* ── FILTER BAR ── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 36px;
}
.filter-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.filter-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.ev-page .filter-btn:hover, .ev-page .filter-btn.active {
  border-color: var(--ev);
  color: var(--ev);
  background: var(--ev-dim);
}

/* ── BRAND GROUP ── */
.brand-group { margin-bottom: 44px; }
.brand-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 10px;
  padding-left: 2px;
}

/* ── CAR CARD ── */
.car-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.car-card:hover { border-color: var(--border2); }
.car-card.ev-card { border-color: rgba(79,195,138,0.2); }
.car-card.ev-card:hover { border-color: rgba(79,195,138,0.4); }
.car-card.selected { border-color: rgba(232,195,106,0.5); background: rgba(232,195,106,0.04); }
.car-card.ev-card.selected { border-color: rgba(79,195,138,0.6); background: rgba(79,195,138,0.04); }

.car-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}
.sel-box {
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.sel-box.on { background: var(--accent); border-color: var(--accent); }
.ev-card .sel-box.on { background: var(--ev); border-color: var(--ev); }
.sel-box svg { display: none; }
.sel-box.on svg { display: block; }

.car-info { flex: 1; min-width: 0; }
.car-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.yr-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent-dim);
  color: var(--accent);
}
.ev-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--ev-dim);
  color: var(--ev);
}
.car-meta {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.car-price { text-align: right; flex-shrink: 0; }
.car-price .lbl { font-size: 11px; color: var(--muted); }
.car-price .val { font-size: 16px; font-weight: 600; color: var(--accent); }
.ev-card .car-price .val { color: var(--ev); }

.car-links { display: flex; gap: 8px; flex-shrink: 0; margin-left: 4px; }
.detail-link {
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border2);
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.detail-link:hover { border-color: var(--accent); color: var(--accent); }
.ev-card .detail-link:hover { border-color: var(--ev); color: var(--ev); }

.expand-icon {
  font-size: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.25s;
}
.car-card.open .expand-icon { transform: rotate(180deg); }

/* ── CARD DETAILS ── */
.car-details { display: none; border-top: 1px solid var(--border); }
.car-card.open .car-details { display: block; }

.variant-tabs {
  display: flex;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  gap: 0;
}
.v-tab {
  padding: 11px 18px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: -1px;
}
.v-tab:hover { color: var(--text); }
.v-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.ev-card .v-tab.active { color: var(--ev); border-bottom-color: var(--ev); }

.spec-wrap { padding: 20px 22px; }
.spec-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.sn-btn {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.sn-btn.active, .sn-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.ev-card .sn-btn.active { border-color: var(--ev); color: var(--ev); background: var(--ev-dim); }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.spec-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.spec-k {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.spec-v { font-size: 13px; font-weight: 500; }

.feature-list { display: flex; flex-wrap: wrap; gap: 7px; }
.f-tag {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 13px;
  font-size: 12px;
  color: var(--text);
}
.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.price-line .pl { font-size: 12px; color: var(--muted); }
.price-line .pv { font-size: 14px; font-weight: 600; color: var(--accent); }
.ev-card .price-line .pv { color: var(--ev); }

/* ── GLOSSARY TOOLTIP ── */
.jargon {
  border-bottom: 1px dashed var(--accent);
  color: var(--accent);
  cursor: help;
  position: relative;
  display: inline-block;
}
.jargon.ev-jargon { border-bottom-color: var(--ev); color: var(--ev); }
.jargon-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  z-index: 50;
  max-width: 220px;
  white-space: normal;
  line-height: 1.5;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.jargon:hover .jargon-tip { display: block; }

/* ── COMPARE BAR ── */
.compare-sticky {
  position: sticky;
  bottom: 0;
  background: var(--bg2);
  border-top: 1px solid var(--border2);
  padding: 12px 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 90;
  display: none;
}
.compare-sticky.visible { display: flex; }
.cmp-label { font-size: 13px; color: var(--muted); flex: 1; }
.cmp-label strong { color: var(--accent); }
.cmp-clear { background: none; border: 1px solid var(--border2); color: var(--muted); padding: 8px 16px; border-radius: var(--radius-sm); font-size: 12px; cursor: pointer; }
.cmp-go { background: var(--accent); color: #0e0f11; border: none; padding: 9px 22px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }

/* ── VEHICLE DETAIL PAGE ── */
.vehicle-hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 40px;
  margin-bottom: 48px;
  align-items: start;
}
.vehicle-gallery {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.main-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.main-img-placeholder {
  text-align: center;
  color: var(--muted);
}
.main-img-placeholder .car-icon { font-size: 64px; margin-bottom: 8px; }
.main-img-placeholder p { font-size: 12px; }
.view-360-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.7);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 5px 12px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}
.color-thumbs {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.color-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}
.color-thumb.active, .color-thumb:hover { border-color: var(--accent); transform: scale(1.1); }
.color-name-label {
  padding: 0 16px 12px;
  font-size: 12px;
  color: var(--muted);
}
.view-360-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--info);
  cursor: pointer;
  transition: background 0.15s;
}
.view-360-btn:hover { background: var(--bg3); }
.view-360-btn svg { flex-shrink: 0; }

.vehicle-info-panel {
  position: sticky;
  top: 80px;
}
.veh-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.veh-badge {
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.veh-badge.year { background: var(--accent-dim); color: var(--accent); }
.veh-badge.ev { background: var(--ev-dim); color: var(--ev); }
.veh-badge.fuel { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); }
.veh-title {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.veh-brand { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.price-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.price-card .range-lbl { font-size: 11px; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.price-card .range-val { font-size: 26px; font-weight: 600; color: var(--accent); }
.price-card .range-val.ev { color: var(--ev); }
.price-card .note { font-size: 11px; color: var(--muted); margin-top: 4px; }

.quick-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.qs-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; }
.qs-k { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 3px; }
.qs-v { font-size: 13px; font-weight: 500; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--text); }

/* ── COMPARE PAGE ── */
.compare-page .section-hd h2 { color: var(--accent); }
.compare-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.compare-toolbar label { font-size: 12px; color: var(--muted); }
.compare-toolbar select, .compare-toolbar input[type=range] {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
.price-range-display { font-size: 13px; color: var(--accent); font-weight: 500; min-width: 80px; }
.add-car-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  margin-left: auto;
}
.add-car-btn:hover { border-color: var(--accent); color: var(--accent); }

.compare-table-outer { overflow-x: auto; margin-bottom: 40px; }
table.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 600px;
}
.cmp-table thead tr { background: var(--bg3); }
.cmp-table th {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.cmp-table th:first-child { color: var(--muted); font-weight: 400; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.cmp-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}
.cmp-table td:first-child { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr:hover td { background: var(--bg3); }
.cmp-best { color: var(--ev); font-weight: 600; }
.remove-col-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  margin-left: 8px;
  vertical-align: middle;
}
.remove-col-btn:hover { color: #e55; }

.empty-compare {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-compare .icon { font-size: 48px; margin-bottom: 12px; }
.empty-compare p { margin-bottom: 20px; }
.go-browse {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: #0e0f11;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
}

/* ── GLOSSARY MODAL ── */
.glossary-btn-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 80; }
.glossary-btn {
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}
.glossary-btn:hover { color: var(--accent); border-color: var(--accent); }
.glossary-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}
.glossary-modal.open { display: flex; }
.glossary-inner {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  width: 100%;
  max-width: 640px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 28px;
}
.glossary-inner h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gl-close { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.gl-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.gl-item:last-child { border-bottom: none; margin-bottom: 0; }
.gl-term { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.gl-def { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ── MISC ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 80px;
}
footer p { font-size: 12px; color: var(--muted); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (max-width: 768px) {
  nav { padding: 0 16px; }
  .page-wrap { padding: 32px 16px; }
  .page-hero h1 { font-size: 28px; }
  .vehicle-hero { grid-template-columns: 1fr; }
  .vehicle-info-panel { position: static; }
  footer { padding: 24px 16px; flex-direction: column; gap: 8px; }
}
