/* ==========================================================================
   VERDELLEN TRADING - DESIGN SYSTEM & PUBLIC STYLESHEET
   Classic Ford Mustang Specialist
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Theme Variables & Reset
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #a8dadc;
  --accent-hover: #78c0c4;
  --border: #334155;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  --badge-success-bg: #143825;
  --badge-success-text: #4ade80;
  --badge-warning-bg: #1e3a45;
  --badge-warning-text: #a8dadc;
  --badge-danger-bg: #451a1c;
  --badge-danger-text: #f87171;
}

[data-theme="light"] {
  --background: #f4f1eb;
  --surface: #ffffff;
  --surface-hover: #eae7df;
  --text: #181818;
  --muted: #6d6d6d;
  --accent: #8f1d24;
  --accent-hover: #72161c;
  --border: #d8d4cc;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);

  --badge-success-bg: #e6f4ea;
  --badge-success-text: #137333;
  --badge-warning-bg: #fef7e0;
  --badge-warning-text: #b06000;
  --badge-danger-bg: #fce8e6;
  --badge-danger-text: #c5221f;
}

[data-theme="dark"] {
  --background: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #a8dadc;
  --accent-hover: #78c0c4;
  --border: #334155;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.5);

  --badge-success-bg: #143825;
  --badge-success-text: #4ade80;
  --badge-warning-bg: #1e3a45;
  --badge-warning-text: #a8dadc;
  --badge-danger-bg: #451a1c;
  --badge-danger-text: #f87171;
}

[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] button[type="submit"]:hover {
  color: #000000 !important;
  font-weight: 700;
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: #cbd5e1;
  border-color: #cbd5e1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

h4 {
  font-size: 1.2rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text);
}

.text-muted {
  color: var(--muted);
}

.text-accent {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   3. Containers & Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title p {
  max-width: 600px;
  margin: 0.5rem auto 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.header-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 85px;
}

@media (min-width: 769px) {
  .brand-logo {
    flex: 1 1 0%;
    display: flex;
    justify-content: flex-start;
  }

  .header-wrapper > nav {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
  }

  .nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.25rem;
  }

  .nav-actions {
    flex: 1 1 0%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-logo-img {
  height: 55px;
  width: auto;
  object-fit: contain;
}

.hero-logo-img {
  max-width: 320px;
  width: 85%;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  color: var(--text);
  font-size: 1rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme & Language Toggle Buttons */
.theme-toggle-btn,
.lang-toggle-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.theme-toggle-btn:hover,
.lang-toggle-btn:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.lang-switch-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 3px;
  gap: 2px;
}

.lang-chip {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 1;
  text-align: center;
}

.lang-chip:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.lang-chip.active {
  background: var(--accent);
  color: #ffffff;
}

