/* ==========================================================================
   VORIMO — premium automotive theme
   Dark, refined, with tasteful subtle depth. Flat, simple controls.
   Mobile-first. System font stack only. No external assets.
   ========================================================================== */

:root {
  --bg: #0a1120;
  --bg-deep: #060b15;
  --panel: #0f1a2e;
  --panel-2: #132238;
  --panel-3: #18293f;
  --line: rgba(148, 163, 184, 0.16);
  --line-soft: rgba(148, 163, 184, 0.09);
  --text: #f1f5f9;
  --muted: #9aa8bd;
  --muted-2: #64748b;
  --accent: #f5a623;
  --accent-soft: #ffc25e;
  --accent-deep: #b97a12;
  --accent-ink: #231600;
  --green: #3ddc84;
  --red: #ff7b7b;
  --blue: #5aa9ff;
  --radius: 16px;
  --radius-sm: 10px;
  /* subtle layered depth */
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 12px 32px rgba(2, 6, 16, 0.5);
  --shadow-lift: 0 2px 0 rgba(255, 255, 255, 0.05) inset, 0 20px 48px rgba(2, 6, 16, 0.6);
  --shadow-pop: 0 24px 64px rgba(2, 6, 16, 0.65);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 50% -120px, rgba(245, 166, 35, 0.08), transparent 62%),
    radial-gradient(900px 620px at 108% 12%, rgba(90, 169, 255, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  min-height: 100vh;
  font-size: 16px;
}

h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 0.55em; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 0.85em; }
a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: rgba(245, 166, 35, 0.35); }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 18px;
}

