/* ==========================================================================
   Avonside Auto — premium dealership theme
   ========================================================================== */

:root {
  --navy-950: #070d19;
  --navy-900: #0a1526;
  --navy-800: #132340;
  --navy-700: #1c3153;
  --gold-100: #f4e2a1;
  --gold-300: #e0bf5c;
  --gold-500: #c9a12b;
  --gold-700: #8a6410;
  --burgundy-600: #7a1f2b;
  --burgundy-700: #551017;
  --cream-050: #faf8f3;
  --cream-100: #f3efe4;
  --ink-900: #14171c;
  --ink-700: #3a3f47;
  --ink-500: #6b7280;
  --line: #e7e1d2;
  --white: #ffffff;
  --success: #2f6f4f;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-md: 0 8px 24px rgba(10, 21, 38, 0.10);
  --shadow-lg: 0 20px 50px rgba(10, 21, 38, 0.18);
  --container: 1240px;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--cream-050);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; margin: 0 0 0.5em; line-height: 1.15; color: var(--navy-900); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--navy { background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%); color: var(--cream-100); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--gold-100); }
.section--cream { background: var(--cream-100); }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 3px; font-size: 12.5px;
  font-weight: 600; color: var(--gold-700); margin-bottom: 10px;
}
.section--navy .eyebrow { color: var(--gold-300); }
.lede { font-size: 18px; color: var(--ink-500); max-width: 640px; }
.section--navy .lede { color: #b9c2d4; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 600; font-size: 15px;
  border: 1.5px solid transparent; transition: all .18s ease; white-space: nowrap;
}
.btn--gold { background: linear-gradient(135deg, var(--gold-100), var(--gold-500)); color: var(--navy-950); border-color: var(--gold-500); }
.btn--gold:hover { filter: brightness(1.06); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--navy-900); border-color: var(--navy-900); }
.btn--outline:hover { background: var(--navy-900); color: var(--gold-100); }
.section--navy .btn--outline { color: var(--gold-100); border-color: var(--gold-300); }
.section--navy .btn--outline:hover { background: var(--gold-300); color: var(--navy-950); }
.btn--sm { padding: 9px 18px; font-size: 13.5px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(10,21,38,0.97);
  backdrop-filter: blur(6px); border-bottom: 1px solid rgba(201,161,43,0.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; max-width: var(--container); margin: 0 auto; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 44px; width: auto; }
.brand-text { font-family: var(--font-serif); color: var(--gold-100); line-height: 1.1; }
.brand-text strong { display: block; font-size: 16px; letter-spacing: 1px; }
.brand-text span { display: block; font-size: 10px; letter-spacing: 2.5px; color: var(--gold-500); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { color: #dbe3f0; font-size: 14.5px; font-weight: 500; letter-spacing: 0.3px; padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold-100); border-color: var(--gold-500); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.header-phone { color: var(--gold-100); font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(201,161,43,0.5); border-radius: var(--radius-sm); padding: 8px 10px; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ''; display: block; width: 20px; height: 2px; background: var(--gold-100); margin: 4px 0; }

@media (max-width: 900px) {
  .main-nav { position: fixed; inset: 68px 0 0 0; background: var(--navy-950); flex-direction: column;
    align-items: flex-start; padding: 24px 28px; gap: 4px; transform: translateX(100%); transition: transform .25s ease;
    overflow-y: auto; }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.08); font-size: 17px; }
  .nav-toggle { display: block; }
  .header-phone span.phone-text { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; background: radial-gradient(circle at 30% 20%, #1c3153 0%, #0a1526 55%, #070d19 100%);
  color: var(--cream-100); padding: 96px 0 84px; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0; opacity: 0.06; pointer-events: none;
  background-image: radial-gradient(circle, var(--gold-500) 1px, transparent 1px); background-size: 26px 26px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); color: var(--white); }
.hero h1 em { font-style: normal; color: var(--gold-300); }
.hero-badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 8px; }
.hero-badge { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); border: 1px solid rgba(201,161,43,0.3); padding: 10px 16px; border-radius: 999px; font-size: 13.5px; color: var(--gold-100); }
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-crest { display: flex; justify-content: center; }
.hero-crest img { width: 220px; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.45)); }

