/* Axis Motors — premium automotive UI · vanilla PHP + CSS · 2026 */

:root {
  color-scheme: dark light;
  --font-display: 'Sora', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --silver: #c7ccd6;
  --blue: #3b82f6;
  --blue-deep: #1d4ed8;
  --ink: #0b1020;
  --paper: #f6f7fb;

  --bg: #05070e;
  --bg-elev: rgba(255, 255, 255, 0.06);
  --fg: #eef1f9;
  --muted: rgba(238, 241, 249, 0.66);
  --border: rgba(255, 255, 255, 0.12);

  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.28);
}

:root[data-theme='light'] {
  --bg: var(--paper);
  --bg-elev: rgba(255, 255, 255, 0.78);
  --fg: var(--ink);
  --muted: rgba(17, 24, 39, 0.58);
  --border: rgba(15, 23, 42, 0.1);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.1);
}

/* Native controls follow one scheme (fixes unreadable selects in dark UI). */
html[data-theme='dark'] { color-scheme: dark; }
html[data-theme='light'] { color-scheme: light; }

/* Fallback before JS applies data-theme — match system preference */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) { color-scheme: dark; }
}
@media (prefers-color-scheme: light) {
  html:not([data-theme]) { color-scheme: light; }
}

* { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at 10% -10%, rgba(59, 130, 246, 0.09), transparent 45%), var(--bg);
  color: var(--fg);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a { color: inherit; text-decoration-thickness: 1px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 14px);
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  box-shadow: var(--shadow);
  z-index: 1000;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.container.narrow {
  width: min(740px, 92vw);
}

.glass {
  background: linear-gradient(120deg, var(--bg-elev), transparent);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}

.glass-card {
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
}

.pad-xl { padding: clamp(20px, 3vw, 32px); }
.pad-lg { padding: clamp(16px, 2.8vw, 28px); }

.site-header.glass {
  position: sticky;
  top: 0;
  z-index: 200;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem clamp(14px, 3vw, 8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
}

.brand-mark {
  width: 40px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff 0%, var(--silver) 50%, var(--blue) 100%);
}

.nav-toggle { display: none; }

.theme-toggle {
  margin-left: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: inherit;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  opacity: 0.9;
}

.nav a:hover { opacity: 1; color: var(--blue); }

.nav-cta {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav-cta--ghost {
  border-color: var(--border);
}

.nav-cta:not(.nav-cta--ghost) {
  background: linear-gradient(120deg, var(--blue), var(--blue-deep));
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.32);
}

@media (max-width: 940px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    padding: 0.45rem 0.9rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    color: inherit;
  }
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: clamp(14px, 3vw, 8px);
    background: rgba(6, 8, 16, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    flex-direction: column;
    align-items: flex-start;
    display: none;
    min-width: 220px;
  }
  :root[data-theme='light'] .nav {
    background: rgba(255, 255, 255, 0.93);
  }
  body.nav-open .nav { display: flex; }
}

.hero-home {
  position: relative;
  min-height: 85vh;
  display: grid;
  align-items: end;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.06) brightness(0.92);
}

.hero-media { position: absolute; inset: 0; overflow: hidden; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% -10%, rgba(59,130,246,0.55), transparent 45%),
    linear-gradient(to top, rgba(0,0,0,0.9), transparent 62%),
    url('../img/hero-fallback.svg');
  background-size: cover;
  opacity: 0.95;
}

.hero-content {
  position: relative;
  padding-block: clamp(48px, 10vh, 88px);
  z-index: 2;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 4vw, 3.55rem);
  margin: 0 0 0.6rem;
  letter-spacing: -0.04em;
}

.hero-lead { max-width: 520px; color: var(--muted); margin: 0 0 1rem; font-size: 1.06rem; }

.eyebrow {
  letter-spacing: 0.38em;
  text-transform: uppercase;
  font-size: 11px;
  color: rgba(238,241,249,0.55);
}

:root[data-theme='light'] .eyebrow { color: rgba(17,24,39,0.45); }

.hero-search {
  margin-top: 1rem;
}

.search-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1rem;
}

.input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: inherit;
  padding: 0.76rem 0.92rem;
  font: inherit;
  transition: border 0.22s ease, box-shadow 0.22s ease;
}

