/* =========================================================
   Quality Cars Kenya — public website
   Clean, white, lots of breathing room.
   ========================================================= */

:root {
  --brand: #4b1c9c;
  --brand-hover: #3a1380;
  --brand-soft: #f5f1fc;
  --brand-line: #e3d9f5;
  --ink: #17131f;
  --ink-2: #464152;
  --muted: #7a7584;
  --line: #e9e7ee;
  --line-2: #f2f1f5;
  --bg: #ffffff;
  --bg-soft: #fafafc;
  --green: #128c4a;
  --whatsapp: #1fad54;
  --amber: #b45309;
  --amber-soft: #fff4e5;
  --danger: #c0262d;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(23, 19, 31, 0.05);
  --shadow: 0 1px 2px rgba(23, 19, 31, 0.04), 0 12px 32px rgba(23, 19, 31, 0.07);
  --maxw: 1240px;
  --header-h: 76px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.icon { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
.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(--brand); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px;
  border-radius: 10px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-outline { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand-line); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #168f44; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); font-size: 15px; }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 32px; }
.logo { display: inline-flex; align-items: center; gap: 12px; flex: none; }
.logo svg { width: 38px; height: 38px; }
.logo-img { display: block; height: 56px; width: auto; }
.site-footer .logo-img { height: 64px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text strong { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.logo-text span { font-size: 10.5px; font-weight: 700; letter-spacing: 0.28em; color: var(--muted); margin-top: 5px; }

.main-nav { display: flex; gap: 2px; }
.main-nav a {
  padding: 8px 11px; border-radius: 8px; white-space: nowrap;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
  transition: color .15s, background-color .15s;
}
.main-nav a:hover { color: var(--ink); background: var(--line-2); }
.main-nav a.active { color: var(--brand); font-weight: 600; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--ink); }
.header-phone .icon { width: 18px; height: 18px; color: var(--brand); }
.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 10px; align-items: center; justify-content: center; }

.mobile-nav { display: none; }

/* Slim info bar above the header */
.topbar { border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.topbar-inner { display: flex; justify-content: space-between; gap: 24px; height: 40px; align-items: center; }
.topbar-group { display: flex; gap: 24px; min-width: 0; }
.topbar-group > * { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar .icon { width: 15px; height: 15px; }
.topbar a:hover { color: var(--brand); }

@media (max-width: 1180px) {
  .topbar { display: none; }
  .main-nav, .header-phone { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-inner { gap: 16px; }
  .mobile-nav.open {
    display: flex; flex-direction: column; gap: 28px;
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff; padding: 8px 24px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain;
    animation: menu-in .18s ease-out;
  }
  .mobile-nav-links a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 2px; font-size: 18px; font-weight: 600; color: var(--ink);
    border-bottom: 1px solid var(--line-2);
  }
  .mobile-nav-links a .icon { width: 18px; height: 18px; color: var(--muted); }
  .mobile-nav-links a.active { color: var(--brand); }
  .mobile-nav-links a.active .icon { color: var(--brand); }
  .mobile-nav-cta { display: grid; gap: 12px; }
  .mobile-nav-info { display: grid; gap: 10px; color: var(--muted); font-size: 14px; }
  .mobile-nav-info li { display: flex; gap: 10px; align-items: flex-start; }
  .mobile-nav-info .icon { width: 17px; height: 17px; margin-top: 2px; flex: none; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .mobile-nav.open { animation: none; } }
@media (max-width: 560px) {
  .header-actions .btn-whatsapp span { display: none; }
  .header-actions .btn-whatsapp { width: 44px; padding: 0; }
  .logo-img { height: 46px; }
}

/* ---------- Generic sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 3vw, 34px); }
.section-head p { color: var(--muted); margin-top: 8px; max-width: 560px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(520px, calc(100vh - var(--header-h)), 780px);
  display: grid; place-items: center; text-align: center; color: #fff;
  padding: 96px 0;
}
/* Background slideshow: photos cross-fade with a slow, subtle zoom */
.hero-slides { position: absolute; inset: 0; z-index: -2; background: #1a1622; }
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.4s ease, transform 8s ease-out;
}
.hero-bg.is-active { opacity: 1; transform: scale(1); }
.hero-dots { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; gap: 2px; }
.hero-dots button { padding: 10px 4px; border: 0; background: none; cursor: pointer; }
.hero-dots button::before {
  content: ''; display: block; width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .5); transition: width .35s ease, background-color .35s ease;
}
.hero-dots button:hover::before { background: rgba(255, 255, 255, .8); }
.hero-dots button[aria-current="true"]::before { width: 26px; background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none; transition: opacity .6s ease; }
}
.hero-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14, 11, 22, .58) 0%, rgba(14, 11, 22, .42) 45%, rgba(14, 11, 22, .62) 100%);
}
.hero-content { max-width: 820px; }
.hero h1 {
  font-size: clamp(40px, 6.2vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05;
  color: #fff; text-shadow: 0 2px 30px rgba(0, 0, 0, .25);
}
.hero h1 span {
  background: linear-gradient(90deg, #d8ccff 0%, #b69cff 45%, #9b72ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; white-space: nowrap;
}
.hero-lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255, 255, 255, .92); max-width: 600px; margin: 20px auto 0; text-shadow: 0 1px 12px rgba(0, 0, 0, .3); }