/* search bar */
.search-bar { background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: 18px; display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; margin-top: 36px; }
.search-bar select, .search-bar input { padding: 12px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 14.5px; color: var(--ink-900); background: var(--white); }
@media (max-width: 900px) { .search-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .search-bar { grid-template-columns: 1fr; } .hero-grid { grid-template-columns: 1fr; } .hero-crest { order: -1; } .hero-crest img { width: 130px; } }

/* ---------- Trust strip ---------- */
.trust-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust-item { text-align: center; padding: 20px 12px; }
.trust-item .icon { margin-bottom: 12px; color: var(--gold-700); display: flex; align-items: center; justify-content: center; }
.trust-item h4 { font-size: 15.5px; margin-bottom: 4px; }
.trust-item p { font-size: 13.5px; color: var(--ink-500); margin: 0; }
@media (max-width: 760px) { .trust-strip { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Section headers ---------- */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }

/* ---------- Vehicle grid & cards ---------- */
.vehicle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .vehicle-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .vehicle-grid { grid-template-columns: 1fr; } }

.vehicle-card { background: var(--white); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--line); transition: transform .18s ease, box-shadow .18s ease; display: flex; flex-direction: column; }
.vehicle-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vehicle-card__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--navy-800); }
.vehicle-card__media img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--burgundy-600); color: var(--white); font-size: 11.5px; font-weight: 700; letter-spacing: 1px; padding: 6px 12px; border-radius: 999px; text-transform: uppercase; }
.badge--gold { background: linear-gradient(135deg, var(--gold-100), var(--gold-500)); color: var(--navy-950); }
.badge--sold { background: var(--ink-900); }
.vehicle-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vehicle-card__title { font-size: 18px; margin: 0; }
.vehicle-card__sub { color: var(--ink-500); font-size: 13.5px; margin: -4px 0 4px; }
.vehicle-card__specs { display: flex; flex-wrap: wrap; gap: 8px 10px; font-size: 12.5px; color: var(--ink-500); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.vehicle-card__specs span + span::before { content: '·'; margin-right: 10px; color: var(--gold-500); }
.vehicle-card__price { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 10px; }
.price { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--navy-900); }
.price-was { text-decoration: line-through; color: var(--ink-500); font-size: 14px; }
.vehicle-card__cta { margin-top: 10px; }

/* ---------- Filters ---------- */
.filters { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; display: grid; grid-template-columns: repeat(5, 1fr) auto; gap: 12px; margin-bottom: 32px; box-shadow: var(--shadow-md); }
.filters select, .filters input { padding: 11px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } }
.results-meta { color: var(--ink-500); font-size: 14px; margin-bottom: 18px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-500); }

/* ---------- Vehicle detail page ---------- */
.vdp-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start; }
@media (max-width: 980px) { .vdp-grid { grid-template-columns: 1fr; } }
.gallery-main { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; background: var(--navy-800); margin-bottom: 12px; box-shadow: var(--shadow-md); position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.gallery-thumbs img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; opacity: 0.75; transition: opacity .15s, border-color .15s; }
.gallery-thumbs img.active, .gallery-thumbs img:hover { opacity: 1; border-color: var(--gold-500); }

.vdp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.vdp-title { font-size: 30px; margin-bottom: 2px; }
.vdp-sub { color: var(--ink-500); margin-bottom: 0; }
.vdp-price-block { text-align: right; }
.vdp-price-block .price { font-size: 32px; }

.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.spec-table tr { border-bottom: 1px solid var(--line); }
.spec-table td { padding: 10px 4px; font-size: 14.5px; }
.spec-table td:first-child { color: var(--ink-500); width: 46%; }
.spec-table td:last-child { font-weight: 600; text-align: right; }

.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; margin: 16px 0; }
.feature-list li { font-size: 14.5px; padding-left: 22px; position: relative; }
.feature-list li::before { content: '✓'; position: absolute; left: 0; color: var(--gold-700); font-weight: 700; }