:root[data-theme='light'] .input { background: #fff; color: var(--fg); }

/*
 * Dark theme · storefront forms only (#main excludes admin#main).
 * Native <select> often ignores colour inheritance; opaque surface fixes contrast on glass panels.
 */
html[data-theme='dark'] #main input.input,
html[data-theme='dark'] #main textarea.input,
html[data-theme='dark'] #main select.input {
  background-color: #141c30;
  color: #f0f4fd;
  border-color: rgba(255, 255, 255, 0.22);
}

html[data-theme='dark'] #main select.input option {
  background-color: #0f172a;
  color: #f8fafc;
}

html[data-theme='light'] #main select.input option {
  background-color: #fff;
  color: #111827;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) #main input.input,
  html:not([data-theme]) #main textarea.input,
  html:not([data-theme]) #main select.input {
    background-color: #141c30;
    color: #f0f4fd;
    border-color: rgba(255, 255, 255, 0.22);
  }
  html:not([data-theme]) #main select.input option {
    background-color: #0f172a;
    color: #f8fafc;
  }
}

.input:focus-visible {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.28);
}

label span { display: block; margin-bottom: 0.38rem; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  border: none;
  padding: 0.78rem 1.6rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(120deg, var(--blue), var(--blue-deep));
  color: #fff;
  box-shadow: 0 24px 50px rgba(59,130,246,0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: inherit;
}

.btn-inline { align-self: flex-start; }

.btn-block { width: 100%; }

.section { padding-block: clamp(48px, 8vw, 96px); }
.section--muted { background: radial-gradient(circle at 110% -20%, rgba(59,130,246,0.14), transparent 45%), transparent; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  margin: 0;
}

.hero--compact .display {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
  font-size: clamp(2rem, 3.4vw, 2.7rem);
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.muted { color: var(--muted); }
.fine-print { font-size: 0.9rem; }

.card-grid {
  display: grid;
  gap: 1.35rem;
}
.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.car-card { overflow: hidden; }

.car-card .card-body { padding: 1rem 1.05rem 1.3rem; }
.car-card img { aspect-ratio: 16/11; width: 100%; object-fit: cover; }

.card-link { text-decoration: none; }

.price { font-size: 1.08rem; }

.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.65rem;
  scroll-snap-type: x mandatory;
}

.tile {
  scroll-snap-align: start;
  min-width: 190px;
  border-radius: 18px;
  overflow: hidden;
}
.tile-body { padding: 0.8rem 0.92rem 1rem; font-weight: 600; }

.marque-strip { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.marque-chip { padding: 0.55rem 1rem; border-radius: 999px; font-weight: 600; text-decoration: none; transition: transform 0.2s ease; }
.marque-chip:hover { transform: translateY(-1px); }

.split-section .split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(22px, 4vw, 36px);
  align-items: center;
}

.quotes {
  display: grid;
  gap: 1rem;
}

.quote { margin: 0; }
.quote cite {
  margin-top: 0.85rem;
  display: block;
  color: var(--muted);
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: clamp(40px, 6vw, 70px);
  background: radial-gradient(circle at 20% -30%, rgba(59,130,246,0.16), transparent 45%);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(28px, 5vw, 48px);
}
.footer-links { padding: 0; margin: 0.35rem 0 0 0; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-brand { font-weight: 700; font-family: var(--font-display); margin-bottom: 0.65rem; }
.footer-meta {
  padding-top: 1.85rem;
  border-top: 1px dashed var(--border);
  margin-top: 2rem;
}

.checklist {
  padding: 0 0 0 1.05rem;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
}

.tools .filters { animation: drift 44s infinite linear alternate; }

@keyframes drift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 0%; }
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.95rem;
  margin-bottom: 1rem;
}

.tool-actions {
  display: flex;
  gap: 0.95rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.view-toggle {
  display: inline-flex;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}
.view-toggle a {
  border-radius: 999px;
  padding: 0.4rem 0.92rem;
  text-decoration: none;
  opacity: 0.7;
}
.view-toggle .is-active { background: rgba(59,130,246,0.18); opacity: 1; }

.list-view { display: grid; gap: 0.9rem; }

.row.glass-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem !important;
  border-radius: 18px !important;
}
.row img {
  aspect-ratio: 16/11;
  object-fit: cover;
  border-radius: 14px;
}
.row-price strong { font-size: 1.09rem; }

.price-old {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(248, 113, 113, 0.9);
}
.pill {
  padding: 0.25rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.34);
}
.pill--muted { opacity: 0.75; }

.gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.62fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-main { position: relative; padding: clamp(14px, 2vw, 18px); }
.gallery-main img {
  border-radius: 18px;
  width: 100%;
  aspect-ratio: 16/11;
  object-fit: cover;
}