.hero-search {
  display: flex; align-items: stretch; max-width: 680px; margin: 40px auto 0;
  background: #fff; border-radius: 999px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .28);
  transition: box-shadow .15s;
}
.hero-search:focus-within { box-shadow: 0 16px 48px rgba(0, 0, 0, .28), 0 0 0 4px rgba(182, 156, 255, .55); }
.hero-search input {
  flex: 1; min-width: 0; height: 60px; padding: 0 28px; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--ink);
}
.hero-search input::placeholder { color: var(--muted); }
.hero-search input::-webkit-search-cancel-button { cursor: pointer; }
.hero-search button {
  flex: none; display: inline-flex; align-items: center; gap: 10px;
  padding: 0 34px; border: 0; background: var(--brand); color: #fff;
  font-weight: 600; font-size: 16px; transition: background-color .15s;
}
.hero-search button:hover { background: var(--brand-hover); }
.hero-search button .icon { width: 19px; height: 19px; }

/* ---------- Body styles ---------- */
.body-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.body-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 8px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; text-align: center; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.body-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.body-tile svg { width: 84px; height: 36px; color: var(--ink); }
.body-tile strong { font-size: 14px; font-weight: 600; }
.body-tile small { font-size: 12.5px; color: var(--muted); margin-top: -8px; }

