/* ═══════════════════════════════════════════════════════════
   GOLDEN CARS — Claude Bright Theme
   Warm cream · Claude orange · Dark warm text
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds — Claude warm cream */
  --bg:        #FAF9F6;
  --bg-2:      #F3F0EB;
  --surface:   #FFFFFF;
  --surface-2: #F7F5F1;

  /* Text — warm dark */
  --ink:   #1C1917;
  --ink-2: #44403C;
  --muted: #78716C;

  /* Borders */
  --line:        rgba(28,25,23,0.10);
  --glass-border: rgba(28,25,23,0.10);

  /* Claude warm orange — primary accent */
  --accent:      #D97040;
  --accent-h:    #C05A28;
  --accent-glow: rgba(217,112,64,0.18);
  --accent-soft: rgba(217,112,64,0.09);
  --accent-ink:  #fff;

  /* Secondary palette */
  --violet:      #7C5AF0;
  --violet-soft: rgba(124,90,240,0.08);
  --gold:        #D4A030;
  --gold-soft:   rgba(212,160,48,0.10);

  /* Status */
  --ok:          #16A34A;
  --ok-soft:     rgba(22,163,74,0.09);
  --danger:      #DC2626;
  --danger-soft: rgba(220,38,38,0.08);
  --warn-soft:   rgba(202,138,4,0.10);

  /* Shape */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 7px;

  /* Shadows — warm, not cold */
  --shadow:    0 1px 3px rgba(28,25,23,0.06), 0 4px 16px rgba(28,25,23,0.07);
  --shadow-lg: 0 4px 8px rgba(28,25,23,0.08), 0 16px 40px rgba(28,25,23,0.10);
  --glow:      0 0 24px rgba(217,112,64,0.22);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(28,25,23,0.045) 1px, transparent 0);
  background-size: 36px 36px;
  color: var(--ink);
  font: 16px/1.6 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.025em; font-weight: 700; color: var(--ink); }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── Site Header ────────────────────────────────────────── */
