/* TD Car Centre: asphalt ground, plate-yellow accent, signage type. */
:root {
  --asphalt: #16181C;
  --panel: #1F2228;
  --panel-2: #262A31;
  --line: #32363E;
  --chalk: #E8E6E1;
  --steel: #9BA1AB;
  --plate: #F0C33C;
  --plate-ink: #101114;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--asphalt);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("../logo.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(60vw, 640px);
  opacity: 0.05;
  pointer-events: none;
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; }
a:hover { color: var(--plate); }
:focus-visible { outline: 2px solid var(--plate); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.visually-hidden, .skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
  position: fixed; top: 0.5rem; left: 0.5rem; width: auto; height: auto; clip: auto;
  background: var(--plate); color: var(--plate-ink); padding: 0.5rem 1rem; z-index: 100;
}

h1, h2, h3, .brand-name {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }
h1 strong, h3 strong { color: var(--plate); font-weight: 700; }

.eyebrow {
  color: var(--plate);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* The signature: number-plate price chip. */
.plate {
  display: inline-block;
  background: var(--plate);
  color: var(--plate-ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0.03em;
  padding: 0.4rem 0.8rem 0.35rem;
  border-radius: 5px;
  border: 2px solid #0e0f11;
  box-shadow: inset 0 0 0 2px #fbe8a8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Chrome */
.topbar { background: #101114; font-size: 0.85rem; color: var(--steel); }
.topbar a { color: var(--chalk); text-decoration: none; }
.topbar-in { display: flex; justify-content: space-between; padding-top: 0.35rem; padding-bottom: 0.35rem; }

.site-head { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--asphalt); z-index: 50; }
.head-in { display: flex; align-items: center; gap: 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand-logo { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.brand-name { font-size: 1.3rem; }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.98rem; color: var(--steel);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--chalk); }
.site-nav a.active { color: var(--chalk); border-bottom-color: var(--plate); }
.nav-toggle { display: none; }

/* Hero */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-in {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem;
  align-items: center; padding-top: 4rem; padding-bottom: 4rem;
}
.hero-sub { color: var(--steel); margin: 1.25rem 0 1.75rem; max-width: 34rem; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-car { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.hero-car img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-car-tag {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(transparent, rgba(10, 11, 13, 0.92) 45%);
}
.hero-car-name { font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 1.2rem; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--plate); color: var(--plate-ink);
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  text-decoration: none; border: 0; cursor: pointer;
  padding: 0.7rem 1.4rem; border-radius: 6px;
}
.btn:hover { background: #f7d264; color: var(--plate-ink); }
.btn-quiet { background: transparent; color: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { background: var(--panel); color: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--steel); }
.btn-block { display: block; text-align: center; }

/* Filter band */
.filter-band { background: var(--panel); border-bottom: 1px solid var(--line); padding: 1.75rem 0 2rem; }
.band-title { margin-bottom: 1rem; }
.filter-form {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 0.9rem; align-items: end;
}
.filter-form label, .admin-form label, .enquiry-form label, .contact-form label {
  display: flex; flex-direction: column; gap: 0.35rem;
  font-size: 0.86rem; color: var(--steel); font-weight: 500;
}
select, input[type="text"], input[type="email"], input[type="password"], input:not([type]), textarea {
  background: var(--asphalt); color: var(--chalk);
  border: 1.5px solid var(--line); border-radius: 6px;
  font: inherit; padding: 0.55rem 0.7rem; width: 100%;
}
select:focus, input:focus, textarea:focus { border-color: var(--plate); outline: none; }

/* Sections */
.section { padding: 3.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; }
.section-head a { color: var(--steel); }

/* Home tile strip */
.tile-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr);
  gap: 1rem; overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none; /* Firefox */
}
.tile-strip::-webkit-scrollbar { display: none; } /* Chrome/Safari/Edge */
.car-tile {
  position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; text-decoration: none; scroll-snap-align: start;
  display: flex; flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.car-tile:hover { transform: translateY(-3px); border-color: var(--steel); color: inherit; }
.car-tile img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.car-tile-name { font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 1.1rem; padding: 0.7rem 0.9rem 0; }
.car-tile-meta { color: var(--steel); font-size: 0.85rem; padding: 0 0.9rem 0.6rem; }
.car-tile .plate { margin: 0 0.9rem 0.9rem; font-size: 1.15rem; align-self: flex-start; }

/* Listings rows */
.car-rows { display: flex; flex-direction: column; gap: 1rem; }
.car-row {
  display: grid; grid-template-columns: 280px 1fr auto; gap: 1.25rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem; align-items: center;
  transition: border-color 0.15s ease;
}
.car-row:hover { border-color: var(--steel); }
.car-row-photo { position: relative; border-radius: 6px; overflow: hidden; display: block; }
.car-row-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.car-row h3 a { text-decoration: none; }
.car-specline { display: flex; flex-wrap: wrap; color: var(--steel); font-size: 0.9rem; margin-top: 0.35rem; }
.car-specline span:not(:first-child)::before { content: "\00B7"; margin: 0 0.5rem; }
.car-row-desc { color: var(--steel); font-size: 0.95rem; margin-top: 0.6rem; }
.car-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 0.8rem; padding-right: 0.5rem; }
.is-sold .car-row-photo img { filter: grayscale(0.85); opacity: 0.75; }
.sold-badge {
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 2;
  background: var(--chalk); color: var(--plate-ink);
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: 0.9rem; padding: 0.2rem 0.6rem; border-radius: 4px;
}
.sold-badge-big { position: static; display: inline-block; margin-bottom: 0.75rem; }
.coming-soon-badge {
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 2;
  background: #4A7CC7; color: #fff;
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: 0.9rem; padding: 0.2rem 0.6rem; border-radius: 4px;
}
.coming-soon-badge-big { position: static; display: inline-block; margin-bottom: 0.75rem; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; color: var(--steel); }
.sort-form label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.sort-form select { width: auto; }
.empty-state { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3rem 2rem; text-align: center; }
.empty-state p { color: var(--steel); margin: 0.75rem 0 1.25rem; }
.empty-state .btn, .empty-state .btn-quiet { margin: 0 0.35rem; }

/* Why band */
.why-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 1.75rem; }
.why-list dt {
  font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 1.25rem;
  border-top: 2px solid var(--plate); padding-top: 0.9rem; margin-bottom: 0.5rem;
}
.why-list dd { color: var(--steel); }

/* Quotes */
.quotes { background: var(--panel); border-block: 1px solid var(--line); }
.quote-rotator { max-width: 46rem; margin: 0 auto; text-align: center; position: relative; }
.quote { display: none; }
.quote.is-active { display: block; }
.quote p { font-size: 1.35rem; font-weight: 500; line-height: 1.45; }
.quote cite { display: block; margin-top: 1rem; color: var(--steel); font-style: normal; }
.quote-dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.5rem; }
.quote-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--line); padding: 0;
}
.quote-dots button[aria-selected="true"] { background: var(--plate); }