/* ---------- Car cards ---------- */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px 28px; }
.car-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.car-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.car-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.car-media { position: relative; aspect-ratio: 4 / 3; background: var(--line-2); overflow: hidden; }
.car-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.car-media.car-media-contain { background: #edf0ed; }
.car-media.car-media-contain img { object-fit: contain; }
.car-card:hover .car-media img { transform: scale(1.035); }
.car-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; line-height: 1; padding: 7px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .95); color: var(--ink);
}
.pill-brand { background: var(--brand); color: #fff; }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-dark { background: var(--ink); color: #fff; }
.pill-soft { background: var(--brand-soft); color: var(--brand); }
.photo-count { position: absolute; right: 12px; bottom: 12px; }
.photo-count .icon { width: 14px; height: 14px; }
.car-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.car-condition { font-size: 13px; color: var(--muted); font-weight: 500; }
.car-title { font-size: 17px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; line-height: 1.3; }
.car-mileage { font-size: 14px; color: var(--muted); margin-top: 2px; }
.car-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; font-size: 21px; font-weight: 800; margin-top: 14px; letter-spacing: -0.02em; }
.car-price > span { white-space: nowrap; }
.car-price small { font-size: 12px; font-weight: 600; color: var(--green); letter-spacing: 0; }
.car-specs { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.car-specs span { display: inline-flex; align-items: center; gap: 5px; }
.car-specs .icon { width: 15px; height: 15px; color: var(--muted); }
.car-location { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.car-location .icon { width: 15px; height: 15px; }

/* Skeleton loading */
.skeleton { pointer-events: none; }
.skeleton .car-media, .skeleton .sk { background: linear-gradient(90deg, var(--line-2) 0%, #f8f7fa 50%, var(--line-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skeleton .sk { height: 14px; border-radius: 6px; margin-top: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 72px 24px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); grid-column: 1 / -1; }
.empty-state h3 { color: var(--ink); font-size: 20px; margin-bottom: 8px; }
.empty-state .btn { margin-top: 20px; }

/* ---------- Makes ---------- */
.make-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.make-tile {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: border-color .15s, color .15s;
}
.make-tile small { color: var(--muted); font-weight: 500; font-size: 13px; }
.make-tile:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.why-item .why-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 20px; }
.why-item .why-icon .icon { width: 24px; height: 24px; }
.why-item h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.01em; }
.why-item p { color: var(--muted); font-size: 15px; }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center; }
.about-grid img { border-radius: 24px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.about-grid h2 { font-size: clamp(28px, 3.2vw, 38px); margin-bottom: 20px; }
.about-grid p { color: var(--ink-2); font-size: 17px; margin-bottom: 16px; }
.checklist { margin: 24px 0 32px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.checklist .icon { color: var(--green); margin-top: 3px; width: 18px; height: 18px; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  background: var(--brand-soft); border-radius: 24px; padding: 56px 56px;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); }
.cta-band p { color: var(--ink-2); margin-top: 10px; max-width: 520px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 32px; margin-top: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 48px; }
.footer-grid h4 { font-size: 14px; font-weight: 700; margin-bottom: 18px; letter-spacing: 0; }
.footer-grid p, .footer-grid li { color: var(--muted); font-size: 15px; }
.footer-grid li + li { margin-top: 10px; }
.footer-grid a:hover { color: var(--brand); }
.footer-about p { margin: 18px 0 20px; max-width: 300px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--ink-2); }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.socials a:hover { border-color: var(--brand); color: var(--brand); }
.socials .icon { width: 18px; height: 18px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer-bottom .footer-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-bottom .footer-legal a:hover { color: var(--brand); }

/* Legal / policy pages */
.legal { max-width: 760px; margin: 0 auto; color: var(--ink); font-size: 16.5px; line-height: 1.75; }
.legal .legal-meta { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.legal h2 { font-size: 22px; margin: 40px 0 12px; line-height: 1.3; }
.legal h3 { font-size: 18px; margin: 28px 0 10px; }
.legal p { margin-bottom: 16px; }
.legal ul { padding-left: 22px; margin: 0 0 20px; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--brand-hover); }
.legal strong { color: var(--ink); }

/* Floating WhatsApp button */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%; background: var(--whatsapp); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(31, 173, 84, .35);
  transition: transform .15s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- Page header / breadcrumbs ---------- */
.page-head { padding: 40px 0 8px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs span[aria-hidden] { color: var(--line); }
.page-head h1 { font-size: clamp(28px, 3.4vw, 38px); }

/* ---------- Listings ---------- */
.results-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; padding: 32px 0 96px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 8px; scrollbar-width: thin; }
.filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters-head h2 { font-size: 18px; }
.text-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; font-size: 14px; }
.text-btn:hover { text-decoration: underline; }
.filter-group { border-bottom: 1px solid var(--line); padding: 20px 0; }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; letter-spacing: 0; }
.check { display: flex; align-items: center; gap: 12px; padding: 5px 0; font-size: 15px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border: 1.5px solid #c9c5d1; border-radius: 6px; margin: 0; flex: none; display: grid; place-items: center; transition: background-color .15s, border-color .15s; cursor: pointer; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check small { margin-left: auto; color: var(--muted); font-size: 13px; }
.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px;
  transition: border-color .15s, box-shadow .15s; outline: 0;
}
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a7584' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.search-input { position: relative; }
.search-input .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 18px; height: 18px; }
.search-input .input { padding-left: 42px; }
.more-toggle { margin-top: 8px; }