.site-header {
  background: rgba(250,249,246,0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 66px; flex-wrap: wrap; }

.brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.03em;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-logo {
  display: block;
  flex: none;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(217,112,64,0.35), 0 1px 2px rgba(0,0,0,.08);
  transition: transform .15s;
}
.brand:hover .brand-logo { transform: scale(1.06); }
.brand .name {
  background: linear-gradient(130deg, #C05828 0%, var(--accent) 55%, #E8903A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
  -webkit-text-fill-color: var(--muted);
  font-size: .85em;
}

.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a {
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: all .15s;
}
.nav a:hover { background: var(--bg-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.userbox { display: flex; align-items: center; gap: 12px; font-size: .85rem; color: var(--muted); }
.site-footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
main { padding: 32px 0 12px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  transition: all .15s;
}
.btn:hover { border-color: rgba(28,25,23,0.2); background: var(--bg-2); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #B84D20);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(217,112,64,0.28);
}
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 4px 18px rgba(217,112,64,0.36); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 12px; font-size: .82rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; }

/* ── Forms ───────────────────────────────────────────────── */
label {
  display: block;
  font-weight: 600;
  font-size: .78rem;
  margin-bottom: 6px;
  color: var(--muted);
  letter-spacing: .06em;
  text-transform: uppercase;
}
input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=search],
select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #B4AFA9; }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,112,64,0.14);
  outline: none;
}
.field { margin-bottom: 16px; }
.field .hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.field .err { color: var(--danger); font-size: .85rem; margin-top: 4px; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }
.grid { display: grid; gap: 0 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.req::after { content: " *"; color: var(--danger); }

/* ── Panel ───────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.panel > h2 { margin-bottom: 16px; }
.banner {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background: var(--warn-soft);
  border: 1px solid rgba(202,138,4,0.2);
  color: #92400E;
}
.banner.error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(220,38,38,0.2);
}

/* ── Status pills ────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--bg-2);
  color: var(--muted);
}
.pill.published { background: var(--ok-soft); color: var(--ok); }
.pill.draft { background: var(--warn-soft); color: #B45309; }
.pill.unpublished { background: var(--bg-2); color: var(--muted); }
.pill.sold { background: var(--violet-soft); color: var(--violet); }
.pill.ready { background: var(--ok-soft); color: var(--ok); }
.pill.processing { background: var(--warn-soft); color: #B45309; }
.pill.failed { background: var(--danger-soft); color: var(--danger); }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--bg-2);
  white-space: nowrap;
  font-weight: 600;
}
tr:last-child td { border-bottom: 0; }
td.thumb img { width: 76px; height: 54px; object-fit: cover; border-radius: 8px; }
td.thumb .nophoto { width: 76px; height: 54px; border-radius: 8px; background: var(--bg-2); display: grid; place-items: center; font-size: .7rem; color: var(--muted); }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { margin-left: 4px; }
.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .field { margin: 0; }
.toolbar .grow { flex: 1; min-width: 200px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 20px 0; color: var(--muted); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Upload / Photos ─────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  background: var(--bg-2);
  color: var(--muted);
  transition: all .15s;
}
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: grab; }
.tile.dragging { opacity: .4; }
.tile.drop-target { outline: 2px solid var(--accent); }
.tile .img { aspect-ratio: 4 / 3; background: var(--bg-2); display: grid; place-items: center; color: var(--muted); font-size: .8rem; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .badges { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }
.tile .body { padding: 6px 8px 8px; font-size: .8rem; display: flex; flex-direction: column; gap: 6px; }
.tile .body .row { display: flex; justify-content: space-between; gap: 4px; }
.tile .error { color: var(--danger); font-size: .78rem; }
.progress { height: 4px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); width: 0; transition: width .15s; }
.upload-errors { margin-top: 10px; }
.upload-errors div { color: var(--danger); font-size: .88rem; }

/* ── Save bar ────────────────────────────────────────────── */
.savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: rgba(250,249,246,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding: 14px 0;
  margin-top: 24px;
}
.savebar .wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.savebar .state { flex: 1; color: var(--muted); font-size: .9rem; }
.status-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Dialog ──────────────────────────────────────────────── */
dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--ink);
}
dialog::backdrop { background: rgba(28,25,23,0.40); backdrop-filter: blur(6px); }
dialog .dlg-body { padding: 24px 26px; }
dialog .dlg-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 26px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.preview { display: flex; gap: 14px; margin-bottom: 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.preview img, .preview .nophoto { width: 120px; height: 86px; object-fit: cover; border-radius: 8px; background: var(--bg-2); flex: none; }
.checklist { list-style: none; padding: 0; margin: 0; max-height: 280px; overflow: auto; }
.checklist li { display: flex; gap: 10px; padding: 6px 0; align-items: baseline; }
.checklist .mark { width: 1.3em; font-weight: 700; flex: none; }
.checklist .pass .mark { color: var(--ok); }
.checklist .fail .mark { color: var(--danger); }
.checklist .fail { color: var(--danger); }

/* ── Toast ───────────────────────────────────────────────── */
#toasts { position: fixed; right: 20px; bottom: 90px; display: flex; flex-direction: column; gap: 8px; z-index: 50; max-width: min(420px, calc(100vw - 40px)); }
.toast {
  background: var(--ink);
  border: none;
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: .9rem;
}
.toast.error { background: var(--danger); }
.toast a { color: #FCA967; }

/* ── Login ───────────────────────────────────────────────── */
.login-card { max-width: 420px; margin: 80px auto; }

/* ════════════════════════════════════════════════════════════
   PUBLIC PAGES
   ════════════════════════════════════════════════════════════ */

/* ── Page hero strip ─────────────────────────────────────── */
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.page-hero-text h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.04em;
  margin-bottom: .2em;
  background: linear-gradient(130deg, #B84D20 0%, var(--accent) 50%, #E8973A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero-text p { color: var(--muted); font-size: .95rem; margin: 0; }
.hero-stats { display: flex; gap: 24px; flex-wrap: wrap; }
.hero-stat { text-align: right; }
.hero-stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, var(--accent), #C47F28);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ── Listing two-column layout ───────────────────────────── */
.listing-layout {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 28px;
  align-items: start;
}

/* ── Left sidebar ────────────────────────────────────────── */
.filters-sidebar {
  position: sticky;
  top: 82px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

/* Mobile toggle: hidden on desktop */
.filter-cb { display: none; }
.filter-mob-toggle { display: none; }

/* ── Filter panel ────────────────────────────────────────── */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.filter-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--accent) 45%, var(--gold) 100%);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 0;
}
.filter-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.filter-title svg { color: var(--accent); }

.filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all .15s;
}
.filter-reset:hover {
  color: var(--danger);
  border-color: rgba(220,38,38,0.25);
  background: var(--danger-soft);
}

