:root {
  --bg: #0d0c0b;
  --bg-2: #151412;
  --card: #1a1917;
  --line: #2c2a26;
  --text: #f3efe7;
  --muted: #a39d92;
  --gold: #c8a96a;
  --gold-2: #e2c88f;
  --ok: #6fbf8b;
  --warn: #e0a64f;
  --bad: #d06a5f;
  --radius: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .01em; margin: 0; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; }
.title-sans { font-family: var(--sans); font-weight: 400; letter-spacing: .2em; font-size: clamp(22px, 2.8vw, 32px); line-height: 1.2; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font: 500 14px var(--sans);
  letter-spacing: .02em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.btn-gold { background: var(--gold); color: #17130b; }
.btn-gold:hover { background: var(--gold-2); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-line { border-color: var(--line); color: var(--text); background: transparent; }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }
.link { background: none; border: 0; color: var(--gold); cursor: pointer; font: inherit; text-decoration: underline; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(13,12,11,.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo-small { font-size: 9.5px; letter-spacing: .42em; color: var(--muted); }
.logo-big { font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: .28em; color: var(--gold); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.ig-link { display: inline-flex; }
.burger { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: var(--text); margin: 6px 0; transition: transform .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  justify-content: center;
  background:
    radial-gradient(ellipse 55% 70% at 50% 45%, rgba(200,169,106,.10), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* Wide banner: starts on the AUTO DIOR sign; scrolling pans down to the car (see app.js). */
.hero-img {
  display: block;
  width: 100%;
  height: clamp(230px, 50vw, calc(100vh - 140px));
  object-fit: cover;
  object-position: 50% var(--hero-y, 8%);
  will-change: object-position;
  animation: heroIn 1.8s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes heroIn {
  from { opacity: 0; transform: scale(1.06); filter: brightness(.4); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* Glow + light sweep over the AUTO DIOR sign. It fades out as you scroll. */
.hero-sign {
  position: absolute;
  left: var(--sx, 12%); top: var(--sy, 4%);
  width: var(--sw, 76%); height: var(--sh, 16%);
  opacity: var(--sign-o, 1);
  pointer-events: none;
  mix-blend-mode: screen;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
  animation: signIn 1.2s ease 1.1s both;
}
.hero-sign::before {
  content: "";
  position: absolute; inset: -10%;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(255, 205, 130, .55), rgba(255, 205, 130, 0) 70%);
  animation: signGlow 4.5s ease-in-out infinite;
}
.hero-shine {
  position: absolute; top: -60%; bottom: -60%; left: -35%;
  width: 22%;
  background: linear-gradient(90deg, rgba(255,244,220,0), rgba(255,244,220,.85) 50%, rgba(255,244,220,0));
  transform: skewX(-22deg);
  filter: blur(2px);
  animation: signShine 6s cubic-bezier(.45,0,.25,1) 1.6s infinite;
}
@keyframes signIn { from { filter: opacity(0); } to { filter: opacity(1); } }
@keyframes signGlow { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }
@keyframes signShine { 0% { left: -35%; } 40%, 100% { left: 120%; } }
@media (prefers-reduced-motion: reduce) {
  .hero-img, .hero-sign, .hero-sign::before, .hero-shine { animation: none; }
  .hero-shine { display: none; }
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 30%;
  background: linear-gradient(180deg, rgba(13,12,11,0), var(--bg));
  pointer-events: none;
}
.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;
}

/* ---------- Stock ---------- */
.stock { padding: 72px 0 40px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.result-count { color: var(--muted); margin: 0; }

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 32px;
  align-items: end;
}
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.filters .f-search { grid-column: span 2; }
.filters input[type=search], .filters select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  font: 14px var(--sans);
  outline: none;
}
.filters input:focus, .filters select:focus { border-color: var(--gold); }
.filters .f-check { flex-direction: row; align-items: center; gap: 8px; height: 42px; font-size: 13px; cursor: pointer; }
.filters .f-check input { accent-color: var(--gold); width: 16px; height: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(200,169,106,.55); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.card-img { position: relative; aspect-ratio: 4 / 3; background: #111; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.04); }
.badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(13,12,11,.78); backdrop-filter: blur(6px); color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
}
.badge.gold { background: var(--gold); color: #17130b; border-color: transparent; }
.badge.warn { color: var(--warn); border-color: rgba(224,166,79,.5); }
.badge.bad { color: #fff; background: var(--bad); border-color: transparent; }
.photo-count { position: absolute; right: 12px; bottom: 12px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: rgba(0,0,0,.6); }
.card.is-sold .card-img img { filter: grayscale(.85) brightness(.6); }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-title small { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.card-title h3 { font-size: 24px; line-height: 1.15; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 13px; }
.chips span { display: inline-flex; align-items: center; gap: 6px; }
.chips span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--line); margin-right: 8px; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--text); }
.price.ask { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--gold); }
.price.sold { text-decoration: line-through; color: var(--muted); font-size: 22px; }
.more { color: var(--gold); font-size: 13px; }

.more-wrap { display: flex; justify-content: center; margin-top: 32px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }

/* ---------- About ---------- */
.about { margin-top: 60px; background: var(--bg-2); border-block: 1px solid var(--line); padding: 80px 0; }
.about-inner { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; align-items: start; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.perks li { border-top: 1px solid var(--gold); padding-top: 14px; }
.perks b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.perks span { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.contact-card h3 { font-size: 24px; margin-bottom: 6px; }
.contact-card p { margin: 0; color: var(--muted); }
.c-row { color: var(--text); border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.c-row:hover { color: var(--gold); border-color: var(--gold); }
.map-card { position: relative; margin-top: 20px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.map-card iframe { display: block; width: 100%; height: clamp(280px, 40vw, 440px); border: 0; filter: grayscale(.25) contrast(1.05); }
.map-btn { position: absolute; right: 16px; top: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.hours { border-collapse: collapse; width: 100%; font-size: 14px; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; color: var(--muted); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.modal-box {
  position: relative;
  width: min(1100px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
}
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: var(--text); border: 1px solid var(--line);
  font-size: 24px; line-height: 1; cursor: pointer;
}
.m-gallery { position: relative; background: #000; display: flex; flex-direction: column; min-width: 0; }
.m-body { min-width: 0; }
.m-gallery > img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #000; touch-action: pan-y; user-select: none; }
.m-counter { position: absolute; top: 14px; left: 14px; font-size: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.m-counter:empty { display: none; }
.m-nav {
  position: absolute; top: calc(50% - 40px); transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.2);
  font-size: 26px; cursor: pointer;
}
.m-prev { left: 12px; } .m-next { right: 12px; }
.m-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--bg); }
.m-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; opacity: .5; cursor: pointer; border: 2px solid transparent; flex: none; }
.m-thumbs img.active { opacity: 1; border-color: var(--gold); }
.m-body { padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.m-body h3 { font-size: 34px; line-height: 1.1; }
.m-body .eyebrow { margin: 0; }
.m-price { font-family: var(--serif); font-size: 36px; font-weight: 700; color: var(--gold); margin: 0; }
.m-price.ask { font-family: var(--sans); font-size: 18px; font-weight: 600; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; }
.m-body h4 { margin: 4px 0 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.equip { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.equip li { font-size: 13px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; }
.perks-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.perks-list li::before { content: "✓ "; color: var(--gold); }
.m-desc { color: var(--muted); margin: 0; }
.m-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }

/* ---------- Responsive ---------- */
@media (min-width: 901px) {
  .m-gallery { position: sticky; top: 0; align-self: start; }
  .m-gallery > img { max-height: calc(100vh - 140px); }
}
@media (max-width: 900px) {
  .modal-box { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-call { display: none; }
  .burger { display: block; margin-left: auto; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; padding: 16px; }
  .perks { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .m-body { padding: 22px; }
}
@media (max-width: 420px) {
  .filters .f-search { grid-column: 1 / -1; }
}