.section { padding: 40px 0; }
.section-title { font-size: 1.35rem; margin: 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.link-more { font-weight: 600; white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 8px; font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------------- Buttons: flat, simple, obvious ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 22px;
  border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn-ghost {
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--line); color: var(--text);
}
.btn-ghost:hover { background: rgba(148, 163, 184, 0.16); border-color: rgba(148,163,184,.3); }
.btn-danger { background: rgba(255, 107, 107, 0.12); border-color: rgba(255,107,107,.4); color: #ffb4b4; }
.btn-danger:hover { background: rgba(255, 107, 107, 0.2); }
.btn-lg { min-height: 56px; padding: 16px 32px; font-size: 1.1rem; border-radius: 14px; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 0.88rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row .btn { flex: 1 1 0; }
.link-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.9rem; padding: 8px 4px; text-decoration: underline;
  text-underline-offset: 3px; min-height: 40px;
}
.link-btn:hover { color: var(--red); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; color: var(--text);
  border: 1px solid transparent;
}
.icon-btn:hover { background: rgba(148,163,184,.1); text-decoration: none; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 16px; min-width: 0; }
.field label, .field > .label-like {
  display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 7px; color: var(--text);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="search"],
.field input[type="tel"],
.field select,
.field textarea,
.sort-form select {
  width: 100%; min-height: 48px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: 12px; color: var(--text);
  padding: 12px 14px; font-size: 1rem; font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus,
.sort-form select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.22);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row .field { margin-bottom: 16px; }
.fieldset-legend, fieldset { border: none; padding: 0; margin: 0 0 26px; min-width: 0; }
fieldset legend {
  font-size: 1.12rem; font-weight: 700; margin-bottom: 14px; padding: 0; color: var(--text);
}
.form-grid { display: grid; gap: 0 14px; }
.form-stack .field { margin-bottom: 14px; }
.form-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.inline-form { display: inline; }
.label-spacer { display: block; height: 1.6em; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 14, 26, 0.88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; gap: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-word { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-word em { font-style: normal; color: var(--accent); }
.logo-glyph { flex-shrink: 0; }

.site-nav { display: none; }
.site-nav .nav-link {
  color: var(--muted); font-weight: 600; padding: 10px 12px; border-radius: 10px;
  white-space: nowrap;
}
.site-nav .nav-link:hover { color: var(--text); background: rgba(148,163,184,.1); text-decoration: none; }
.nav-dropdown { position: relative; }
.nav-dropdown summary { list-style: none; cursor: pointer; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow-pop); z-index: 120;
}
.dropdown-menu a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); font-weight: 500;
}
.dropdown-menu a:hover { background: rgba(148,163,184,.12); text-decoration: none; }
.dropdown-right { left: auto; right: 0; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; }
.site-header.nav-open .site-nav {
  display: flex; flex-direction: column; align-items: stretch;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--panel); border-bottom: 1px solid var(--line);
  padding: 10px 18px 16px; gap: 2px;
}
.site-header.nav-open .nav-dropdown .dropdown-menu { position: static; box-shadow: none; margin-top: 4px; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(148,163,184,.08);
}
.avatar-dot {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800;
}
.user-name { font-weight: 600; font-size: 0.92rem; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* small screens: keep the header compact — avatar only, no search shortcut */
@media (max-width: 719px) {
  .header-actions .icon-btn { display: none; }
  .user-name { display: none; }
  .user-chip { padding: 6px; }
}
@media (max-width: 479px) {
  /* "Sign in" hides on very small screens; the Join page links to sign-in */
  .header-actions .btn-ghost { display: none; }
  .brand-word { font-size: 1.15rem; }
}
.signout-form { padding: 4px; }
.menu-signout {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 10px 12px; border-radius: 8px; color: var(--red); font-size: 0.95rem; font-weight: 600;
}
.menu-signout:hover { background: rgba(255,107,107,.1); }

/* ---------------- Hero: premium automotive, subtle depth ---------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line-soft);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(720px 340px at 50% -40px, rgba(245, 166, 35, 0.16), transparent 65%),
    radial-gradient(560px 300px at 88% 30%, rgba(90, 169, 255, 0.1), transparent 60%),
    radial-gradient(500px 260px at 8% 70%, rgba(245, 166, 35, 0.05), transparent 60%);
  animation: heroGlow 14s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { opacity: 0.75; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-14px); }
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 120px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(6, 11, 21, 0.55));
}
.hero-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; padding: 0 18px; text-align: center; }
.hero-eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-soft);
  border: 1px solid rgba(245, 166, 35, 0.4); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 18px;
  background: rgba(245, 166, 35, 0.07);
}
.hero h1 {
  font-size: 2.15rem; font-weight: 800; letter-spacing: -0.025em;
  margin: 0 0 14px; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  color: var(--muted); font-size: 1.06rem; max-width: 620px; margin: 0 auto 26px;
  text-wrap: balance;
}
.hero-cta { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.hero-cta .btn { width: 100%; }

/* quick search card: layered, subtle 3D */
.quick-search {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 40%),
    var(--panel);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-card);
  padding: 18px; text-align: left;
}
.quick-search h2 { font-size: 1.02rem; margin: 0 0 4px; }
.quick-search .qs-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 14px; }
.qs-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.qs-grid .field { margin-bottom: 0; }
.qs-grid .field label { font-size: 0.82rem; }
.qs-actions { margin-top: 14px; }
.qs-actions .btn { width: 100%; }

