/* assets/css/main.css - Modern SaaS Luxury Theme with Logo Colors */

:root {
  /* Logo Colors Foundation */
  --primary: #FFCC00; /* Vibrant Yellow */
  --secondary: #E60000; /* Vibrant Red */
  --bg: #050505; /* Pure Black Background */
  --card: rgba(20, 20, 20, 0.45); /* Glass card background */
  --text: #FFFFFF; /* White for readable contrast */
  --white: #FFFFFF; /* Alias for --text */
  --muted: #FFB300; /* Darker Yellow for muted text */
  --grey: rgba(255, 255, 255, 0.45); /* Neutral grey for subtle text */

  --gradient-main: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-accent: linear-gradient(90deg, var(--primary), var(--secondary));
  --glass-bg: rgba(20, 20, 20, 0.45);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Cairo', 'Inter', sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Glassmorphism Styles */
.glass-panel {
  background: rgba(20, 20, 20, 0.45) !important;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
  background: rgba(30, 30, 30, 0.6) !important;
  border-color: rgba(255, 204, 0, 0.3) !important;
  box-shadow: 0 12px 40px 0 rgba(255, 204, 0, 0.15);
}

.glass-input {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.glass-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}

/* Fix autofill colors making text invisible */
.glass-input:-webkit-autofill,
.glass-input:-webkit-autofill:hover, 
.glass-input:-webkit-autofill:focus, 
.glass-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #1a1a1a inset !important;
  -webkit-text-fill-color: white !important;
  transition: background-color 5000s ease-in-out 0s;
}

.glass-input option {
  background: #ffffff !important;
  color: #000000 !important;
}

/* Elegant numbers / prices font */
.playfair-font, .price-tag, .number-val, .year-val, .stat h3 {
  font-family: 'Playfair Display', 'Inter', serif !important;
}

/* Background floating shapes */
body::before, body::after {
  content: '';
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(150px);
  z-index: -1;
  opacity: 0.15;
}
body::before {
  top: -100px;
  left: -100px;
  background: var(--primary);
}
body::after {
  bottom: -100px;
  right: -100px;
  background: var(--secondary);
}

h1, h2, h3, h4 {
  font-family: 'Cairo', sans-serif;
  color: white;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

/* ---------------- NAV ---------------- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  position: sticky;
  top: 0;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s;
}

.logo-container img {
  height: 45px;
  object-fit: contain;
}

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav ul li a {
  color: var(--muted);
  font-weight: 600;
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0; height: 2px;
  bottom: -5px; left: 0;
  background: var(--primary);
  transition: 0.3s;
}

nav ul li a:hover {
  color: white;
}
nav ul li a:hover::after {
  width: 100%;
}

/* ---------------- BUTTONS ---------------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  font-weight: 700;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
  transform: translateY(-3px);
}

/* ---------------- HERO ---------------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 5% 40px;
  gap: 40px;
  min-height: 90vh;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 30px;
  max-width: 500px;
}

.buttons {
  display: flex;
  gap: 15px;
}

.mockup {
  flex: 1;
  position: relative;
  height: 400px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid var(--glass-border);
}

.mockup video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

/* ---------------- FEATURES ---------------- */
.features {
  padding: 80px 5%;
  text-align: center;
}

.features h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--card);
  padding: 30px 20px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  transition: all 0.4s;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transition: 0.4s;
}

.card:hover {
  transform: translateY(-8px);
  background: #1f2937;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3), 0 0 15px rgba(212, 175, 55, 0.1);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--primary);
}

/* ---------------- STATS ---------------- */
.stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 80px 5%;
  background: rgba(17, 24, 39, 0.4);
  border-top: 1px solid var(--glass-border);
  border-bottom: 1px solid var(--glass-border);
  text-align: center;
  gap: 30px;
}

.stat h3 {
  font-size: 3.5rem;
  color: var(--primary);
  margin-bottom: 5px;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
}
.stat p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* ---------------- HOW IT WORKS ---------------- */
.steps {
  padding: 100px 5%;
}

