body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f7fb;
  color: #222;
}
.container { width: 95%; max-width: 1100px; margin: 0 auto; }

/* Header */
.site-header { background: #111827; color: #fff; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 0;
}
.logo a { color: #fff; font-weight: 700; font-size: 1.4rem; text-decoration: none; }
.main-nav a {
  color: #e5e7eb; margin-left: 1rem; text-decoration: none; font-size: 0.95rem;
}
.main-nav a:hover { color: #fff; }

.account-menu { display: inline-block; position: relative; margin-left: 1rem; }
.account-label { cursor: pointer; }
.account-dropdown {
  position: absolute; right: 0; top: 110%; background: #111827; padding: 0.75rem;
  border-radius: 0.5rem; min-width: 200px; display: none;
}
.account-dropdown.open { display: block; }
.account-dropdown a,
.account-dropdown button {
  display: block; width: 100%; margin-top: 0.25rem; text-align: left;
  background: #2563eb; border: none; padding: 0.4rem 0.6rem; border-radius: 0.375rem;
  color: #fff; text-decoration: none; font-size: 0.85rem;
}

/* Hero */
.hero {
  height: 260px;
  background-image: url('https://images.pexels.com/photos/210019/pexels-photo-210019.jpeg');
  background-size: cover; background-position: center; position: relative;
}
.hero-overlay {
  position: relative; height: 100%;
  background: linear-gradient(to right, rgba(0,0,0,0.75), rgba(0,0,0,0.25));
  color: #fff; display: flex; align-items: center;
}
.hero-overlay h1 { font-size: 2.2rem; margin-bottom: 0.4rem; }
.hero-overlay p { font-size: 1.1rem; }

.site-main { padding: 1.5rem 0 3rem; }
.search-section {
  background: #fff; padding: 1.2rem; border-radius: 0.75rem;
  margin-top: -60px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.search-form .form-row {
  display: flex; flex-wrap: wrap; gap: 1rem;
}
.form-row > div { flex: 1 1 150px; }
.form-row .grow { flex: 2 1 200px; }
.form-row .align-bottom { display: flex; align-items: flex-end; }

/* Forms */
label { display: block; font-size: 0.85rem; margin-bottom: 0.25rem; color: #4b5563; }
input, select, textarea {
  width: 100%; padding: 0.45rem 0.55rem; border-radius: 0.5rem;
  border: 1px solid #d1d5db; font-size: 0.95rem; box-sizing: border-box;
}
textarea { min-height: 120px; }

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger {
  display: inline-block; padding: 0.55rem 1rem; border-radius: 999px;
  border: none; cursor: pointer; font-size: 0.95rem; text-decoration: none;
}
.btn-primary { background: #2563eb; color: #fff; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-danger { background: #dc2626; color: #fff; }

/* Cards */
.vehicle-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.vehicle-card {
  background: #fff; border-radius: 0.75rem; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.vehicle-card a { color: inherit; text-decoration: none; }
.vehicle-image { position: relative; }
.vehicle-image img { width: 100%; display: block; }
.vehicle-image .placeholder { height: 200px; background: #e5e7eb;
  display:flex; align-items:center; justify-content:center; }
.vehicle-body { padding: 0.75rem 0.9rem 0.9rem; }
.vehicle-body h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.vehicle-body .attention { margin: 0 0 0.4rem; color: #4b5563; font-size: 0.9rem; }
.vehicle-meta {
  display:flex; flex-wrap:wrap; gap:0.5rem; font-size:0.8rem; color:#6b7280;
}
.price { font-weight:700; margin-top:0.4rem; font-size:1.05rem; }

/* Badges */
.badge {
  position:absolute; top:8px; left:8px; padding:0.2rem 0.7rem;
  border-radius:999px; font-size:0.75rem; color:#fff;
}
.badge-reserved { background:#f59e0b; }
.badge-sold { background:#dc2626; }
.hero-badge { top:12px; left:12px; }

/* Vehicle detail */
.vehicle-hero-image {
  position:relative; overflow:hidden; border-radius:0.75rem;
}
.vehicle-hero-overlay {
  position:absolute; left:0; right:0; bottom:0;
  padding:0.75rem 1rem; background:linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color:#fff;
}
.vehicle-hero-overlay h1 { margin:0; font-size:1.6rem; }
.vehicle-thumbs {
  display:flex; flex-wrap:wrap; gap:0.5rem; margin-top:0.6rem;
}
.vehicle-thumbs img {
  width:90px; height:70px; object-fit:cover; border-radius:0.4rem; cursor:pointer;
}
.vehicle-actions { margin-top:1.3rem; }
.action-buttons { display:flex; gap:0.75rem; flex-wrap:wrap; }
.vehicle-info-grid {
  display:grid; gap:1rem; grid-template-columns:2fr 3fr; margin-top:1.5rem;
}
.info-box {
  background:#fff; padding:1rem; border-radius:0.75rem;
}
.vehicle-options {
  margin-top:1rem; background:#fff; padding:1rem; border-radius:0.75rem;
}

/* Footer */
.site-footer {
  background:#111827; color:#9ca3af; padding:2rem 0 1rem; margin-top:2rem;
}
.footer-inner { display:flex; flex-wrap:wrap; gap:2rem; }
.footer-column h4 { color:#e5e7eb; }
.makes-list { list-style:none; padding:0; margin:0; }
.makes-list a { color:#9ca3af; text-decoration:none; font-size:0.9rem; }
.makes-list a:hover { color:#fff; }
.footer-bottom { text-align:center; margin-top:1rem; font-size:0.8rem; color:#6b7280; }

/* Messages */
.messages { margin-bottom:1rem; }
.message { padding:0.5rem 0.75rem; border-radius:0.5rem; font-size:0.9rem; }
.message.success { background:#dcfce7; color:#166534; }
.message.error { background:#fee2e2; color:#b91c1c; }

/* Admin tables */
.admin-table {
  width:100%; border-collapse:collapse; margin-top:1rem;
  background:#fff; border-radius:0.75rem; overflow:hidden;
}
.admin-table th, .admin-table td {
  padding:0.55rem 0.65rem; border-bottom:1px solid #e5e7eb; font-size:0.9rem;
}
.admin-table th { background:#f3f4f6; text-align:left; }

/* Auth */
.auth-page { max-width:500px; }

/* Cookie banner */
.cookie-banner {
  position:fixed; bottom:0; left:0; right:0;
  background:rgba(15,23,42,0.95); color:#e5e7eb;
  padding:0.75rem 0; z-index:1000;
}
.cookie-inner {
  max-width:1100px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  font-size:0.9rem;
}
.cookie-inner a { color:#93c5fd; }

/* Responsive */
@media (max-width:768px) {
  .header-inner { flex-direction:column; align-items:flex-start; gap:0.5rem; }
  .hero { height:220px; }
  .vehicle-info-grid { grid-template-columns:1fr; }
}

/* --- Vehicle detail image scaling fix --- */
.vehicle-detail .vehicle-hero-image img {
  width: 100%;
  max-height: 450px;      /* cap the height so it doesn't fill the whole screen */
  object-fit: cover;      /* crop nicely instead of squashing */
  display: block;
}

/* A bit smaller on mobiles */
@media (max-width: 768px) {
  .vehicle-detail .vehicle-hero-image img {
    max-height: 320px;
  }
}

/* --- Fix account dropdown hidden behind hero --- */
.site-header {
  position: relative;
  z-index: 50; /* keep header above hero image/overlay */
}

.account-dropdown {
  z-index: 60; /* ensure dropdown is above everything in header/hero */
}

/* --- Fix home page search box being overlapped by hero --- */

/* Make the hero a clean block with spacing underneath */
.hero {
  position: relative;
  z-index: 1;        /* keep hero under the header + dropdown */
  margin-bottom: 2rem; /* creates clean space before search box */
}

/* Ensure the hero overlay does not float above page content */
.hero-overlay {
  position: relative;
  z-index: 1;
}

/* --- Fix admin dashboard button sticking out of account dropdown --- */
.account-dropdown {
  min-width: 220px;          /* a bit more breathing room */
}

.account-dropdown a,
.account-dropdown button {
  box-sizing: border-box;    /* padding included in width so nothing overflows */
  width: 100%;
}

/* --- Clean, aligned vertical layout for account dropdown --- */
.account-dropdown {
  display: flex;
  flex-direction: column;
  align-items: stretch;      /* ensures all items line up and fill the width */
  gap: 0.5rem;               /* even spacing between items */
  padding: 0.75rem;
  min-width: 220px;
}

.account-dropdown p {
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.account-dropdown a,
.account-dropdown form button {
  width: 100%;               /* full width for perfect alignment */
  text-align: left;          /* align text to the left so it matches */
  padding: 0.5rem 0.75rem;
  background: #f8f9fb;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-sizing: border-box;
  cursor: pointer;
}

.account-dropdown a:hover,
.account-dropdown form button:hover {
  background: #e2e8f0;
}

/* Make logout button look like a link-button */
.account-dropdown form button {
  background: #f1f5f9;
}

/* --- Clean + visible account dropdown buttons (override previous styles) --- */
.account-dropdown {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  padding: 0.75rem;
  min-width: 220px;
  background: #020617;          /* same dark tone as header */
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.account-dropdown p {
  margin: 0 0 0.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1f2937;
  color: #e5e7eb;
  font-size: 0.85rem;
}

/* make sure the form itself has no extra margin */
.account-dropdown form {
  margin: 0;
}

/* unified style for links + logout/admin buttons */
.account-dropdown a,
.account-dropdown form button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 0.45rem 0.75rem;
  border-radius: 0.375rem;
  border: none;
  font-size: 0.85rem;
  background: #2563eb;     /* vivid blue */
  color: #ffffff;          /* readable white text */
  cursor: pointer;
}

/* hover state */
.account-dropdown a:hover,
.account-dropdown form button:hover {
  background: #1d4ed8;
}

/* remove any old grey background overrides */
.account-dropdown form button:disabled {
  opacity: 0.7;
}

/* --- FINAL alignment fix for account dropdown --- */
.account-dropdown {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.5rem;
  padding: 0.75rem;
  min-width: 220px;
  background: #020617;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

/* Remove any weird margins from children */
.account-dropdown > * {
  margin: 0 !important;
}

/* Top text */
.account-dropdown p {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #1f2937;
  color: #e5e7eb;
  font-size: 0.85rem;
  text-align: left;
}

/* Make form itself neutral */
.account-dropdown form {
  margin: 0 !important;
  padding: 0 !important;
}

/* FORCE both Admin Dashboard (link) and Logout (button) to be identical */
.account-dropdown a,
.account-dropdown form button {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
  padding: 0.45rem 0.75rem !important;
  border-radius: 0.375rem !important;
  border: none !important;
  margin: 0 !important;

  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
}

/* Hover state */
.account-dropdown a:hover,
.account-dropdown form button:hover {
  background: #1d4ed8 !important;
}

/* --- Restore dropdown open/close behaviour --- */
/* Hidden by default */
.account-dropdown {
  display: none !important;
}

/* Only visible when JS adds the .open class */
.account-dropdown.open {
  display: flex !important;
}

/* --- Remove unwanted white bar above hero --- */
.hero {
    margin-top: 0 !important;  /* Ensure no spacing above hero */
}

/* --- Maintain clean gap between hero and search box (below, not above) --- */
.hero {
    margin-bottom: 1.5rem !important;
}

/* --- Keep header and dropdown ABOVE hero --- */
.site-header {
    position: relative;
    z-index: 1000 !important;
}

/* Dropdown sits above everything */
.account-dropdown {
    z-index: 2000 !important;
}

/* --- Hero spacing: no gap above, clean gap below --- */
.hero {
  margin-top: -1.5rem !important;   /* cancel .site-main top padding so hero touches nav */
  margin-bottom: 1.5rem !important; /* keep the white block separating hero & search */
}

/* --- Add clean spacing BELOW the hero --- */
.hero {
    margin-bottom: 3rem !important;   /* adjust this value for more or less gap */
}

/* --- Grey gap between hero and search box --- */
.hero {
    margin-bottom: 2.5rem !important; /* creates the spacing */
}

/* Optional fade separator (looks cleaner on dealerships) */
.hero::after {
    content: "";
    display: block;
    width: 100%;
    height: 2rem;                      /* thickness of the grey bar */
    background: #f3f4f6;               /* your site's grey background */
    margin-top: -2rem;                 /* lifts it up against the hero */
}

/* --- Proper spacing between page title and search box on Stock & Sold pages --- */
.stock-page-title,
.sold-page-title {
    margin-bottom: 2.5rem !important;   /* push search box down cleanly */
    display: block;
}

/* Ensure the search container doesn’t creep upward */
.stock-search-container,
.sold-search-container {
    margin-top: 0 !important;
}

/* ----- Page-specific spacing for the search section ----- */

/* Default: no negative margin */
.search-section {
  margin-top: 0;
}

/* Home page: float the search box up over the hero */
.home-page .search-section {
  margin-top: -60px;
}

/* Stock & Sold pages: clean gap under the page title */
.stock-page .search-section,
.sold-page .search-section {
  margin-top: 1.5rem;
}

/* --- Remove dark grey strip below hero --- */
.hero::after {
    content: none !important;
}

/* Maintain clean spacing below the hero */
.hero {
    margin-bottom: 2.5rem !important;  /* adjust value if you want more/less gap */
}

/* Disabled Model dropdown look */
.model-select:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

/* Add space below the hero on the home page */
.home-page .hero {
    margin-bottom: 3rem !important;   /* adjust higher/lower if needed */
}

/* Add space between the hero and the vehicle search box on the home page */
.home-page .search-section {
    margin-top: 3rem !important;   /* increase to 4rem or 5rem if you want more space */
}

/* FINAL override: add gap between hero and search on home only */
.home-page .hero + .search-section,
.home-page .search-section {
    margin-top: 3rem !important;   /* change to 4rem/5rem if you want more space */
}

/* Add a real gap under the hero container */
.home-page .hero {
    padding-bottom: 0 !important;
    margin-bottom: 3rem !important;
}

/* =========================
   ADMIN UI STYLING
   ========================= */

/* Dark, focused backdrop for admin pages */
.admin-page .site-main {
  background: #020617;
  min-height: calc(100vh - 160px);
  padding: 2.5rem 0;
}

/* Container tweaks */
.admin-page .container {
  max-width: 1200px;
}

/* Admin page title */
.admin-page h1,
.admin-page .page-title {
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #e5e7eb;
}

/* Subhead / breadcrumb style */
.admin-page .admin-subtitle {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

/* Dashboard layout: cards for quick actions / stats */
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.admin-card {
  background: #0b1120;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 45px rgba(15,23,42,0.65);
  color: #e5e7eb;
}

.admin-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.admin-card p {
  margin: 0.15rem 0;
  color: #9ca3af;
}

.admin-card .admin-card-metric {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: #38bdf8;
}

/* Links / buttons inside admin cards */
.admin-card a.btn-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #60a5fa;
}

.admin-card a.btn-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Admin section titles */
.admin-section {
  margin-bottom: 2.5rem;
}

.admin-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

/* Admin tables */
.admin-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: #020617;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #1f2937;
}

.admin-page thead {
  background: #111827;
}

.admin-page thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  border-bottom: 1px solid #1f2937;
}

.admin-page tbody tr:nth-child(odd) {
  background: #020617;
}

.admin-page tbody tr:nth-child(even) {
  background: #020617;
}

.admin-page tbody tr:hover {
  background: #0b1120;
}

.admin-page tbody td {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: #e5e7eb;
  border-bottom: 1px solid #111827;
}

/* Admin action links/buttons in tables */
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-actions a,
.admin-actions button {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  border: none;
  background: #1d4ed8;
  color: #e5e7eb;
  cursor: pointer;
}

.admin-actions a:hover,
.admin-actions button:hover {
  background: #2563eb;
}

/* Secondary / danger variants */
.admin-actions .btn-secondary {
  background: #4b5563;
}

.admin-actions .btn-secondary:hover {
  background: #6b7280;
}

.admin-actions .btn-danger {
  background: #b91c1c;
}

.admin-actions .btn-danger:hover {
  background: #dc2626;
}

/* Admin forms (Add/Edit vehicle, users, leads, etc.) */
.admin-page form {
  background: #020617;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 40px rgba(15,23,42,0.7);
  color: #e5e7eb;
}

.admin-page form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.admin-page form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #9ca3af;
}

.admin-page form input,
.admin-page form select,
.admin-page form textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #111827;
  padding: 0.5rem 0.6rem;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.admin-page form input:focus,
.admin-page form select:focus,
.admin-page form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.admin-page form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Admin primary button */
.admin-page .btn-primary,
.admin-page button.btn-primary {
  background: #2563eb;
  border-radius: 0.5rem;
  padding: 0.55rem 1.2rem;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
}

.admin-page .btn-primary:hover,
.admin-page button.btn-primary:hover {
  background: #1d4ed8;
}

/* Top-right toolbar on admin pages (e.g. "Add vehicle") */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.admin-toolbar .toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* On smaller screens */
@media (max-width: 768px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .admin-page form {
    padding: 1rem;
  }
}

/* =========================
   ADMIN UI STYLING (FINAL)
   ========================= */

.admin-page .site-main {
  background: #020617;
  min-height: calc(100vh - 160px);
  padding: 2.5rem 0;
}

.admin-page .container {
  max-width: 1200px;
}

/* Titles */
.admin-page h1,
.admin-page .page-title {
  font-size: 1.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #e5e7eb;
}

.admin-page .admin-subtitle {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

/* Dashboard cards */
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.admin-card {
  background: #0b1120;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 45px rgba(15,23,42,0.65);
  color: #e5e7eb;
}

.admin-card h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.admin-card p {
  margin: 0.15rem 0;
  color: #9ca3af;
}

.admin-card .admin-card-metric {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: #38bdf8;
}

.admin-card a.btn-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #60a5fa;
}
.admin-card a.btn-link:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Sections */
.admin-section {
  margin-bottom: 2.5rem;
}
.admin-section h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

/* Tables */
.admin-page table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: #020617;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid #1f2937;
}

.admin-page thead {
  background: #111827;
}

.admin-page thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  border-bottom: 1px solid #1f2937;
}

.admin-page tbody tr:hover {
  background: #0b1120;
}

.admin-page tbody td {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  color: #e5e7eb;
  border-bottom: 1px solid #111827;
}

/* Actions */
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-actions a,
.admin-actions button {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.375rem;
  border: none;
  background: #1d4ed8;
  color: #e5e7eb;
  cursor: pointer;
}

.admin-actions a:hover,
.admin-actions button:hover {
  background: #2563eb;
}

/* Admin forms */
.admin-page form {
  background: #020617;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid #1f2937;
  box-shadow: 0 18px 40px rgba(15,23,42,0.7);
  color: #e5e7eb;
}

.admin-page form .form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.admin-page form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #9ca3af;
}

.admin-page form input,
.admin-page form select,
.admin-page form textarea {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid #111827;
  padding: 0.5rem 0.6rem;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
}

/* Buttons */
.admin-page .btn-primary,
.admin-page button.btn-primary {
  background: #2563eb;
  border-radius: 0.5rem;
  padding: 0.55rem 1.2rem;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: white;
  cursor: pointer;
}

.admin-page .btn-primary:hover,
.admin-page button.btn-primary:hover {
  background: #1d4ed8;
}

/* Toolbar */
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.admin-toolbar .toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .admin-page form {
    padding: 1rem;
  }
}

/* === ADMIN OVERRIDES: back to light theme === */
.admin-page .site-main {
  background: #f3f4f6;   /* same light grey as rest of site */
}

/* Admin tables: white rows, light borders */
.admin-page table {
  background: #ffffff;
  border-color: #e5e7eb;
}

.admin-page thead {
  background: #f9fafb;
}

.admin-page tbody tr:nth-child(odd),
.admin-page tbody tr:nth-child(even) {
  background: #ffffff;
}

.admin-page tbody tr:hover {
  background: #f9fafb;
}

/* Keep admin action buttons away from the table edge */
.admin-page td:last-child {
  padding-right: 1.5rem;
}

/* Space between multiple actions */
.admin-actions {
  gap: 0.4rem;
}

.admin-actions a,
.admin-actions button {
  margin-right: 0;  /* rely on gap instead of extra margin */
}

/* === FIX ADMIN ACTION BUTTONS === */

/* Ensure last column has enough room */
.admin-page td:last-child {
    padding-right: 2.5rem !important;
    position: relative;
}

/* Actions container */
.admin-actions {
    display: flex;
    flex-direction: row;
    gap: 0.6rem;
    align-items: center;
}

/* Normal light button style for Edit/Delete */
.admin-actions a,
.admin-actions button {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;  /* Light grey border */
    color: #374151 !important;             /* Dark grey text */
    padding: 6px 10px !important;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

/* Button hover */
.admin-actions a:hover,
.admin-actions button:hover {
    background: #f3f4f6 !important;
}

/* Delete button (danger style) */
.admin-actions .delete-btn {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.admin-actions .delete-btn:hover {
    background: #fee2e2 !important;
}

/* ===== Admin tables & action buttons (final override) ===== */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.admin-table thead {
  background: #f9fafb;
}

.admin-table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.admin-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.admin-table tbody tr:hover {
  background: #f3f4f6;
}

/* Make sure last cell has room so buttons don't touch the edge */
.admin-table td:last-child {
  padding-right: 1.75rem;
}

/* Action buttons container */
.admin-actions {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}

/* Edit button */
.edit-btn {
  background-color: #2563eb;
  border: 1px solid #2563eb;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.edit-btn:hover {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
}

/* Delete button – light, red outline, NO dark box */
.delete-btn {
  background-color: #ffffff !important;
  border: 1px solid #ef4444 !important;
  color: #b91c1c !important;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.delete-btn:hover {
  background-color: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #991b1b !important;
}

/* ========== Modern Admin Dashboard Styling ========== */

.admin-page .site-main {
  background: #f3f4f6;
}

/* Overall wrapper */
.admin-dashboard {
  padding: 2.5rem 0 3rem;
}

/* Hero / header area */
.admin-dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  border-radius: 1.25rem;
  border: 1px solid #dbeafe;
}

.admin-hero-text h1 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
  color: #111827;
}

.admin-hero-text p {
  color: #4b5563;
  margin: 0;
}

.admin-hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Secondary light button */
.btn-secondary-light {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
}

.btn-secondary-light:hover {
  background: #eff6ff;
}

/* Metric cards row */
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2.25rem;
}

.admin-metric-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15,23,42,0.05);
}

.admin-metric-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 0.4rem;
}

.admin-metric-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: #111827;
}

.admin-metric-foot {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: 0.35rem;
}

/* Quick links section */
.admin-quick-links {
  margin-bottom: 2.4rem;
}

.admin-quick-links h2 {
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
  color: #111827;
}

.admin-quick-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.admin-quick-link {
  display: block;
  padding: 0.9rem 1.1rem;
  border-radius: 0.9rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-quick-link:hover {
  border-color: #93c5fd;
  box-shadow: 0 18px 30px rgba(37,99,235,0.12);
  transform: translateY(-1px);
}

.admin-quick-link .ql-title {
  display: block;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.2rem;
}

.admin-quick-link .ql-desc {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Lower two-column panels */
.admin-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 1.5rem;
}

.admin-panel-card {
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 18px 40px rgba(15,23,42,0.04);
}

.admin-panel-card .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.admin-panel-card .panel-header h2 {
  font-size: 1.1rem;
  margin: 0;
  color: #111827;
}

.admin-panel-card .panel-header a {
  font-size: 0.85rem;
  color: #2563eb;
  text-decoration: none;
}

.admin-panel-card .panel-header a:hover {
  text-decoration: underline;
}

.panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.panel-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  font-size: 0.9rem;
  border-bottom: 1px dashed #e5e7eb;
}

.panel-list li:last-child {
  border-bottom: none;
}

.pl-label {
  color: #4b5563;
}

.pl-value {
  font-weight: 600;
  color: #111827;
}

/* Make it behave nicely on mobile */
@media (max-width: 768px) {
  .admin-dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-hero-actions {
    justify-content: flex-start;
  }
  .admin-lower-grid {
    grid-template-columns: 1fr;
  }
}

/* Inline status dropdown in vehicle admin list */
.inline-status-form {
  margin: 0;
}

.inline-status-form select {
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background-color: #ffffff;
}

/* Fix oversized Status dropdown in vehicle admin list */
.inline-status-form select {
    width: 130px !important;        /* Normal fixed width */
    padding: 6px 8px !important;    /* Compact padding */
    font-size: 0.9rem !important;   /* Normal text size */
    height: auto !important;        /* Prevent Safari auto-stretch */
    background-color: #fff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: none !important;    /* Removes the huge dark shadow box */
    appearance: none;               /* Cleaner dropdown */
}

/* Make sure the form wrapper doesn't add shadows */
.inline-status-form {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block;
}


/* ============================================================
   Ensure readable black text on white/light backgrounds
   ============================================================ */

/* Applies to containers, tables, forms, and cards */
.white-bg, 
.table, 
.admin-table, 
.admin-panel-card, 
.admin-metric-card,
.inline-status-form select,
.container,
body:not(.dark-mode) .site-main {
    color: #111827 !important;   /* modern near-black text */
}

/* Apply black text to standard elements inside those containers */
.white-bg *, 
.admin-table *, 
.admin-panel-card *, 
.admin-metric-card *,
.container *,
.inline-status-form select,
body:not(.dark-mode) .site-main * {
    color: #111827 !important;
}

/* Dropdown text specifically */
.inline-status-form select option {
    color: #111827 !important;
    background: #ffffff !important;
}

/* Fix inputs appearing grey */
input, select, textarea {
    color: #111827 !important;
}

/* Buttons still use their intended colours */
.btn-primary, 
.btn-secondary, 
.btn-secondary-light, 
.delete-btn, 
.edit-btn {
    color: inherit;
}


/* ============================================================
   Force header + footer text to be white
   ============================================================ */

/* Header navigation bar */
header, 
header *, 
.navbar, 
.navbar * {
    color: #ffffff !important;
}

/* Footer */
footer, 
footer * {
    color: #ffffff !important;
}

/* Ensure footer links also stay white */
footer a {
    color: #ffffff !important;
}

/* Make header dropdown text white as well */
.account-dropdown, 
.account-dropdown * {
    color: #ffffff !important;
}

/* ============================================================
   FORCE HEADER + FOOTER TEXT TO WHITE (final override)
   ============================================================ */

/* Header area (nav bar, logo, links) */
.site-header,
.site-header *,
.header,
.header *,
.main-header,
.main-header *,
nav.site-nav,
nav.site-nav * {
    color: #ffffff !important;
}

/* Footer area */
.site-footer,
.site-footer *,
footer,
footer *,
.footer,
.footer * {
    color: #ffffff !important;
}

/* Header & footer links specifically */
.site-header a,
.site-header a *,
.site-footer a,
.site-footer a *,
footer a,
footer a * {
    color: #ffffff !important;
}

/* Hover effect (slightly lighter) */
.site-header a:hover,
.site-footer a:hover,
footer a:hover {
    color: #e5e7eb !important;
}

/* Vehicle detail hero & image carousel */

.vehicle-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.vehicle-main-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.vehicle-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #ffffff;
}

.vehicle-hero-overlay h1 {
    margin: 0;
    font-size: 1.6rem;
}

.vehicle-hero-overlay .vehicle-price {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Left/right navigation buttons on main image */
.vehicle-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.vehicle-image-nav.prev {
    left: 12px;
}

.vehicle-image-nav.next {
    right: 12px;
}

.vehicle-image-nav:hover {
    background: rgba(0,0,0,0.8);
}

/* Thumbnails row */
.vehicle-image-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.vehicle-image-thumbs .thumb-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.vehicle-image-thumbs img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    display: block;
}

.vehicle-image-thumbs img.active {
    border-color: #2563eb;
}

/* Basic responsive tweak */
@media (max-width: 768px) {
    .vehicle-main-image img {
        height: 320px;
    }
}

/* Vehicle detail hero & image carousel */

.vehicle-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.vehicle-main-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.vehicle-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #ffffff;
}

.vehicle-hero-overlay h1 {
    margin: 0;
    font-size: 1.6rem;
}

.vehicle-hero-overlay .vehicle-price {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Left/right navigation buttons on main image */
.vehicle-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.vehicle-image-nav.prev {
    left: 12px;
}

.vehicle-image-nav.next {
    right: 12px;
}

.vehicle-image-nav:hover {
    background: rgba(0,0,0,0.8);
}

/* Thumbnails row */
.vehicle-image-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.vehicle-image-thumbs .thumb-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.vehicle-image-thumbs img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    display: block;
}

.vehicle-image-thumbs img.active {
    border-color: #2563eb;
}

/* Responsive */
@media (max-width: 768px) {
    .vehicle-main-image img {
        height: 320px;
    }
}

.vehicle-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.vehicle-main-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.vehicle-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #ffffff;
}

.vehicle-hero-overlay h1 {
    margin: 0;
    font-size: 1.6rem;
}

.vehicle-hero-overlay .vehicle-price {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.vehicle-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.vehicle-image-nav.prev {
    left: 12px;
}

.vehicle-image-nav.next {
    right: 12px;
}

.vehicle-image-nav:hover {
    background: rgba(0,0,0,0.8);
}

.vehicle-image-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.vehicle-image-thumbs .thumb-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.vehicle-image-thumbs img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    display: block;
}

.vehicle-image-thumbs img.active {
    border-color: #2563eb;
}

@media (max-width: 768px) {
    .vehicle-main-image img {
        height: 320px;
    }
}

.vehicle-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.vehicle-main-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.vehicle-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #ffffff;
}

.vehicle-hero-overlay h1 {
    margin: 0;
    font-size: 1.6rem;
}

.vehicle-hero-overlay .vehicle-price {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Left/right navigation buttons on main image */
.vehicle-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.vehicle-image-nav.prev {
    left: 12px;
}

.vehicle-image-nav.next {
    right: 12px;
}

.vehicle-image-nav:hover {
    background: rgba(0,0,0,0.8);
}

/* Thumbnails row */
.vehicle-image-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.vehicle-image-thumbs .thumb-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.vehicle-image-thumbs img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    display: block;
}

.vehicle-image-thumbs img.active {
    border-color: #2563eb;
}

@media (max-width: 768px) {
    .vehicle-main-image img {
        height: 320px;
    }
}

/* Vehicle advert hero image + arrows */

.vehicle-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.vehicle-main-image img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.vehicle-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: #ffffff;
}

.vehicle-hero-overlay h1 {
    margin: 0;
    font-size: 1.6rem;
}

.vehicle-hero-overlay .vehicle-price {
    margin: 0.25rem 0 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Left/right navigation buttons on main image */
.vehicle-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.vehicle-image-nav.prev {
    left: 12px;
}

.vehicle-image-nav.next {
    right: 12px;
}

.vehicle-image-nav:hover {
    background: rgba(0,0,0,0.8);
}

/* Thumbnails row */
.vehicle-image-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
}

.vehicle-image-thumbs .thumb-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.vehicle-image-thumbs img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    display: block;
}

.vehicle-image-thumbs img.active {
    border-color: #2563eb;
}

@media (max-width: 768px) {
    .vehicle-main-image img {
        height: 320px;
    }
}

/* --- Vehicle detail page layout --- */

.vehicle-detail-page {
    background: #f3f4f6;
    padding: 2.5rem 0 4rem;
}

.vehicle-detail-page .container {
    max-width: 1100px;
}

/* Re-usable elevated card look */
.card-elevated {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    padding: 1.5rem 1.75rem;
}

/* Hero */
.vehicle-hero {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.vehicle-main-image {
    position: relative;
    padding: 0;
    overflow: hidden;
}

.vehicle-main-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.vehicle-hero-overlay {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 1.1rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    background: linear-gradient(to top, rgba(15,23,42,0.95), transparent);
    color: #ffffff;
}

.vehicle-hero-text h1 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
}

.vehicle-hero-text .vehicle-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.vehicle-hero-overlay .vehicle-price {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

/* Image nav arrows (already defined, but refine) */
.vehicle-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.vehicle-image-nav.prev { left: 12px; }
.vehicle-image-nav.next { right: 12px; }

.vehicle-image-nav:hover {
    background: rgba(15, 23, 42, 0.92);
}

/* Thumbnails strip */
.vehicle-image-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    overflow-x: auto;
}

.vehicle-image-thumbs .thumb-btn {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

.vehicle-image-thumbs img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
    display: block;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.vehicle-image-thumbs img:hover {
    transform: translateY(-2px);
}

.vehicle-image-thumbs img.active {
    border-color: #2563eb;
}

/* CTA card */
.vehicle-enquiry-cta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.vehicle-enquiry-cta h2 {
    margin: 0 0 0.4rem;
}

.vehicle-enquiry-cta p {
    margin: 0;
    font-size: 0.95rem;
    color: #6b7280;
}

.vehicle-enquiry-cta .cta-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Info + description layout */
.vehicle-info-section {
    margin-bottom: 1.75rem;
}

.vehicle-info-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 1.5rem;
}

.vehicle-info-card h3,
.vehicle-description-card h3,
.vehicle-options-section h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.vehicle-info-card dl {
    margin: 0;
}

.vehicle-info-card dl > div {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.93rem;
}

.vehicle-info-card dt {
    font-weight: 600;
    color: #4b5563;
}

.vehicle-info-card dd {
    margin: 0;
    color: #111827;
}

.vehicle-description-text {
    font-size: 0.95rem;
    color: #374151;
}

.highlighted-note {
    margin-top: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
}

/* Options pills */
.vehicle-options-section {
    margin-top: 0.5rem;
}

.options-helper {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.options-pill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.option-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: #f3f4ff;
    color: #1d4ed8;
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
    .vehicle-info-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .vehicle-enquiry-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .vehicle-main-image img {
        height: 320px;
    }
}

/* --- Fix white strip above nav on vehicle advert page --- */

/* Make 100% sure there is no default margin anywhere */
html, body {
    margin: 0;
    padding: 0;
}

/* Remove any top border/margin/padding on the header */
body.vehicle-detail-page .site-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
}