[data-theme="dark"] .lang-chip.active {
  color: #0f172a;
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sun-icon {
  display: none;
}

.moon-icon {
  display: block;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-divider,
.mobile-menu-controls {
  display: none;
}

/* --------------------------------------------------------------------------
   5. Buttons & UI Elements
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(143, 29, 36, 0.3);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--text);
  color: var(--text);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn-outline:hover {
  background-color: var(--accent);
  color: #ffffff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.badge {
  display: inline-block;
  padding: 0.35em 0.75em;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

.badge-success {
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
}

.badge-new {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.badge-warning {
  background: var(--badge-warning-bg);
  color: var(--badge-warning-text);
}

.badge-danger {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
}

.badge-secondary {
  background: var(--surface-hover);
  color: var(--muted);
}

/* Corner Ribbon for New Arrived Vehicles */
.car-card-ribbon {
  position: absolute;
  top: 25px;
  left: -48px;
  width: 195px;
  text-align: center;
  background: linear-gradient(135deg, #e60000 0%, #b30000 100%);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 7px 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 12;
  pointer-events: none;
}

/* Flash Messages */
.flash-container {
  margin-top: 1.5rem;
}

.flash-message {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}

.flash-success {
  background: var(--badge-success-bg);
  color: var(--badge-success-text);
  border: 1px solid var(--badge-success-text);
}

.flash-error {
  background: var(--badge-danger-bg);
  color: var(--badge-danger-text);
  border: 1px solid var(--badge-danger-text);
}

.flash-info {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

/* --------------------------------------------------------------------------
   6. Hero Section (Homepage)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.82) 100%), url('../images/mustang-hero-light.jpg') center/cover no-repeat;
  color: #ffffff;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 6rem 1.25rem 4rem;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .hero {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.88) 100%), url('../images/mustang-hero.jpg') center/cover no-repeat;
}

.hero-content {
  max-width: 850px;
  margin: 0 auto;
}

.hero-main-title {
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 0.75rem;
  line-height: 1.25;
  font-family: var(--font-heading);
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.95);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  font-weight: 600;
  text-transform: none;
  color: #fef08a;
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 60%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2.25rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 1)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.95));
}

.hero-buttons {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   iPad / Tablet Landscape Optimization (Does NOT affect Desktop > 1024px)
   -------------------------------------------------------------------------- */
@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: landscape),
       screen and (hover: none) and (pointer: coarse) and (min-width: 769px) and (orientation: landscape) {
  .hero {
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    padding: 3.25rem 1.25rem 3rem;
  }

  .hero-logo-img {
    max-width: 165px;
    margin-bottom: 0.75rem;
  }

  .hero-main-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    margin-bottom: 1.5rem;
  }
}

.btn-hero-cta,
.btn-hero-cta:hover,
.btn-hero-cta:focus,
.btn-hero-cta:active,
[data-theme="dark"] .btn-hero-cta,
[data-theme="dark"] .btn-hero-cta:hover,
[data-theme="dark"] .btn-hero-cta:focus,
[data-theme="dark"] .btn-hero-cta:active {
  color: #ffffff !important;
}

.btn-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 2.85rem;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #72161c 0%, #8f1d24 50%, #581116 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(143, 29, 36, 0.4), 0 0 16px rgba(143, 29, 36, 0.25);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.btn-hero-cta:hover {
  background: linear-gradient(135deg, #8f1d24 0%, #a3222a 50%, #72161c 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 32px rgba(143, 29, 36, 0.6), 0 0 22px rgba(163, 34, 42, 0.45);
  border-color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .btn-hero-cta {
  background: linear-gradient(135deg, #1e3a45 0%, #2a5262 50%, #15252e 100%);
  border: 1px solid rgba(168, 218, 220, 0.4);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5), 0 0 18px rgba(168, 218, 220, 0.25);
}

[data-theme="dark"] .btn-hero-cta:hover {
  background: linear-gradient(135deg, #2a5262 0%, #36677b 50%, #1e3a45 100%);
  border-color: rgba(168, 218, 220, 0.7);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(168, 218, 220, 0.4);
}

/* --------------------------------------------------------------------------
   7. Car Cards & Grids
   -------------------------------------------------------------------------- */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.car-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.car-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.car-card-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--background);
}

.car-card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.car-card:hover .car-card-image-wrap img {
  transform: scale(1.05);
}

.car-card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.car-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.car-card-title {
  font-size: 1.5rem;
  line-height: 1.3;
  margin-bottom: 1.15rem;
  font-family: var(--font-heading);
}

.car-card-title a {
  color: var(--accent);
  transition: color 0.2s ease;
}

.car-card-title a:hover {
  color: var(--text);
  text-decoration: underline;
}

.car-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border);
}

.car-card-meta div {
  line-height: 1.5;
}

.car-card-meta strong {
  color: var(--muted);
  font-weight: 600;
}

.car-card-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.25rem;
  margin-top: auto;
}

.car-card-footer {
  margin-top: auto;
}

.car-card-footer .btn {
  width: 100%;
}