.steps h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0; right: 25px; /* RTL logic */
  width: 2px; height: 100%;
  background: var(--glass-border);
}

.step {
  position: relative;
  background: var(--card);
  margin-bottom: 30px;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  margin-right: 60px; /* RTL logic */
  transition: 0.3s;
}

.step:hover {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.step::before {
  content: '';
  position: absolute;
  top: 50%; right: -42px;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

/* ---------------- TESTIMONIALS ---------------- */
.testimonials {
  padding: 80px 5%;
  text-align: center;
}

.testi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.testi-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  padding: 30px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  text-align: right;
}

/* ---------------- CTA ---------------- */
.cta {
  text-align: center;
  padding: 80px 5%;
  background: var(--gradient-accent);
  border-radius: 24px;
  margin: 80px 5%;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('../images/logo-anim.mp4') center/cover;
  opacity: 0.1;
}

.cta h2 {
  font-size: 3rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.cta p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
  color: white;
}

.cta .btn {
  background: white;
  color: var(--secondary);
  position: relative;
  z-index: 2;
}

/* ---------------- ANIMATION UTILITIES ---------------- */
.fade-in {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}
.fade-in.appear {
  opacity: 1;
}

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.slide-up.appear {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ---------------- FOOTER ---------------- */
footer {
  text-align: center;
  padding: 40px;
  color: var(--muted);
  border-top: 1px solid var(--glass-border);
  margin-top: 50px;
}

/* ---------------- CARDS (FOR PHP PAGES) ---------------- */
.car-card-modern {
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}
.car-card-modern:hover {
  transform: translateY(-8px);
  background: rgba(30, 30, 30, 0.6);
  border-color: rgba(255, 204, 0, 0.3);
  box-shadow: 0 12px 40px 0 rgba(255, 204, 0, 0.15);
}

/* ---------------- CENTRAL SEARCH BAR ---------------- */
.search-container {
  width: 100%;
  max-width: 950px;
  margin: -40px auto 50px;
  padding: 24px;
  border-radius: 24px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 15px;
  align-items: flex-end;
}
.search-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}
.search-field label {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
}
.search-field select {
  width: 100%;
  cursor: pointer;
}

.car-card-modern img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.car-card-content {
  padding: 20px;
}

/* ---------------- SEARCH PAGE LAYOUT ---------------- */
.search-page-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 30px;
  align-items: start;
  margin-top: 40px;
  margin-bottom: 80px;
}

.filter-sidebar {
  position: sticky;
  top: 100px;
  padding: 30px 24px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 25px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

/* Custom scrollbar for sidebar */
.filter-sidebar::-webkit-scrollbar {
  width: 6px;
}
.filter-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 204, 0, 0.2);
  border-radius: 3px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}
.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-group-title {
  font-size: 1.05rem;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 5px;
}

.filter-range {
  display: flex;
  gap: 10px;
}
.filter-range input {
  width: 50%;
}

.filter-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  cursor: pointer;
}
.filter-checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ---------------- B2B DASHBOARD STYLES ---------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
  margin-bottom: 40px;
}

.kpi-card {
  padding: 24px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 5px;
}

.kpi-title {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.inventory-section {
  margin-top: 40px;
  margin-bottom: 60px;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.inventory-table-container {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inventory-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.95rem;
}

.inventory-table th, .inventory-table td {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.inventory-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--primary);
  font-weight: 700;
}

.inventory-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
}

