:root {
  --bg: #0a0a0b;
  --surface: #121214;
  --surface-alt: #1a1a1d;
  --text: #f3f4f6;
  --muted: #b2b6c2;
  --line: rgba(255, 255, 255, 0.08);
  --primary: #d91f26;
  --primary-dark: #af171d;
  --accent: #d9dce3;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --radius: 22px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  width: 100%;
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  width: min(860px, 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 11, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.logo {
  font-size: 1.2rem;
  font-weight: 800;
}

.logo-image-wrap {
  display: inline-flex;
  align-items: center;
}

.site-logo {
  width: 120px;
  height: auto;
  object-fit: cover;
  border-radius: 0;
  border: none;
}

.wide-logo {
  width: 190px;
  height: auto;
  object-fit: contain;
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.main-nav,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.main-nav a,
.text-link,
.saved-link {
  color: var(--muted);
  font-weight: 600;
}

.main-nav a:hover,
.text-link:hover,
.saved-link:hover {
  color: #ffffff;
}

.saved-link span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  height: 1.3rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
}

.nav-toggle {
  display: none;
  border: 0;
  background: var(--surface);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  box-shadow: var(--shadow);
}

.hero,
.page-hero {
  padding: 5rem 0 3rem;
}

.hero-carvana {
  background: radial-gradient(circle at top left, rgba(217, 31, 38, 0.18), transparent 28%), linear-gradient(180deg, #0c0c0e 0%, #131316 100%);
}

.hero-grid,
.split-grid,
.model-layout,
.browse-layout {
  display: grid;
  gap: 2rem;
}

.hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
}

.hero-copy h1,
.page-hero h1 {
  font-size: clamp(2.7rem, 4vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0.4rem 0 1rem;
}

.hero-copy p,
.page-hero p,
.lead {
  font-size: 1.06rem;
  line-height: 1.8;
  max-width: 62ch;
  color: var(--muted);
}

.section-head h2,
.request-panel h2,
.form-section h2,
.step-card h3,
.info-panel h3,
.vehicle-card-body h3,
.results-bar h2 {
  color: #ffffff;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888888;
  text-shadow: 0 0 8px rgba(217,31,38,0.4), 0 0 20px rgba(217,31,38,0.2);
}

.hero-actions,
.card-actions,
.stat-row,
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-actions {
  gap: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 1.15rem;
}

.hero-actions .btn {
  min-width: 170px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.9rem 1.35rem;
  font-weight: 700;
  cursor: pointer;
}

.btn.small {
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.14);
  color: #111214;
}

.btn-secondary:hover {
  background: #ffffff;
}

.full-width,
.wide {
  width: 100%;
}

.hero-card,
.step-card,
.info-panel,
.vehicle-card,
.filter-panel,
.finder-form,
.request-panel,
.search-form {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-showcase {
  overflow: hidden;
  padding: 0;
}

.showcase-top {
  position: relative;
}

.showcase-top img {
  height: 250px;
  object-fit: cover;
}

.showcase-chip {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  background: rgba(16, 24, 40, 0.82);
  color: white;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.showcase-body {
  padding: 1rem 1.1rem 0.1rem;
}

.showcase-body strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
}

.showcase-body p {
  margin: 0.35rem 0 0;
}

.compact-search {
  padding: 0.95rem 1.1rem 1.1rem;
}

.hero-badges span {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  color: #e5e7eb;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.trust-strip div,
.quiz-card {
  background: #151518;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.trust-strip div {
  padding: 1rem 1.1rem;
}

.trust-strip strong {
  display: block;
  font-size: 1.2rem;
}

.trust-strip span {
  color: var(--muted);
  font-size: 0.92rem;
}

.quiz-band {
  padding-top: 0;
}

.quiz-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background: linear-gradient(135deg, #151518 0%, #1d1d21 100%);
}

.compact-specs {
  margin: 0.55rem 0 0;
  line-height: 1.55;
}

.compact-search .form-row {
  gap: 0.75rem;
}

.compact-search label {
  font-size: 0.82rem;
}

.compact-search input,
.compact-search select {
  padding: 0.65rem 0.8rem;
  font-size: 0.95rem;
}

.compact-search .btn {
  margin-top: 0.25rem;
}

.hero-card,
.filter-panel,
.finder-form,
.request-panel,
.search-form,
.info-panel,
.step-card {
  padding: 1.5rem;
}

.search-form h2,
.section-head h2,
.request-panel h2,
.model-summary h1,
.form-section h2 {
  margin-top: 0;
}

.form-row,
.form-grid {
  display: grid;
  gap: 1rem;
}

.form-row {
  grid-template-columns: repeat(3, 1fr);
}

.form-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

input,
select {
  width: 100%;
  margin-top: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--text);
  background: #0f1012;
}

.section {
  padding: 2.5rem 0 4.75rem;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head.center {
  justify-content: center;
  text-align: center;
}

.card-grid {
  display: grid;
  gap: 1.25rem;
}

.model-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vehicle-card {
  overflow: hidden;
}

.vehicle-card img {
  height: 360px;
  object-fit: contain;
  object-position: center;
  background: transparent;
  padding: 0;
}

.vehicle-card-body {
  padding: 1.35rem;
}

.vehicle-card-body h3 {
  margin: 0.3rem 0;
}

.vehicle-card-body p,
.results-bar p,
.mini-specs,
.disclaimer,
.success-note {
  color: var(--muted);
}

.vehicle-card {
  transition: transform 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

.vehicle-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 31, 38, 0.35);
}

.pill {
  display: inline-block;
  background: rgba(217, 31, 38, 0.12);
  color: #ff6b70;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.steps-grid,
.model-info-grid,
.footer-grid {
  display: grid;
  gap: 1.25rem;
}

.steps-grid,
.model-info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-number {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f0ff;
  color: var(--primary);
  font-weight: 800;
}

.split-grid,
.model-layout,
.browse-layout {
  grid-template-columns: 1fr 1fr;
}

.feature-list {
  padding-left: 1.2rem;
  line-height: 1.8;
}

.feature-list.compact {
  margin: 0;
}

.stat-row {
  margin-top: 1.2rem;
}

.stat-row div {
  display: grid;
  gap: 0.2rem;
}

.stat-row strong {
  font-size: 1.4rem;
}

.request-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mini-request-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  flex: 1;
}

.site-footer {
  padding: 3rem 0;
  background: #080809;
  color: white;
}

.footer-grid {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.footer-grid a,
.site-footer p {
  color: rgba(255, 255, 255, 0.78);
  display: block;
  margin-bottom: 0.65rem;
}

.minimal-footer {
  padding: 1.5rem 0;
}

.page-shell {
  min-height: calc(100vh - 80px);
}

.compact {
  padding-top: 3rem;
}

.filter-panel {
  height: fit-content;
  position: sticky;
  top: 100px;
}

.results-bar {
  margin-bottom: 1.25rem;
}

.admin-panel {
  padding: 1.5rem;
}

.admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
}

.leads-table {
  width: 100%;
  border-collapse: collapse;
}

.leads-table th,
.leads-table td {
  text-align: left;
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}

.leads-table th {
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-stats {
  margin-bottom: 1.5rem;
}

.save-btn {
  background: #18191c;
  color: #f4f4f5;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.delete-btn {
  background: transparent;
  color: #ff6b70;
  border: 1px solid rgba(255, 107, 112, 0.28);
  border-radius: 999px;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.delete-btn:hover {
  background: rgba(255, 107, 112, 0.08);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.gallery-grid img {
  height: 300px;
  object-fit: contain;
  object-position: center;
  background: #0f1012;
  padding: 0.35rem;
  border-radius: 20px;
}

.gallery-main {
  grid-row: span 2;
  height: 100% !important;
}

.price-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.price-box div {
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface-alt);
}

.price-box span {
  color: var(--muted);
  display: block;
  margin-bottom: 0.35rem;
}

.form-section + .form-section {
  margin-top: 1.5rem;
}

.form-section {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}

.form-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.full-span {
  grid-column: 1 / -1;
}

.mini-specs {
  padding-left: 1.2rem;
  line-height: 1.7;
}

.success-note {
  display: none;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.success-note.show {
  display: block;
}

.form-feedback {
  margin: 0.75rem 0 0;
  font-weight: 700;
  color: var(--accent);
}

.top-space {
  margin-top: 1rem;
}

.strong {
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero-grid,
  .split-grid,
  .model-layout,
  .browse-layout,
  .steps-grid,
  .model-info-grid,
  .footer-grid,
  .model-grid,
  .form-grid.two-col,
  .form-row,
  .mini-request-form,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .request-panel,
  .quiz-card {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav {
    display: flex;
    overflow-x: auto;
    gap: .75rem;
    width: 100%;
    order: 3;
    padding-top: .5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a {
    white-space: nowrap;
    font-size: .78rem;
    padding: 6px 12px;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--line);
  }
  .nav-actions {
    display: none;
  }

  

  .nav-wrap {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero,
  .page-hero,
  .section {
    padding-top: 2rem;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.2rem;
  }

  .stack-mobile {
    flex-direction: column;
  }
}


/* ── Browse Page v2 ── */
.browse-layout { grid-template-columns: 280px 1fr; gap: 1.5rem; }
.filter-panel { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; position: sticky; top: 90px; height: fit-content; border: 1px solid var(--line); }
.filter-panel h3 { font-size: .95rem; font-weight: 800; margin-bottom: 1rem; color: #fff; }
.filter-panel label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .75rem; }
.filter-panel select, .filter-panel input[type="text"] { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 8px; color: #fff; font-size: .85rem; font-family: inherit; outline: none; margin-top: 4px; appearance: none; -webkit-appearance: none; cursor: pointer; transition: border-color .2s; }
.filter-panel select:focus, .filter-panel input:focus { border-color: var(--accent, #d91f26); }
.filter-panel select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.filter-panel select option { background: #111; color: #eee; }

.filter-panel h3:nth-of-type(2) { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

#liveSearchBtn { width: 100%; margin-top: 1rem; padding: 12px; background: linear-gradient(135deg, #d91f26, #ff4444); color: #fff; border: none; border-radius: 8px; font-weight: 700; font-size: .9rem; cursor: pointer; font-family: inherit; transition: opacity .2s, transform .2s; }
#liveSearchBtn:hover { opacity: .9; transform: translateY(-1px); }
#liveSearchBtn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.card-grid.model-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.vehicle-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.vehicle-card:hover { transform: translateY(-4px); border-color: rgba(217,31,38,0.35); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }
.vehicle-card img { width: 100%; height: 200px; object-fit: cover; object-position: center; background: #0a0a0a; }
.vehicle-card-body { padding: 1rem; }
.vehicle-card-body .pill { display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 8px; border-radius: 4px; background: rgba(217,31,38,0.15); color: #ff4444; }
.vehicle-card-body h3 { font-size: .95rem; font-weight: 700; margin: .4rem 0 .2rem; color: #fff; }
.vehicle-card-body p { font-size: .85rem; color: var(--muted); margin: 0; }
.card-actions { display: flex; gap: .5rem; margin-top: .75rem; }
.card-actions .btn { font-size: .8rem; padding: 8px 14px; }

/* Search Results */
#searchResults { margin-bottom: 2rem; }
#searchResults h2 { font-size: 1.3rem; font-weight: 800; color: #fff; }
#searchResults h2 span { font-weight: 400; }
.search-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.search-card { background: #111; border: 1px solid #222; border-radius: 12px; overflow: hidden; transition: transform .25s, border-color .25s; }
.search-card:hover { transform: translateY(-3px); border-color: rgba(217,31,38,0.3); }
.search-card img { width: 100%; height: 200px; object-fit: cover; background: #0a0a0a; }
.search-card-body { padding: 1rem; }
.search-card-body .badge { display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; }
.search-card-body .badge-new { background: rgba(34,197,94,0.15); color: #22c55e; }
.search-card-body .badge-used { background: rgba(59,130,246,0.15); color: #3b82f6; }
.search-card-body h3 { font-size: .95rem; font-weight: 700; margin: .4rem 0 .2rem; color: #fff; }
.search-card-body .price { font-size: 1.1rem; font-weight: 800; color: #fff; }
.search-card-body .meta { font-size: .8rem; color: #888; margin-top: .25rem; }
.search-card-body .dealer { font-size: .78rem; color: #666; margin-top: .4rem; }
.search-card-body .cta { display: block; text-align: center; margin-top: .75rem; padding: 10px; background: rgba(217,31,38,0.12); color: #ff4444; border-radius: 8px; text-decoration: none; font-size: .85rem; font-weight: 600; transition: background .2s; }
.search-card-body .cta:hover { background: rgba(217,31,38,0.25); }
.no-photo { width: 100%; height: 200px; background: linear-gradient(135deg, #0a0a0a, #1a1a1a); display: flex; align-items: center; justify-content: center; color: #333; font-size: .8rem; }
.clear-results { background: none; border: 1px solid #333; color: #888; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: .8rem; font-family: inherit; transition: .2s; }
.clear-results:hover { border-color: #666; color: #ccc; }

@media (max-width: 768px) {
  .browse-layout { grid-template-columns: 1fr; }
  .card-grid.model-grid { grid-template-columns: 1fr 1fr; }
  .search-results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .card-grid.model-grid { grid-template-columns: 1fr; }
}




/* Fix anchor scroll position for sticky header */
[id] { scroll-margin-top: 100px; }
html { scroll-behavior: smooth; }