.zoom-btn {
  position: absolute;
  top: clamp(22px, 3vw, 30px);
  right: clamp(22px, 3vw, 30px);
  border-radius: 999px;
  border: none;
  padding: 0.52rem 0.94rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.62);
  color: white;
}

.gallery-thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 12px;
  border: none;
  margin-bottom: 0.72rem;
  overflow: hidden;
  cursor: pointer;
  outline-offset: 2px;
}

.gallery-thumbs .thumb.active { box-shadow: 0 0 0 3px rgba(59,130,246,0.45); border-radius: 12px; }
.gallery-thumbs img { aspect-ratio: 16/11; width: 100%; object-fit: cover; }

.details-grid {
  display: grid;
  gap: clamp(22px, 4vw, 36px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-top: 1rem;
}

.display-price {
  font-size: clamp(2rem, 3vw, 2.85rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  font-family: var(--font-display);
}

.actions-inline {
  margin-top: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.specs div {
  display: grid;
  grid-template-columns: 170px auto;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}
.specs dd { margin: 0; }
.specs dt { letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.75rem; opacity: 0.75; margin: 0; }

.section--compact { padding-top: 1rem; padding-bottom: 1rem; }
.breadcrumbs a { opacity: 0.75; }

.text-link { opacity: 0.75; font-weight: 600; color: inherit; }

.form-stack label { display: grid; gap: 0.4rem; }
.form-stack textarea { resize: vertical; }

.flash {
  padding: 0.75rem 0.92rem;
  border-radius: 14px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}
.flash--ok { background: rgba(34,197,94,0.15); }
.flash--err { background: rgba(248,113,113,0.15); }

.auth-card { margin-bottom: 3rem; }

.prose { max-width: 720px; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

body.nav-open header + main { pointer-events: auto; }

/* Zoom modal */

.zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 48px);
}
.zoom-modal.is-open {
  display: flex;
}

.zoom-modal img {
  width: auto;
  max-width: min(1360px, 96vw);
  max-height: 88vh;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.zoom-close {
  position: absolute;
  top: 24px;
  right: clamp(22px, 4vw, 48px);
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: white;
  width: 44px;
  height: 44px;
  cursor: pointer;
  font-weight: bold;
}

.zoom-close:hover { background: rgba(255,255,255,0.24); }

.hero--grain:after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(transparent 0, rgba(0,0,0,0.5) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' stitchTiles='stitch' type='fractalNoise' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' fill='white'/%3E%3Crect width='120' height='120' fill='transparent' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.section-head-meta { margin: 0; max-width: 26rem; text-align: right; opacity: 0.9; }
@media (max-width: 720px) {
  .section-head-meta { text-align: left; max-width: none; }
}

/* Home — tighter, catalogue-style cards */
.section--home-cards { padding-block: clamp(36px, 6vw, 72px); }

.home-feature-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
}
@media (min-width: 1200px) {
  .home-feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.home-car-card {
  overflow: hidden;
  border-radius: 17px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.home-car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
}
:root[data-theme='light'] .home-car-card:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.home-car-card__link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.home-car-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: clamp(136px, 22vw, 188px);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
}

.home-car-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-car-card:hover .home-car-card__media img {
  transform: scale(1.06);
}

.home-car-card__body {
  padding: 0.8rem 0.95rem 1rem;
}

.home-car-card__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.32rem;
  line-height: 1.28;
}

.home-car-card__tags {
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.28rem;
}

.home-car-card__dot { opacity: 0.45; font-weight: 300; }

.home-car-card__loc { margin: 0.4rem 0 0; }

.home-car-card__price {
  margin: 0.52rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
}

.home-car-card__oldprice {
  margin: 0.36rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(248, 113, 113, 0.88);
}

.home-car-card__cur {
  font-size: 0.82em;
  opacity: 0.72;
  font-weight: 600;
}

.section--home-latest { padding-block: clamp(40px, 6vw, 80px); }

.home-latest-row {
  display: flex;
  gap: 0.82rem;
  overflow-x: auto;
  padding-bottom: 0.55rem;
  scroll-snap-type: x mandatory;
}

.home-latest-card {
  flex: 0 0 auto;
  width: clamp(134px, 29vw, 164px);
  border-radius: 14px;
  overflow: hidden;
  scroll-snap-align: start;
}

.home-latest-card__link {
  text-decoration: none;
  color: inherit;
}

.home-latest-card__media {
  aspect-ratio: 1;
  max-height: 118px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.14);
}

.home-latest-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-latest-card__body {
  padding: 0.48rem 0.62rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
}

.home-latest-card__model {
  font-weight: 700;
  font-size: 0.84rem;
  line-height: 1.22;
}

.section--home-sold {
  padding-top: clamp(36px, 5vw, 64px);
}

.sold-card {
  position: relative;
  overflow: hidden;
}

.sold-card__media-wrap {
  position: relative;
}

.sold-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(120deg, #ef4444, #b91c1c);
  box-shadow: 0 8px 22px rgba(185, 28, 28, 0.35);
}

/* Vehicle detail — magazine layout */
.listing-page { padding-block: clamp(26px, 5vw, 54px); }

.listing-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem 0.55rem;
  margin-bottom: 1.45rem;
  letter-spacing: 0.04em;
}