/* Vertical filter form inside sidebar */
.filters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 16px 18px;
}
.filters .field { margin: 0; }

/* Fuel pills ----------------------------------------------- */
.fuel-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.fuel-pill-item { display: inline-flex; position: relative; }
.fuel-pill-item input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  margin: 0; cursor: pointer; z-index: 1;
}
.fuel-pill-item span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  line-height: 1.2;
  user-select: none;
  white-space: nowrap;
  pointer-events: none;
}
.fuel-pill-item input[type=radio]:checked + span {
  background: var(--accent-soft);
  border-color: rgba(217,112,64,0.4);
  color: var(--accent);
}
.fuel-pill-item:hover span {
  background: var(--bg-2);
  color: var(--ink-2);
  border-color: rgba(28,25,23,0.18);
}
.fuel-pill-item input[value=Petrol]:checked + span,
.fuel-pill-item input[value=petrol]:checked + span {
  background: rgba(212,160,48,0.1);
  border-color: rgba(212,160,48,0.4);
  color: #7A5608;
}
.fuel-pill-item input[value=Diesel]:checked + span,
.fuel-pill-item input[value=diesel]:checked + span {
  background: var(--violet-soft);
  border-color: rgba(124,90,240,0.4);
  color: var(--violet);
}
.fuel-pill-item input[value=Electric]:checked + span,
.fuel-pill-item input[value=electric]:checked + span {
  background: var(--ok-soft);
  border-color: rgba(22,163,74,0.35);
  color: var(--ok);
}
.fuel-pill-item input[value=CNG]:checked + span,
.fuel-pill-item input[value=cng]:checked + span {
  background: rgba(6,182,212,0.08);
  border-color: rgba(6,182,212,0.35);
  color: #0E7490;
}

/* Price range ---------------------------------------------- */
.price-range-row { display: flex; align-items: center; gap: 8px; }
.price-range-row input { flex: 1; min-width: 0; }
.price-sep { color: var(--muted); font-size: .9rem; flex: none; font-weight: 600; }

/* ── Right listings panel ────────────────────────────────── */
.listings-main { min-width: 0; }

/* ── Mobile: toggle + collapse ──────────────────────────── */
@media (max-width: 768px) {
  .listing-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .filters-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 16px;
  }

  /* Show the mobile toggle button */
  .filter-mob-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 700;
    font-size: .95rem;
    color: var(--ink);
    box-shadow: var(--shadow);
    user-select: none;
    transition: background .15s;
  }
  .filter-mob-toggle:hover { background: var(--bg-2); }
  .fmt-left { display: flex; align-items: center; gap: 8px; }
  .active-badge { color: var(--accent); font-size: .7rem; }

  /* Chevron rotates when open */
  .fmt-chevron { transition: transform .2s; flex: none; color: var(--muted); }
  .filter-cb:checked ~ .filter-mob-toggle .fmt-chevron { transform: rotate(180deg); }

  /* Panel hidden by default, shown when checkbox checked */
  .filter-panel { display: none; border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
  .filter-cb:checked ~ .filter-panel { display: block; }

  /* When open, connect toggle to panel visually */
  .filter-cb:checked ~ .filter-mob-toggle {
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom-color: transparent;
    box-shadow: var(--shadow) !important;
  }
}