/* ---------------- Category tiles ---------------- */
.category-tiles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.category-tile {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.category-tile:hover { text-decoration: none; border-color: rgba(245,166,35,.45); }
.tile-icon { font-size: 1.5rem; line-height: 1; }
.tile-name { font-weight: 700; }

/* ---------------- Listing cards: layered, scannable ---------------- */
.cards-grid {
  display: grid; grid-template-columns: 1fr; gap: 18px;
}
.listing-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,0) 32%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  display: flex; flex-direction: column;
}
.listing-card.is-featured { border-color: rgba(245, 166, 35, 0.5); }
.ribbon {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  background: var(--accent); color: var(--accent-ink);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.35);
}
.card-photo {
  display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-deep);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.photo-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--panel-2), var(--bg-deep));
}
.photo-placeholder svg { width: 46%; opacity: 0.8; }
.card-body { padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-price { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.fav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(148,163,184,.08); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 8px 12px; min-height: 40px;
  cursor: pointer; font-size: 0.85rem; font-weight: 700;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.fav-btn svg { width: 18px; height: 18px; }
.fav-btn.active { color: var(--red); border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.1); }
.card-title { font-size: 1.06rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-title:hover { color: var(--accent-soft); }
.card-meta { color: var(--muted); font-size: 0.92rem; margin: 0; }
.card-specs { color: var(--muted); font-size: 0.88rem; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.card-loc { color: var(--muted); font-size: 0.88rem; margin: 0; display: flex; align-items: center; gap: 6px; }
.card-loc::before { content: "📍"; font-size: 0.85em; }
.dot-sep { margin: 0 6px; color: var(--muted-2); }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: 4px;
}
.card-views { color: var(--muted-2); font-size: 0.82rem; }
.compare-check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); cursor: pointer; min-height: 40px; }
.compare-check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 28px 0 8px; }
.page-link {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-weight: 600; padding: 8px 14px;
}
.page-link:hover { text-decoration: none; border-color: var(--accent); }
.page-link.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.page-link.is-disabled { opacity: 0.4; pointer-events: none; }
.page-ellipsis { align-self: center; color: var(--muted-2); }

/* ---------------- Search ---------------- */
.search-layout { padding-top: 24px; padding-bottom: 40px; }
.filters-panel { margin-bottom: 20px; }
.filters-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  color: var(--text); font-weight: 700; padding: 14px 16px; cursor: pointer; font-size: 1rem;
}
.filters-form {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-card); margin-top: 12px;
}
.filters-form h2 { font-size: 1.1rem; margin-bottom: 14px; }
.filters-form .field { margin-bottom: 13px; }
.filters-form .field label { font-size: 0.85rem; }
.more-filters { border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 6px; }
.more-filters summary {
  cursor: pointer; font-weight: 700; color: var(--accent-soft); padding: 12px 2px; list-style: none;
  display: flex; align-items: center; gap: 8px; min-height: 44px;
}
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary::before { content: "+"; font-size: 1.2rem; color: var(--accent); }
.more-filters[open] summary::before { content: "–"; }
.more-filters .mf-body { padding-top: 6px; }
.filter-actions { display: flex; gap: 10px; margin-top: 16px; }
.filter-actions .btn { flex: 1; }

.results-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.results-head h1 { font-size: 1.4rem; margin: 0; }
.results-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; align-items: center; }
.sort-form select { min-height: 44px; width: auto; }
.save-search-form { display: flex; gap: 8px; }
.save-search-form input[type="text"] {
  min-height: 44px; background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: 10px; color: var(--text); padding: 8px 12px; font-size: 0.9rem; width: 150px;
}