.listing-breadcrumb a {
  text-decoration: none;
  opacity: 0.82;
}

.listing-breadcrumb span[aria-hidden='true'] { opacity: 0.35; padding: 0 0.1rem; }

.listing-shell {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(268px, 348px);
  align-items: start;
  margin-bottom: 2rem;
}

@media (max-width: 920px) {
  .listing-shell {
    grid-template-columns: 1fr;
  }
}

.listing-gallery-column { min-width: 0; }

.listing-hero-frame {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 21px;
  border: none;
}

.listing-hero-frame .gallery-hero {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  max-height: min(52vh, 540px);
  object-fit: cover;
}

.listing-zoom-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(4, 6, 12, 0.62);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.42rem 0.82rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.listing-zoom-btn:hover {
  background: rgba(4, 6, 12, 0.78);
}

.listing-thumb-filmstrip {
  display: flex;
  gap: 0.48rem;
  margin-top: 0.62rem;
  overflow-x: auto;
  padding-bottom: 0.28rem;
  scroll-snap-type: x mandatory;
}

.listing-thumb {
  flex: 0 0 auto;
  width: 74px;
  height: 50px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  background: transparent;
  scroll-snap-align: start;
  opacity: 0.74;
  transition: opacity 0.2s, border-color 0.2s, transform 0.22s ease;
}

.listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-thumb:hover { opacity: 1; }

.listing-thumb.is-active,
.listing-thumb.active {
  opacity: 1;
  border-color: rgba(59, 130, 246, 0.72);
  transform: translateY(-2px);
}

.listing-aside {
  position: sticky;
  top: calc(5.75rem + 12px);
  align-self: start;
  border-radius: 21px;
}

@media (max-width: 920px) {
  .listing-aside { position: static; }
}

.listing-aside-brand {
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 0 0 0.32rem;
}

.listing-title {
  font-family: var(--font-display);
  font-size: clamp(1.68rem, 4.2vw, 2.32rem);
  font-weight: 700;
  letter-spacing: -0.042em;
  margin: 0;
  line-height: 1.08;
}

.listing-trim {
  margin: 0.45rem 0 0;
  font-size: 0.94rem;
}

.listing-price-box {
  margin: 1.15rem 0 1.05rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.52rem 0.82rem;
}

.listing-price-num {
  font-family: var(--font-display);
  font-size: clamp(1.76rem, 4vw, 2.42rem);
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

.listing-price-ccy {
  font-size: 1.05rem;
  opacity: 0.72;
  font-weight: 600;
}

.listing-price-old {
  margin-right: 0.2rem;
  font-size: 0.96rem;
}

.listing-chip {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.26rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
}

.listing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
}

.listing-actions-row {
  display: flex;
  gap: 0.48rem;
}

.btn-block-sm {
  width: 100%;
  justify-content: center;
}

.btn-flex {
  flex: 1;
  justify-content: center;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}

.listing-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
  margin-bottom: 2rem;
}

@media (max-width: 720px) {
  .listing-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.hl-card {
  padding: 0.95rem 1.05rem;
  border-radius: 16px;
}

.hl-card__label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.38rem;
}

.hl-card__value {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.12;
}

.hl-card__value small {
  font-size: 0.62em;
  font-weight: 600;
  opacity: 0.62;
  margin-left: 0.12em;
}

.listing-spec-wall { margin-bottom: 2rem; }

.listing-section-heading {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.82rem;
}

