/* Royal Auto Stop — site styles */

:root {
  --bg: #0a1430;
  --bg-deep: #060d20;
  --surface: #101d3d;
  --surface-2: #172a52;
  --line: #22375f;
  --line-strong: #3d5585;
  --text: #f3f6fb;
  --muted: #bcc7da;
  --faint: #97a6c2;
  --blue: #1f6fd6;
  --blue-hover: #3584e8;
  --blue-ink: #ffffff;
  --chrome: linear-gradient(180deg, #ffffff 0%, #e3e8ef 45%, #a9b3c1 55%, #dfe4eb 100%);
  --sold: #c9cdd6;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;

  --wrap: 1240px;
  --gutter: clamp(18px, 4vw, 32px);
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: #8dbaf3; }
a:hover { color: #c3dafb; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--blue);
  color: var(--blue-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(46px, 7vw, 92px); text-transform: uppercase; }
h2 { font-size: clamp(36px, 4.5vw, 56px); text-transform: uppercase; }
h3 { font-size: 26px; font-weight: 600; line-height: 1.1; }

.lede { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 34em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 8px;
  font: 700 16px/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s, border-color 0.15s;
}
.btn-primary { background: var(--blue); color: var(--blue-ink); }
.btn-primary:hover { background: var(--blue-hover); color: var(--blue-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-small { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */

.topbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 9px;
}
.topbar a { font-weight: 700; text-decoration: none; }

.header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand:hover { color: var(--text); }
.brand img { height: 64px; width: auto; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.brand-tag { display: block; font-size: 13px; color: var(--blue); font-weight: 600; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding-block: 12px;
  border-bottom: 2px solid transparent;
}
.nav a:not(.btn):hover { border-color: var(--line-strong); }
.nav a[aria-current="page"] { border-color: var(--blue); }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 8px;
  width: 48px;
  height: 48px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding-block: 14px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }
  .brand-name { font-size: 24px; }
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(56px, 8vw, 96px); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 32px;
}
.section-head p { margin: 10px 0 0; }

.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(48px, 8vw, 96px) clamp(48px, 7vw, 80px); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero-photo {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 48px;
  padding-block: 36px;
}
.promises h3 { color: var(--blue); font-size: 24px; text-transform: uppercase; margin-bottom: 6px; }
.promises p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

/* ---------- Photo placeholder ---------- */

.no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--faint);
  font-size: 14px;
  background: var(--surface-2);
}
.no-photo svg { width: 84px; height: 42px; }

/* ---------- Inventory grid ---------- */

.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.car-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}
.car-card:hover { border-color: var(--line-strong); }
.car-card .photo { aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; }
.car-card .photo img { width: 100%; height: 100%; object-fit: cover; }
.car-card .body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.car-card h3 a { color: var(--text); text-decoration: none; }
.car-card h3 a::after { content: ""; position: absolute; inset: 0; }
.car-card .meta { color: var(--muted); font-size: 15px; margin: 0; }
.car-card .foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.price { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--blue); line-height: 1; }
.price.call { font-size: 22px; color: var(--text); }
.view-link { font-weight: 700; font-size: 14px; color: var(--muted); }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--bg-deep);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
}
.badge.pending { background: #f0c14f; color: #17191d; }
.badge.sold { background: var(--sold); color: #17191d; }
.car-card.is-sold .photo img { filter: grayscale(0.7); opacity: 0.7; }

.empty {
  grid-column: 1 / -1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 48px 28px;
  text-align: center;
}
.empty h3 { margin-bottom: 10px; }
.empty p { margin: 0 auto 20px; max-width: 30em; color: var(--muted); }

/* Filters */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: 700 14px/1 var(--body);
  cursor: pointer;
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.search { margin-bottom: 16px; max-width: 520px; }
.sort { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  font: 16px/1.4 var(--body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 13px 14px;
  min-height: 48px;
  width: 100%;
  min-width: 0;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.hidden-field { position: absolute; left: -9999px; }

/* Payment calculator */

.calc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(24px, 5vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
}
.calc .form-grid { align-content: start; }
.calc-result { display: flex; flex-direction: column; gap: 14px; }
.payment { font-family: var(--display); font-weight: 700; font-size: clamp(56px, 8vw, 80px); line-height: 1; color: var(--blue); }
.payment span { font-size: 26px; color: var(--muted); }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

/* Two-column split */

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px); }
.split-copy { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Visit */

.visit-list { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.visit-list .label { display: block; font-size: 14px; font-weight: 700; color: var(--faint); margin-bottom: 4px; }
.visit-list .big { font-size: 22px; font-weight: 700; text-decoration: none; }
.hours { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 4px 28px; }
.map-box {
  min-height: 340px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}

/* ---------- Car detail ---------- */

.crumbs { font-size: 14px; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--muted); }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  padding-block: 24px 72px;
  align-items: start;
}
@media (max-width: 960px) { .detail { grid-template-columns: 1fr; } }

.gallery-main {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 0;
  background: rgba(16, 18, 21, 0.78);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(16, 18, 21, 0.78);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.thumbs button {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  cursor: pointer;
}
.thumbs button[aria-current="true"] { border-color: var(--blue); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-side { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 96px; grid-column: 2; grid-row: 1 / span 2; }
.detail-desc { grid-column: 1; }
@media (max-width: 960px) { .detail-side, .detail-desc { position: static; grid-column: auto; grid-row: auto; } }
.detail-side h1 { font-size: clamp(38px, 5vw, 56px); text-transform: none; }
.detail-side .price { font-size: 48px; }
.detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
  border-top: 1px solid var(--line);
}
.specs div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: 13px; color: var(--faint); font-weight: 600; }
.specs dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 30px; margin-bottom: 16px; }

/* ---------- Footer ---------- */

.footer { background: var(--bg-deep); border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 32px; padding-block: 32px; }
.footer a { color: var(--muted); }

/* Utility */
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Brand: chrome headings to match the logo ---------- */
h1, .brand-name {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag { color: #c7d0dd; }
.footer-logo { height: 56px; width: auto; }