/* ---------------- Detail page ---------------- */
.detail-layout { padding-top: 20px; padding-bottom: 48px; display: grid; gap: 26px; }
.breadcrumbs { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); }
.gallery {
  border-radius: 20px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.gallery-main { aspect-ratio: 4 / 3; background: var(--bg-deep); position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumb-strip {
  display: flex; gap: 10px; padding: 12px; overflow-x: auto;
  background: rgba(6, 11, 21, 0.6); border-top: 1px solid var(--line-soft);
}
.thumb {
  flex: 0 0 84px; width: 84px; height: 64px; border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--bg-deep);
  transition: border-color 0.15s, transform 0.15s;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-active { border-color: var(--accent); }

.detail-section { margin-top: 28px; }
.detail-section h2 { font-size: 1.2rem; margin-bottom: 14px; }
.spec-grid { display: grid; grid-template-columns: 1fr; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft); align-items: baseline;
}
.spec-row:last-child { border-bottom: none; }
.spec-row dt { color: var(--muted); font-size: 0.88rem; font-weight: 600; }
.spec-row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.description-text { white-space: pre-wrap; color: var(--text); line-height: 1.65; }

.detail-side { display: flex; flex-direction: column; gap: 16px; }
.side-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 36%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-card);
}
.side-price { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.side-title { font-size: 1.2rem; margin: 0 0 8px; }
.side-meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 6px; }
.side-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.side-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.side-compare { margin-top: 2px; }
.seller-name { font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; }
.safety-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.88rem; margin-top: 10px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* sticky mobile action bar */
.mobile-actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(8, 14, 26, 0.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.mobile-actionbar .btn { flex: 1; }
body.has-actionbar { padding-bottom: 86px; }

/* ---------------- Badges, alerts, empty states ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-gray { background: rgba(148,163,184,.12); color: var(--muted); border-color: var(--line); }
.badge-green { background: rgba(61,220,132,.12); color: var(--green); border-color: rgba(61,220,132,.35); }
.badge-amber { background: rgba(245,166,35,.14); color: var(--accent-soft); border-color: rgba(245,166,35,.4); }
.badge-red { background: rgba(255,107,107,.12); color: var(--red); border-color: rgba(255,107,107,.4); }
.badge-blue { background: rgba(90,169,255,.12); color: var(--blue); border-color: rgba(90,169,255,.4); }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  border-radius: 12px; padding: 14px 16px; margin-bottom: 18px;
  border: 1px solid; font-size: 0.95rem;
}
.alert-icon { font-size: 1.15rem; line-height: 1.4; }
.alert-error { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.35); }
.alert-success { background: rgba(61,220,132,.08); border-color: rgba(61,220,132,.35); }
.alert-info { background: rgba(90,169,255,.08); border-color: rgba(90,169,255,.35); }
.alert-warning { background: rgba(245,166,35,.08); border-color: rgba(245,166,35,.35); }
.alert-body p:last-child { margin-bottom: 0; }

.empty-state {
  text-align: center; padding: 48px 24px;
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-glyph { width: 72px; margin: 0 auto 16px; opacity: 0.9; }
.empty-state h2 { font-size: 1.25rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 440px; margin: 0 auto 20px; }
.empty-state .btn { margin-top: 4px; }

/* ---------------- Trust strip ---------------- */
.trust-strip { border-top: 1px solid var(--line-soft); background: rgba(6,11,21,.4); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.trust-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-card);
}
.trust-card h3 { font-size: 1.02rem; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.trust-card h3::before { content: "✓"; color: var(--accent); font-weight: 800; }
.trust-card p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(245,166,35,.14); color: var(--accent-soft); font-weight: 800; margin-bottom: 10px;
}

/* ---------------- Dashboards ---------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 26px 0 20px; }
.page-head h1 { margin: 0; font-size: 1.6rem; }
.page-head .btn { margin-left: auto; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 2px;
}
.stat-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.dash-section { margin-bottom: 34px; }
.dash-section h2 { font-size: 1.2rem; margin-bottom: 14px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
.dash-table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dash-table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.dash-table tr:last-child td { border-bottom: none; }
.row-vehicle { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; min-width: 200px; }
.row-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.row-thumb-empty { background: var(--panel-3); display: inline-block; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-preview-list, .conv-list, .saved-search-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg-preview-list li a, .conv-list li a, .saved-search-list li a {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 14px 16px; color: var(--text);
}
.msg-preview-list li a:hover, .conv-list li a:hover { text-decoration: none; border-color: rgba(245,166,35,.4); }
.msg-subject { color: var(--muted); font-size: 0.88rem; }
.msg-snippet { color: var(--muted); font-size: 0.9rem; margin: 4px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-list time, .msg-preview-list time { color: var(--muted-2); font-size: 0.8rem; }
.conv-peer { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: inline-block; }
.conv-list li.is-active a { border-color: var(--accent); }
.saved-search-list li a { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }

/* mobile: dashboard tables become cards */
@media (max-width: 719px) {
  .dash-table.mobile-cards, .dash-table.mobile-cards thead,
  .dash-table.mobile-cards tbody, .dash-table.mobile-cards tr,
  .dash-table.mobile-cards td { display: block; width: 100%; }
  .dash-table.mobile-cards thead { display: none; }
  .dash-table.mobile-cards { min-width: 0; background: none; border: none; }
  .dash-table.mobile-cards tbody { display: flex; flex-direction: column; gap: 12px; }
  .dash-table.mobile-cards tr {
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    padding: 6px 4px; box-shadow: var(--shadow-card);
  }
  .dash-table.mobile-cards td { border: none; padding: 8px 14px; }
  .dash-table.mobile-cards td[data-label]::before {
    content: attr(data-label); display: block;
    color: var(--muted-2); font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.06em; font-weight: 700; margin-bottom: 2px;
  }
  .dash-table.mobile-cards td.cell-main { padding-top: 12px; }
  .dash-table.mobile-cards td.cell-main::before { display: none; }
}

