/* =============================================================
   Five-K Cars — design system
   ============================================================= */

:root {
  --ink: #0a1020;
  --navy: #0c1426;
  --navy-2: #111d36;
  --navy-3: #1a2a4a;

  --paper: #ffffff;
  --bg: #f4f6fa;
  --bg-soft: #eef1f6;
  --line: #e4e9f0;
  --line-strong: #d3dbe6;

  --text: #111a2e;
  --muted: #5c6b82;
  --faint: #8b98ab;

  --accent: #2563eb;
  --accent-2: #3b82f6;
  --accent-deep: #1d4ed8;
  --accent-soft: #e8f0fe;

  --gold: #e8b54d;
  --gold-deep: #cf9a2e;

  --success: #16a34a;
  --danger: #dc2626;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --shadow: 0 6px 18px -6px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 24px 48px -16px rgba(16, 24, 40, 0.22), 0 8px 20px -8px rgba(16, 24, 40, 0.12);

  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --header-h: 72px;
  --container: 1240px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-head); line-height: 1.15; color: var(--ink); letter-spacing: -0.02em; }
p { margin: 0; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- layout helpers ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg); }
.section--tint { background: var(--bg-soft); }
.section--dark { background: radial-gradient(1200px 600px at 85% -10%, #1a2a4a 0%, var(--navy) 45%, var(--ink) 100%); color: #e9edf5; }
.section--dark h2, .section--dark h3 { color: #fff; }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section-head .kicker::before { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head--center .kicker::after { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 17px; margin-top: 14px; }
.section--dark .section-head p { color: #a9b6ca; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 15px; line-height: 1;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #fff; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.7); }
.btn--primary:hover { box-shadow: 0 12px 26px -8px rgba(37, 99, 235, 0.85); transform: translateY(-2px); }
.btn--gold { background: linear-gradient(180deg, #f2c96f, var(--gold-deep)); color: #2b1c04; box-shadow: 0 8px 20px -8px rgba(207, 154, 46, 0.7); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(207, 154, 46, 0.85); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn--ghost-light { background: rgba(255, 255, 255, 0.06); color: #fff; border-color: rgba(255, 255, 255, 0.22); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); }
.btn--sm { padding: 11px 18px; font-size: 14px; }
.btn--lg { padding: 18px 34px; font-size: 16px; }
.btn--block { width: 100%; }
.btn.is-on { color: #dc2626; border-color: #fecaca; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(10, 16, 32, 0.62); color: #fff; backdrop-filter: blur(4px);
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  background: rgba(10, 16, 32, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: box-shadow .2s ease, background-color .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.7); background: rgba(10, 16, 32, 0.96); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 20px; }
.brand { display: inline-flex; align-items: center; color: #fff; }
.brand svg, .brand img { height: 48px; width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.45)); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  position: relative; padding: 10px 14px; font-size: 14.5px; font-weight: 600;
  color: rgba(255, 255, 255, 0.78); border-radius: 10px; transition: color .15s ease, background-color .15s ease;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.main-nav a.is-active { color: #fff; }
.main-nav a.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gold); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: #fff; }
.header-phone svg { width: 17px; height: 17px; color: var(--gold); }

.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: #fff; margin: 4px auto; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1100px 560px at 80% -8%, #1c2f56 0%, var(--navy) 44%, var(--ink) 100%);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(800px 500px at 70% 20%, #000 20%, transparent 78%);
}
.hero .container { position: relative; z-index: 2; padding-top: 72px; padding-bottom: 88px; }
.hero__wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 52px; align-items: center; }
.hero__inner { max-width: 760px; }

.hero__showcase { position: relative; }
.hero__showcase .showcase-card {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg); padding: 14px 14px 18px;
  backdrop-filter: blur(12px); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7);
}
.hero__showcase .showcase-card .art { aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: #e9eef5; }
.hero__showcase .showcase-card .art svg { width: 100%; height: 100%; display: block; }
.hero__showcase .meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 8px 0; color: #fff; }
.hero__showcase .meta .name { font-weight: 800; font-family: var(--font-head); font-size: 19px; }
.hero__showcase .meta .sub { color: #9fb0c8; font-size: 13px; margin-top: 2px; }
.hero__showcase .meta .price { font-weight: 800; font-size: 21px; white-space: nowrap; }
.hero__showcase .showcase-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 8px 0; }
.hero__showcase .showcase-foot .pm { color: #9fb0c8; font-size: 13px; }
.hero__showcase .showcase-foot .pm b { color: #fff; font-size: 15px; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 13px; font-weight: 600; color: #dbe5f5; margin-bottom: 24px; }
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(232, 181, 77, 0.25); }
.hero h1 { color: #fff; font-size: clamp(36px, 6vw, 62px); font-weight: 800; letter-spacing: -0.03em; }
.hero h1 .accent { background: linear-gradient(90deg, #7cb3ff, #bcd9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin-top: 20px; font-size: 18px; color: #aebbd1; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero__search {
  margin-top: 40px; max-width: 720px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-lg); padding: 10px;
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  backdrop-filter: blur(8px);
}
.hero__search select, .hero__search button { height: 52px; border-radius: 14px; border: none; font-size: 15px; font-weight: 600; }
.hero__search select { padding: 0 16px; background: #fff; color: var(--text); width: 100%; }
.hero__search button { padding: 0 26px; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 46px; }
.hero__stats .stat .num { font-size: 30px; font-weight: 800; font-family: var(--font-head); color: #fff; }
.hero__stats .stat .lbl { font-size: 13.5px; color: #93a3bc; margin-top: 2px; }
.hero__stats .stat--sm .num { font-size: 20px; letter-spacing: 0; }

/* ---------- car cards grid ---------- */
.grid { display: grid; gap: 26px; }
.grid--cars { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--accent-2); }
.card__media { position: relative; display: block; aspect-ratio: 16 / 10; background: #e9eef5; }
.card__art { position: absolute; inset: 0; }
.card__art svg { width: 100%; height: 100%; }
.car-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.car-photo--placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(160deg, #f1f4f9, #dde4ee); color: var(--muted); text-align: center; }
.car-photo--placeholder .ph-icon { font-size: 46px; }
.car-photo--placeholder .ph-text { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); line-height: 1.5; }
.card__stock { position: absolute; top: 14px; left: 14px; z-index: 2; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; color: #fff; letter-spacing: 0.02em; }
.stock-instock { background: var(--success); }
.stock-factory { background: var(--accent-deep); }
.card__tagrow { position: absolute; bottom: 14px; left: 14px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; max-width: calc(100% - 70px); }
.card__saving { position: absolute; top: 46px; left: 14px; z-index: 2; background: linear-gradient(180deg, #f2c96f, var(--gold-deep)); color: #2b1c04; font-size: 12px; font-weight: 800; padding: 6px 12px; border-radius: 999px; }

.card__wish {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.94); color: #0a1020;
  font-size: 18px; line-height: 1; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform .15s ease, color .15s ease;
}
.card__wish:hover { transform: scale(1.1); }
.card__wish.is-on { color: #dc2626; }

.card__body { display: flex; flex-direction: column; gap: 12px; padding: 20px; flex: 1; }
.card__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card__title { font-size: 20px; font-weight: 800; }
.card__title a:hover { color: var(--accent); }
.card__price { font-size: 21px; font-weight: 800; color: var(--accent-deep); white-space: nowrap; }
.card__trim { font-size: 13.5px; color: var(--muted); }
.card__specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card__specs li { font-size: 13.5px; color: var(--text); font-weight: 600; }
.card__specs li span { display: block; font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 1px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
.card__monthly .monthly { font-size: 20px; font-weight: 800; color: var(--text); }
.card__monthly .monthly small { font-size: 13px; color: var(--muted); font-weight: 600; }
.card__monthly .monthly-note { display: block; font-size: 11.5px; color: var(--faint); }

/* ---------- filters ---------- */
.filters {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow-sm); margin-bottom: 30px; align-items: end;
}
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.field select, .field input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #fff; font-size: 14.5px; font-weight: 500; color: var(--text);
}
.field select:focus, .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; flex-wrap: wrap; }
.results-bar .count { font-size: 14.5px; color: var(--muted); font-weight: 600; }
.results-bar .count b { color: var(--text); }
.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-state .big { font-size: 44px; }

/* ---------- car detail ---------- */
.detail-hero { background: linear-gradient(180deg, #eef2f8, #dfe6ef); padding: 40px 0 0; }
.detail-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 36px; }
.detail__media { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); aspect-ratio: 16 / 10; }
.detail__media .car-photo { width: 100%; height: 100%; object-fit: cover; }
.detail__meta { display: flex; flex-direction: column; gap: 16px; }
.breadcrumb { font-size: 13.5px; color: var(--muted); margin-bottom: 4px; }
.breadcrumb a:hover { color: var(--accent); }
.detail__meta h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.detail__trim { font-size: 15.5px; color: var(--muted); margin-top: 4px; }
.price-block { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.price-block .now { font-size: 38px; font-weight: 800; color: var(--accent-deep); font-family: var(--font-head); }
.price-block .was { font-size: 18px; color: var(--faint); text-decoration: line-through; }
.price-block .save { font-size: 13px; font-weight: 800; color: #8a5b0b; background: #fdf3dd; padding: 5px 12px; border-radius: 999px; }
.keyfacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.keyfact { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.keyfact .k { font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.keyfact .v { font-size: 15px; font-weight: 700; color: var(--text); margin-top: 3px; }
.detail__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.finance-box { background: var(--navy); color: #fff; border-radius: var(--r-lg); padding: 24px; margin-top: 8px; }
.finance-box .row { display: flex; align-items: baseline; justify-content: space-between; }
.finance-box .pm { font-size: 34px; font-weight: 800; font-family: var(--font-head); }
.finance-box .pm small { font-size: 15px; color: #a9b6ca; font-weight: 600; }
.finance-box p { color: #9fb0c8; font-size: 13.5px; margin-top: 8px; }

.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--line); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table td { padding: 13px 0; font-size: 14.5px; }
.specs-table td:first-child { color: var(--muted); width: 42%; }
.specs-table td:last-child { font-weight: 600; }

.feature-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.feature-chips span { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; }
.feature-chips span::before { content: "✓"; color: var(--success); margin-right: 8px; font-weight: 800; }

/* ---------- feature / info cards ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.feature p { font-size: 14.5px; color: var(--muted); }

/* ---------- brands strip ---------- */
.brands-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.brands-strip .make { padding: 10px 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); font-weight: 700; font-size: 14px; color: #dbe5f5; }

/* ---------- testimonials ---------- */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.testi .stars { color: var(--gold); letter-spacing: 2px; font-size: 15px; }
.testi p { margin: 14px 0 18px; font-size: 15px; color: var(--text); }
.testi .who { display: flex; align-items: center; gap: 12px; }
.testi .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--navy-3); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.testi .who .n { font-weight: 700; font-size: 14.5px; }
.testi .who .c { font-size: 12.5px; color: var(--faint); }

/* ---------- finance calculator ---------- */
.calc-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.calc-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow); }
.calc-field { margin-bottom: 18px; }
.calc-field label { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.calc-field label output { color: var(--accent-deep); }
.calc-field input[type="range"] { width: 100%; accent-color: var(--accent); }
.calc-result { background: linear-gradient(160deg, var(--navy-2), var(--ink)); color: #fff; border-radius: var(--r-lg); padding: 36px; text-align: center; }
.calc-result .pm { font-size: 52px; font-weight: 800; font-family: var(--font-head); }
.calc-result .pm small { font-size: 18px; color: #a9b6ca; }
.calc-result p { color: #9fb0c8; font-size: 13.5px; margin-top: 10px; }
.calc-result .rule { display: flex; justify-content: space-between; font-size: 14px; color: #c3cfdf; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.calc-result .rule b { color: #fff; }

/* ---------- forms ---------- */
.form-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 7px; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line-strong);
  font: inherit; font-size: 15px; color: var(--text); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.form-grid textarea { resize: vertical; min-height: 120px; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.form-note { font-size: 12.5px; color: var(--faint); margin-top: 12px; }
.form-msg { display: none; margin-top: 18px; padding: 14px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.form-msg.is-ok { display: block; background: #ecfdf3; color: #166534; border: 1px solid #bbf7d0; }
.form-msg.is-err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.input-error { border-color: var(--danger) !important; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.contact-item { display: flex; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.contact-item .ic { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.contact-item .ic svg { width: 22px; height: 22px; }
.contact-item h3 { font-size: 15.5px; font-weight: 800; }
.contact-item p, .contact-item a { font-size: 14.5px; color: var(--muted); }
.contact-item a:hover { color: var(--accent); }
.hours { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 24px; }
.hours h3 { font-size: 15.5px; font-weight: 800; margin-bottom: 10px; }
.hours li { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.hours li:last-child { border-bottom: none; }
.hours li b { color: var(--text); }

/* ---------- admin ---------- */
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.stat-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat-card .n { font-size: 30px; font-weight: 800; font-family: var(--font-head); }
.stat-card .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; box-shadow: var(--shadow-sm); }
table.admin { width: 100%; border-collapse: collapse; min-width: 760px; }
table.admin th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 14px 16px; background: var(--bg-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.admin td { padding: 14px 16px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.admin tr:last-child td { border-bottom: none; }
table.admin .pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-new { background: #fef3c7; color: #92400e; }
.pill-done { background: #dcfce7; color: #166534; }
.pill-cancelled { background: #f1f5f9; color: #475569; }
.tool-btn { border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--text); }
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #aebbd1; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; max-width: 300px; }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: #aebbd1; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 22px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #7e8ca2; }
.footer-bottom a { color: #aebbd1; }

/* ---------- reveal ---------- */
.reveal { transition: opacity .55s ease, transform .55s ease; }
html.js .reveal { opacity: 0; transform: translateY(22px); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- page hero (sub pages) ---------- */
.page-hero { background: radial-gradient(1000px 480px at 85% -10%, #1c2f56 0%, var(--navy) 46%, var(--ink) 100%); color: #fff; padding: 64px 0 68px; }
.page-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 46px); font-weight: 800; }
.page-hero p { color: #aebbd1; font-size: 16px; margin-top: 12px; max-width: 560px; }

/* ---------- admin tabs + auth ---------- */
.admin-tabs { display: flex; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin-bottom: 30px; width: max-content; max-width: 100%; overflow: auto; }
.admin-tabs button { border: none; background: transparent; padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.admin-tabs button.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 36px; box-shadow: var(--shadow-lg); }
.auth-tabs { display: flex; gap: 6px; background: var(--bg-soft); border-radius: 999px; padding: 5px; margin-bottom: 24px; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 11px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); }
.auth-tabs button.is-active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 100;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid--cars { grid-template-columns: repeat(2, 1fr); }
  .features-grid, .testi-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .calc-wrap, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero__wrap { grid-template-columns: 1fr; }
  .hero__showcase { max-width: 540px; }
}
@media (max-width: 760px) {
  .section { padding: 60px 0; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 20px 20px; display: none;
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 13px 14px; font-size: 16px; }
  .nav-toggle { display: block; }
  .header-phone { display: none; }
  .grid--cars, .grid--2, .features-grid, .testi-grid, .stat-cards { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .hero__search { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
  .detail__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* =============================================================
   Five-K Cars — UK dealership refinements (2026)
   ============================================================= */

/* ---------- trust strip (HPI / warranty / delivery) ---------- */
.trust-strip {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.trust-strip .container {
  display: flex; flex-wrap: wrap; gap: 12px 34px;
  align-items: center; justify-content: center;
}
.trust-item {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 700; color: var(--text);
}
.trust-item .tic {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 14px;
}
.trust-item span.mut { font-weight: 600; color: var(--muted); font-size: 12.5px; }

/* ---------- vehicle card refinements ---------- */
.card__art { overflow: hidden; }
.car-photo--placeholder { position: relative; }
.car-photo--placeholder .ph-art { position: absolute; inset: 0; }
.car-photo--placeholder .ph-art svg { width: 100%; height: 100%; }
.car-photo--placeholder .ph-text {
  position: relative; z-index: 2;
  background: rgba(10, 16, 32, 0.76); color: #fff;
  padding: 7px 14px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.4;
}
.car-photo--placeholder .ph-icon { font-size: 46px; }
.card__specs li:first-child span { color: var(--accent); }
.card__saving { top: 46px; }

/* ---------- admin quick actions on listing cards ---------- */
.card__admin {
  display: flex; gap: 8px; padding-top: 14px; margin-top: 2px;
  border-top: 1px dashed var(--line-strong);
}
.mini-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.mini-btn--danger { color: var(--danger); border-color: #fecaca; }
.mini-btn--danger:hover { background: #fef2f2; border-color: var(--danger); color: var(--danger); }

.detail__admin { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- footer admin icon (admins only) ---------- */
.admin-footer-link {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--gold); font-weight: 700; font-size: 13px;
  border: 1px solid rgba(232, 181, 77, 0.4); padding: 6px 14px; border-radius: 999px;
}
.admin-footer-link[hidden] { display: none; }
.admin-footer-link:hover { background: rgba(232, 181, 77, 0.12); color: #fff; }

/* ---------- admin: access link box & form extras ---------- */
.admin-link-box {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.admin-link-box__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.admin-link-box__head b { font-size: 15px; }
.admin-link-box__head span { font-size: 13px; color: var(--muted); }
.admin-link-row { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-link-row input {
  flex: 1; min-width: 240px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); font-size: 14px; color: var(--muted); background: var(--bg-soft);
}
.upload-status { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.cf-preview-wrap { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line-strong); }
.cf-preview-wrap .grid--cars { grid-template-columns: 1fr; max-width: 420px; }