.badge-in_stock {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-reserved {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-sold {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Modal and Wizard Styles */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

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

.modal-content-wrapper {
  width: 90%;
  max-width: 650px;
  border-radius: 24px;
  padding: 30px;
  position: relative;
  transform: translateY(-50px);
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-content-wrapper {
  transform: translateY(0);
}

.wizard-steps-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.wizard-steps-indicator::before {
  content: '';
  position: absolute;
  top: 15px; left: 5%; width: 90%; height: 2px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.wizard-indicator-step {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #141414;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  z-index: 2;
  position: relative;
  transition: 0.3s;
}

.wizard-indicator-step.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
  box-shadow: 0 0 15px var(--primary);
}

.wizard-indicator-step.completed {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.wizard-step-pane {
  display: none;
  animation: fadeIn 0.4s ease;
}

.wizard-step-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Navigation Drawer Toggle Elements */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
}

/* ---------------- HATLA2EE-STYLE COMPACT LAYOUT ---------------- */

/* Tabbed Search Box */
.search-tabs-container {
  display: flex;
  margin-bottom: -1px;
  position: relative;
  z-index: 11;
}

.search-tab {
  padding: 12px 25px;
  background: rgba(20, 20, 20, 0.6);
  color: var(--muted);
  font-weight: 700;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  border-bottom: none;
  transition: 0.3s;
}

.search-tab.active {
  background: rgba(40, 40, 40, 0.85);
  color: var(--primary);
  border-color: rgba(255, 204, 0, 0.3);
  box-shadow: 0 -4px 15px rgba(255, 204, 0, 0.1);
}

.compact-search-panel {
  background: rgba(40, 40, 40, 0.85) !important;
  border-radius: 0 0 16px 16px !important;
  border-top-left-radius: 0 !important; /* In case first tab is active */
  padding: 25px;
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 15px;
  align-items: flex-end;
  border-top-color: rgba(255, 204, 0, 0.3) !important;
}

@media (max-width: 992px) {
  .compact-search-panel {
    grid-template-columns: repeat(2, 1fr);
  }
  .compact-search-panel .btn {
    grid-column: 1 / -1;
  }
}

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

/* Compact Hero */
.hero-compact {
  padding: 40px 5% 0px;
  min-height: auto;
  text-align: right; /* Hatla2ee style RTL */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-compact-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
}

/* Dense Brands Grid */
.brands-dense-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.brand-dense-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 15px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  text-decoration: none;
}

.brand-dense-card:hover {
  border-color: var(--primary);
  background: rgba(30, 30, 30, 0.8);
  transform: translateY(-3px);
}

.brand-dense-logo {
  width: 45px;
  height: 45px;
  margin-bottom: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.brand-dense-name {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Quick Categories Line */
.quick-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  margin: 30px 0;
}

.quick-category-pill {
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--white);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.quick-category-pill:hover {
  background: rgba(255, 204, 0, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

/* Offcanvas Overlay for Mobile Filter Sheet */
.filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2999;
}
.filter-overlay.active {
  display: block;
}

.btn-filter-trigger {
  display: none;
}

/* Sticky Action Bar for Mobile View details page */
.sticky-action-bar {
  display: none;
}

/* Glass Card styling */
.glass-card {
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.glass-card:hover {
  background: rgba(30, 30, 30, 0.6);
  border-color: rgba(255, 204, 0, 0.3);
  box-shadow: 0 12px 40px 0 rgba(255, 204, 0, 0.15);
}

/* Global Form Controls */
.form-control {
  width: 100%;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  border-radius: 12px;
  padding: 12px 20px;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  height: 48px;
}
.form-control:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 15px rgba(255, 204, 0, 0.3);
}
textarea.form-control {
  height: auto;
  min-height: 100px;
}
select.form-control {
  cursor: pointer;
}
select.form-control option {
  background: #141414;
  color: #fff;
}

/* B2B Dashboard Wizard Form Row Grid */
.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

/* Category Grid & Modern Car Cards */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}
.car-card.glass-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.car-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.car-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.car-card:hover .car-img {
  transform: scale(1.05);
}
.car-details-wrap {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  text-align: right;
}
.car-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 700;
  line-height: 1.3;
}
.car-year {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}
.car-price-row {
  border-top: 1px solid var(--glass-border);
  padding-top: 15px;
  margin-bottom: 15px;
}
.car-price {
  font-size: 1.6rem;
  font-weight: bold;
  color: #fff;
  font-family: 'Playfair Display', serif;
}
.car-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}
.stat-value {
  font-size: 0.95rem;
  font-weight: bold;
  color: #fff;
}
.car-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}
.car-actions .btn {
  flex: 1;
  font-size: 0.95rem;
  padding: 10px 15px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: rgba(255, 204, 0, 0.1);
  transform: translateY(-3px);
}

/* RESPONSIVE MEDIA QUERIES */

/* 1. Large Screens & Desktops (1441px+) */
@media (min-width: 1441px) {
  .container {
    max-width: 1400px;
  }
}

/* 2. Laptops & Mid-size Monitors (1025px - 1440px) */
@media (max-width: 1440px) {
  .container {
    max-width: 1150px;
  }
}

/* 3. Tablets & Smaller Notebooks (768px - 1024px) */
@media (max-width: 1024px) {
  .search-page-layout {
    grid-template-columns: 280px 1fr;
    gap: 20px;
  }
  .filter-sidebar {
    top: 90px;
    padding: 20px 15px;
  }
}

/* 4. Mobile & Touch Screen Devices (max-width: 768px) */
@media (max-width: 768px) {
  /* Typography Scale */
  .hero-text h1 {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  
  /* Menu Navigation Drawer */
  .menu-toggle {
    display: block;
    z-index: 1002;
  }
  
  nav {
    justify-content: space-between;
    padding: 15px 5%;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 75px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 75px);
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-left: 1px solid var(--glass-border);
    padding: 40px 25px;
    gap: 25px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    overflow-y: auto;
    list-style: none;
    margin: 0;
  }

  nav ul.active {
    right: 0;
  }

  /* Layout and Spacing Checks */
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 60px;
    padding-bottom: 20px;
    gap: 30px;
  }
  .buttons {
    justify-content: center;
    flex-direction: column;
    width: 100%;
  }
  .buttons .btn {
    width: 100%;
  }
  .mockup {
    width: 100%;
    height: 250px;
  }

  .stats {
    flex-direction: column;
    gap: 40px;
    padding: 50px 5%;
  }
  
  .timeline::before {
    right: 15px;
  }
  .step {
    margin-right: 40px;
    padding: 20px;
  }
  .step::before {
    right: -32px;
  }

  /* Central Search Bar Responsive adjustment */
  .search-container {
    grid-template-columns: 1fr;
    margin: 20px auto 40px;
    width: 90%;
    gap: 20px;
    border-radius: 16px;
    padding: 20px;
  }
  
  .search-container button[type="submit"] {
    width: 100%;
  }

  /* Offcanvas Bottom Sheet Filters inside search.php */
  .search-page-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .btn-filter-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: bold;
    border-radius: 12px;
    background: var(--primary);
    color: #000;
    border: none;
    cursor: pointer;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.2);
  }

  .filter-sidebar {
    position: fixed !important;
    bottom: -100% !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 80vh !important;
    z-index: 3000 !important;
    background: #0d0d0d !important;
    border-radius: 24px 24px 0 0 !important;
    border: 1px solid var(--glass-border) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8) !important;
    padding: 30px 20px !important;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    top: auto !important;
  }

  .filter-sidebar.active {
    bottom: 0 !important;
  }

  /* Sticky Bottom Mobile Bar */
  .sticky-action-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    z-index: 1500;
    gap: 12px;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
  }
  
  .sticky-action-bar .btn {
    flex: 1;
    padding: 14px;
    font-size: 1rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  body.has-sticky-bar {
    padding-bottom: 85px;
  }

  /* Tables and forms adaptation */
  .inventory-table th, .inventory-table td {
    padding: 12px 14px;
    font-size: 0.85rem;
  }
  
  .inventory-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .inventory-header select {
    width: 100%;
  }

  .form-control {
    font-size: 1rem;
    height: 48px;
  }

  /* Form spacing adjustments */
  .glass-card {
    padding: 25px 15px !important;
  }

  /* Category grid layout for mobile */
  .cars-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  /* B2B Dashboard forms layout for mobile */
  .form-row-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .modal-content-wrapper {
    padding: 25px 15px !important;
    width: 95% !important;
  }

  .wizard-indicator-step {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }
}