/* Ensure the very first element after the header doesn't add a gap */
body.vehicle-detail-page .vehicle-detail-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* --- Nuclear fix: remove any gap above header on vehicle advert page --- */
body.vehicle-detail-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* First child of body (the header wrapper) should never be pushed down */
body.vehicle-detail-page > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Make sure the header itself is flush with the top */
body.vehicle-detail-page header.site-header {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    position: relative !important;
    top: 0 !important;
}

/* --- Admin dashboard styling --- */

.dashboard-page {
    background: #f3f4f6;
    padding: 2.5rem 0 4rem;
}

.dashboard-page .container {
    max-width: 1100px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 1rem 1.25rem;
}

.stat-card h2 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    color: #6b7280;
}

.stat-number {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.dashboard-card-header h2 {
    margin: 0 0 0.75rem;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.45rem 0.25rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.dashboard-table th {
    font-weight: 600;
    color: #6b7280;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 900px) {
    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* --- Dashboard large action buttons --- */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.dashboard-action-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease-in-out;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.dashboard-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
}


/* --- Dashboard large action buttons --- */
.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.dashboard-action-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: 0.2s ease-in-out;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

.dashboard-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
}


/* Fix white strip above nav on dashboard */
.dashboard-page {
    background-color: #f3f4f6 !important;  /* same grey as rest of dashboard */
    margin: 0;
    padding: 0;
}

/* ---- Auth pages (login, register, password reset) ---- */

body.auth-page {
    background-color: #f3f4f6;
}

.auth-page .auth-container {
    max-width: 480px;
    margin: 3rem auto 4rem;   /* centres horizontally */
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem 2.5rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.auth-page .auth-container h1 {
    font-size: 1.9rem;
    margin-bottom: 1rem;
}

.auth-page .auth-container p {
    margin-bottom: 1.25rem;
    color: #4b5563;
}

.auth-page .form-row {
    margin-bottom: 1.25rem;
}

.auth-page .form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="text"] {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.auth-page .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.5rem;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.auth-page .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}


/* === Auth pages (login, register, password reset) === */

body.auth-page {
    background-color: #f3f4f6;
}

/* Full-width wrapper similar to other pages */
.auth-wrapper {
    min-height: calc(100vh - 80px);   /* allow for header */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 1.5rem 5rem;
}

/* Make the card wide, like other big sections */
.auth-wrapper .auth-container {
    width: 100%;
    max-width: 900px;                 /* wider than before */
    background: #ffffff;
    border-radius: 20px;
    padding: 2.5rem 3rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.auth-wrapper .auth-container h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-wrapper .auth-container p {
    margin-bottom: 1.25rem;
    color: #4b5563;
}

/* Input + button styling matches rest of site */
.auth-wrapper .auth-container .form-row {
    margin-bottom: 1rem;
}

.auth-wrapper .auth-container input[type="email"],
.auth-wrapper .auth-container input[type="text"],
.auth-wrapper .auth-container input[type="password"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    font-size: 0.95rem;
}

.auth-wrapper .auth-container .btn-primary {
    margin-top: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.auth-wrapper .auth-container .btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