.spec-wall-grid {
  display: grid;
  gap: 0.72rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 820px) {
  .spec-wall-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.spec-tile {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  min-height: 5.4rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.spec-tile--wide {
  grid-column: span 2;
}

@media (max-width: 719px) {
  .spec-tile--wide {
    grid-column: span 1;
  }
}

.spec-tile--mono {
  grid-column: span 2;
}

@media (max-width: 719px) {
  .spec-tile--mono {
    grid-column: span 1;
  }
}

.spec-tile__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.32rem;
}

.spec-tile__value {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 500;
  line-height: 1.38;
}

.listing-vin {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.listing-features { margin-bottom: 2rem; }

.feature-chip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.feature-chip {
  display: inline-block;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: linear-gradient(140deg, var(--bg-elev), transparent);
}

.listing-two-col {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 2rem;
}

.listing-panel-heading {
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin: 0 0 0.55rem;
}

.listing-panel--soft {
  background: linear-gradient(155deg, rgba(59, 130, 246, 0.09), transparent);
}

.listing-enquiry label span {
  display: block;
  margin-bottom: 0.28rem;
}

.listing-story { margin-bottom: 2.4rem; }

.listing-story-body {
  position: relative;
  display: grid;
  grid-template-columns: 3px minmax(0, 1fr);
  gap: 1.2rem;
  border-radius: 18px;
  overflow: hidden;
}

.listing-story-accent {
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  border-radius: 3px;
}

.listing-story-text {
  font-size: 1.04rem;
  line-height: 1.76;
  opacity: 0.94;
}

.listing-related-section {
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.listing-related-section .heading {
  margin-bottom: 1.2rem;
}

/* —— Admin —— */
.admin-body { min-height: 100vh; margin: 0; }
.admin-shell {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  min-height: 100vh;
}
.admin-sidebar {
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-brand { font-family: var(--font-display); font-weight: 700; }
.admin-brand a { text-decoration: none; }
.admin-nav { display: flex; flex-direction: column; gap: 0.45rem; }
.admin-nav a { text-decoration: none; padding: 0.45rem 0.55rem; border-radius: 10px; color: var(--muted); }
.admin-nav a:hover { color: var(--fg); background: var(--bg-elev); }
.admin-nav-cta { font-weight: 600; color: var(--blue); }
.admin-nav-muted { font-size: 0.9rem; }
.admin-main-wrap { padding: clamp(20px, 3vw, 40px); overflow-x: auto; }
.admin-main { max-width: 1100px; }
.admin-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat-num { display: block; font-size: 1.75rem; margin-top: 0.35rem; font-family: var(--font-display); }
.admin-table-wrap { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.96rem; }
.admin-table th,
.admin-table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.7; }
.admin-pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.78rem;
}
.admin-actions { white-space: nowrap; }
.admin-actions a { margin-right: 0.65rem; }
.admin-inline-form { display: inline; }
.admin-link-danger {
  background: none; border: none; color: #f87171; cursor: pointer; font: inherit; text-decoration: underline;
  padding: 0;
}
.admin-form-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.admin-form fieldset,
.admin-fieldset-full {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1rem 0.5rem;
  margin: 0 0 1rem;
}
.admin-form legend {
  padding: 0 0.35rem;
  font-weight: 600;
  font-family: var(--font-display);
}
.admin-form label { display: block; margin-bottom: 0.75rem; }
.admin-form .req { color: var(--blue); }
.admin-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.admin-feature-grid {
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.admin-photo-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.admin-photo-tile { display: block; }
.admin-photo-tile img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 0.35rem;
  border: 1px solid var(--border);
}
.admin-form-actions { margin-top: 1rem; }

/*
 * Admin (body.admin-body) — same theme token as storefront (html[data-theme] from app.js).
 * Inputs were excluded from #main fixes; tables + glass cards need solid field surfaces.
 */
html[data-theme='dark'] body.admin-body input.input,
html[data-theme='dark'] body.admin-body textarea.input,
html[data-theme='dark'] body.admin-body select.input {
  background-color: #151d33;
  color: #f1f5fb;
  border-color: rgba(255, 255, 255, 0.24);
}

html[data-theme='dark'] body.admin-body select.input option {
  background-color: #0f172a;
  color: #f8fafc;
}

html[data-theme='light'] body.admin-body select.input option {
  background-color: #fff;
  color: #111827;
}

html[data-theme='light'] body.admin-body input.input,
html[data-theme='light'] body.admin-body textarea.input,
html[data-theme='light'] body.admin-body select.input {
  background-color: #fff;
  color: var(--fg);
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-theme='dark'] body.admin-body .admin-table td,
html[data-theme='dark'] body.admin-body .admin-table th {
  color: #ebeef7;
}

html[data-theme='dark'] body.admin-body .admin-table th {
  opacity: 1;
  color: rgba(235, 238, 247, 0.82);
}

html[data-theme='dark'] body.admin-body .admin-table .fine-print,
html[data-theme='dark'] body.admin-body .admin-table .muted {
  color: rgba(220, 228, 245, 0.78);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) body.admin-body input.input,
  html:not([data-theme]) body.admin-body textarea.input,
  html:not([data-theme]) body.admin-body select.input {
    background-color: #151d33;
    color: #f1f5fb;
    border-color: rgba(255, 255, 255, 0.24);
  }
  html:not([data-theme]) body.admin-body select.input option {
    background-color: #0f172a;
    color: #f8fafc;
  }
  html:not([data-theme]) body.admin-body .admin-table td,
  html:not([data-theme]) body.admin-body .admin-table th {
    color: #ebeef7;
  }
}

html[data-theme='dark'] body.admin-body .admin-form legend,
html[data-theme='dark'] body.admin-body .admin-page-head .display {
  color: #f4f6fd;
}

html[data-theme='dark'] body.admin-body .admin-page-head .muted {
  color: rgba(226, 232, 247, 0.75);
}

.brand-logo-img {
  height: 36px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
  flex-shrink: 0;
}

.wa-fab {
  position: fixed;
  bottom: max(1.1rem, env(safe-area-inset-bottom, 0px));
  right: max(1.1rem, env(safe-area-inset-right, 0px));
  z-index: 210;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: #fff !important;
  background: #25d366;
  box-shadow: 0 14px 32px rgba(37, 211, 102, 0.35);
}

.wa-fab:hover { filter: brightness(1.07); }

/* ---------- Public storefront templates (admin: Site settings) ---------- */
body.site-tpl { min-height: 100vh; }

/* Aurora matches the baseline theme (explicit hook for tweaks). */

html[data-theme='dark'] body.site-tpl--studio {
  --silver: #94a3b8;
  --blue: #fb923c;
  --blue-deep: #ea580c;
  --bg: #09090b;
  --border: rgba(255, 255, 255, 0.09);
  background-color: var(--bg);
  background-image: linear-gradient(180deg, rgba(251, 146, 60, 0.07), transparent 32%);
}

html[data-theme='light'] body.site-tpl--studio {
  --silver: #64748b;
  --blue: #ea580c;
  --blue-deep: #c2410c;
  --bg: #fafafa;
  --fg: #0f172a;
  --muted: rgba(15, 23, 42, 0.58);
  --border: rgba(15, 23, 42, 0.1);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 100% -10%, rgba(251, 146, 60, 0.1), transparent 45%);
}