.sidebar-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-md); margin-bottom: 20px; }
.sidebar-card h3 { font-size: 18px; }
.warranty-card { background: linear-gradient(135deg, var(--navy-800), var(--navy-950)); color: var(--cream-100); }
.warranty-card h3 { color: var(--gold-100); }
.warranty-card p { color: #b9c2d4; font-size: 14px; }

.enquiry-form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--ink-700); }
.enquiry-form input, .enquiry-form select, .enquiry-form textarea {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 14.5px; font-family: inherit;
}
.enquiry-form textarea { resize: vertical; min-height: 90px; }
.form-note { font-size: 12px; color: var(--ink-500); margin-top: 10px; }
.form-success, .form-error { display: none; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-top: 12px; }
.form-success { background: #e8f3ec; color: var(--success); border: 1px solid #bfe0cc; }
.form-error { background: #fbeaea; color: #a4302f; border: 1px solid #f0c4c3; }
.form-success.is-visible, .form-error.is-visible { display: block; }

/* ---------- About / process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 900px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }
.process-step { position: relative; padding: 28px 20px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-md); }
.process-step::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: 20px; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-100), var(--gold-500)); color: var(--navy-950); font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-serif); box-shadow: var(--shadow-md); }

/* ---------- Testimonials ---------- */
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .testimonial-grid { grid-template-columns: 1fr; } }
.testimonial { background: rgba(255,255,255,0.04); border: 1px solid rgba(201,161,43,0.25); border-radius: var(--radius-md); padding: 24px; }
.testimonial .stars { color: var(--gold-300); letter-spacing: 2px; margin-bottom: 10px; }
.testimonial p { font-size: 14.5px; color: #dbe3f0; }
.testimonial .who { font-size: 13px; color: var(--gold-300); font-weight: 600; margin-top: 10px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-info-item .icon { color: var(--gold-700); flex-shrink: 0; margin-top: 2px; }
.map-embed { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); margin-top: 20px; }

/* ---------- Legal / prose pages ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose h3 { font-size: 17px; margin-top: 24px; }
.prose p, .prose li { font-size: 15px; color: var(--ink-700); }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 1em; }
.prose ul li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.prose table td, .prose table th { border: 1px solid var(--line); padding: 10px; text-align: left; }
.callout { background: var(--cream-100); border-left: 4px solid var(--gold-500); padding: 16px 20px; border-radius: var(--radius-sm); font-size: 14.5px; margin: 20px 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--ink-500); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--gold-700); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; max-width: 640px; margin: 0 auto;
  background: var(--navy-950); color: var(--cream-100); border: 1px solid rgba(201,161,43,0.4);
  border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-lg);
  display: none; gap: 14px; flex-direction: column;
}
.cookie-banner.is-visible { display: flex; }
.cookie-banner p { font-size: 13.5px; color: #cbd4e3; margin: 0; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fabc2; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 44px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo img { height: 48px; width: auto; }
.footer-brand-text { font-family: var(--font-serif); color: var(--gold-100); line-height: 1.15; }
.footer-brand-text strong { display: block; font-size: 19px; letter-spacing: 1px; }
.footer-brand-text span { display: block; font-size: 11px; letter-spacing: 3px; color: var(--gold-500); }
.footer-brand p { font-size: 13.5px; color: #8a97b2; max-width: 280px; }
.footer-col h5 { color: var(--gold-100); font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: var(--gold-300); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: #6f7c96; }
.footer-bottom a:hover { color: var(--gold-300); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold-500); color: var(--navy-950); padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 12px; top: 12px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(7,13,25,0.94); z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: var(--radius-sm); }
.lightbox-close { position: absolute; top: 20px; right: 24px; color: var(--gold-100); font-size: 32px; background: none; border: none; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.08); border: 1px solid rgba(201,161,43,0.4); color: var(--gold-100); font-size: 24px; padding: 10px 16px; border-radius: var(--radius-sm); }
.lightbox-prev { left: 20px; } .lightbox-next { right: 20px; }
