/* ===============================
   GLOBAL RESET & VARIABLES
================================ */
:root {
  --primary: #111827;
  --secondary: #e11d48;
  --accent: #2563eb;
  --bg: #ffffff;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #f9fafb;
  --radius: 14px;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--primary);
  line-height: 1.6;
}

/* ===============================
   CONTAINER
================================ */
.container {
  max-width: var(--max-width);
  margin: auto;
  padding: 0 20px;
}

/* ===============================
   HEADER
================================ */
.header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
}

.top-nav a {
  margin-left: 24px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
}

.top-nav a:hover {
  color: var(--secondary);
}

/* ===============================
   HERO
================================ */
.hero {
  padding: 80px 0;
  background: linear-gradient(180deg, #f9fafb, #ffffff);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero h2 {
  font-size: 2.6rem;
  margin-bottom: 20px;
}

.hero p {
  color: var(--muted);
  max-width: 500px;
  margin-bottom: 30px;
}

.hero-actions {
  margin-top: 30px;
}

.hero-actions .btn {
  margin-right: 15px;
}

.hero-image img {
  width: 100%;
  border-radius: var(--radius);
}

/* ===============================
   BUTTONS
================================ */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-2px) scale(1.03);
}

.btn.secondary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--primary);
  color: #fff;
}

.btn.small {
  padding: 10px 18px;
  font-size: 0.9rem;
}

/* ===============================
   CATEGORIES
================================ */
.categories {
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 16px 0;
}

.categories .container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 20px;
  scrollbar-width: none;
}

.categories .container::-webkit-scrollbar {
  display: none;
}

.cat {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.cat.active,
.cat:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===============================
   VEHICLES GRID
================================ */
.vehicles {
  padding: 20px 0;
}

.vehicles h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 40px;
  background: #fff;
  transition: border 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(17,24,39,0.1);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.vehicle-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  overflow: hidden;
}

.vehicle-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.vehicle-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: var(--radius);
}

.vehicle-card h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.vehicle-card p {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 1.1rem;
}

.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 1.2rem;
  padding: 60px 0;
}

/* ===============================
   HOW IT WORKS
================================ */
.how {
  background: #f9fafb;
  padding: 80px 0;
}

.how h2 {
  text-align: center;
  margin-bottom: 60px;
  font-size: 2.2rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.step {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 30px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-8px);
}

.step span {
  width: 60px;
  height: 60px;
  background: var(--secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0 auto 20px;
}

.step h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
}

/* ===============================
   FOOTER - Perfectly spaced & even on desktop
================================ */
.footer {
  background: var(--primary);
  color: #fff;
  padding: 80px 0 40px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* Three equal columns */
  gap: 40px;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Each column takes equal space */
.footer > .footer-inner > div {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* AutoConnect column */
.footer-main-left {
  text-align: left;
}

.footer-main-left h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-main-left p {
  color: #d1d5db;
  max-width: 380px;
  line-height: 1.7;
}

/* Legal column - centered */
.footer-legal {
  text-align: center;
}

.footer-legal h4 {
  margin-bottom: 30px;
  font-size: 1.2rem;
}

.footer-legal a {
  display: block;
  color: #d1d5db;
  text-decoration: none;
  line-height: 2.4;
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: #fff;
}

/* Quick Nav column - centered and evenly spaced links */
.quick-nav {
  text-align: center;
}

.quick-nav h4 {
  margin-bottom: 30px;
  font-size: 1.3rem;
}

.quick-nav nav {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Even vertical spacing */
  align-items: center;
}

.quick-nav a {
  font-weight: 600;
  font-size: 1.15rem;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.quick-nav a:hover {
  opacity: 0.8;
}

/* MOBILE: Stack vertically, keep even feel */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }

  .footer-main-left,
  .footer-legal,
  .quick-nav {
    text-align: center;
  }

  .footer-main-left p {
    max-width: none;
  }

  .quick-nav {
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }

  .quick-nav nav {
    gap: 28px;
  }

  .quick-nav a {
    font-size: 1.4rem;
  }
}

/* ===============================
   FORM ELEMENTS (used across pages)
================================ */
.styled-select,
.search-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: #fff;
  transition: all 0.3s ease;
}

.styled-select:focus,
.search-input:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(17,24,39,0.1);
}

.form-label {
  display: block;
  margin: 24px 0 10px;
  font-weight: 600;
  font-size: 1.1rem;
}

/* Colour palette */
.colour-palette {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.colour-swatch {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  cursor: pointer;
  border: 4px solid transparent;
  transition: all 0.3s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.colour-swatch:hover {
  transform: scale(1.15);
}

.colour-swatch.selected {
  border-color: #fff;
  box-shadow: 0 0 0 4px var(--primary);
  transform: scale(1.2);
}

/* Extras */
.extras-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.extra-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid var(--border);
}

.extra-item:hover {
  background: #fff;
  border-color: var(--primary);
}

.styled-checkbox {
  width: 24px;
  height: 24px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Main vehicle image */
.main-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Price summary */
.summary {
  margin-top: 60px;
  padding: 30px;
  background: var(--card);
  border-radius: var(--radius);
  text-align: center;
}

.price.large {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0;
}

.cta-buttons {
  margin-top: 30px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Specs */
.spec-card {
  background: var(--card);
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
  border: 1px solid var(--border);
}

/* Description */
#fullDescription {
  margin-top: 60px;
  font-size: 1.15rem;
  line-height: 1.9;
  max-width: 900px;
  color: var(--muted);
}

/* ===============================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image {
    order: -1;
    margin-bottom: 40px;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    padding: 16px 0;
    gap: 12px;
  }

  .top-nav {
    order: 3;
  }

  .hero h2 {
    font-size: 2.2rem;
  }

  .vehicle-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
  }
}
/* Back button - left side, border only, smaller, like hero secondary button */
.back-btn {
  margin-left: 30px; /* Space after logo */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;           /* Slightly smaller than main btn */
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: transparent;      /* No fill */
  color: var(--primary);        /* Text color matches border */
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;           /* Slightly smaller text */
  transition: all 0.3s ease;
  white-space: nowrap;
}

.back-btn:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.back-btn::before {
  content: "←";
  font-weight: bold;
  font-size: 1.1rem;
}

/* On mobile - stack properly */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .back-btn {
    margin-left: 0;
    margin-top: 12px;
    order: 3;
    width: auto;
  }
}
/* ================= HEADER & HAMBURGER MENU ================= */
  .header {
    padding: 20px 0;
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }

  .container.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
  }

  .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e11d48;
    text-decoration: none;
  }

  .top-nav {
    display: flex;
    gap: 32px;
  }

  .top-nav a {
    color: #111827;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
  }

  .hamburger {
    display: none;
    font-size: 2.2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #111827;
  }

  @media (max-width: 768px) {
    .top-nav {
      display: none;
      flex-direction: column;
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      padding: 30px 20px;
      box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .top-nav.active {
      display: flex;
    }

    .top-nav a {
      padding: 16px 0;
      font-size: 1.3rem;
      text-align: center;
    }

    .hamburger {
      display: block;
    }
  }