/* Filter Chips (Aanbod Page) */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.filter-chip:hover,
.filter-chip.active {
  background-color: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

[data-theme="dark"] .filter-chip:hover,
[data-theme="dark"] .filter-chip.active {
  color: #0f172a;
  font-weight: 700;
}

.mobile-filter-bar-wrapper {
  display: none;
}

.mobile-filter-modal {
  display: none;
}

/* --------------------------------------------------------------------------
   8. Vehicle Detail Page (auto.php)
   -------------------------------------------------------------------------- */
.detail-header {
  margin-bottom: 2rem;
}

.detail-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: 0.5rem;
}

.detail-subtitle {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.1rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 992px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  /* Prevents grid blowout */
  width: 100%;
  max-width: 100%;
}

.gallery-main-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  touch-action: pan-y;
}

.gallery-main-wrap img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Subtle Overlay Arrow Buttons for Main Focused Image */
.main-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  font-family: var(--font-body);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  opacity: 0.85;
  user-select: none;
}

.main-gallery-arrow-left {
  left: 15px;
}

.main-gallery-arrow-right {
  right: 15px;
}

.main-gallery-arrow:hover {
  background-color: var(--accent);
  border-color: #ffffff;
  color: #ffffff;
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.main-gallery-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* --------------------------------------------------------------------------
   Fullscreen Lightbox Modal
   -------------------------------------------------------------------------- */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 2.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10002;
  transition: var(--transition);
}

.lightbox-close:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
  user-select: none;
}

.lightbox-arrow-left {
  left: 35px;
}

.lightbox-arrow-right {
  right: 35px;
}

.lightbox-arrow:hover {
  background-color: var(--accent);
  border-color: #ffffff;
  color: #ffffff;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.lightbox-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 88vh;
  position: relative;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  user-select: none;
}

.lightbox-caption {
  margin-top: 1rem;
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.gallery-thumbs-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  position: relative;
}

.gallery-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-family: var(--font-body);
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: var(--shadow);
  user-select: none;
}

.gallery-arrow:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.08);
}

.gallery-arrow:active {
  transform: scale(0.95);
}

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  padding-top: 0.25rem;
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* Hide default scrollbar in Firefox */
}

.gallery-thumbs::-webkit-scrollbar {
  display: none;
  /* Hide default scrollbar in Chrome/Safari */
}

.gallery-thumb {
  position: relative;
  width: 110px;
  height: 75px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  opacity: 0.75;
  transition: var(--transition);
}

.gallery-thumb-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(143, 29, 36, 0.92);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
  padding-left: 2px; /* optical centering of play arrow */
}

.gallery-thumb:hover .gallery-thumb-video-badge,
.gallery-thumb.active .gallery-thumb-video-badge {
  background: var(--accent);
  color: #0f172a;
  transform: translate(-50%, -50%) scale(1.1);
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}

/* Specifications Sidebar Box */
.specs-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  position: sticky;
  top: 105px;
}

