:root {
  --navy: #0f2942;
  --navy-dark: #0a1c2e;
  --red: #c8102e;
  --red-dark: #a10d25;
  --on-primary: #ffffff;
  --on-accent: #ffffff;
  --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --gray-50: #f7f8fa;
  --gray-100: #eef0f3;
  --gray-200: #dde1e6;
  --gray-400: #98a2ae;
  --gray-600: #5b6570;
  --gray-800: #2a323c;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(15, 41, 66, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 41, 66, 0.14);
  --success: #16a34a;
  --success-bg: #e7f8ee;
  --warning: #d97706;
  --warning-bg: #fff4e0;
  --info: #2563eb;
  --info-bg: #eaf2fe;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-family);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--navy);
  color: var(--on-primary);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { height: 56px; width: auto; display: block; max-height: 56px; }
nav.main-nav { display: flex; align-items: center; gap: 26px; font-weight: 600; font-size: 15px; }
nav.main-nav a:hover { color: #ffd7dc; }
nav.main-nav .nav-cta { display: none; }
.btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  text-align: center;
}
.btn-red { background: var(--red); color: var(--on-accent); }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { background: transparent; color: var(--on-primary); border: 2px solid rgba(255,255,255,0.6); }
.btn-outline:hover { border-color: white; }
.btn-navy { background: var(--navy); color: var(--on-primary); }
.btn-navy:hover { background: var(--navy-dark); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--on-primary); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; margin: 0 auto; }
.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  /* Storefront photo behind the text, under a dark overlay in the theme color
     (heavier on the left where the text is). The first background line is a
     fallback for browsers without color-mix(). */
  background: linear-gradient(90deg, rgba(10, 28, 46, 0.78), rgba(10, 28, 46, 0.2)), url('/location/storefront.jpg') center / cover no-repeat;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--navy-dark) 80%, transparent) 0%, color-mix(in srgb, var(--navy-dark) 50%, transparent) 55%, color-mix(in srgb, var(--navy-dark) 12%, transparent) 100%),
    url('/location/storefront.jpg') center / cover no-repeat,
    var(--navy-dark);
  color: var(--on-primary);
  padding: 70px 0 90px;
  position: relative;
}
/* Soft shadow keeps the text readable over the brighter photo */
.hero h1, .hero p.lead { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75), 0 2px 12px rgba(0, 0, 0, 0.5); }
.hero h1 { font-size: 42px; margin: 0 0 14px; max-width: 640px; line-height: 1.15; }
.hero p.lead { font-size: 18px; color: #e6edf3; max-width: 640px; margin: 0 0 14px; }
.hero p.lead:last-of-type { margin-bottom: 30px; }
.hero .hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.search-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  margin-top: -50px;
  position: relative;
  z-index: 5;
}
.search-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.search-grid .field { display: flex; flex-direction: column; gap: 6px; }
.search-grid label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gray-600); }

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  background: white;
  color: var(--gray-800);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); }

/* Section headings */
.section { padding: 60px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 30px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-size: 28px; margin: 0 0 6px; }
.section-head p { color: var(--gray-600); margin: 0; }
.section-alt { background: white; }

/* Vehicle grid */
/* Vehicle carousel: one car per view (photo + name), arrows/swipe to move. */
.vehicle-carousel { position: relative; max-width: 760px; margin: 0 auto; }
.vehicle-carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); }
.vehicle-carousel-track::-webkit-scrollbar { display: none; }
.vehicle-carousel-track:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
.vehicle-card { flex: 0 0 100%; scroll-snap-align: start; display: block; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.vehicle-card-link { display: block; }
.vehicle-card-book { padding: 0 20px 20px; }
.vehicle-card-book .btn { text-align: center; font-size: 16px; padding: 12px 18px; }
.vehicle-photo { position: relative; aspect-ratio: 4/3; background: var(--gray-100); overflow: hidden; }
.vehicle-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.vehicle-card-link:hover .vehicle-photo img { transform: scale(1.03); }
.vehicle-photo .badge { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--red); color: var(--on-accent); font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 20px; text-transform: uppercase; }
.vehicle-photo .no-photo { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--gray-400); font-size: 14px; }
.vehicle-title { font-size: 20px; font-weight: 700; margin: 0; padding: 16px 20px; text-align: center; color: var(--gray-800); }
.carousel-arrows { position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 4/3; pointer-events: none; }
.carousel-arrow { pointer-events: auto; position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.92); color: var(--navy); font-size: 34px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-lg); display: flex; align-items: center; justify-content: center; padding-bottom: 4px; }
.carousel-arrow.prev { left: 12px; }
.carousel-arrow.next { right: 12px; }
.carousel-arrow:hover:not(:disabled) { background: white; color: var(--red); }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }
.carousel-count { text-align: center; margin-top: 10px; font-size: 14px; color: var(--gray-600); font-weight: 600; }
.vehicle-price { font-size: 20px; font-weight: 800; color: var(--red); }
.compare-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--navy); font-weight: 600; cursor: pointer; margin-bottom: 8px; }
.compare-inline input { width: 16px; height: 16px; margin: 0; }
@media (max-width: 560px) {
  .carousel-arrow { width: 40px; height: 40px; font-size: 28px; }
  .carousel-arrow.prev { left: 8px; }
  .carousel-arrow.next { right: 8px; }
  .vehicle-title { font-size: 17px; }
}

