/* ==========================================================================
   CarAuto - Custom Automotive Design System & Micro-interactions
   ========================================================================== */

:root {
  --color-brand-primary: #0284C7;       /* Automotive Electric Blue */
  --color-brand-primary-hover: #0369A1;
  --color-brand-dark: #0F172A;          /* Deep Navy Charcoal */
  --color-brand-navy-card: #0c1527;
  --color-whatsapp: #25D366;            /* WhatsApp Green */
  --color-whatsapp-hover: #20BA5A;
  --color-surface-light: #F8FAFC;
  --color-border-subtle: #E2E8F0;
  --color-text-main: #0F172A;
  --color-text-muted: #64748B;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base resets & typography */
body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 72px; /* Prevent fixed bottom CTA bar from covering content on mobile */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Header blur effect */
.header-glass {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Vehicle card micro-interactions */
.car-card {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  will-change: transform, box-shadow;
}

.car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
  border-color: #CBD5E1;
}

.car-card .card-image-wrap {
  position: relative;
  overflow: hidden;
  background-color: #F1F5F9;
}

.car-card .card-image {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

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

/* Price accent */
.price-tag {
  color: #0284C7;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Specification badges & pill chips */
.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #F1F5F9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #E2E8F0;
}

/* Mobile sticky bottom CTA dock with iOS safe area support */
.mobile-sticky-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #FFFFFF;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.15);
  border-top: 1px solid #E2E8F0;
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 768px) {
  .mobile-sticky-dock {
    display: none !important;
  }
}

/* Custom Scrollbar for image carousels & filter pill bars */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Hero mountain overlay gradient */
.hero-gradient-overlay {
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.72) 0%,
    rgba(15, 23, 42, 0.58) 50%,
    rgba(15, 23, 42, 0.85) 100%
  );
}

/* Hero text shadow effects for crisp readability without blocking cards */
.hero-title-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95), 0 4px 24px rgba(0, 0, 0, 0.8), 0 8px 36px rgba(0, 0, 0, 0.6);
}

.hero-desc-shadow {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 2px 12px rgba(0, 0, 0, 0.85);
}

/* Quick search floating box shadow */
.quick-search-box {
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(226, 232, 240, 0.9);
}

/* Status Badges */
.badge-featured {
  background: #0284C7;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-recently-added {
  background: #0D9488;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-sold {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
}

/* Gallery active thumbnail border */
.gallery-thumb.active {
  border-color: #0284C7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.35);
}

/* Brand logo tile hover */
.brand-pill {
  transition: all 0.2s ease;
}
.brand-pill:hover {
  transform: translateY(-2px);
  border-color: #0284C7;
  background-color: #F8FAFC;
}

/* Budget & Body type card premium styling */
.budget-card,
.bodytype-card {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform, box-shadow;
  backface-visibility: hidden;
}
.budget-card:hover,
.bodytype-card:hover {
  transform: translateY(-4px);
  border-color: rgba(2, 132, 199, 0.6);
  box-shadow: 0 16px 32px -8px rgba(2, 132, 199, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}
.budget-card img,
.bodytype-card img {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.03));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Custom Accordion Chevron Animation */
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary svg.chevron {
  transform: rotate(180deg);
}
summary svg.chevron {
  transition: transform 0.2s ease-in-out;
}