/* ---------------- Messages ---------------- */
.chat-layout { display: grid; gap: 18px; padding-top: 22px; padding-bottom: 40px; }
.conv-list-pane h1 { font-size: 1.4rem; margin-bottom: 14px; }
.thread-pane {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; min-height: 420px;
  overflow: hidden;
}
.thread-head { padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.thread-head h2 { font-size: 1.1rem; margin: 0 0 2px; }
.thread-head .msg-subject { margin: 0; }
.thread-messages { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 52vh; }
.msg { max-width: 85%; }
.msg-body {
  background: var(--panel-3); border: 1px solid var(--line-soft);
  border-radius: 16px 16px 16px 4px; padding: 10px 14px; margin: 0; overflow-wrap: anywhere;
}
.msg.is-mine { align-self: flex-end; }
.msg.is-mine .msg-body { background: rgba(245,166,35,.16); border-color: rgba(245,166,35,.35); border-radius: 16px 16px 4px 16px; }
.msg-time { color: var(--muted-2); font-size: 0.75rem; margin-top: 4px; display: block; }
.thread-send { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line-soft); }
.thread-send input[type="text"] {
  flex: 1; min-height: 48px; background: var(--bg-deep); border: 1px solid var(--line);
  border-radius: 12px; color: var(--text); padding: 10px 14px; font-size: 1rem;
}
.thread-send input:focus { outline: none; border-color: var(--accent); }
.safety-note {
  margin: 0; padding: 12px 18px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 0.83rem; background: rgba(245,166,35,.05);
}
.safety-note a { font-weight: 600; }
.thread-empty { padding: 30px 18px; }

/* ---------------- Sell wizard ---------------- */
.wizard-progress { margin: 6px 0 24px; }
.wizard-steps { list-style: none; display: flex; margin: 0 0 10px; padding: 0; }
.wizard-steps li { flex: 1; text-align: center; position: relative; font-size: 0.75rem; color: var(--muted-2); font-weight: 600; }
.wizard-steps li::before {
  content: ""; display: block; width: 100%; height: 4px; border-radius: 2px;
  background: var(--panel-3); margin-bottom: 8px;
}
.wizard-steps li.is-done::before { background: var(--green); }
.wizard-steps li.is-done { color: var(--green); }
.wizard-steps li.is-current::before { background: var(--accent); }
.wizard-steps li.is-current { color: var(--accent-soft); }
.wizard-step { display: block; }
.wizard-active .wizard-step { display: none; }
.wizard-active .wizard-step.is-current { display: block; animation: stepIn 0.25s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wizard-nav { display: flex; gap: 10px; margin-top: 22px; }
.wizard-nav .btn { flex: 1; }
/* no-JS: all steps visible, submit shown. JS adds .wizard-active to step through. */
.wizard-nav [data-wizard-next],
.wizard-nav [data-wizard-back] { display: none; }
.wizard-active .wizard-nav [data-wizard-next],
.wizard-active .wizard-nav [data-wizard-back] { display: inline-flex; }
.wizard-active .wizard-nav [data-wizard-submit] { display: none; }
.wizard-active .wizard-nav.on-last [data-wizard-submit] { display: inline-flex; }
.wizard-active .wizard-nav.on-last [data-wizard-next] { display: none; }
.wizard-active .wizard-nav.on-first [data-wizard-back] { visibility: hidden; }
.review-summary {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 18px; margin-bottom: 18px; box-shadow: var(--shadow-card);
}
.review-summary .spec-row { padding: 10px 0; }
.fresh-banner {
  background: linear-gradient(180deg, rgba(61,220,132,.1), rgba(61,220,132,.03));
  border: 1px solid rgba(61,220,132,.4); border-radius: var(--radius);
  padding: 20px; margin-bottom: 22px;
}
.fresh-banner h2 { margin: 0 0 6px; font-size: 1.2rem; }
.fresh-banner p { color: var(--muted); margin: 0 0 14px; }

/* ---------------- Photo manager ---------------- */
.photo-manager-section { margin-top: 30px; }
.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; cursor: pointer;
  background: rgba(148,163,184,.04); transition: border-color 0.15s, background 0.15s;
  min-height: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.dropzone:hover, .dropzone.is-dragging { border-color: var(--accent); background: rgba(245,166,35,.06); }
.dropzone strong { color: var(--text); display: block; }
.dropzone span { color: var(--muted); font-size: 0.9rem; }
.pm-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 16px; }
.pm-thumb {
  position: relative; border-radius: 12px; overflow: hidden; border: 2px solid var(--line);
  aspect-ratio: 4 / 3; background: var(--bg-deep); cursor: grab;
}
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm-thumb.is-primary { border-color: var(--accent); }
.pm-badge {
  position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink);
  font-size: 0.72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px;
}
.pm-actions { position: absolute; bottom: 0; left: 0; right: 0; display: flex; gap: 6px; padding: 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); }
.pm-actions button {
  flex: 1; font-size: 0.78rem; font-weight: 700; padding: 8px 6px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(10,17,32,.85); color: var(--text); cursor: pointer; min-height: 36px;
}
.pm-progress { height: 6px; background: var(--panel-3); border-radius: 3px; margin-top: 14px; overflow: hidden; display: none; }
.pm-progress.is-active { display: block; }
.pm-progress span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.2s; }