/* Filters bar (inventory page) */
.filters-bar { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 26px; }
.filters-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.results-count { color: var(--gray-600); font-size: 14px; margin-bottom: 16px; }

/* Vehicle detail */
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; background: var(--gray-100); margin-bottom: 10px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(15, 41, 66, 0.55); color: #fff; font-size: 20px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  z-index: 2;
}
.gallery-arrow:hover { background: rgba(15, 41, 66, 0.8); }
.gallery-arrow.prev { left: 12px; }
.gallery-arrow.next { right: 12px; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs img { width: 78px; height: 58px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--red); }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
.spec-table td:first-child { color: var(--gray-600); width: 44%; }

/* Compare bar (floating, site-wide) */
.compare-bar {
  position: fixed; left: 50%; bottom: -80px; transform: translateX(-50%);
  background: var(--navy); color: var(--on-primary);
  border-radius: 30px; box-shadow: var(--shadow-lg);
  padding: 12px 20px; display: flex; align-items: center; gap: 16px;
  z-index: 50; transition: bottom 0.25s ease; font-size: 14px; font-weight: 600;
}
.compare-bar.visible { bottom: 24px; }
.compare-bar-actions { display: flex; gap: 8px; }
.compare-bar .btn-red.disabled { opacity: 0.5; pointer-events: none; }
.compare-bar-clear { background: rgba(255,255,255,0.15); color: var(--on-primary); }
.compare-bar-clear:hover { background: rgba(255,255,255,0.25); }

/* Compare page */
.compare-scroll { overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.compare-table th, .compare-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); text-align: center; vertical-align: top; }
.compare-label-col { text-align: left !important; color: var(--gray-600); font-size: 14px; width: 160px; white-space: nowrap; }
.compare-photo { aspect-ratio: 4/3; background: var(--gray-100); border-radius: var(--radius); overflow: hidden; margin-bottom: 10px; }
.compare-photo img { width: 100%; height: 100%; object-fit: cover; }
.compare-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.compare-price { font-weight: 800; color: var(--red); font-size: 17px; margin-bottom: 10px; }
.compare-actions { display: flex; gap: 6px; justify-content: center; margin-bottom: 10px; }
.compare-remove { background: none; border: 1px solid var(--gray-200); border-radius: 20px; padding: 4px 12px; font-size: 12px; color: var(--gray-600); cursor: pointer; }
.compare-remove:hover { background: var(--gray-100); }

/* Chat widget */
.chat-widget { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--red); color: var(--on-accent); font-size: 24px;
  box-shadow: var(--shadow-lg); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.chat-toggle:hover { background: var(--red-dark); }
