:root {
  --bg: #ffffff;
  --bg2: #f0f9ff;
  --bg3: #e0f2fe;
  --card: #ffffff;
  --border: #e0f2fe;
  --accent: #38bdf8;
  --accent2: #0284c7;
  --text: #111111;
  --muted: #6b7280;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 4px 20px rgba(56,189,248,0.1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: #111111;
  min-height: 100vh;
  overflow-x: hidden;
}

/* HEADER */
header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid #e0f2fe;
  box-shadow: 0 1px 6px rgba(56,189,248,0.08);
  padding: 0 16px;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  height: 68px;
}
.logo {
  font-family: 'Bebas Neue', cursive;
  font-size: 28px; letter-spacing: 2px;
  color: #1a1a1a; white-space: nowrap;
  text-decoration: none;
}
.logo span { color: #1a1a1a; }
.search-wrap {
  flex: 1; position: relative; max-width: 600px;
}
.search-wrap input {
  width: 100%;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 10px 48px 10px 20px;
  color: #111111;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.search-wrap input:focus { border-color: #38bdf8; outline: none; background: #ffffff; }
.search-wrap input::placeholder { color: #6b7280; }
.search-icon {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: #6b7280; pointer-events: none;
}
.header-actions { display: flex; gap: 10px; }
.btn-outline {
  background: transparent; border: 1px solid var(--border);
  color: #111111; padding: 8px 18px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-outline:hover { border-color: #38bdf8; color: #0284c7; background: #f0f9ff; }
.btn-accent {
  background: var(--accent); border: none;
  color: #000; padding: 8px 18px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-accent:hover { background: #0ea5e9; }

.filter-select {
  background: var(--bg3); border: 1px solid var(--border);
  color: #111111; padding: 10px 16px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 13px;
  outline: none; cursor: pointer; transition: border-color .2s;
  appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.filter-select:focus { border-color: var(--accent); }
.filter-select option { background: var(--bg3); }
.filter-btn {
  background: var(--accent); border: none; color: #ffffff;
  padding: 10px 24px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .2s;
}
.filter-btn:hover { background: #0ea5e9; transform: translateY(-1px); }
.results-info {
  max-width: 1400px; margin: 8px auto 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 16px;
  flex-wrap: wrap; gap: 10px;
}
/* sort-wrap merged into results-controls */

/* GRID */
.grid-wrap { max-width: 1400px; margin: 0 auto; padding: 10px 12px; }
.car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

/* CARD */
/* ─── TOUCH FEEDBACK ────────────────────────────────── */.car-card:active {
  transform: scale(0.97);
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 2px rgba(56,189,248,0.25);
  transition: transform 0.08s ease, border-color 0.08s ease;
}
.car-card:active::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(56,189,248,0.03);
  pointer-events: none;
  border-radius: inherit;
}

.car-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}
.car-card:hover {
  transform: translateY(-4px);
  border-color: rgba(13,115,119,0.25);
  box-shadow: 0 12px 36px rgba(13,115,119,0.14), 0 4px 12px rgba(0,0,0,0.06);
}


/* ── PHOTO COUNT BADGE ── */
.photo-count-badge {
  position: absolute; bottom: 8px; right: 8px; z-index: 3;
  background: rgba(0,0,0,0.55); color: #ffffff;
  font-size: 10px; font-weight: 600;
  padding: 3px 7px; border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
/* IMAGE SLIDER */
.card-img-wrap {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9; background: #f8fafc;
}
.img-slider {
  display: flex; height: 100%; width: 100%;
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.img-slider img {
  min-width: 100%; height: 100%;
  object-fit: contain; pointer-events: none;
  flex-shrink: 0; background: #f8fafc;
}
.img-placeholder {
  min-width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  flex-shrink: 0; flex-direction: column; gap: 8px;
}
.img-placeholder svg { opacity: 0.2; }
.img-placeholder span { color: #374151; font-size: 12px; }
.slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1);
  color: white; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .2s; z-index: 5; font-size: 14px;
  opacity: 0;
}
.card-img-wrap:hover .slide-btn { opacity: 1; }
.slide-btn:hover { background: rgba(56,189,248,0.9); color: #fff; }
.slide-prev { left: 8px; }
.slide-next { right: 8px; }
.img-dots {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px;
}
.img-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,0.4); transition: all .2s; cursor: pointer;
}
.img-dot.active { background: var(--accent); width: 14px; border-radius: 3px; }
.card-badge {
  position: absolute; top: 10px; left: 10px;
  background: #111111; color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 2px; text-transform: uppercase;
  z-index: 3;
}
.card-badge.used { background: var(--bg3); color: #374151; border: 1px solid var(--border); }
.card-fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
  color: white; width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 14px; transition: all .2s;
  backdrop-filter: blur(4px);
}
.card-fav:hover, .card-fav.active { color: #ff4d6d; border-color: #ff4d6d; }
.card-body { padding: 16px; }
.card-title {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-sub { font-size: 12px; color: #374151; margin-bottom: 12px; font-family: 'DM Mono', monospace; }
.card-stats {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.stat-pill {
  background: #ffffff; border: 1px solid #bae6fd;
  padding: 3px 10px; border-radius: 4px;
  font-size: 11px; color: #374151;
  display: flex; align-items: center; gap: 4px;
}
.card-price-row {
  display: flex; align-items: flex-end; justify-content: space-between;
}
.card-price {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px; letter-spacing: 1px; color: #111111;
  line-height: 1;
}
.card-price small {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; color: #374151; font-weight: 400;
  display: block; letter-spacing: 0;
}
.card-view-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: #111111; padding: 6px 14px; border-radius: 2px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.card-view-btn:hover { background: #38bdf8; border-color: #38bdf8; color: #fff; }

/* PAGINATION */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px; padding: 32px 24px 48px;
}
.page-btn {
  background: var(--card); border: 1px solid var(--border);
  color: #111111; min-width: 38px; height: 38px; border-radius: 2px;
  padding: 0 10px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .2s; display: flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.page-btn:hover, .page-btn.active {
  background: #38bdf8; border-color: #38bdf8; color: #fff; font-weight: 700;
}
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* DETAIL OVERLAY */
.detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.detail-overlay.open { opacity: 1; pointer-events: all; }
.detail-modal {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 2px;
  width: 100%; max-width: 1100px;
  overflow-x: hidden;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  margin: auto;
  box-sizing: border-box;
}
.detail-overlay.open .detail-modal { transform: translateY(0); }
.modal-close {
  background: none; border: 1px solid var(--border);
  color: #374151; width: 34px; height: 34px; border-radius: 2px;
  font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.modal-close:hover { background: #ff4d6d; border-color: #ff4d6d; color: #fff; }
.modal-back {
  background: none; border: 1px solid var(--border);
  color: #111111; padding: 6px 14px; height: 34px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; white-space: nowrap; flex-shrink: 0;
}
.modal-back:hover { border-color: var(--accent); color: var(--accent); }
.modal-top { display: flex; flex-wrap: wrap; }
.modal-gallery {
  flex: 1; min-width: 0;
  width: 100%;
  background: var(--bg3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Scopes prev/next arrows strictly to the photo — never bleeds below */
.gallery-main-wrap {
  position: relative;
  line-height: 0; /* removes phantom gap below img */
}
.gallery-main {
  width: 100%; height: 340px; object-fit: contain; background: var(--bg3); display: block;
}
.gallery-main-placeholder {
  width: 100%; height: 340px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg3), var(--bg));
  flex-direction: column; gap: 12px;
}
.gallery-thumbs {
  display: flex; gap: 6px; padding: 10px;
  overflow-x: auto; background: var(--bg);
}
.gallery-thumb {
  min-width: 70px; height: 50px;
  object-fit: cover; border-radius: 2px;
  border: 2px solid transparent; cursor: pointer;
  transition: border-color .2s;
}
.gallery-thumb.active { border-color: var(--accent); }
.gallery-slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.15);
  color: white; width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 16px; transition: all .2s;
}
.gallery-slide-btn:hover { background: #111111; color: #fff; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.modal-info { flex: 1; min-width: 0; padding: 28px; overflow: hidden; }
.modal-make { font-size: 12px; color: #4b5563; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; }
.modal-title { font-family: 'Bebas Neue', cursive; font-size: clamp(20px, 5vw, 32px); line-height: 1.1; margin-bottom: 4px; overflow: hidden; max-width: 100%; display: block; word-break: break-word; color: #111111; }
.modal-vin { font-family: 'DM Mono', monospace; font-size: 11px; color: #374151; margin-bottom: 18px; }
.modal-price-row {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px;
}
.modal-price {
  font-family: 'Bebas Neue', cursive; font-size: 44px; color: #111111; line-height: 1;
}
.modal-estimate { font-size: 13px; color: #374151; }


/* TABS */
.tab-bar {
  display: flex; border-bottom: 1px solid var(--border); margin-bottom: 0;
}
.tab-btn {
  flex: 1; padding: 14px; background: none; border: none;
  color: #4b5563; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .2s; text-align: center;
}
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: #111111; }

.tab-content { padding: 24px 28px 28px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* BUY NOW TAB */
.buy-section h3 {
  font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #111111;
}
.buy-price-breakdown {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; padding: 18px; margin-bottom: 20px;
}
.breakdown-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.breakdown-row:last-child { border-bottom: none; font-weight: 700; font-size: 16px; }
.breakdown-row span:last-child { font-family: 'DM Mono', monospace; color: #111111; }
.buy-cta {
  background: var(--accent); border: none; color: #ffffff;
  width: 100%; padding: 15px; border-radius: 2px;
  font-family: 'Bebas Neue', cursive; font-size: 22px; letter-spacing: 2px;
  cursor: pointer; transition: all .2s;
}
.buy-cta:hover { background: #0ea5e9; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(56,189,248,0.12); }
.buy-sub {
  text-align: center; font-size: 12px; color: #374151; margin-top: 10px;
}

/* FINANCE TAB */
.finance-calc h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.calc-field label {
  display: block; font-size: 11px; color: #374151;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
}
.calc-field input, .calc-field select {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: #111111; padding: 10px 14px; border-radius: 2px;
  font-family: 'DM Mono', monospace; font-size: 14px; outline: none;
  transition: border-color .2s;
}
.calc-field input:focus, .calc-field select:focus { border-color: var(--accent); }
.calc-field select option { background: var(--bg3); }
.payment-result {
  background: linear-gradient(135deg, rgba(56,189,248,0.05), rgba(232,255,71,0.03));
  border: 1px solid rgba(56,189,248,0.12);
  border-radius: 2px; padding: 20px; text-align: center; margin-bottom: 20px;
}
.payment-amount {
  font-family: 'Bebas Neue', cursive; font-size: 48px; color: #111111; line-height: 1;
}
.payment-label { font-size: 13px; color: #4b5563; margin-top: 4px; }
.payment-breakdown {
  display: flex; justify-content: space-around; margin-top: 14px; flex-wrap: wrap; gap: 8px;
}
.payment-stat { text-align: center; }
.payment-stat .val { font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 600; color: #111111; }
.payment-stat .lbl { font-size: 11px; color: #4b5563; }
.finance-cta {
  background: transparent; border: 2px solid var(--accent); color: var(--accent);
  width: 100%; padding: 14px; border-radius: 2px;
  font-family: 'Bebas Neue', cursive; font-size: 22px; letter-spacing: 2px;
  cursor: pointer; transition: all .2s;
}
.finance-cta:hover { background: #0c4a6e; color: #fff; }

/* SPECS GRID INSIDE DETAIL */
.specs-section { margin-top: 20px; }
.specs-section h4 { font-size: 13px; color: #374151; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spec-item {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 2px;
}
.spec-color-val { display: flex; align-items: center; gap: 8px; }
.color-swatch {
  width: 16px; height: 16px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  flex-shrink: 0; display: inline-block;
}
.spec-item .spec-label { font-size: 11px; color: #6b7280; }
.spec-item .spec-val { font-size: 13px; font-weight: 600; color: #111111; }


/* ABOUT THIS VEHICLE — below gallery thumbs, left column */
.modal-about {
  background: #f0f9ff;
  border-top: 2px solid var(--accent);
  padding: 20px 18px 22px;
  margin-top: 6px;
  width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-word;
}
.modal-about-label {
  font-size: 10px; color: #4b5563888;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 700;
}
.modal-about-text {
  font-size: 13px; color: #333333;
  line-height: 1.85;
}

/* LOADING */
.loading-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.skeleton {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 2px; overflow: hidden;
}
.skel-img { height: 200px; background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.skel-body { padding: 16px; }
.skel-line { height: 14px; border-radius: 2px; background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; margin-bottom: 10px; }
.skel-line.short { width: 60%; }
.skel-line.price { height: 24px; width: 40%; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* EMPTY STATE */
.empty-state {
  text-align: center; padding: 80px 20px; color: #374151;
}
.empty-state svg { margin-bottom: 16px; opacity: 0.3; }
.empty-state h3 { font-size: 20px; color: #111111; margin-bottom: 8px; }

/* TOAST */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: #111111; color: #fff; padding: 12px 24px; border-radius: 2px;
  font-weight: 700; font-size: 14px; z-index: 999;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .header-inner { gap: 8px; padding: 0 5px; }
  .header-actions { display: none; }
  /* ham-btn already always visible */
  .search-wrap { max-width: none; }
  .hero { padding: 16px 5px 12px; }
  .modal-top { flex-direction: column; }
  .calc-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr 1fr; }
  .modal-info { padding: 14px; }
  .tab-content { padding: 10px; }
  .car-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .grid-wrap { padding: 8px; }
  .results-info { padding: 6px 5px; }
  .vtype-section { padding: 10px 5px; }
}
@media (max-width: 480px) {
  header { padding: 0 5px; }
  .hero { padding: 12px 5px 8px; }
  .grid-wrap { padding: 8px 8px; }
  .car-grid { grid-template-columns: 1fr; gap: 8px; }
  .results-info { padding: 6px 5px; }
  .card-body { padding: 10px; }
  .card-title { white-space: normal; overflow: visible; text-overflow: unset; }
  .card-dealer { white-space: normal; overflow: visible; text-overflow: unset; }
  .filter-select, .filter-btn { font-size: 12px; padding: 6px 8px; }
  .detail-modal {
    padding: 16px 10px;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    min-height: 100vh;
  }
  .detail-overlay {
    padding: 0;
    align-items: flex-start;
  }
  .lead-modal {
    padding: 20px 14px 18px;
    max-width: 100% !important;
    border-radius: 0;
  }
  .lead-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .vtype-section { padding: 10px 5px; }
  /* Accent separator — matches "AUTO" in logo */
  /* ─── TOUCH FEEDBACK ────────────────────────────────── */
}


/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── FILTER BAR ───────────────────────────────────── */
.filter-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.filter-bar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.filter-bar-label {
  font-size: 11px; color: #374151; text-transform: uppercase;
  letter-spacing: 1px; white-space: nowrap; font-weight: 600;
  margin-right: 4px;
}
.filter-chips {
  display: flex; gap: 6px; flex-wrap: wrap; flex: 1;
}
.filter-chip-active {
  display: flex; align-items: center; gap: 6px;
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.15);
  color: var(--accent);
  padding: 4px 10px; border-radius: 2px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.filter-chip-active:hover { background: rgba(56,189,248,0.12); }
.filter-chip-active .fca-x { opacity: .6; margin-left: 2px; }
.filter-clear-all {
  background: none; border: 1px solid var(--border);
  color: #374151; padding: 4px 12px; border-radius: 2px;
  font-size: 11px; cursor: pointer; transition: all .2s;
  white-space: nowrap;
}
.filter-clear-all:hover { border-color: var(--accent2); color: var(--accent2); }

/* ─── ADVANCED FILTER PANEL ────────────────────────── */
.adv-filter-wrap {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}
.adv-filter-toggle-label {
  font-size: 13px; color: #374151; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  transition: color .2s;
}
.adv-filter-toggle:hover .adv-filter-toggle-label { color: #111111; }
.adv-filter-toggle-arrow {
  margin-left: auto; color: #374151; font-size: 12px;
  transition: transform .25s;
}
.adv-filter-toggle.open .adv-filter-toggle-arrow { transform: rotate(180deg); }
.adv-filter-panel {
  max-width: 1400px; margin: 0 auto;
  padding: 0 16px;
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1), padding .35s;
}
.adv-filter-panel.open { max-height: 200px; padding: 0 16px 14px; }
.adv-filter-grid {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
}
.adv-filter-grid .filter-select { min-width: 130px; flex: 1; }
.adv-filter-grid .filter-btn { white-space: nowrap; }
.filter-ev-toggle {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 10px 14px; border-radius: 2px; cursor: pointer;
  font-size: 13px; color: #374151; transition: all .2s;
  white-space: nowrap;
}
.filter-ev-toggle.active { border-color: var(--accent); color: var(--accent); background: rgba(56,189,248,0.05); }

/* ─── RECENTLY VIEWED ──────────────────────────────── */
/* ─── COMPARE FEATURE ───────────────────────────────── */
.compare-go:hover { background: #ff8055; }
.compare-go:disabled { opacity: .4; cursor: not-allowed; }

/* ─── COMPARE MODAL ─────────────────────────────────── */
.cmp-title span { color: var(--accent2); }
.cmp-car-header { text-align: center; background: var(--bg3); padding: 16px; }
.cmp-car-img { width: 100%; height: 120px; object-fit: cover; border-radius: 2px; margin-bottom: 8px; }
.cmp-car-img-ph { width: 100%; height: 120px; background: var(--bg); border-radius: 2px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; }
.cmp-car-img-ph svg { opacity: .2; }
.cmp-car-name { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.cmp-car-price { font-family: 'Bebas Neue', cursive; font-size: 22px; color: var(--accent); }
.cmp-val { font-size: 13px; font-weight: 600; }
.cmp-val.win { color: var(--accent); }
.cmp-val.neutral { color: #374151; }
.cmp-contact-btn {
  flex: 1; background: var(--accent); border: none; color: #ffffff;
  padding: 12px 20px; border-radius: 2px;
  font-family: 'Bebas Neue', cursive; font-size: 18px; letter-spacing: 1px;
  cursor: pointer; transition: all .2s;
}
.cmp-contact-btn:hover { background: #0ea5e9; }
@media (max-width: 768px) {
  .cmp-row-label { display: none; }
}

/* ─── FOOTER ─────────────────────────────────────────── */
.site-footer {
  background: #0c4a6e;
  border-top: 1px solid var(--border);
  padding: 48px 16px 24px;
  margin-top: 32px;
}
.footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .logo { font-size: 26px; display: inline-block; margin-bottom: 12px; color: #ffffff; }
.footer-brand p { font-size: 13px; color: rgba(255,255,255,0.65); line-height: 1.7; max-width: 260px; }
.footer-col-title { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #ffffff; font-weight: 700; margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13px; transition: color .2s; }
.footer-links a:hover { color: #ffffff; }
.footer-bottom {
  max-width: 1400px; margin: 32px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: #ffffff; }
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .adv-filter-panel.open { max-height: 300px; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-banner { padding: 16px 12px; }
}


/* ─── PRIVATE LISTINGS PAGE ─────────────────────────── */
.private-page {
  display: none;
  min-height: 80vh;
  max-width: 1400px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  margin: 0 auto;
  padding: 16px 12px;
}
.private-page.active { display: block; }
.private-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.private-header h2 {
  font-family: 'Bebas Neue', cursive;
  font-size: 36px; letter-spacing: 2px;
}
.private-header h2 span { color: var(--accent); }
.private-badge {
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.15);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 2px;
  text-transform: uppercase; letter-spacing: 1px;
}
.private-empty {
  text-align: center; padding: 80px 20px; color: #374151;
}
.private-empty svg { opacity: .2; margin-bottom: 16px; }
.private-empty h3 { font-size: 22px; color: #111111; margin-bottom: 8px; }
.private-empty p  { font-size: 14px; margin-bottom: 24px; }
.private-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 2px; overflow: hidden;
  cursor: pointer;
  transition: transform .25s, border-color .25s, box-shadow .25s;
  position: relative;
}
.private-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56,189,248,0.15);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.private-card-img {
  height: 200px; background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.private-card-img svg { opacity: .2; }
.private-seller-badge {
  position: absolute; top: 10px; left: 10px;
  background: #7c3aed; color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 2px;
  text-transform: uppercase; letter-spacing: 1px;
}
.private-card-body { padding: 16px; }
.private-card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.private-card-sub { font-size: 12px; color: #374151; margin-bottom: 10px; font-family: 'DM Mono', monospace; }
.private-card-price {
  font-family: 'Bebas Neue', cursive;
  font-size: 26px; color: var(--accent);
}
.private-card-row {
  display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px;
}
.private-contact-btn {
  background: #111111; color: #fff; border: none;
  padding: 8px 16px; border-radius: 2px;
  font-size: 12px; font-weight: 800; cursor: pointer;
  transition: all .2s;
}
.private-contact-btn:hover { background: #0ea5e9; }
.back-to-inventory {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border);
  color: #374151; padding: 8px 16px; border-radius: 2px;
  font-size: 13px; cursor: pointer; transition: all .2s;
  margin-bottom: 20px;
}
.back-to-inventory:hover { border-color: var(--accent); color: var(--accent); }

/* ─── LEAD FORM ─────────────────────── */
.lead-overlay { position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:2000;display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;pointer-events:none;transition:opacity .25s;overflow:hidden; }
.lead-overlay.open { opacity:1;pointer-events:all; }
.lead-modal { background:#ffffff;border:1px solid #e0f2fe;border-radius:8px;width:100%;max-width:540px;max-height:90vh;overflow-y:auto;position:relative;padding:28px 28px 24px; }
.lf-vehicle-strip { background:#f0f9ff;border:1px solid #bae6fd;border-radius:6px;padding:12px 16px;margin-bottom:20px;display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.lf-vehicle-label { font-size:10px;color:#6b7280;text-transform:uppercase;letter-spacing:1px;width:100%; }
.lf-vehicle-name { font-weight:800;font-size:15px;font-family:'Bebas Neue',sans-serif;letter-spacing:.5px;flex:1;color:#111111; }
.lf-vehicle-price { color:var(--accent);font-weight:700;font-size:14px; }
.lf-progress-wrap { height:4px;background:#e0f2fe;border-radius:4px;margin-bottom:6px;overflow:hidden; }
.lf-progress-bar { height:100%;background:var(--accent);border-radius: 2px;transition:width .4s ease; }
.lf-step-label { font-size:11px;color:#6b7280;margin-bottom:18px; }
.lf-step-header { margin-bottom:20px; }
.lf-step-title { font-family:'Bebas Neue',sans-serif;font-size:26px;letter-spacing:1px;margin-bottom:4px;color:#111111; }
.lf-step-subtitle { font-size:13px;color:#6b7280; }
.lf-fields { display:flex;flex-direction:column;gap:2px;margin-bottom:24px; }
.lf-field { display:flex;flex-direction:column;gap:6px; padding: 10px 0; border-bottom: 1px solid #f0f9ff; }
.lf-field.full { width:100%; }
.lf-label { font-size:12px;color:#6b7280;font-weight:600;text-transform:uppercase;letter-spacing:.5px; }
.lf-req { color:var(--accent);margin-left:2px; }
.lf-input { background:#ffffff;border:1.5px solid #e0f2fe;border-radius:6px;padding:10px 12px;color:#111111;font-size:14px;font-family:'DM Sans',sans-serif;outline:none;transition:border-color .2s; }
.lf-input:focus { border-color:var(--accent); }
.lf-textarea { resize:vertical;min-height:80px; }
select.lf-input { cursor:pointer; }
.lf-radio-group { display:flex;flex-direction:column;gap:4px;width:100%; }
.lf-radio {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; background: #ffffff; border: 1.5px solid #e0f2fe;
  border-radius: 6px; padding: 14px 16px; cursor: pointer;
  transition: all .18s; font-size: 14px; font-weight: 600; color: #111111;
  width: 100%; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.lf-radio::after { content: '→'; color: #374151; font-size: 14px; transition: color .18s; }
.lf-radio:hover { border-color: rgba(56,189,248,0.3); background: rgba(56,189,248,0.02); }
.lf-radio:hover::after { color: var(--accent); }
.lf-radio.selected, .lf-radio:has(input:checked) { border-color:#38bdf8;background:#f0f9ff;color:#0284c7; }
.lf-radio.selected::after, .lf-radio:has(input:checked)::after { color: var(--accent); content: '✓'; }
.lf-radio input { display:none; }
.lf-checkbox-wrap { display:flex;align-items:flex-start; }
.lf-checkbox-label { display:flex;align-items:flex-start;gap:10px;cursor:pointer;font-size:13px;color:#333333;line-height:1.5; }
.lf-checkbox-label input { margin-top:2px;accent-color:var(--accent); }
.lf-actions { display:flex;justify-content:space-between;align-items:center;gap:12px;padding-top:4px; }
.lf-btn-back { background:none;border:1.5px solid #e0f2fe;color:#6b7280;padding:10px 20px;border-radius:6px;cursor:pointer;font-size:13px;transition:all .2s; }
.lf-btn-back:hover { border-color:#38bdf8;color:#0284c7; }
.lf-btn-next { background:#38bdf8;color:#ffffff;border:none;padding:12px 28px;border-radius:6px;font-weight:800;cursor:pointer;font-size:14px;letter-spacing:.5px;transition:opacity .2s; }
.lf-btn-next:hover { opacity:.85; }
@media(max-width:480px){ .lf-fields{grid-template-columns:1fr;} }

/* ─── VEHICLE TYPE SELECTOR ─────────────────────── */
.vtype-section {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px 8px;
}
.vtype-inner { max-width: 1400px; margin: 0 auto; }
.vtype-heading {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px; letter-spacing: 2px;
  color: #111111; margin-bottom: 18px;
}
.vtype-heading span { color: var(--accent); }
.vtype-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.vtype-tile {
  background: #ffffff;
  border: 1.5px solid #e0f2fe;
  border-radius: 10px;
  padding: 14px 10px 10px;
  cursor: pointer;
  transition: all .2s;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  position: relative; overflow: hidden;
  user-select: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.vtype-tile:hover {
  border-color: #0ea5e9;
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(14,165,233,0.15), 0 0 0 2px #0ea5e9;
}
.vtype-tile.active {
  border-color: #0ea5e9;
  background: #ffffff;
  box-shadow: 0 0 0 2px #0ea5e9;
}
.vtype-tile.active .vtype-label { color: #0284c7; font-weight: 700; }
.vtype-svg {
  width: 100%; max-width: 120px; height: 54px;
  display: flex; align-items: center; justify-content: center;
}
.vtype-svg svg { width: 100%; height: 100%; overflow: visible; }


/* window, wheel-outer, wheel-rim, wheel-hub — unchanged on hover */

/* Outline only — no fill, dark stroke */
.car-silhouette .body       { fill: none; stroke: #0ea5e9; stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.car-silhouette .arch       { fill: none; stroke: #0ea5e9; stroke-width: 1.2; transition: fill .2s, stroke .2s; }
.car-silhouette .window     { fill: none; stroke: #c0cdd8; stroke-width: 1; transition: fill .2s, stroke .2s; }
.car-silhouette .wheel-outer{ fill: none; stroke: #0284c7; stroke-width: 1.5; transition: fill .2s, stroke .2s; }
.car-silhouette .wheel-rim  { fill: none; stroke: #d4dfe8; stroke-width: 1; transition: fill .2s, stroke .2s; }
.car-silhouette .wheel-hub  { fill: #c0cdd8; transition: fill .22s; }
.car-silhouette .panel      { fill: none; stroke: #e2eaf0; stroke-width: 1; transition: stroke .22s; }
.car-silhouette .ground     { stroke: #eef4f8; stroke-width: 1; fill: none; }
.car-silhouette .chrome     { fill: none; stroke: #38bdf8; stroke-width: 1.2; transition: fill .2s, stroke .2s; }
/* Hover / Active — accent blue stroke */
.vtype-tile:hover .car-silhouette .body, .vtype-tile.active .car-silhouette .body { fill: #0ea5e9; stroke: #0284c7; }
.vtype-tile:hover .car-silhouette .arch, .vtype-tile.active .car-silhouette .arch { fill: #0284c7; stroke: #0284c7; }
.vtype-tile:hover .car-silhouette .window, .vtype-tile.active .car-silhouette .window { fill: none; stroke: #ffffff; stroke-width: 1.2; }
.vtype-tile:hover .car-silhouette .wheel-outer, .vtype-tile.active .car-silhouette .wheel-outer { fill: #0c4a6e; stroke: #0c4a6e; }
.vtype-tile:hover .car-silhouette .wheel-rim, .vtype-tile.active .car-silhouette .wheel-rim { fill: #38bdf8; stroke: #38bdf8; }
.vtype-tile:hover .car-silhouette .wheel-hub, .vtype-tile.active .car-silhouette .wheel-hub { fill: #ffffff; }
.vtype-tile:hover .car-silhouette .chrome, .vtype-tile.active .car-silhouette .chrome { fill: none; stroke: #38bdf8; }
.vtype-tile:hover .car-silhouette .ground, .vtype-tile.active .car-silhouette .ground { stroke: #bae6fd; }
.vtype-tile:hover .car-silhouette .panel, .vtype-tile.active .car-silhouette .panel { stroke: rgba(255,255,255,0.3); }
.vtype-label {
  font-size: 11px; font-weight: 600;
  color: #374151; letter-spacing: .3px;
  transition: color .2s; text-align: center;
}
.vtype-tile:hover .vtype-label { color: #0284c7; }
.vtype-count {
  font-size: 10px; color: #374151;
  font-family: 'DM Mono', monospace; opacity: .6;
}

/* Mobile: 2-col full-screen feel */
@media (max-width: 900px) {
  .vtype-grid { grid-template-columns: repeat(5, 1fr); gap: 8px; }
}
@media (max-width: 600px) {
  .vtype-section { padding: 10px 5px 8px; }
  .vtype-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .vtype-heading { font-size: 18px; text-align: left; margin-bottom: 10px; }
  .vtype-tile { padding: 12px 8px 10px; gap: 8px; }
  .vtype-svg { max-width: 100px; height: 50px; }
  .vtype-label { font-size: 11px; }
  .vtype-scroll-hint {
    text-align: center; color: #374151; font-size: 12px;
    margin-top: 20px; animation: bounce 2s infinite;
  }
}
@media (min-width: 601px) { .vtype-scroll-hint { display: none; } }
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}
/* ─── INFO PAGES OVERLAY ───────────────────────────── */
.info-overlay {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(12px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.info-overlay.open { opacity: 1; pointer-events: all; }
.info-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 2px; width: 100%; max-width: 760px;
  margin: auto; overflow: hidden;
  transform: translateY(30px);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.info-overlay.open .info-modal { transform: translateY(0); }
.info-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg2); z-index: 2;
}
.info-modal-title {
  font-family: 'Bebas Neue', cursive; font-size: 26px; letter-spacing: 2px;
}
.info-modal-title span { color: var(--accent); }
.info-modal-body {
  padding: 28px; max-height: 80vh; overflow-y: auto;
  font-size: 14px; line-height: 1.8; color: #333333;
}
.info-modal-body h2 {
  font-family: 'Bebas Neue', cursive; font-size: 22px; letter-spacing: 1px;
  color: #111111; margin: 28px 0 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.info-modal-body h2:first-child { margin-top: 0; }
.info-modal-body h3 {
  font-size: 15px; font-weight: 700; color: #111111; margin: 18px 0 8px;
}
.info-modal-body p { margin-bottom: 14px; }
.info-modal-body ul { padding-left: 20px; margin-bottom: 14px; }
.info-modal-body li { margin-bottom: 6px; }
.info-modal-body strong { color: #111111; }
.info-modal-body .accent { color: var(--accent); }
.info-page-cta {
  background: var(--accent); border: none; color: #ffffff;
  padding: 12px 28px; border-radius: 2px;
  font-family: 'Bebas Neue', cursive; font-size: 20px; letter-spacing: 1px;
  cursor: pointer; transition: all .2s; margin-top: 8px;
}
.info-page-cta:hover { background: #0ea5e9; }
.info-page-cta-outline {
  background: transparent; border: 1px solid var(--border); color: #111111;
  padding: 10px 24px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s; margin-top: 8px; margin-left: 10px;
}
.info-page-cta-outline:hover { border-color: var(--accent); color: var(--accent); }
.info-card {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 2px;
  padding: 18px 20px; margin-bottom: 14px;
}
.info-card h3 { margin-top: 0; }
.info-steps { counter-reset: steps; }
.info-step {
  display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start;
}
.info-step-num {
  min-width: 36px; height: 36px; background: #111111; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', cursive; font-size: 20px; flex-shrink: 0;
}
.info-step-content h3 { margin-top: 2px; }
.info-faq-item { border-bottom: 1px solid var(--border); padding: 16px 0; }
.info-faq-item:last-child { border-bottom: none; }
.info-faq-q { font-weight: 700; color: #111111; margin-bottom: 8px; cursor: pointer; }
.info-faq-q:hover { color: var(--accent); }
.info-faq-a { color: #374151; }
.info-contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.info-contact-field { display: flex; flex-direction: column; gap: 6px; }
.info-contact-field label { font-size: 11px; color: #374151; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.info-contact-field input, .info-contact-field textarea, .info-contact-field select {
  background: var(--bg3); border: 1px solid var(--border); color: #111111;
  padding: 10px 14px; border-radius: 2px; font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color .2s;
}
.info-contact-field input:focus, .info-contact-field textarea:focus, .info-contact-field select:focus { border-color: var(--accent); }
.info-contact-field.full { grid-column: 1/-1; }
.info-contact-field textarea { resize: vertical; min-height: 100px; }
.val-result { background: rgba(232,255,71,.07); border: 1px solid rgba(232,255,71,.2); border-radius: 2px; padding: 20px; text-align: center; display: none; }
.val-result.show { display: block; }
.val-result-price { font-family: 'Bebas Neue', cursive; font-size: 48px; color: var(--accent); line-height: 1; }
.val-range { font-size: 13px; color: #374151; margin-top: 4px; }
@media (max-width: 480px) { .info-contact-grid { grid-template-columns: 1fr; } }

/* ─── SIMILAR VEHICLES (desktop left column only) ───── */
.similar-section {
  display: none;
  border-top: 1px solid var(--border);
  padding: 12px 10px 10px;
  width: 100%;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
@media (min-width: 769px) {
  .similar-section { display: block; }
}
@media (min-width: 1200px) {
  .similar-section { /* fills column */ }
}
/* Explicitly hide on all mobile breakpoints */
@media (max-width: 768px) {
  .similar-section { display: none !important; }
}
.similar-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px;
  color: #374151; font-weight: 700; margin-bottom: 10px;
  padding: 0 2px;
}
.similar-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--bg3);
  margin-bottom: 5px;
  cursor: pointer;
  transition: border-color .2s, transform .15s;
}
.similar-row:hover {
  border-color: #38bdf8;
  transform: translateX(3px);
}
.similar-row:last-child { margin-bottom: 0; }
.similar-thumb {
  min-width: 114px; height: 82px;
  border-radius: 2px; overflow: hidden;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative;
}
.similar-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.similar-thumb svg { opacity: .2; }
.similar-thumb-badge {
  position: absolute; bottom: 3px; left: 3px;
  font-size: 8px; font-weight: 800; letter-spacing: .5px;
  padding: 1px 4px; border-radius: 1px; text-transform: uppercase;
  background: #111111; color: #fff;
}
.similar-thumb-badge.used { background: var(--bg); color: #374151; border: 1px solid var(--border); }
.similar-middle {
  flex: 1; min-width: 0;
}
.similar-name {
  font-size: 12px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.similar-dealer {
  font-size: 11px; color: #374151;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
}
.similar-miles {
  font-size: 10px; color: #374151;
  font-family: 'DM Mono', monospace;
}
.similar-right {
  text-align: right; flex-shrink: 0;
}
.similar-price {
  font-family: 'Bebas Neue', cursive;
  font-size: 18px; color: var(--accent); line-height: 1;
  white-space: nowrap;
}
.similar-view {
  display: block; margin-top: 4px;
  font-size: 10px; color: #374151;
  background: none; border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 2px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: all .2s; white-space: nowrap;
}
.similar-view:hover { border-color: var(--accent); color: var(--accent); }

/* ─── SAVED SEARCHES ────────────────────────────────── */
.saved-search-btn {
  background: none; border: 1px solid var(--border);
  color: #374151; padding: 6px 12px; border-radius: 2px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s; display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif; white-space: nowrap;
}
.saved-search-btn:hover { border-color: var(--accent); color: var(--accent); }
.saved-search-btn.saved { border-color: var(--accent); color: var(--accent); background: rgba(232,255,71,0.07); }
.ss-panel {
  position: fixed; top: 68px; right: 16px; z-index: 300;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 2px; width: 300px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s;
}
.ss-panel.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.ss-panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.ss-panel-title {
  font-family: 'Bebas Neue', cursive; font-size: 18px; letter-spacing: 1px;
}
.ss-panel-title span { color: var(--accent); }
.ss-panel-close {
  background: none; border: none; color: #374151;
  font-size: 16px; cursor: pointer; padding: 0;
}
.ss-list { max-height: 280px; overflow-y: auto; }
.ss-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.ss-item:hover { background: var(--bg3); }
.ss-item:last-child { border-bottom: none; }
.ss-item-info { flex: 1; min-width: 0; }
.ss-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item-meta { font-size: 11px; color: #374151; margin-top: 1px; }
.ss-item-rm {
  background: none; border: none; color: #374151;
  font-size: 14px; cursor: pointer; padding: 2px 4px;
  transition: color .15s; flex-shrink: 0;
}
.ss-item-rm:hover { color: #ff4d6d; }
.ss-save-row {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.ss-save-input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: #111111; padding: 8px 12px; border-radius: 2px;
  font-size: 13px; outline: none; font-family: 'DM Sans', sans-serif;
  margin-bottom: 8px; transition: border-color .2s;
}
.ss-save-input:focus { border-color: var(--accent); }
.ss-save-btn {
  width: 100%; background: var(--accent); border: none; color: #ffffff;
  padding: 8px; border-radius: 2px; font-weight: 800; font-size: 13px;
  cursor: pointer; transition: opacity .2s;
}
.ss-save-btn:hover { opacity: .85; }
.ss-empty {
  padding: 24px 16px; text-align: center;
  font-size: 13px; color: #374151;
}

/* ─── MOBILE BOTTOM NAV ─────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.mobile-nav-inner {
  display: flex; justify-content: space-around; align-items: center;
}
.mobile-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: #374151;
  font-size: 10px; font-weight: 600; cursor: pointer;
  padding: 4px 12px; transition: color .2s;
  font-family: 'DM Sans', sans-serif; text-transform: uppercase;
  letter-spacing: .5px;
}
.mobile-nav-btn svg { transition: color .2s; }
.mobile-nav-btn.active { color: var(--accent); }
.mobile-nav-btn:hover { color: #111111; }
.mobile-nav-badge {
  position: absolute; top: -2px; right: -4px;
  background: #111111; color: #fff;
  font-size: 9px; font-weight: 800;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mobile-nav-icon { position: relative; }
@media (max-width: 768px) {
  .mobile-nav { display: block; }
  body { padding-bottom: 64px; }
  /* hide compare dock on mobile */

}

/* ─── PRICE DROP BADGE ──────────────────────────────── */
.price-drop-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.3);
  color: #00a65a; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 2px; margin-left: 6px;
  font-family: 'DM Mono', monospace; white-space: nowrap;
  vertical-align: middle;
}
.price-drop-banner {
  background: rgba(0,166,90,0.08); border: 1px solid rgba(34,197,94,0.25);
  border-radius: 2px; padding: 10px 16px; margin-bottom: 12px;
  font-size: 13px; color: #00a65a; display: none;
}
.price-drop-banner.show { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.price-watch-btn {
  background: none; border: 1px solid var(--border);
  color: #374151; padding: 5px 12px; border-radius: 2px;
  font-size: 11px; font-weight: 600; cursor: pointer;
  transition: all .2s; font-family: 'DM Sans', sans-serif;
  display: inline-flex; align-items: center; gap: 5px;
}
.price-watch-btn:hover { border-color: #00a65a; color: #00a65a; }
.price-watch-btn.watching { border-color: #00a65a; color: #00a65a; background: rgba(0,166,90,0.08); }

/* ─── SHARE + PRINT BUTTONS ─────────────────────────── */
.modal-action-bar {
  display: flex; flex-wrap: nowrap; align-items: center;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg2); position: relative; z-index: 2;
  gap: 0;
}
.modal-action-bar .modal-close {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--bg2);
  height: 100%;
  min-width: 44px;
}
.modal-action-bar-scroll {
  display: flex; gap: 8px; align-items: center;
  flex: 1; overflow-x: auto; min-width: 0;
  scrollbar-width: none;
}
.modal-action-bar-scroll::-webkit-scrollbar { display: none; }
.modal-action-btn {
  background: none; border: 1px solid var(--border);
  color: #374151; padding: 6px 14px; border-radius: 2px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .2s; display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif;
}
.modal-action-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── DEALER PROFILE ────────────────────────────────── */
.dealer-profile-link {
  cursor: pointer; text-decoration: underline; text-decoration-color: transparent;
  transition: text-decoration-color .2s, color .2s;
  display: inline;
}
.dealer-profile-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.dealer-profile-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: 12px;
}
.dp-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; overflow: hidden; cursor: pointer;
  transition: border-color .2s;
}
.dp-card:hover { border-color: rgba(56,189,248,0.3); }
.dp-card-img { width: 100%; height: 110px; object-fit: cover; background: var(--bg2); display: block; }
.dp-card-body { padding: 10px 12px; }
.dp-card-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-card-price { font-family: 'Bebas Neue', cursive; font-size: 20px; color: var(--accent); }
.dp-card-meta { font-size: 11px; color: #374151; margin-top: 2px; }
.dp-loading { text-align: center; padding: 40px; color: #374151; font-size: 13px; }

/* ─── IMAGE UPLOAD (private listings) ──────────────── */
.photo-drop-zone {
  border: 2px dashed var(--border); border-radius: 2px;
  padding: 28px 20px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
  background: var(--bg3);
}
.photo-drop-zone:hover, .photo-drop-zone.dragover {
  border-color: var(--accent); background: rgba(56,189,248,0.02);
}
.photo-drop-zone svg { opacity: .4; margin-bottom: 10px; }
.photo-drop-zone p { font-size: 13px; color: #374151; margin: 0; }
.photo-drop-zone span { font-size: 11px; color: #374151; opacity: .6; }
.photo-previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.photo-preview-item {
  position: relative; width: 90px; height: 68px;
  border-radius: 2px; overflow: hidden;
  border: 1px solid var(--border);
}
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview-rm {
  position: absolute; top: 3px; right: 3px;
  background: rgba(0,0,0,0.4); border: none; color: #fff;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 10px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1;
}
.photo-count-label { font-size: 11px; color: #374151; margin-top: 6px; }

/* ─── PRINT STYLES ──────────────────────────────────── */
@media print {
  header, .adv-filter-wrap, .filter-bar, .rv-section, .vtype-section,
  .modal-action-bar, .modal-back, .modal-close, .mobile-nav,
  .gallery-slide-btn, .gallery-thumbs, .similar-section,
  #tab-finance, .buy-cta, .buy-sub, .finance-cta,
  .detail-overlay > *:not(.detail-modal),
  .toast, .lead-overlay, .list-overlay, .ss-panel { display: none !important; }

  body { background: #fff !important; color: #000 !important; padding: 0 !important; }
  .detail-overlay { position: static !important; background: #fff !important; overflow: visible !important; }
  .detail-modal { border: none !important; box-shadow: none !important; background: #fff !important; color: #000 !important; }
  .modal-top { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 20px !important; }
  .gallery-main { width: 100% !important; height: auto !important; max-height: 280px !important; object-fit: contain !important; background: var(--bg3) !important; }
  .modal-make, .modal-title, .modal-vin, .modal-price { color: #000 !important; }
  .modal-price { color: #1a1a1a !important; }
  .specs-section h4, .spec-label { color: #555 !important; }
  .spec-val { color: #000 !important; }
  .specs-grid { border: 1px solid #ddd !important; }
  .spec-item { border-bottom-color: #eee !important; }
  .print-header { display: block !important; font-size: 11px; color: #6b7280; margin-bottom: 8px; }
  .tab-content .tab-panel { display: block !important; }
  #tab-finance { display: none !important; }
  a { color: #000 !important; text-decoration: none !important; }
}
.print-header { display: none; }

/* ─── CARD DISCLAIMER ──────────────────────────────── */
.card-disclaimer {
  font-size: 9px; color: #374151; opacity: 0.5;
  padding: 6px 12px; line-height: 1.4; border-top: 1px solid var(--border);
  background: var(--bg2);
}

/* ─── HAMBURGER BUTTON — always visible ─────────────── */
.ham-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 9px 11px;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
/* Group that holds search icon + hamburger — always far right */
.header-right-btns {
  display: flex; align-items: center; gap: 6px;
  margin-left: auto; flex-shrink: 0;
}
.ham-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.ham-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-btn.open span:nth-child(2) { opacity: 0; }
.ham-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── DRAWER OVERLAY ─────────────────────────────────── */
.ham-overlay {
  visibility: hidden; position: fixed; inset: 0; z-index: 899;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .3s, visibility .3s;
  pointer-events: none;
}
.ham-overlay.open { visibility: visible; opacity: 1; pointer-events: all; }

/* ─── DRAWER PANEL ───────────────────────────────────── */
.ham-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  z-index: 900;
  width: 300px;
  max-width: 88vw;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.ham-drawer.open {
  transform: translateX(0);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.ham-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg2);
  z-index: 2;
  flex-shrink: 0;
}
.ham-close {
  background: none;
  border: 1px solid var(--border);
  color: #374151;
  width: 34px; height: 34px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.ham-close:hover { border-color: #ff4d6d; color: #ff4d6d; }
.ham-section-label {
  font-size: 10px;
  color: #374151;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 18px 20px 6px;
  opacity: 0.5;
  flex-shrink: 0;
}
.ham-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  color: #111111;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.ham-item:hover { background: rgba(255,255,255,0.04); }
.ham-item:active { background: rgba(232,255,71,0.07); color: var(--accent); }
.ham-icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}
.ham-badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.ham-footer {
  margin-top: auto;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #374151;
  text-align: center;
  flex-shrink: 0;
}
.ham-footer a { color: #374151; text-decoration: none; }
.ham-footer a:hover { color: var(--accent); }

/* ─── FAVORITES LIST ─────────────────────────────────── */
.fav-list { display: flex; flex-direction: column; gap: 2px; }
.fav-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.fav-row:active { background: rgba(56,189,248,0.02); }
.fav-thumb {
  width: 80px; height: 56px; flex-shrink: 0;
  background: var(--bg3); border-radius: 2px; overflow: hidden;
}
.fav-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fav-info { flex: 1; min-width: 0; }
.fav-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-dealer { font-size: 11px; color: #374151; margin-top: 2px; }
.fav-price { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 4px; }
.fav-remove {
  background: none; border: none; color: #374151;
  font-size: 16px; cursor: pointer; padding: 8px;
  flex-shrink: 0; transition: color .2s;
}
.fav-remove:hover { color: #ff4d6d; }

/* ─── TAB BAR SCROLL on mobile ────────────────────── */
@media (max-width: 600px) {
  .tab-bar { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .tab-btn { white-space: nowrap; flex-shrink: 0; font-size: 12px; padding: 12px 10px; }
}

/* ─── DEALER FULL-PAGE MODE ────────────────────────────── */
.info-overlay.dealer-page-mode {
  background: var(--bg);
  display: flex; flex-direction: column;
}
.info-overlay.dealer-page-mode .info-modal {
  width: 100%; max-width: 100%; height: 100%;
  border-radius: 0; border: none;
  display: flex; flex-direction: column;
  max-height: 100%;
}
.info-overlay.dealer-page-mode .info-modal-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 16px;
  flex-shrink: 0;
}
.dealer-back-btn {
  background: none; border: 1px solid var(--border);
  color: #111111; padding: 8px 16px; border-radius: 2px;
  cursor: pointer; font-size: 14px; font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s, color .2s;
  white-space: nowrap; flex-shrink: 0;
}
.dealer-back-btn:hover { border-color: var(--accent); color: var(--accent); }
.dealer-page-heading { flex: 1; min-width: 0; }
.info-overlay.dealer-page-mode .info-modal-body {
  flex: 1; overflow-y: auto; padding: 20px;
}
/* Slide-in animation for dealer page */
.info-overlay.dealer-page-mode.open {
  animation: slideInRight .22s cubic-bezier(.25,.46,.45,.94);
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
/* dp-card empty image */
.dp-card-img--empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3); opacity: .25;
}

/* ─── ACCORDION TABS ──────────────────────────────────── */
.accord-list {
  margin: 16px 0 20px;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.accord-item {
  border-bottom: 1px solid var(--border);
}
.accord-item:last-child { border-bottom: none; }

.accord-hdr {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: var(--bg3); border: none; color: #111111;
  padding: 13px 16px; cursor: pointer; font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: .3px;
  transition: background .15s, color .15s;
  text-align: left;
}
.accord-hdr:hover { background: rgba(232,255,71,.06); color: var(--accent); }
.accord-hdr.open  { background: rgba(232,255,71,.08); color: var(--accent); }

.accord-chevron {
  font-size: 16px; color: #374151; transition: transform .2s, color .2s;
  display: inline-block; line-height: 1;
}
.accord-hdr.open .accord-chevron { transform: rotate(90deg); color: var(--accent); }

.accord-body {
  display: none; padding: 0;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.accord-body.open { display: block; }
.accord-body > * { padding: 20px; }
/* finance-calc and buy-section already have own padding */
.accord-body .finance-calc,
.accord-body .buy-section { padding: 20px; }

/* ─── AUTH / USER PANEL / MOBILE ZIP ─────────────────────────────────────── */

/* Mobile ZIP button — shows on mobile filter bar */
.adv-filter-top-row {
display: flex; align-items: center; justify-content: space-between;
padding: 0 16px;
}
.mobile-zip-btn:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 768px) {
.mobile-zip-btn { display: flex; align-items: center; gap: 5px; }
}

/* User header buttons flex */
#userHeaderBtns { display: none; }
#userHeaderBtns.visible { display: flex !important; }

/* ── Auth form styles (reuse lf- classes, add auth-specific) */
.auth-tabs {
display: flex; gap: 0; margin-bottom: 24px;
border-bottom: 1px solid var(--border);
}
.auth-tab {
flex: 1; padding: 10px; text-align: center; cursor: pointer;
font-weight: 700; font-size: 14px; color: #374151;
border-bottom: 2px solid transparent; margin-bottom: -1px;
transition: all .2s; background: none; border-top: none;
border-left: none; border-right: none; font-family: 'DM Sans', sans-serif;
}
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.auth-title {
font-family: 'Bebas Neue', cursive; font-size: 28px;
letter-spacing: 1px; margin-bottom: 4px;
}
.auth-subtitle { font-size: 13px; color: #374151; margin-bottom: 20px; }

.auth-divider {
text-align: center; font-size: 12px; color: #374151;
margin: 16px 0; position: relative;
}
.auth-divider::before, .auth-divider::after {
content: ''; position: absolute; top: 50%; width: 40%; height: 1px;
background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-error {
background: rgba(255,75,75,.1); border: 1px solid rgba(255,75,75,.3);
color: #ff6b6b; padding: 10px 14px; border-radius: 2px;
font-size: 13px; margin-bottom: 12px;
}

/* ── User Panel ──────────────────────────────────────────────── */
.up-header {
display: flex; align-items: center; gap: 14px;
margin-bottom: 24px; padding-bottom: 20px;
border-bottom: 1px solid var(--border);
}
.up-avatar {
width: 52px; height: 52px; border-radius: 50%;
background: #111111; color: #fff;
display: flex; align-items: center; justify-content: center;
font-size: 22px; font-weight: 800; font-family: 'Bebas Neue', cursive;
flex-shrink: 0;
}
.up-name   { font-weight: 800; font-size: 16px; }
.up-email  { font-size: 12px; color: #374151; margin-top: 2px; }
.up-tabs {
display: flex; gap: 4px; flex-wrap: wrap;
margin-bottom: 20px;
}
.up-tab {
padding: 7px 14px; border-radius: 2px; cursor: pointer; font-size: 13px;
font-weight: 600; border: 1px solid var(--border); background: none;
color: #374151; transition: all .2s; font-family: 'DM Sans', sans-serif;
}
.up-tab.active { background: #111111; color: #fff; border-color: var(--accent); }
.up-tab:hover:not(.active) { border-color: var(--accent); color: var(--accent); }

.up-content { min-height: 200px; }

/* Listing card in user panel */
.up-listing-card {
display: flex; gap: 12px; padding: 14px;
background: var(--bg3); border: 1px solid var(--border);
border-radius: 2px; margin-bottom: 10px;
}
.up-listing-thumb {
width: 90px; height: 65px; object-fit: cover;
border-radius: 2px; flex-shrink: 0; background: var(--bg2);
}
.up-listing-info { flex: 1; min-width: 0; }
.up-listing-title { font-weight: 700; font-size: 14px; }
.up-listing-meta  { font-size: 12px; color: #374151; margin-top: 3px; }
.up-listing-status {
display: inline-block; padding: 2px 8px; border-radius: 2px;
font-size: 11px; font-weight: 700; text-transform: uppercase;
margin-top: 4px;
}
.up-listing-status.active   { background: rgba(100,220,100,.15); color: #6ddc6d; }
.up-listing-status.draft    { background: rgba(200,200,100,.15); color: #c8c864; }
.up-listing-status.sold     { background: rgba(100,150,255,.15); color: #7ab0ff; }
.up-listing-status.expired  { background: rgba(255,100,100,.15); color: #ff7070; }

.up-listing-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.up-btn {
padding: 5px 12px; font-size: 12px; font-weight: 600; border-radius: 2px;
cursor: pointer; font-family: 'DM Sans', sans-serif; border: 1px solid var(--border);
background: none; color: #374151; transition: all .2s;
}
.up-btn:hover { border-color: var(--accent); color: var(--accent); }
.up-btn.danger:hover { border-color: #ff6b6b; color: #ff6b6b; }

/* Empty state */
.up-empty {
text-align: center; padding: 40px 20px; color: #374151;
}
.up-empty-icon { font-size: 36px; margin-bottom: 10px; }
.up-empty-title { font-size: 15px; font-weight: 700; color: #111111; margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════════
 PHASE 2 + 3 — DEAL RATING · DAYS ON LOT · ADMIN · SEO
 ═══════════════════════════════════════════════════════════ */

/* ── Deal Rating Badge ─────────────────────────────────────── */
.deal-badge {
display: inline-flex; align-items: center; gap: 4px;
padding: 3px 8px; border-radius: 2px; font-size: 11px;
font-weight: 800; letter-spacing: .3px; white-space: nowrap;
}
.deal-badge.great   { background: rgba(100,220,100,.15); color: #5ddd5d; border: 1px solid rgba(100,220,100,.3); }
.deal-badge.good    { background: rgba(150,220,100,.12); color: #96dc64; border: 1px solid rgba(150,220,100,.25); }
.deal-badge.fair    { background: rgba(220,200,80,.12);  color: #dcc850; border: 1px solid rgba(220,200,80,.25); }
.deal-badge.high    { background: rgba(255,140,50,.12);  color: #ff8c32; border: 1px solid rgba(255,140,50,.25); }
.deal-badge.over    { background: rgba(255,80,80,.12);   color: #ff5050; border: 1px solid rgba(255,80,80,.25);  }

/* ── Days on Lot ───────────────────────────────────────────── */
.days-pill {
font-size: 10px; color: #374151; margin-top: 3px;
display: flex; align-items: center; gap: 3px;
}
.days-pill.fresh  { color: #5ddd5d; }
.days-pill.aging  { color: #dcc850; }
.days-pill.stale  { color: #ff8c32; }

/* ── Price Drop ────────────────────────────────────────────── */
.price-drop-tag {
font-size: 11px; color: #5ddd5d; font-weight: 700;
display: inline-flex; align-items: center; gap: 3px;
}

/* ── Market Comparison in Modal ────────────────────────────── */
.market-bar-wrap {
background: var(--bg3); border: 1px solid var(--border);
border-radius: 2px; padding: 14px 16px; margin: 12px 0;
}
.market-bar-label { font-size: 11px; color: #374151; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .8px; }
.market-bar-track {
height: 6px; background: var(--bg2); border-radius: 3px;
position: relative; margin-bottom: 8px;
}
.market-bar-fill {
height: 100%; border-radius: 3px;
background: linear-gradient(90deg, #5ddd5d, var(--accent));
transition: width .6s ease;
}
.market-bar-needle {
position: absolute; top: -4px; width: 2px; height: 14px;
background: #fff; border-radius: 1px; transform: translateX(-50%);
}
.market-stats-row {
display: flex; justify-content: space-between; font-size: 12px;
}
.market-stat { text-align: center; }
.market-stat .val { font-weight: 800; font-size: 13px; }
.market-stat .lbl { color: #374151; font-size: 10px; }

/* ── Phone OTP ─────────────────────────────────────────────── */
.otp-input-wrap {
display: flex; gap: 8px; justify-content: center; margin: 16px 0;
}
.otp-digit {
width: 44px; height: 54px; text-align: center; font-size: 24px;
font-weight: 800; background: var(--bg3); border: 1px solid var(--border);
border-radius: 2px; color: #111111; font-family: 'DM Mono', monospace;
caret-color: var(--accent); transition: border-color .2s;
}
.otp-digit:focus { border-color: var(--accent); outline: none; }

/* ── Admin Panel ───────────────────────────────────────────── */
.admin-wrap {
padding: 0 24px 40px; max-width: 1100px; margin: 0 auto;
}
.admin-stat-grid {
display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 12px; margin-bottom: 24px;
}
.admin-stat-card {
background: var(--bg3); border: 1px solid var(--border);
border-radius: 2px; padding: 18px 20px;
}
.admin-stat-num  { font-family: 'Bebas Neue', cursive; font-size: 36px; color: var(--accent); line-height: 1; }
.admin-stat-lbl  { font-size: 12px; color: #374151; margin-top: 4px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table {
width: 100%; border-collapse: collapse; font-size: 13px;
}
.admin-table th {
text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
color: #374151; font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
white-space: nowrap;
}
.admin-table td {
padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.04);
vertical-align: top;
}
.admin-table tr:hover td { background: rgba(255,255,255,.02); }

.admin-status {
display: inline-block; padding: 2px 8px; border-radius: 2px;
font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.admin-status.new       { background: rgba(100,200,255,.15); color: #64c8ff; }
.admin-status.contacted { background: rgba(220,180,100,.15); color: #dcb464; }
.admin-status.closed    { background: rgba(100,220,100,.15); color: #64dc64; }
.admin-status.denied    { background: rgba(255,80,80,.15);   color: #ff5050; }

.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-tab {
padding: 7px 16px; border-radius: 2px; cursor: pointer;
font-size: 13px; font-weight: 600; border: 1px solid var(--border);
background: none; color: #374151; transition: all .2s;
font-family: 'DM Sans', sans-serif;
}
.admin-tab.active { background: #111111; color: #fff; border-color: var(--accent); }

/* ── SEO Content Pages ─────────────────────────────────────── */
.seo-hero {
background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
border: 1px solid var(--border); border-radius: 2px;
padding: 32px; margin-bottom: 24px; text-align: center;
}
.seo-hero h1 {
font-family: 'Bebas Neue', cursive; font-size: clamp(28px, 5vw, 48px);
letter-spacing: 2px; margin: 0 0 8px;
}
.seo-hero p { color: #374151; font-size: 15px; max-width: 520px; margin: 0 auto; }

.seo-grid {
display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px;
}
.seo-card {
background: var(--bg3); border: 1px solid var(--border); border-radius: 2px;
padding: 20px; transition: border-color .2s;
}
.seo-card:hover { border-color: rgba(232,255,71,.3); }
.seo-card h3 { font-size: 15px; font-weight: 800; margin: 0 0 8px; }
.seo-card p  { font-size: 13px; color: #374151; margin: 0; line-height: 1.6; }
.seo-tag {
display: inline-block; padding: 3px 10px; border-radius: 2px;
font-size: 11px; font-weight: 700; background: rgba(232,255,71,.1);
color: var(--accent); margin-bottom: 8px;
}

/* ── Dealer Onboarding ─────────────────────────────────────── */
.dealer-plan-grid {
display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0;
}
.dealer-plan {
background: var(--bg3); border: 1px solid var(--border); border-radius: 2px;
padding: 20px; position: relative; transition: border-color .2s;
}
.dealer-plan.featured { border-color: var(--accent); }
.dealer-plan-badge {
position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
background: #111111; color: #fff; font-size: 10px; font-weight: 800;
padding: 2px 10px; border-radius: 2px; white-space: nowrap;
}
.dealer-plan-price {
font-family: 'Bebas Neue', cursive; font-size: 36px; color: var(--accent);
line-height: 1; margin: 8px 0 4px;
}
.dealer-plan ul { padding: 0 0 0 16px; margin: 12px 0; color: #374151; font-size: 13px; }
.dealer-plan ul li { margin-bottom: 6px; }

/* ── Results info row with location controls ───────────────── */
.results-count {
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
flex-shrink: 1; min-width: 0; font-size: 13px; color: #374151;
}
.results-count strong { color: #111111; }
.zip-change-btn {
background: none; border: 1px solid var(--border);
color: #374151; padding: 5px 10px; border-radius: 2px;
font-size: 12px; font-weight: 600; cursor: pointer;
font-family: 'DM Sans', sans-serif; white-space: nowrap;
transition: all .2s; display: flex; align-items: center; gap: 4px;
}
.zip-change-btn:hover { border-color: var(--accent); color: var(--accent); }
.distance-select, #sortSelect { width: auto !important; padding: 5px 8px !important; font-size: 12px !important; }
/* Ellipsis in pagination */
.page-ellipsis {
display: flex; align-items: center; justify-content: center;
width: 38px; height: 38px; color: #374151; font-size: 14px; user-select: none;
}

@media (max-width: 600px) {
.results-info-row { flex-wrap: wrap; gap: 6px; }
.results-controls {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; overflow-x: auto; }
.saved-label { display: none; }
}

/* ═══════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════ */
.hero-section {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px;
  background: radial-gradient(ellipse, rgba(56,189,248,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.hero-inner {
  max-width: 760px; margin: 0 auto; text-align: center;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  display: none !important;
}
.hero-title {
  font-family: 'Bebas Neue', cursive;
  font-size: clamp(28px, 7vw, 96px);
  line-height: 1; letter-spacing: 2px;
  color: #111111; margin: 0 0 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.hero-title span { color: var(--accent); }
.hero-sub {
  font-size: 16px; color: #374151; line-height: 1.6;
  max-width: 540px; margin: 0 auto 36px;
}
.hero-search-bar {
  display: none; gap: 0; max-width: 680px; margin: 0 auto 36px;
  background: var(--card); border: 1px solid rgba(56,189,248,0.15);
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 40px rgba(56,189,248,0.04);
  transition: border-color .2s, box-shadow .2s;
}
.hero-search-bar:focus-within {
  border-color: rgba(56,189,248,0.5);
  box-shadow: 0 0 40px rgba(232,255,71,0.12);
}
.hero-search-input-wrap {
  flex: 1; display: flex; align-items: center;
  padding: 0 16px; gap: 10px;
  border-right: 1px solid var(--border);
}
.hero-search-input-wrap svg { color: #374151; flex-shrink: 0; }
.hero-search-input-wrap input {
  flex: 1; background: none; border: none; outline: none;
  color: #111111; font-family: 'DM Sans', sans-serif;
  font-size: 14px; padding: 16px 0;
}
.hero-search-input-wrap input::placeholder { color: #374151; }
.hero-zip-wrap {
  display: flex; align-items: center; gap: 8px;
  padding: 0 16px; border-right: 1px solid var(--border);
  min-width: 140px;
}
.hero-zip-wrap svg { color: #374151; flex-shrink: 0; }
.hero-zip-wrap input {
  width: 80px; background: none; border: none; outline: none;
  color: #111111; font-family: 'DM Mono', monospace;
  font-size: 14px; letter-spacing: 1px;
}
.hero-zip-wrap input::placeholder { color: #374151; }
.hero-search-btn {
  background: #111111; color: #fff;
  border: none; padding: 0 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 800;
  cursor: pointer; letter-spacing: .5px;
  white-space: nowrap;
  transition: background .15s, transform .1s;
}
.hero-search-btn:hover { background: #ff7722; }
.hero-search-btn:active { transform: scale(0.98); }
.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 24px;
}
.hero-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.hero-stat span:first-child {
  font-family: 'Bebas Neue', cursive; font-size: 20px;
  color: var(--accent); letter-spacing: 1px;
}
.hero-stat span:last-child {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 2px; color: #374151;
}
.hero-stat-div {
  width: 1px; height: 32px; background: var(--border);
}

/* ═══════════════════════════════════════════════════════
   RECENTLY VIEWED
═══════════════════════════════════════════════════════ */
.rv-section {
  border-top: 1px solid var(--border);
  padding: 28px 24px 24px;
  background: var(--bg2);
}
.rv-inner { max-width: 1400px; margin: 0 auto; }
.rv-heading {
  font-family: 'Bebas Neue', cursive;
  font-size: 20px; letter-spacing: 2px;
  color: #111111; margin-bottom: 14px;
}
.rv-heading span { color: var(--accent); }
.rv-strip {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 6px; scrollbar-width: none;
}
.rv-strip::-webkit-scrollbar { display: none; }
.rv-card {
  flex-shrink: 0; width: 160px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 2px; overflow: hidden; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.rv-card:hover { border-color: rgba(56,189,248,0.3); transform: translateY(-2px); }
.rv-card-img {
  width: 100%; height: 90px; object-fit: cover;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
}
.rv-card-img img { width: 100%; height: 100%; object-fit: cover; }
.rv-card-img svg { color: #333; }
.rv-card-body { padding: 8px 10px; }
.rv-card-title {
  font-size: 11px; font-weight: 700; color: #111111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rv-card-price {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--accent); margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════
   MOBILE BOTTOM NAV
═══════════════════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 150;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  height: 62px;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; border: none;
  color: #374151; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 9px; font-weight: 600; letter-spacing: .3px;
  text-transform: uppercase; padding: 8px 0;
  transition: color .15s; position: relative;
}
.bnav-item svg { transition: stroke .15s; }
.bnav-item.active { color: var(--accent); }
.bnav-item.active svg { stroke: var(--accent); }
.bnav-list {
  color: #000 !important;
}
.bnav-list svg { stroke: #000 !important; }
.bnav-list::before {
  content: '';
  position: absolute; inset: 8px 10px;
  background: var(--accent); border-radius: 2px; z-index: -1;
}
.bnav-badge {
  position: absolute; top: 6px; right: calc(50% - 18px);
  background: #ff4444; color: #fff;
  font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════
   PAYMENT CALCULATOR
═══════════════════════════════════════════════════════ */
.pay-calc {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; margin: 14px 0; overflow: hidden;
}
.pay-calc-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #111111;
  user-select: none;
  transition: background .15s;
}
.pay-calc-header:hover { background: rgba(255,255,255,0.03); }
.pay-calc-result {
  font-family: 'DM Mono', monospace;
  font-size: 15px; color: var(--accent);
  margin-left: auto;
}
.pay-calc-arrow { margin-left: 4px; transition: transform .2s; flex-shrink: 0; }
.pay-calc-arrow.open { transform: rotate(180deg); }
.pay-calc-body { padding: 4px 14px 14px; border-top: 1px solid var(--border); }
.pay-calc-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 12px; color: #374151;
}
.pay-calc-row:last-of-type { border-bottom: none; }
.pay-calc-row label { font-weight: 600; }
.pay-calc-input-wrap {
  display: flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 2px; padding: 5px 10px;
  font-size: 12px; color: #374151;
}
.pay-calc-input-wrap input, .pay-calc-row select {
  background: none; border: none; outline: none;
  color: #111111; font-family: 'DM Mono', monospace;
  font-size: 12px; width: 60px; text-align: right;
}
.pay-calc-row select {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 2px; padding: 5px 8px;
  color: #111111; cursor: pointer;
}
.pay-calc-disclaimer {
  font-size: 10px; color: #374151; margin-top: 10px; line-height: 1.5;
}
.pay-calc-disclaimer a { color: var(--accent); text-decoration: none; }

/* ═══════════════════════════════════════════════════════
   MOBILE OVERRIDES
═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  header .search-wrap { display: none; }
  .hero-section { padding: 10px 16px 10px; }
  .hero-search-bar { display: none; }
  .hero-stats { display: flex; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 62px; }
  .rv-card { width: 140px; }
}
@media (max-width: 480px) {
  .hero-section { padding: 10px 12px 10px; }
  .hero-stats { gap: 12px; }
  .hero-stat span:first-child { font-size: 16px; }
}

/* ── Card redesign ── */
.card-make-line {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: #0284c7; margin-bottom: 2px;
}
.card-mileage-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 6px; gap: 6px;
}
.card-mileage {
  font-family: 'DM Mono', monospace; font-size: 12px;
  font-weight: 600; color: #1e3a5f;
}
.card-loc {
  font-size: 11px; color: #4b5563;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 120px;
}
.card-specs-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px;
}
.card-specs-row span {
  font-size: 10px; color: #374151;
  background: #ffffff; border: 1px solid #bae6fd;
  padding: 2px 7px; border-radius: 4px;
}
.card-price-wrap { display: flex; flex-direction: column; gap: 3px; }
.card-deal-inline { margin-top: 2px; }
.call-price { font-size: 13px; font-family: 'DM Sans',sans-serif; opacity: .6; }
.card-dol-pill {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 8px; border-radius: 2px;
  background: rgba(12,74,110,0.85); color: #ffffff;
  backdrop-filter: blur(4px);
}
.card-dol-pill.fresh { color: #4ade80; }
.card-dol-pill.stale { color: #f87171; }

/* ── Compare button on card ── */
.compare-btn {
  background: none; border: 1px solid #bae6fd;
  color: #4b5563; width: 32px; height: 32px;
  border-radius: 2px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s; flex-shrink: 0;
}
.compare-btn:hover, .compare-btn.active {
  background: #38bdf8; border-color: #38bdf8; color: #fff;
}

/* ── Compare bar (sticky bottom) ── */
.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 140;
  background: var(--bg2); border-top: 2px solid var(--accent);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
  padding: 12px 20px;
}
.compare-bar.show { transform: translateY(0); }
@media (max-width: 768px) { .compare-bar { bottom: 62px; } }
.compare-bar-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.compare-bar-label {
  font-family: 'Bebas Neue', cursive; font-size: 16px;
  letter-spacing: 1px; color: var(--accent); white-space: nowrap;
}
.compare-bar-cars { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; }
.compare-bar-car {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 2px; font-size: 12px; color: #111111;
}
.compare-bar-rm {
  background: none; border: none; color: #374151;
  cursor: pointer; font-size: 12px; padding: 0 2px;
  line-height: 1;
}
.compare-bar-btn {
  background: #111111; color: #fff;
  border: none; padding: 9px 20px; border-radius: 2px;
  font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.compare-bar-hint { font-size: 12px; color: #374151; }
.compare-bar-clear {
  background: none; border: 1px solid var(--border);
  color: #374151; padding: 7px 14px; border-radius: 2px;
  font-size: 12px; cursor: pointer; white-space: nowrap;
}

/* ── Compare modal ── */
.compare-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.88); backdrop-filter: blur(12px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  opacity: 0; transition: opacity .3s;
}
.compare-overlay.open { opacity: 1; }
.compare-modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 3px; width: 100%; max-width: 900px;
  overflow: hidden;
}
.compare-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.compare-grid {
  display: grid; overflow-x: auto;
}
.compare-cell {
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 13px; color: #111111;
}
.compare-even { background: rgba(255,255,255,0.02); }
.compare-header-cell { background: var(--bg3); }
.compare-car-header {
  background: var(--bg3); padding: 16px;
  border-left: 1px solid var(--border);
  text-align: center;
}
.compare-label-cell {
  font-size: 11px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: #374151;
  background: var(--bg3);
}
.compare-open-btn {
  background: #111111; color: #fff; border: none;
  padding: 6px 14px; border-radius: 2px; font-size: 11px;
  font-weight: 800; cursor: pointer; margin-top: 8px;
}

/* ── Settings in admin ── */
.settings-section { padding: 24px; max-width: 600px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  gap: 20px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row label { font-size: 14px; font-weight: 600; color: #111111; }
.settings-row p { font-size: 12px; color: #374151; margin: 4px 0 0; }
.settings-input {
  background: var(--card); border: 1px solid var(--border);
  color: #111111; padding: 8px 12px; border-radius: 2px;
  font-family: 'DM Mono', monospace; font-size: 14px;
  width: 100px; outline: none; text-align: right;
}
.settings-input:focus { border-color: var(--accent); }
.settings-toggle {
  width: 44px; height: 24px; border-radius: 12px;
  border: none; cursor: pointer; position: relative;
  transition: background .2s; flex-shrink: 0;
}
.settings-toggle.on { background: var(--accent); }
.settings-toggle.off { background: var(--border); }
.settings-toggle::after {
  content: ''; position: absolute;
  top: 3px; width: 18px; height: 18px; border-radius: 9px;
  background: #fff; transition: left .2s;
}
.settings-toggle.on::after  { left: 23px; }
.settings-toggle.off::after { left: 3px; }
.settings-save-btn {
  background: #111111; color: #fff; border: none;
  padding: 11px 28px; border-radius: 2px; font-weight: 800;
  font-size: 14px; cursor: pointer; margin-top: 20px;
}

/* ── DEALER FULL PAGE ─────────────────────────────────── */
.dealer-full-page {
  position: fixed; inset: 0; z-index: 180;
  background: var(--bg);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.25,.46,.45,.94);
  overflow: hidden;
}
.dealer-full-page.open {
  transform: translateX(0);
}
.dealer-full-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex; align-items: center; gap: 20px;
  flex-shrink: 0;
  position: sticky; top: 0; z-index: 10;
}
.dealer-page-eyebrow {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 2px; color: #374151;
  display: block; margin-bottom: 2px;
}
.dealer-page-name {
  font-family: 'Bebas Neue', cursive;
  font-size: 22px; letter-spacing: 1px; color: #111111;
}
.dealer-full-body {
  flex: 1; overflow-y: auto;
  padding: 24px;
  max-width: 1400px; width: 100%; margin: 0 auto;
  box-sizing: border-box;
}
.dealer-full-page .dealer-profile-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.dealer-full-page .dp-card-img { height: 140px; }
@media (max-width: 600px) {
  .dealer-full-header { padding: 12px 16px; gap: 12px; }
  .dealer-full-body { padding: 16px; }
  .dealer-full-page .dealer-profile-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── MOBILE SEARCH BUTTON + PANEL ────────────────────── */
.mob-search-btn {
  display: none;
  background: none; border: 1px solid var(--border);
  border-radius: 2px; padding: 9px 11px;
  cursor: pointer; color: #111111;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, color .2s;
}
.mob-search-btn:hover { border-color: var(--accent); color: var(--accent); }
.mob-search-btn.active { border-color: var(--accent); color: var(--accent); }

.mob-search-panel {
  display: none;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  max-height: 0;
  transition: max-height .28s cubic-bezier(.4,0,.2,1);
}
.mob-search-panel.open { max-height: 200px; }
.mob-search-inner { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.mob-search-row { display: flex; align-items: center; gap: 8px; }
.mob-search-input-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; padding: 10px 12px;
  transition: border-color .2s;
}
.mob-search-input-wrap:focus-within { border-color: var(--accent); }
.mob-search-input-wrap svg { color: #374151; flex-shrink: 0; }
.mob-search-input-wrap input {
  flex: 1; background: none; border: none; outline: none;
  color: #111111; font-family: 'DM Sans', sans-serif; font-size: 14px;
}
.mob-search-input-wrap input::placeholder { color: #374151; }
.mob-search-close {
  background: none; border: 1px solid var(--border);
  color: #374151; width: 38px; height: 38px;
  border-radius: 2px; cursor: pointer; font-size: 14px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.mob-search-loc-row { gap: 8px; }
.mob-search-zip-wrap {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; padding: 9px 12px;
}
.mob-search-zip-wrap svg { color: #374151; flex-shrink: 0; }
.mob-search-zip-wrap input {
  flex: 1; background: none; border: none; outline: none;
  color: #111111; font-family: 'DM Mono', monospace;
  font-size: 13px; letter-spacing: 1px; width: 60px;
}
.mob-search-zip-wrap input::placeholder { color: #374151; }
.mob-dist-select {
  background: var(--bg3); border: 1px solid var(--border);
  color: #111111; padding: 9px 8px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 12px;
  outline: none; cursor: pointer; flex-shrink: 0;
}
.mob-search-btn-go {
  background: #111111; color: #fff;
  border: none; padding: 10px 18px; border-radius: 2px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 800;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}

@media (max-width: 768px) {
  .mob-search-btn { display: flex; align-items: center; justify-content: center; }
  .mob-search-panel { display: block; }
}

/* ── FORM VALIDATION TOAST (fixed top of screen) ──────── */
.form-toast-fixed {
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #111111; color: #fff;
  padding: 12px 20px; border-radius: 2px;
  font-weight: 800; font-size: 13px;
  z-index: 9999;
  display: none;
  align-items: center; gap: 8px;
  box-shadow: 0 4px 24px rgba(56,189,248,0.15);
  white-space: nowrap;
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}
.form-toast-fixed.show {
  display: flex;
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  animation: formToastIn .25s ease forwards;
}
@keyframes formToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (max-width: 600px) {
  .form-toast-fixed {
    top: 70px; left: 16px; right: 16px;
    transform: translateY(-12px);
    white-space: normal; text-align: center;
    justify-content: center;
  }
  .form-toast-fixed.show {
    transform: translateY(0);
    animation: formToastInMob .25s ease forwards;
  }
  @keyframes formToastInMob {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

.results-controls::-webkit-scrollbar { display: none; }

/* ─── ADVANCED FILTER BUTTON ─────────────────────────────────────────────────── */
.adv-filter-toggle-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #ffffff; border: 1.5px solid #e0f2fe;
  color: #374151; padding: 6px 14px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: 'DM Sans', sans-serif; white-space: nowrap;
  transition: all .2s;
}
.adv-filter-toggle-btn:hover { border-color: #38bdf8; color: #0284c7; }
.adv-filter-toggle-btn.has-filters { border-color: #38bdf8; background: #f0f9ff; color: #0284c7; }
.adv-filter-count {
  background: #38bdf8; color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ─── ADVANCED FILTER PANEL ──────────────────────────────────────────────────── */
.adv-overlay {
  position: fixed; inset: 0; z-index: 490;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.adv-overlay.open { opacity: 1; pointer-events: all; }

.adv-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 400px;
  z-index: 500; background: #ffffff;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
}
.adv-panel.open { transform: translateX(0); }

.adv-panel-inner { display: flex; flex-direction: column; height: 100%; }

.adv-panel-header {
  display: flex; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #e0f2fe;
  background: #f8fdff; flex-shrink: 0;
}
.adv-panel-title { font-size: 16px; font-weight: 700; color: #111; flex: 1; }
.adv-panel-clear {
  font-size: 12px; color: #0284c7; background: none; border: none;
  cursor: pointer; font-family: 'DM Sans', sans-serif; margin-right: 12px;
  font-weight: 600;
}
.adv-panel-close {
  background: none; border: 1px solid #e0f2fe; color: #555;
  width: 30px; height: 30px; border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.adv-panel-close:hover { background: #ff4d6d; border-color: #ff4d6d; color: #fff; }

.adv-panel-body {
  flex: 1; overflow-y: auto; padding: 16px 20px 24px;
  display: flex; flex-direction: column; gap: 0;
}

.adv-section {
  padding: 14px 0;
  border-bottom: 1px solid #f0f9ff;
}
.adv-section:last-child { border-bottom: none; }

.adv-label {
  font-size: 11px; font-weight: 700; color: #6b7280;
  text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 10px;
}

.adv-toggles {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.adv-toggle-chip input { display: none; }
.adv-toggle-chip span {
  display: inline-block; padding: 6px 14px;
  border: 1.5px solid #e0f2fe; border-radius: 20px;
  font-size: 13px; font-weight: 500; color: #374151;
  cursor: pointer; transition: all .15s; user-select: none;
  background: #fff;
}
.adv-toggle-chip input:checked + span {
  background: #38bdf8; border-color: #38bdf8; color: #fff; font-weight: 700;
}
.adv-toggle-chip span:hover { border-color: #38bdf8; color: #0284c7; }

.adv-checks { display: flex; flex-direction: column; gap: 8px; }
.adv-checks-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.adv-check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: #374151; cursor: pointer; user-select: none;
}
.adv-check-row input { accent-color: #38bdf8; width: 16px; height: 16px; cursor: pointer; }

/* Color swatches */
.adv-color-grid {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.adv-color-swatch input { display: none; }
.adv-color-swatch span {
  display: block; width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; border: 3px solid transparent;
  transition: border-color .15s, transform .15s;
}
.adv-color-swatch input:checked + span {
  border-color: #0284c7; transform: scale(1.15);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0284c7;
}
.adv-color-swatch span:hover { transform: scale(1.1); }

.adv-input {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid #e0f2fe; border-radius: 6px;
  font-size: 14px; color: #111; font-family: 'DM Sans', sans-serif;
  background: #f8fdff; outline: none; transition: border-color .2s;
}
.adv-input:focus { border-color: #38bdf8; background: #fff; }
.adv-input-short { width: 100px; }

.adv-range-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.adv-range-prefix, .adv-range-suffix { font-size: 14px; color: #6b7280; font-weight: 600; }
.adv-range-note { font-size: 12px; color: #38bdf8; font-weight: 600; }

.adv-apply-btn {
  width: 100%; background: #38bdf8; color: #fff; border: none;
  padding: 14px; border-radius: 8px; font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  margin-top: 8px; transition: background .2s;
}
.adv-apply-btn:hover { background: #0ea5e9; }

@media (max-width: 480px) {
  .adv-panel { max-width: 100%; }
  .adv-checks-grid { grid-template-columns: 1fr; }
}

/* ── HEADER FILTER BUTTON ── */
.header-filter-btn {
  background: transparent !important;
  border: 1px solid #e0f2fe !important;
  color: #0284c7 !important;
  padding: 6px 12px !important;
  height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px !important;
  font-size: 13px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}
.header-filter-btn .adv-filter-count {
  position: absolute; top: -6px; right: -6px;
  background: #0ea5e9; color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex !important; align-items: center; justify-content: center;
  padding: 0 3px;
}
.header-filter-btn.has-filters {
  background: #f0f9ff !important;
  border-color: #38bdf8 !important;
}

/* ── MINIMAL RESULTS BAR ── */
.results-mini-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 16px 4px;
  max-width: 1400px; margin: 0 auto; width: 100%;
}
.results-mini-bar .results-count {
  font-size: 12px; color: #9ca3af; font-weight: 400; margin: 0;
}
.results-mini-bar .saved-search-btn {
  font-size: 11px; padding: 4px 10px;
}

/* ─── TOUCH / MOBILE IMPROVEMENTS ──────────────────────────────────────────── */
/* Prevent text selection during swipe */
.card-img-wrap,
.gallery-main-wrap,
.img-slider {
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y; /* allow vertical scroll, intercept horizontal */
}
/* Smooth slider transition on touch */
.img-slider {
  will-change: transform;
}
/* Momentum scroll on panels */
.adv-panel-body,
.detail-modal,
.dealer-full-body {
  -webkit-overflow-scrolling: touch;
}
/* Larger tap targets on mobile for slide buttons */
@media (max-width: 768px) {
  .slide-btn {
    width: 36px; height: 36px;
    opacity: 0.85;
  }
  .gallery-slide-btn {
    width: 40px; height: 40px;
  }
  /* Show slide buttons on mobile (hidden on desktop until hover) */
  .slide-btn { opacity: 0.7; }
}
/* Swipe hint dots bigger on mobile */
@media (max-width: 600px) {
  .img-dot {
    width: 6px; height: 6px;
  }
  .img-dot.active { width: 16px; }
}

/* ─── PWA INSTALL BANNER ────────────────────────────────────────────────────── */
.pwa-banner {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: calc(100% - 32px); max-width: 420px;
  background: #ffffff;
  border: 1.5px solid #e0f2fe;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(14,165,233,0.18), 0 2px 8px rgba(0,0,0,0.08);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 9999;
  opacity: 0; transition: all .3s cubic-bezier(.4,0,.2,1);
}
.pwa-banner.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.pwa-banner-icon { flex-shrink: 0; }
.pwa-banner-text { flex: 1; min-width: 0; }
.pwa-banner-title {
  font-size: 14px; font-weight: 700; color: #111111;
  font-family: 'DM Sans', sans-serif;
}
.pwa-banner-sub {
  font-size: 12px; color: #6b7280;
  font-family: 'DM Sans', sans-serif; margin-top: 2px;
}
.pwa-banner-add {
  background: #0ea5e9; color: #ffffff;
  border: none; border-radius: 8px;
  padding: 8px 18px; font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  white-space: nowrap; flex-shrink: 0;
}
.pwa-banner-add:hover { background: #0284c7; }
.pwa-banner-close {
  background: none; border: none; color: #9ca3af;
  font-size: 16px; cursor: pointer; padding: 4px;
  flex-shrink: 0; line-height: 1;
}