.specs-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.specs-list {
  list-style: none;
  margin: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.specs-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.specs-item-label {
  color: var(--muted);
}

.specs-item-value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.detail-description {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-top: 2.5rem;
  box-shadow: var(--shadow);
}

.detail-description h3 {
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 0.4rem;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   9. Forms (Contact & Admin Inputs)
   -------------------------------------------------------------------------- */
.form-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  max-width: 750px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background-color: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 29, 36, 0.15);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1rem;
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

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

/* Honeypot field (hidden from humans) */
.hp-field {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* --------------------------------------------------------------------------
   10. About & Contact CTA Banner
   -------------------------------------------------------------------------- */
.cta-banner {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  margin-top: 4rem;
}

.cta-banner h2 {
  margin-bottom: 0.75rem;
}

.cta-banner p {
  max-width: 600px;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   12. Responsive Adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  main {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .flash-container {
    margin-top: 0 !important;
  }

  .site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 1000;
    pointer-events: none;
  }

  .header-wrapper {
    height: 0;
    padding: 0;
    margin: 0;
  }

  .site-header .brand-logo {
    display: none !important;
  }

  .hero {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 3rem 1.25rem 2rem;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
  }

  .hero-content {
    width: 100%;
    max-width: 100%;
  }

  .hero-logo-img {
    max-width: 180px;
    margin-bottom: 1rem;
  }

  .hero-main-title {
    font-size: clamp(1.2rem, 5vw, 1.75rem);
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.85rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
  }

  .hero-buttons .btn,
  .btn-hero-cta {
    width: 100%;
    padding: 0.95rem 1.5rem;
    box-sizing: border-box;
  }

  .nav-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 3rem);
    max-width: 340px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    flex-direction: column;
    padding: 2rem 1.5rem;
    gap: 1.2rem;
    display: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 1004;
    pointer-events: auto;
    text-align: center;
  }

  .nav-menu.open {
    display: flex;
  }

  .mobile-nav-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 2.25rem;
    right: 1.25rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(18, 18, 18, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    z-index: 1005;
    cursor: pointer;
    transition: var(--transition);
    pointer-events: auto;
  }

  .mobile-nav-toggle .close-icon {
    display: none;
    font-size: 1.8rem;
    line-height: 1;
  }

  .mobile-nav-toggle[aria-expanded="true"] .hamburger-icon,
  .mobile-nav-toggle.open .hamburger-icon {
    display: none !important;
  }

  .mobile-nav-toggle[aria-expanded="true"] .close-icon,
  .mobile-nav-toggle.open .close-icon {
    display: inline-block !important;
  }

  [data-theme="light"] .mobile-nav-toggle {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #121212;
  }

  .mobile-nav-toggle:hover {
    transform: scale(1.05);
    border-color: var(--accent);
  }

  .desktop-only-action {
    display: none !important;
  }

  .mobile-menu-divider {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
  }

  .mobile-menu-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.85rem;
    padding-top: 0.5rem;
  }

  .lang-toggle-mobile,
  .theme-toggle-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    gap: 0.4rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  /* Car Cards Mobile Fit */
  .car-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
  }

  .car-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .car-card-body {
    padding: 1.25rem;
  }

  .gallery-main-wrap {
    aspect-ratio: 4 / 3;
    max-height: 380px;
  }

  .gallery-thumb {
    width: 90px;
    height: 60px;
  }

  /* --------------------------------------------------------------------------
     Mobile Inventory Filter Trigger & Bottom Sheet Modal (<= 768px)
     -------------------------------------------------------------------------- */
  .desktop-filter-bar {
    display: none !important;
  }

  .mobile-filter-bar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
  }

  .mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.6rem;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    transition: var(--transition);
  }

  [data-theme="dark"] .mobile-filter-btn {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .mobile-filter-btn:hover,
  .mobile-filter-btn:focus {
    border-color: var(--accent);
    transform: translateY(-1px);
  }

  .mobile-filter-modal.open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 2500;
    align-items: flex-end;
    justify-content: center;
  }

  .mobile-filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2501;
  }

  .mobile-filter-sheet {
    position: relative;
    z-index: 2502;
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 1.5rem 1.25rem 2.25rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    animation: slideUpSheet 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  @keyframes slideUpSheet {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .mobile-filter-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .mobile-filter-sheet-header h3 {
    font-size: 1.2rem;
    margin: 0;
  }

  .mobile-filter-close {
    background: transparent;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem;
  }

  .mobile-filter-close:hover {
    color: var(--text);
  }

  .mobile-filter-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .mobile-filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 52px;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--surface-hover);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    transition: var(--transition);
  }

  .mobile-filter-option.active {
    background: var(--accent);
    color: #ffffff !important;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(143, 29, 36, 0.35);
  }

  [data-theme="dark"] .mobile-filter-option.active {
    color: #0f172a !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(168, 218, 220, 0.35);
  }

  .mobile-filter-count {
    opacity: 0.85;
    font-weight: 500;
  }
}

/* --------------------------------------------------------------------------
   13. About Us Showcase Gallery (over-ons.php)
   -------------------------------------------------------------------------- */
.about-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

.about-gallery-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
  background-color: var(--surface);
}

.about-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-gallery-item:hover img {
  transform: scale(1.04);
}

@media (max-width: 768px) {
  .about-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
  }
}