/* ---------------- Modals, toasts, compare tray ---------------- */
.modal { border: none; padding: 0; background: transparent; max-width: calc(100vw - 36px); }
.modal::backdrop { background: rgba(3, 7, 14, 0.7); backdrop-filter: blur(4px); }
.modal-box {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; width: 440px; max-width: 100%; box-shadow: var(--shadow-pop);
}
.modal-box h2 { margin-bottom: 6px; }
.modal-sub { color: var(--muted); font-size: 0.92rem; }
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 36px); max-width: 420px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 16px; box-shadow: var(--shadow-pop); font-weight: 600; font-size: 0.93rem;
  transition: opacity 0.35s;
}
.toast.is-success { border-color: rgba(61,220,132,.5); }
.toast.is-error { border-color: rgba(255,107,107,.5); }
.toast.is-fading { opacity: 0; }
.compare-tray {
  position: fixed; bottom: 18px; left: 50%; z-index: 95;
  transform: translateX(-50%) translateY(140%);
  display: flex; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 10px 10px 18px; box-shadow: var(--shadow-pop);
  transition: transform 0.28s ease; max-width: calc(100vw - 24px);
}
.compare-tray.is-visible { transform: translateX(-50%) translateY(0); }
.compare-tray .tray-label { font-weight: 700; font-size: 0.92rem; }
.tray-thumbs { display: flex; gap: 6px; }
.tray-thumbs span {
  width: 28px; height: 28px; border-radius: 50%; background: var(--panel-3);
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700;
}

/* ---------------- Auth ---------------- */
.auth-wrap { max-width: 480px; margin: 0 auto; padding: 40px 18px 60px; }
.auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,0) 36%), var(--panel);
  border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px;
  box-shadow: var(--shadow-card);
}
.auth-card h1 { font-size: 1.5rem; margin-bottom: 18px; }
.auth-alt { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: 0.93rem; }