/* CTA band */
.cta-band { border-top: 1px solid var(--line); }
.cta-in { text-align: center; padding: 3.5rem 1.25rem; }
.cta-in p { color: var(--steel); margin: 0.75rem 0 1.5rem; }

/* Page head */
.page-head { padding: 2.75rem 0 1.75rem; }

/* Car detail */
.crumb { margin-bottom: 1.25rem; }
.crumb a { color: var(--steel); text-decoration: none; }
.car-detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; align-items: start; }
.gallery-main {
  display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; padding: 0; background: none; cursor: zoom-in;
}
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.gallery-thumb { border: 2px solid transparent; border-radius: 6px; overflow: hidden; padding: 0; background: none; cursor: pointer; }
.gallery-thumb img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery-thumb.is-active { border-color: var(--plate); }
.car-rail { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; position: sticky; top: 5rem; }
.car-rail h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.car-rail .plate { font-size: 1.9rem; }
.spec-table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.95rem; }
.spec-table th { text-align: left; color: var(--steel); font-weight: 500; padding: 0.45rem 0; }
.spec-table td { text-align: right; font-variant-numeric: tabular-nums; }
.spec-table tr + tr { border-top: 1px solid var(--line); }
.rail-phone { margin-top: 0.9rem; text-align: center; color: var(--steel); font-size: 0.95rem; }
.car-desc { max-width: 46rem; margin-top: 3rem; }
.car-desc h2 { margin-bottom: 1rem; }
.car-desc p { color: var(--steel); margin-bottom: 1rem; }