.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.results-count { font-size: 15px; color: var(--muted); }
.results-count strong { color: var(--ink); font-size: 18px; }
.sort-wrap { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort-wrap .input { width: auto; min-width: 200px; color: var(--ink); }
.filter-open { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; min-height: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px 7px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13.5px; font-weight: 600; border: 0; }
.chip .icon { width: 14px; height: 14px; }
.chip:hover { background: var(--brand-line); }

.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 56px; flex-wrap: wrap; }
.pagination button { min-width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.pagination button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination button:disabled { opacity: .4; cursor: default; }

.drawer-foot { display: none; }
.drawer-backdrop { display: none; }

@media (max-width: 960px) {
  .results-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .filter-open { display: inline-flex; }
  .filters {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(360px, 88vw); max-height: none; height: 100%;
    background: #fff; padding: 24px 24px 0; transform: translateX(-100%); transition: transform .25s ease;
    display: flex; flex-direction: column;
  }
  .filters.open { transform: none; box-shadow: var(--shadow); }
  .filters-scroll { flex: 1; overflow-y: auto; }
  .drawer-foot { display: block; padding: 16px 0 24px; border-top: 1px solid var(--line); }
  .drawer-backdrop.open { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(23, 19, 31, .4); }
}

/* ---------- Car detail ---------- */
.detail-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; }
.detail-head .sub { color: var(--muted); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; }
.detail-head .sub span { display: inline-flex; align-items: center; gap: 6px; }
.detail-head .sub .icon { width: 16px; height: 16px; }
.detail-price { text-align: right; }
.detail-price strong { font-size: clamp(28px, 3vw, 36px); font-weight: 800; letter-spacing: -0.03em; display: block; }
.detail-price span { font-size: 14px; color: var(--muted); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; padding-bottom: 96px; }
.gallery-main { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--line-2); cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main.gallery-main-contain { background: #edf0ed; }
.gallery-main.gallery-main-contain img { object-fit: contain; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.gallery-nav.prev { left: 16px; } .gallery-nav.next { right: 16px; }
.gallery-counter { position: absolute; bottom: 16px; right: 16px; }
.gallery-status { position: absolute; top: 16px; left: 16px; display: flex; gap: 6px; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.thumbs button { flex: none; width: 96px; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--line-2); opacity: .75; transition: opacity .15s, border-color .15s; }
.thumbs button.active, .thumbs button:hover { opacity: 1; }
.thumbs button.active { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-section { padding-top: 48px; margin-top: 48px; border-top: 1px solid var(--line); }
.detail-section:first-of-type { border-top: 0; margin-top: 8px; }
.detail-section h2 { font-size: 24px; margin-bottom: 24px; }
.spec-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.spec { display: flex; gap: 14px; align-items: flex-start; }
.spec .spec-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.spec .spec-icon .icon { width: 20px; height: 20px; }
.spec small { display: block; font-size: 13px; color: var(--muted); }
.spec strong { font-size: 15px; font-weight: 600; }
.feature-list { columns: 3 200px; column-gap: 24px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; break-inside: avoid; font-size: 15px; }
.feature-list .icon { width: 18px; height: 18px; color: var(--green); margin-top: 3px; }
.description { color: var(--ink-2); font-size: 16px; white-space: pre-line; max-width: 720px; }

.contact-card { position: sticky; top: calc(var(--header-h) + 24px); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; background: #fff; box-shadow: var(--shadow); }
.contact-card h3 { font-size: 20px; }
.contact-card .muted { color: var(--muted); font-size: 14px; margin-top: 6px; }
.contact-actions { display: grid; gap: 10px; margin: 22px 0; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 4px 0 18px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.form { display: grid; gap: 12px; }
.form textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.form label.lbl { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-note { font-size: 13px; color: var(--muted); }
.form-msg { font-size: 14px; padding: 12px 14px; border-radius: 10px; }
.form-msg.ok { background: #ecf8f1; color: var(--green); }
.form-msg.err { background: #fdeeee; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10, 8, 14, .94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; object-fit: contain; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lightbox .lb-close { top: 20px; right: 20px; }
.lightbox .lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: 14px; }

/* ---------- Contact page ---------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 72px; padding: 32px 0 96px; align-items: start; }
.info-list { display: grid; gap: 28px; margin-top: 8px; }
.info-item { display: flex; gap: 16px; }
.info-item .why-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.info-item small { display: block; color: var(--muted); font-size: 14px; }
.info-item strong, .info-item a { font-size: 17px; font-weight: 600; }
.info-item a:hover { color: var(--brand); }
.map { margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.map iframe { width: 100%; height: 100%; border: 0; }
.form-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.form-card h2 { font-size: 24px; margin-bottom: 6px; }
.form-card > p { color: var(--muted); margin-bottom: 24px; }

.error-box { padding: 96px 24px; text-align: center; }
.error-box h1 { font-size: 32px; margin-bottom: 12px; }
.error-box p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .body-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
  .car-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .about-grid, .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero { padding: 72px 0; min-height: 520px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .contact-card { position: static; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { min-height: 480px; padding: 64px 0; }
  .hero-search input { height: 54px; padding: 0 20px; }
  .hero-search button { padding: 0 20px; }
  .body-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .car-grid, .car-grid.cols-3 { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .cta-band { padding: 36px 24px; }
  .detail-price { text-align: left; }
  .form .row-2 { grid-template-columns: 1fr; }
  .form-card { padding: 24px; }
  .sort-wrap .input { min-width: 0; }
  .wa-float { right: 16px; bottom: 16px; }
}
@media (max-width: 400px) {
  .hero-search-label { display: none; }
  .hero-search button { padding: 0 18px; }
}

/* =========================================================
   Inner pages (body styles, brands, sell, about, contact)
   ========================================================= */

/* Page banner: photo + tint, title and breadcrumbs */
.page-banner {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  padding: 96px 0 88px; background: #1a1622;
}
.page-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-banner::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 11, 22, .82) 0%, rgba(14, 11, 22, .6) 55%, rgba(14, 11, 22, .35) 100%);
}
.page-banner .breadcrumbs { color: rgba(255, 255, 255, .72); margin-bottom: 18px; }
.page-banner .breadcrumbs a:hover { color: #fff; }
.page-banner .breadcrumbs span[aria-hidden] { color: rgba(255, 255, 255, .4); }
.page-banner h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; letter-spacing: -0.03em; max-width: 760px; }
.page-banner p { font-size: clamp(16px, 1.5vw, 19px); color: rgba(255, 255, 255, .88); max-width: 620px; margin-top: 16px; }
.page-banner .banner-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--brand-soft); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

.lead-text { font-size: 18px; color: var(--ink-2); max-width: 680px; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* Body style cards */
.style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.style-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: #fff; transition: border-color .15s, box-shadow .2s, transform .2s;
}
.style-card:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-3px); }
.style-card .art { background: var(--bg-soft); border-bottom: 1px solid var(--line-2); display: grid; place-items: center; padding: 36px 16px; color: var(--ink); }
.style-card .art svg { width: 140px; height: 58px; }
.style-card:hover .art { color: var(--brand); }
.style-card .body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.style-card h3 { font-size: 19px; letter-spacing: -0.01em; }
.style-card p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.style-card .meta { margin-top: auto; padding-top: 18px; display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.style-card .meta span { color: var(--muted); }
.style-card .meta strong { color: var(--brand); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.style-card .meta .icon { width: 16px; height: 16px; }

.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.guide-card { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; }
a.guide-card { transition: border-color .15s, box-shadow .2s, transform .2s; }
a.guide-card:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-3px); }
.guide-card .why-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.guide-card h3 { font-size: 18px; margin-bottom: 8px; }
.guide-card p { color: var(--muted); font-size: 15px; }
.guide-card .links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

/* Brand cards */
.brand-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.brand-card { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.brand-card:hover { box-shadow: var(--shadow); border-color: transparent; }
.brand-card .cover { position: relative; aspect-ratio: 16 / 9; background: var(--line-2); overflow: hidden; display: block; }
.brand-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.brand-card:hover .cover img { transform: scale(1.04); }
.brand-card .mono { width: 100%; height: 100%; display: grid; place-items: center; font-size: 48px; font-weight: 800; color: var(--brand); background: var(--brand-soft); }
.brand-card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.brand-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.brand-card h3 { font-size: 20px; }
.brand-card .head span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.brand-card .models { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.brand-card .link-arrow { margin-top: auto; }
.tag-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: border-color .15s, color .15s; }
.tag-link:hover { border-color: var(--brand); color: var(--brand); }
.tag-link small { color: var(--muted); }
.brand-search { max-width: 420px; margin-bottom: 32px; }

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(var(--steps, 4), minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.step { position: relative; padding-top: 4px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 17px; margin-bottom: 20px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.stats-row > div { padding: 32px 28px; }
.stats-row > div + div { border-left: 1px solid var(--line); }
.stats-row strong { display: block; font-size: clamp(28px, 3vw, 38px); font-weight: 800; letter-spacing: -0.03em; }
.stats-row span { color: var(--muted); font-size: 15px; }

/* Two-column content + form */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 72px; align-items: start; }
.split-sticky { position: sticky; top: calc(var(--header-h) + 32px); }
.split h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 16px; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.form legend { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; padding: 0; }
.form .row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 15px; transition: border-color .15s, background-color .15s, color .15s; }
.choice input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 4px; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--muted); flex: none; }
.faq details[open] summary .icon { transform: rotate(45deg); color: var(--brand); }
.faq details p { padding: 0 4px 22px; color: var(--ink-2); max-width: 720px; }