/* ---------------- Footer / prose / misc ---------------- */
.site-footer { border-top: 1px solid var(--line-soft); margin-top: 40px; background: rgba(6,11,21,.55); }
.footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 36px 18px 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px;
}
.footer-brand { grid-column: 1 / -1; }
.footer-tagline { color: var(--muted); font-size: 0.92rem; margin: 10px 0 4px; }
.footer-note { color: var(--muted-2); font-size: 0.82rem; }
.footer-col h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--muted); padding: 5px 0; font-size: 0.93rem; }
.footer-col a:hover { color: var(--text); }
.footer-base { border-top: 1px solid var(--line-soft); padding: 16px 18px; text-align: center; color: var(--muted-2); font-size: 0.85rem; }
.footer-base p { margin: 0; }
.prose { max-width: 720px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 10px; color: var(--muted); }
.prose p { color: var(--muted); }
.form-page { max-width: 860px; margin: 0 auto; padding-top: 28px; padding-bottom: 50px; }
.form-page > h1 { font-size: 1.6rem; margin-bottom: 6px; }
.form-page .page-sub { color: var(--muted); margin-bottom: 22px; }
.listing-form {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,0)), var(--panel);
  border: 1px solid var(--line); border-radius: 20px; padding: 24px 20px;
  box-shadow: var(--shadow-card);
}
.inline-create-form { display: grid; gap: 0 14px; }
.admin-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 22px; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.admin-tabs a { padding: 12px 16px; color: var(--muted); font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -3px; }
.admin-tabs a:hover { color: var(--text); text-decoration: none; }
.admin-tabs a.is-active { color: var(--accent-soft); border-bottom-color: var(--accent); }
.admin-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.status-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px;
  color: var(--muted); font-weight: 600; font-size: 0.9rem; min-height: 40px;
  display: inline-flex; align-items: center;
}
.chip:hover { text-decoration: none; border-color: var(--accent); color: var(--text); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--panel); }
.compare-table th, .compare-table td { border: 1px solid var(--line-soft); padding: 12px 14px; text-align: left; font-size: 0.93rem; }
.compare-table thead th { background: var(--panel-2); }
.compare-head { min-width: 180px; }
.compare-vehicle { color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.compare-thumb { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; }
.compare-title { font-weight: 700; }
.compare-price { color: var(--accent-soft); font-weight: 800; }
.report-details { max-width: 260px; }
.cat-icon { font-size: 1.3rem; }

/* ---------------- Desktop enhancements ---------------- */
@media (min-width: 720px) {
  h1 { font-size: 2.1rem; }
  .hero { padding: 88px 0 72px; }
  .hero h1 { font-size: 3rem; }
  .hero-cta { flex-direction: row; justify-content: center; }
  .hero-cta .btn { width: auto; min-width: 240px; }
  .qs-grid { grid-template-columns: repeat(3, 1fr); }
  .qs-grid .qs-keyword { grid-column: 1 / -1; }
  .category-tiles { grid-template-columns: repeat(4, 1fr); }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
  .form-actions { flex-direction: row; }
  .form-actions .btn { width: auto; }
  .inline-create-form { grid-template-columns: 1fr 1fr 2fr 120px auto; align-items: end; }
  .mobile-actionbar { display: none; }
  body.has-actionbar { padding-bottom: 0; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
  .detail-side { position: sticky; top: 86px; }
  .search-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 26px; align-items: start; }
  .filters-details > summary.filters-toggle { display: none; }
  .filters-form { margin-top: 0; position: sticky; top: 86px; }
  .chat-layout { grid-template-columns: 320px minmax(0, 1fr); }
  .wizard-nav .btn { flex: 0 1 auto; min-width: 170px; }
  .wizard-nav { justify-content: space-between; }
}

@media (min-width: 1024px) {
  .site-nav { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
  .nav-toggle { display: none; }
  .header-actions .icon-btn { display: none; }
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
  .category-tiles { grid-template-columns: repeat(7, 1fr); }
  .category-tile { flex-direction: column; text-align: center; padding: 18px 10px; }
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .spec-row:nth-child(odd) { border-right: 1px solid var(--line-soft); }
}

/* subtle lift on devices with a fine pointer */
@media (hover: hover) and (pointer: fine) {
  .listing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
  .listing-card:hover .card-photo img { transform: scale(1.045); }
  .category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
  .trust-card:hover { transform: translateY(-3px); }
  .trust-card { transition: transform 0.22s ease; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