/* ── Results count ───────────────────────────────────────── */
.results-meta {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.results-meta strong { color: var(--ink-2); }

/* ── Cards ───────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.card-wrap { display: flex; flex-direction: column; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(217,112,64,0.18), 0 2px 8px rgba(28,25,23,0.08);
  border-color: rgba(217,112,64,0.3);
}
.card .photo {
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}
.card .photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card:hover .photo img { transform: scale(1.05); }
.card .photo::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(28,25,23,0.30), transparent);
  pointer-events: none;
}
.card .info { padding: 14px 16px 18px; }
.card .title { font-weight: 700; margin-bottom: 8px; font-size: .95rem; line-height: 1.3; color: var(--ink); }
.card .price { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; color: var(--accent); }
.card .specs {
  color: var(--muted);
  font-size: .8rem;
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.card .specs .dot { opacity: .4; }

/* ── WhatsApp ────────────────────────────────────────────── */
.wa-card {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: #F0FDF4;
  color: #15803D;
  border: 1px solid rgba(21,128,61,0.18);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 9px 14px;
  font-size: .82rem; font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.wa-card:hover { background: #DCFCE7; color: #15803D; }
.wa-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: #fff; border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px; font-size: .95rem; font-weight: 600;
  text-decoration: none; margin-top: 14px; width: 100%; justify-content: center;
  box-sizing: border-box; transition: filter .15s;
  box-shadow: 0 2px 12px rgba(34,197,94,0.25);
}
.wa-btn:hover { filter: brightness(1.08); color: #fff; }

/* ── Price / Tags ────────────────────────────────────────── */
.price-tag {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--accent);
  line-height: 1.1;
}
.tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(217,112,64,0.25);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: .7rem;
  font-weight: 700;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Car detail ──────────────────────────────────────────── */
.detail { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }

.gallery .main {
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  border-radius: var(--radius);
  overflow: hidden; cursor: zoom-in;
  border: 0; padding: 0; width: 100%; display: block;
  box-shadow: var(--shadow);
}
.gallery .main img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery .main:hover img { transform: scale(1.02); }
.gallery .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.gallery .thumbs button {
  border: 2px solid transparent;
  padding: 0; border-radius: var(--radius-xs);
  overflow: hidden; cursor: pointer; background: none;
  aspect-ratio: 4 / 3; transition: border-color .15s;
}
.gallery .thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery .thumbs button:hover { border-color: rgba(217,112,64,0.45); }
.gallery .thumbs img { width: 100%; height: 100%; object-fit: cover; }

.car-info-panel { position: sticky; top: 86px; }
.car-title-area h1 { font-size: 1.5rem; margin-bottom: 10px; }

.specs-table { width: 100%; margin-top: 16px; }
.specs-table th {
  background: none; text-transform: none; letter-spacing: 0;
  font-size: .88rem; color: var(--muted); width: 44%;
  font-weight: 400; padding: 9px 0;
}
.specs-table td { font-weight: 600; padding: 9px 0; font-size: .95rem; }
.specs-table tr { border-bottom: 1px solid var(--line); }
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: 0; }

.contact-box {
  background: linear-gradient(135deg, rgba(217,112,64,0.07), rgba(212,160,48,0.05));
  border: 1.5px solid rgba(217,112,64,0.2);
  border-radius: var(--radius);
  padding: 18px 20px; margin-top: 20px;
}
.contact-box strong { color: var(--ink); font-size: 1rem; }
.contact-box p { margin: .4em 0 0; color: var(--ink-2); font-size: .92rem; }
.contact-box a { color: var(--accent); text-decoration: none; font-weight: 600; }
.contact-box a:hover { color: var(--accent-h); }

.breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: 22px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .4; }