/* Finance calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.calc-inputs { padding: 36px; display: grid; gap: 22px; }
.calc-inputs h2 { font-size: 24px; }
.calc-field label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.calc-field label output { color: var(--brand); font-weight: 700; }
.calc-field input[type=range] { width: 100%; accent-color: var(--brand); height: 28px; }
.calc-result { background: var(--brand); color: #fff; padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.calc-result small { font-size: 14px; color: rgba(255, 255, 255, .75); }
.calc-result .big { font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 6px 0 4px; }
.calc-result dl { margin: 28px 0 0; display: grid; gap: 12px; font-size: 15px; }
.calc-result dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.calc-result dt { color: rgba(255, 255, 255, .78); }
.calc-result dd { margin: 0; font-weight: 700; }
.calc-result .note { font-size: 12.5px; color: rgba(255, 255, 255, .7); margin-top: 20px; }
.calc-result .btn { margin-top: 24px; }

.doc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin-top: 24px; }
.doc-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.doc-list .icon { color: var(--green); margin-top: 3px; width: 18px; height: 18px; flex: none; }

@media (max-width: 1100px) {
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .page-banner { padding: 64px 0 56px; }
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split-sticky { position: static; }
  .calc { grid-template-columns: minmax(0, 1fr); }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-row > div:nth-child(3) { border-left: 0; }
  .stats-row > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .style-grid, .brand-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .style-card { flex-direction: row; }
  .style-card .art { border-bottom: 0; border-right: 1px solid var(--line-2); padding: 16px; width: 120px; flex: none; }
  .style-card .art svg { width: 88px; height: 38px; }
  .style-card .body { padding: 16px 18px; }
  .style-card p { display: none; }
  .style-card .meta { padding-top: 8px; }
  .calc-inputs, .calc-result { padding: 24px; }
  .doc-list { grid-template-columns: minmax(0, 1fr); }
  .form .row-3 { grid-template-columns: minmax(0, 1fr); }
  .stats-row > div { padding: 22px 18px; }
}