/* Forms */
.enquiry { max-width: 46rem; margin-top: 3rem; }
.enquiry h2 { margin-bottom: 1.25rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.enquiry-form textarea, .contact-form textarea { margin-bottom: 1rem; }
.enquiry-form label, .contact-form label { margin-bottom: 0; }
.form-error { background: #3a1d1d; border: 1px solid #7c3a3a; color: #f2c9c9; padding: 0.6rem 0.9rem; border-radius: 6px; margin-bottom: 0.75rem; }
.form-success { background: #1d3a24; border: 1px solid #3a7c4c; color: #cdf2d6; padding: 0.9rem 1.1rem; border-radius: 6px; }
.hp-field { position: absolute; left: -9999px; }

/* Content pages */
.finance-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.finance-cols h2 { margin-bottom: 1rem; }
.finance-cols p { color: var(--steel); margin-bottom: 1rem; }
.plain-list { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.plain-list li { padding: 0.5rem 0; border-top: 1px solid var(--line); }
.plain-list li::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; background: var(--plate); border-radius: 2px; margin-right: 0.7rem; }
.about-copy { max-width: 46rem; }
.about-copy .lead { font-size: 1.3rem; font-weight: 500; margin-bottom: 1.25rem; }
.about-copy p:not(.lead) { color: var(--steel); margin-bottom: 1.25rem; }
.about-copy .hero-cta { margin-top: 2rem; }
@media (max-width: 900px) {
  .finance-cols { grid-template-columns: 1fr; gap: 2rem; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; }
.contact-grid h2 { font-size: 1.4rem; margin-bottom: 0.75rem; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 2rem; background: #121417; }
.foot-in { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 3rem 1.25rem 2rem; }
.foot-name { font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 1.3rem; margin-bottom: 0.6rem; }
.foot-label { color: var(--chalk); font-weight: 600; margin-bottom: 0.6rem; }
.foot-addr { color: var(--steel); font-size: 0.95rem; }
.foot-addr a { color: var(--steel); }
.foot-credit { border-top: 1px solid var(--line); padding-top: 1.1rem; padding-bottom: 1.1rem; font-size: 0.85rem; }
.foot-credit a { color: var(--steel); text-decoration: none; }
.foot-credit a:hover { color: var(--plate); }

/* Lightbox */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 9, 10, 0.94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: min(92vw, 1400px); max-height: 88vh; object-fit: contain; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--chalk);
  font-size: 2rem; cursor: pointer; padding: 1rem;
}
.lightbox-close { top: 0.5rem; right: 0.75rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

/* Admin */
.admin-body { background: var(--asphalt); }
.admin-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); background: var(--panel);
}
.admin-bar nav { display: flex; gap: 1.1rem; align-items: center; }
.admin-main { max-width: 960px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.admin-login { max-width: 22rem; margin: 5rem auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 2rem; }
.admin-login h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
.admin-login label { display: block; color: var(--steel); font-size: 0.9rem; margin-bottom: 0.4rem; }
.admin-login input { margin-bottom: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table img { border-radius: 4px; }
.admin-form { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.admin-form .form-grid { margin-bottom: 0; }
.admin-form .btn { align-self: flex-start; }
.inline-form { display: inline; }
.linklike { background: none; border: 0; color: var(--chalk); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.linklike:hover { color: var(--plate); }
.linklike.danger { color: #e08585; }
.status-sold { color: #e08585; font-weight: 600; }
.status-available { color: #8fd8a0; font-weight: 600; }
.status-coming_soon { color: #7ea8e0; font-weight: 600; }
.check { flex-direction: row !important; align-items: center; gap: 0.5rem !important; }
.check input { width: auto; }
.photo-admin { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-top: 1rem; }
.photo-admin li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem; font-size: 0.85rem; }
.photo-admin img { border-radius: 4px; margin-bottom: 0.5rem; }
.badge { background: var(--plate); color: var(--plate-ink); font-weight: 600; border-radius: 4px; padding: 0.1rem 0.45rem; font-size: 0.8rem; }

/* Responsive */
@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 2.5rem; padding-bottom: 2.5rem; }
  .filter-form { grid-template-columns: 1fr 1fr; }
  .filter-form .btn { grid-column: 1 / -1; }
  .car-detail-grid { grid-template-columns: 1fr; }
  .car-rail { position: static; }
  .why-list { grid-template-columns: 1fr; gap: 1.75rem; }
  .foot-in { grid-template-columns: 1fr; }
  .car-row { grid-template-columns: 1fr; }
  .car-row-side { flex-direction: row; align-items: center; justify-content: space-between; padding-right: 0; }

  .nav-toggle {
    display: block; background: none; border: 1.5px solid var(--line); border-radius: 6px;
    color: var(--chalk); font: inherit; padding: 0.35rem 0.9rem; cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--panel);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); }
  .site-nav a.active { border-bottom-color: var(--line); color: var(--plate); }
}