.about-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px; margin-top: 28px;
  box-shadow: var(--shadow);
}
.about-section h2 { color: var(--ink); margin-bottom: 14px; }

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; background: rgba(28,25,23,0.92); display: none; align-items: center; justify-content: center; z-index: 100; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.lightbox button {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff; width: 48px; height: 48px;
  border-radius: 50%; font-size: 22px; cursor: pointer;
  transition: background .15s;
}
.lightbox button:hover { background: rgba(255,255,255,0.22); }
.lightbox .close { top: 20px; right: 20px; }
.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 36px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink-2);
  font-weight: 500; font-size: .9rem;
  transition: all .15s;
}
.pagination a:hover { background: var(--bg-2); border-color: rgba(28,25,23,0.2); color: var(--ink); }
.pagination .current {
  background: linear-gradient(135deg, var(--accent), #B84D20);
  border-color: transparent; color: #fff; font-weight: 700;
  box-shadow: 0 2px 10px rgba(217,112,64,0.3);
}

/* ── Visit Us section ────────────────────────────────────── */
.visit-section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.visit-header { text-align: center; margin-bottom: 36px; }
.visit-header h2 {
  font-size: 1.6rem;
  background: linear-gradient(130deg, #C05828 0%, var(--accent) 55%, #E8903A 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  display: inline-block;
  margin-bottom: 8px;
}
.visit-sub { color: var(--muted); margin: 0; font-size: .95rem; }

.visit-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: stretch;
}
.visit-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.visit-map iframe { display: block; height: 100%; min-height: 360px; }

.visit-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.visit-details::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--violet) 0%, var(--accent) 45%, var(--gold) 100%);
}

.visit-info-block {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.visit-info-icon {
  width: 36px; height: 36px;
  background: var(--accent-soft);
  border: 1px solid rgba(217,112,64,0.2);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  flex: none;
  color: var(--accent);
}
.visit-info-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 3px;
}
.visit-info-value {
  font-size: .95rem;
  color: var(--ink-2);
  line-height: 1.5;
  font-weight: 500;
}
.visit-info-value a { color: var(--accent); text-decoration: none; font-weight: 600; }
.visit-info-value a:hover { color: var(--accent-h); }

.visit-directions-btn { margin-top: auto; width: 100%; justify-content: center; }

@media (max-width: 900px) {
  .visit-grid { grid-template-columns: 1fr; }
  .visit-map { min-height: 280px; }
  .visit-map iframe { min-height: 280px; }
  .visit-details { order: -1; }
}

/* ── Improved footer ─────────────────────────────────────── */
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.footer-brand .brand { font-size: 1rem; }
.footer-tagline { color: var(--muted); font-size: .82rem; margin: 4px 0 0; }
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--muted);
}
.footer-contact-row svg { flex: none; color: var(--accent); opacity: .75; }
.footer-contact-row a { color: var(--muted); text-decoration: none; }
.footer-contact-row a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
}

/* ── Misc ────────────────────────────────────────────────── */
.audit-json { font: 12px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; margin: 6px 0 0; color: var(--muted); }

@media (max-width: 768px) {
  .hero-stat { text-align: left; }
  .page-hero { padding: 24px 0 20px; }
}

@media (max-width: 560px) {
  .site-header .phone { display: none; }
  .site-header .wrap { min-height: 58px; }
  main { padding: 16px 0 8px; }
  h1 { font-size: 1.5rem; }
  .wrap { padding: 0 16px; }
  .car-info-panel { position: static; }
  .cards { grid-template-columns: 1fr; }
}