body.site-tpl--studio .site-header.glass {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.site-tpl--studio .glass-card {
  border-radius: 14px;
  box-shadow: none;
  border-width: 1px;
}

body.site-tpl--studio .nav-cta:not(.nav-cta--ghost) {
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.25);
}

html[data-theme='dark'] body.site-tpl--heritage {
  --silver: #bfa999;
  --blue: #ea580c;
  --blue-deep: #9a3412;
  --bg: #100d0b;
  --fg: #f8f3ed;
  --muted: rgba(248, 243, 237, 0.65);
  --border: rgba(255, 235, 210, 0.12);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(234, 88, 12, 0.14), transparent),
    radial-gradient(circle at 100% 100%, rgba(120, 53, 15, 0.2), transparent 40%);
}

html[data-theme='light'] body.site-tpl--heritage {
  --silver: #78716c;
  --blue: #c2410c;
  --blue-deep: #9a3412;
  --bg: #faf6f0;
  --fg: #1c1917;
  --muted: rgba(28, 25, 23, 0.6);
  --border: rgba(120, 53, 15, 0.12);
  background-color: var(--bg);
  background-image: linear-gradient(185deg, #fffefb 0%, #f9f5ef 42%, var(--bg) 100%);
}

body.site-tpl--heritage {
  --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
}

body.site-tpl--heritage .brand-mark {
  background: linear-gradient(90deg, #fcd34d, #ea580c, #7c2d12);
}

body.site-tpl--heritage .site-footer {
  border-top: 1px solid var(--border);
}

body.site-tpl--heritage .glass-card {
  border-radius: 18px;
}

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: relative; height: auto; flex-flow: row wrap; }
  .gallery-grid { grid-template-columns: 1fr; }
  .row.glass-card { grid-template-columns: 1fr; text-align: left; }
}