.chat-panel {
  display: none; flex-direction: column;
  width: 320px; height: 420px; max-height: 70vh;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel-header { background: var(--navy); color: var(--on-primary); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 14px; }
.chat-panel-header button { background: none; border: none; color: var(--on-primary); font-size: 20px; cursor: pointer; line-height: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 13px; line-height: 1.4; white-space: pre-line; }
.chat-bubble-assistant { background: var(--gray-100); color: var(--gray-900, #1a1a1a); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-bubble-user { background: var(--navy); color: var(--on-primary); align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-bubble-typing { opacity: 0.6; font-style: italic; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--gray-100); }
.chat-form input { flex: 1; margin: 0; }
.chat-form button { white-space: nowrap; }

@media (max-width: 560px) {
  .chat-widget { right: 16px; bottom: 16px; }
  .chat-panel { width: calc(100vw - 32px); }
}

/* Stats counter (homepage) */
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; text-align: center; }
.stat-item { padding: 10px; }
.stat-number { font-size: 44px; font-weight: 800; color: var(--red); line-height: 1; }
.stat-label { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--gray-600); }
@media (max-width: 560px) {
  .stat-number { font-size: 34px; }
}
.feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.feature-tag { background: var(--gray-100); font-size: 12px; padding: 5px 10px; border-radius: 20px; }

.sticky-panel { position: sticky; top: 90px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 22px; }
.panel-price { font-size: 28px; font-weight: 800; color: var(--red); margin-bottom: 4px; }
.contact-links { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.contact-links a { display: flex; align-items: center; gap: 10px; font-weight: 600; }

/* Booking widget */
.booking-widget { border-top: 1px solid var(--gray-100); margin-top: 18px; padding-top: 18px; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin: 10px 0; }
.date-chip { flex: 0 0 auto; border: 1px solid var(--gray-200); border-radius: 8px; padding: 8px 12px; text-align: center; cursor: pointer; font-size: 13px; background: white; }
.date-chip.selected { background: var(--navy); color: var(--on-primary); border-color: var(--navy); }
.date-chip .dow { font-weight: 700; display: block; }
.slot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.slot-btn { padding: 9px 6px; border: 1px solid var(--gray-200); border-radius: 6px; background: white; cursor: pointer; font-size: 13px; font-weight: 600; }
.slot-btn.selected { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.slot-btn:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.slot-empty { color: var(--gray-600); font-size: 13px; padding: 10px 0; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-row label { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.form-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-success { background: #e4f7ea; color: #146c2e; border: 1px solid #b8e6c4; }
.alert-error { background: #fdeced; color: #a1252f; border: 1px solid #f6c3c8; }
.alert-info { background: #eaf2fb; color: #17436f; border: 1px solid #c9dcf2; }

/* Footer */
footer.site-footer { background: var(--navy-dark); color: #c8d3dd; padding: 50px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: var(--on-primary); font-size: 15px; margin: 0 0 14px; }
.footer-logo { height: 64px; width: auto; margin-bottom: 14px; border-radius: 8px; }
.footer-grid a { display: block; color: #c8d3dd; margin-bottom: 8px; font-size: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 13px; text-align: center; color: #8ba0b3; }
.footer-social-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #8ba0b3; margin: 14px 0 8px; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link { display: inline-flex !important; align-items: center; gap: 7px; width: auto; height: auto; padding: 8px 14px; border-radius: 20px; background: rgba(255,255,255,0.1); color: #c8d3dd !important; font-size: 13px; font-weight: 700; margin-bottom: 0 !important; transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
.social-link svg { flex-shrink: 0; }
.social-link:hover { background: var(--red); color: var(--on-accent) !important; transform: translateY(-2px); }

/* Contact / generic pages */
.page-hero { background: var(--navy); color: var(--on-primary); padding: 40px 0; }
.page-hero h1 { margin: 0; font-size: 32px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
.info-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.info-card h3 { margin-top: 0; }
.map-embed { width: 100%; height: 280px; border: 0; border-radius: var(--radius); }

/* Admin */
.admin-body { background: var(--gray-50); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 230px; background: linear-gradient(180deg, var(--navy-dark) 0%, #081522 100%); color: var(--on-primary); flex-shrink: 0; display: flex; flex-direction: column; }
.admin-sidebar .brand { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-logo { height: 60px; width: auto; display: block; }
.admin-sidebar nav { padding: 14px 0; }
.admin-nav-main { flex: 1; overflow-y: auto; }
.admin-nav-footer { border-top: 1px solid rgba(255,255,255,0.08); padding: 8px 0; }
.nav-section-label { padding: 16px 20px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.32); }
.admin-sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; font-weight: 600; color: #c8d3dd; border-left: 3px solid transparent; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.admin-sidebar nav a .nav-icon { display: inline-flex; width: 20px; justify-content: center; flex-shrink: 0; }
.admin-sidebar nav a.active { background: rgba(255,255,255,0.09); color: var(--on-primary); border-left-color: var(--red); font-weight: 700; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,0.06); color: var(--on-primary); border-left-color: rgba(255,255,255,0.35); }
.admin-main { flex: 1; padding: 26px 32px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.admin-topbar h1 { font-size: 22px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--navy); }
.stat-card .label { color: var(--gray-600); font-size: 13px; margin-top: 4px; }
.stat-card .sub { color: var(--gray-400); font-size: 12px; margin-top: 2px; }
.stat-card--flex { display: flex; align-items: center; gap: 16px; }
.stat-card--flex .stat-body { min-width: 0; }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-card--navy .stat-icon { background: rgba(15,41,66,0.1); }
.stat-card--accent .stat-icon { background: rgba(200,16,46,0.1); }
.stat-card--success .stat-icon { background: var(--success-bg); }
.stat-card--warning .stat-icon { background: var(--warning-bg); }
.stat-card--accent .num { color: var(--red); }
.stat-card--success .num { color: var(--success); }
.stat-card--warning .num { color: var(--warning); }
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
.card h3 { margin-top: 0; }

/* Dashboard */
.db-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.db-header h1 { font-size: 24px; margin: 0 0 4px; }
.db-header .db-date { color: var(--gray-600); font-size: 14px; margin: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.quick-action { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 14px; text-align: center; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.quick-action:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quick-action .qa-icon { font-size: 24px; margin-bottom: 8px; }
.quick-action .qa-label { font-size: 13px; font-weight: 700; color: var(--gray-800); }
.db-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.db-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.db-card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.db-card-head .count-pill { background: var(--gray-100); color: var(--gray-600); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.db-empty { text-align: center; padding: 34px 16px; color: var(--gray-600); }
.db-empty .db-empty-icon { font-size: 30px; margin-bottom: 8px; opacity: 0.55; }
@media (max-width: 1100px) {
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .db-grid { grid-template-columns: 1fr; }
}
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--gray-600); padding: 10px; border-bottom: 2px solid var(--gray-100); }
table.data-table td { padding: 12px 10px; border-bottom: 1px solid var(--gray-100); font-size: 14px; vertical-align: middle; }
table.data-table tr:hover { background: var(--gray-50); }
.thumb-sm { width: 60px; height: 44px; object-fit: cover; border-radius: 4px; background: var(--gray-100); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.tag-available { background: #e4f7ea; color: #146c2e; }
.tag-pending { background: #fff5db; color: #8a6100; }
.tag-sold { background: #fdeced; color: #a1252f; }
.tag-new { background: #eaf2fb; color: #17436f; }
.tag-contacted { background: #fff5db; color: #8a6100; }
.tag-closed { background: var(--gray-100); color: var(--gray-600); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy-dark); }
.login-card { background: white; padding: 40px; border-radius: var(--radius); width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); }
.login-card h1 { text-align: center; font-size: 20px; }
.login-logo { display: block; margin: 0 auto 14px; height: 90px; width: auto; border-radius: 10px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.photo-manager { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.photo-manager .photo-item { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 4/3; background: var(--gray-100); }
.photo-manager img { width: 100%; height: 100%; object-fit: cover; }
.photo-manager .photo-actions { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; }
.photo-manager .photo-actions button { background: rgba(0,0,0,0.6); color: white; border: none; border-radius: 4px; padding: 3px 6px; font-size: 11px; cursor: pointer; }
.photo-manager .primary-badge { position: absolute; bottom: 4px; left: 4px; background: var(--red); color: var(--on-accent); font-size: 10px; padding: 2px 7px; border-radius: 10px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-day-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--gray-600); padding-bottom: 6px; }
.cal-cell { min-height: 90px; background: white; border: 1px solid var(--gray-100); border-radius: 6px; padding: 6px; font-size: 12px; }
.cal-cell .date-num { font-weight: 700; margin-bottom: 4px; color: var(--gray-600); }
.cal-cell.today { border-color: var(--navy); }
.cal-booking { background: var(--navy); color: var(--on-primary); border-radius: 4px; padding: 3px 5px; margin-bottom: 3px; font-size: 11px; cursor: default; }
.cal-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--gray-600); }

/* Testimonial carousel */
.carousel-nav { display: flex; gap: 8px; }
.carousel-arrow-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--gray-200); background: white; color: var(--navy); font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease, color 0.15s ease; flex-shrink: 0; }
.carousel-arrow-btn:hover:not(:disabled) { background: var(--navy); color: var(--on-primary); border-color: var(--navy); }
.carousel-arrow-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.testimonial-track { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-card { flex: 0 0 calc(33.333% - 16px); scroll-snap-align: start; background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.helper-text { font-size: 12px; color: var(--gray-600); margin-top: 4px; }
.badge-count { background: var(--red); color: var(--on-accent); font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; }

/* ---- Public site nav: hamburger dropdown ---- */
@media (max-width: 900px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy);
    box-shadow: var(--shadow-lg);
    padding: 6px 0 14px;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 12px 20px; }
  nav.main-nav a:not(.nav-cta):hover { background: rgba(255,255,255,0.06); }
  nav.main-nav .nav-cta { display: block; margin: 8px 20px 0; text-align: center; }
  .mobile-toggle { display: flex; }
  .site-header .container { position: relative; }

  .search-grid, .filters-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .detail-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-grid-2 { grid-template-columns: minmax(0, 1fr); }
  .testimonial-card { flex-basis: calc(50% - 12px); }
}
@media (max-width: 560px) {
  .search-grid, .filters-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 30px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container { padding: 0 14px; }
  .brand-logo { height: 44px; max-height: 44px; }
  .hero { padding: 40px 0; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .compare-bar { flex-direction: column; gap: 8px; padding: 12px 16px; width: calc(100% - 32px); left: 16px; right: 16px; transform: none; }
  .compare-bar.visible { bottom: 16px; }
  .testimonial-card { flex-basis: 88%; }
}

/* ---- Admin: off-canvas sidebar on tablet/mobile ---- */
.admin-mobile-bar { display: none; }
.admin-sidebar-backdrop { display: none; }
@media (max-width: 900px) {
  .admin-shell { display: block; }
  .admin-mobile-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--navy);
    color: var(--on-primary);
    padding: 10px 16px;
    position: sticky;
    top: 0;
    z-index: 60;
  }
  .admin-mobile-logo { height: 34px; width: auto; }
  .admin-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    width: 34px;
    height: 34px;
    padding: 0;
    cursor: pointer;
  }
  .admin-menu-btn span { display: block; width: 22px; height: 2px; background: var(--on-primary); border-radius: 2px; margin: 0 auto; transition: transform 0.2s ease, opacity 0.2s ease; }
  .admin-menu-btn.open span:nth-child(1), .admin-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .admin-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .admin-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    max-width: 82vw;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 30, 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  .admin-sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

  .admin-main { padding: 20px 16px; }
  .admin-topbar { flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 560px) {
  .admin-main { padding: 16px 12px; }
  .admin-topbar h1 { font-size: 19px; }
  table.data-table { font-size: 13px; }
  table.data-table th, table.data-table td { padding: 8px 6px; }
}

/* Horizontally scrollable tables so data isn't crushed on narrow screens */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .table-scroll table.data-table { min-width: 620px; }
}

/* Homepage quick links (round icon buttons, theme accent color) */
.quick-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 32px auto 0; max-width: 720px; }
.quick-link { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.quick-link[aria-expanded="true"] .quick-link-icon { background: var(--red-dark); box-shadow: 0 0 0 4px rgba(0,0,0,0.08); }
.quick-panel { margin-top: 24px; }
.quick-panel h2 { margin-top: 0; }
.quick-panel h3 { margin: 0 0 6px; font-size: 15px; }
.quick-link-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: var(--on-accent); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); transition: transform 0.15s ease, background 0.15s ease; }
.quick-link-icon svg { width: 30px; height: 30px; }
.quick-link:hover .quick-link-icon, .quick-link:focus-visible .quick-link-icon { background: var(--red-dark); transform: translateY(-2px); }
.quick-link-label { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.map-embed-lg { height: 400px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.contact-link { color: var(--navy); font-weight: 700; display: inline-block; padding: 6px 0; }
.contact-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .quick-links { gap: 8px; }
  .quick-link-icon { width: 58px; height: 58px; }
  .quick-link-icon svg { width: 24px; height: 24px; }
  .quick-link-label { font-size: 12px; }
  .map-embed-lg { height: 300px; }
}

/* Top bar (phone + hours, top right) */
.top-bar { background: var(--navy-dark); color: var(--on-primary); font-size: 13px; }
.top-bar .container { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 6px 20px; padding-top: 6px; padding-bottom: 6px; }
.top-bar-phone { font-weight: 700; }
.top-bar-phone:hover { text-decoration: underline; }
@media (max-width: 560px) {
  .top-bar .container { justify-content: center; font-size: 12px; }
}

/* Admin inventory: stacked vehicle rows */
.admin-vehicle-list { display: flex; flex-direction: column; gap: 12px; }
.admin-vehicle-row { display: flex; align-items: center; gap: 18px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.admin-vehicle-photo { flex: 0 0 140px; aspect-ratio: 4/3; border-radius: 6px; overflow: hidden; background: var(--gray-100); display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 12px; }
.admin-vehicle-photo img { width: 100%; height: 100%; object-fit: cover; }
.admin-vehicle-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.admin-vehicle-title { font-size: 16px; }
.admin-vehicle-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--gray-600); }
.admin-vehicle-price { font-weight: 800; color: var(--red); font-size: 15px; }
.admin-vehicle-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 700px) {
  .admin-vehicle-row { flex-wrap: wrap; align-items: flex-start; }
  .admin-vehicle-photo { flex-basis: 100px; }
  .admin-vehicle-actions { flex-basis: 100%; }
  .admin-vehicle-actions .btn { flex: 1; text-align: center; }
}

/* Admin photo pickers: big buttons in place of the browser's small file box */
.photo-pick-btn { display: inline-block; font-size: 16px; padding: 14px 24px; margin-bottom: 8px; cursor: pointer; }
/* Beat `.form-row label`, which would otherwise make the button text dark */
.form-row label.photo-pick-btn { font-size: 16px; }
.form-row label.photo-pick-btn.btn-red { color: var(--on-accent); }
.form-row label.photo-pick-btn.btn-navy { color: var(--on-primary); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.form-row:has(input.visually-hidden:focus-visible) .photo-pick-btn { outline: 3px solid var(--navy); outline-offset: 2px; }

/* Test drive page */
.page-hero-sub { margin: 8px 0 0; opacity: 0.85; font-size: 16px; }

/* Inventory page: list of cars, one row each (homepage keeps the carousels) */
.vehicle-list { display: flex; flex-direction: column; gap: 16px; }
.vehicle-row { display: flex; background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow 0.15s ease; }
.vehicle-row:hover { box-shadow: var(--shadow-lg); }
.vehicle-row-photo { position: relative; flex: 0 0 300px; aspect-ratio: 4/3; background: var(--gray-100); overflow: hidden; }
.vehicle-row-photo img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-row-photo .badge { position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--red); color: var(--on-accent); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; }
.vehicle-row-photo .no-photo { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--gray-400); font-size: 13px; text-align: center; padding: 8px; }
.vehicle-row-body { flex: 1; min-width: 0; padding: 20px 24px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.vehicle-row-title { margin: 0; font-size: 20px; font-weight: 700; }
.vehicle-row-title a:hover { color: var(--red); }
.vehicle-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 700px) {
  .vehicle-row-photo { flex-basis: 40%; }
  .vehicle-row-body { padding: 12px 14px; gap: 10px; }
  .vehicle-row-title { font-size: 16px; }
  .vehicle-row-actions { flex-direction: column; }
  .vehicle-row-actions .btn { text-align: center; }
}

@media (max-width: 560px) {
  /* Text fills the whole width on phones, so darken the photo evenly */
  .hero {
    background: linear-gradient(rgba(10, 28, 46, 0.6), rgba(10, 28, 46, 0.6)), url('/location/storefront.jpg') 85% center / cover no-repeat;
    background:
      linear-gradient(color-mix(in srgb, var(--navy-dark) 60%, transparent), color-mix(in srgb, var(--navy-dark) 60%, transparent)),
      url('/location/storefront.jpg') 85% center / cover no-repeat,
      var(--navy-dark);
  }
}

/* "Visit Our Lot": storefront photo shown large on the homepage, with the
   title and a Get Directions (map) button on top of it */
.visit-section { padding: 50px 0; }
/* The original photo is shown whole (4:3, nothing cropped), so cap its width to keep it from getting very tall */
.visit-card { position: relative; max-width: 960px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--navy-dark); }
.visit-photo { width: 100%; height: auto; display: block; }
.visit-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 28px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: linear-gradient(transparent, rgba(0, 0, 0, 0.65)); }
.visit-overlay h2 { margin: 0; color: white; font-size: 32px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
/* Round button on the photo: reuses .quick-link, with a white label for the dark photo */
.visit-map-link { flex: 0 0 auto; }
.visit-map-link .quick-link-label { color: white; font-size: 15px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); }
@media (max-width: 560px) {
  .visit-overlay { padding: 50px 16px 16px; }
  .visit-overlay h2 { font-size: 24px; }
}
