/* ===========================
   MANSOUR AUTOMOTIVE - DESIGN SYSTEM
   Dark Luxury Theme
   =========================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a25;
  --bg-card: rgba(22, 22, 35, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-hover: rgba(255, 255, 255, 0.06);

  --gold-primary: #c9a96e;
  --gold-light: #e8d5a3;
  --gold-dark: #8b7340;
  --gold-gradient: linear-gradient(135deg, #c9a96e 0%, #e8d5a3 50%, #c9a96e 100%);

  --text-primary: #f0ece4;
  --text-secondary: rgba(240, 236, 228, 0.65);
  --text-muted: rgba(240, 236, 228, 0.4);

  --border-subtle: rgba(201, 169, 110, 0.12);
  --border-gold: rgba(201, 169, 110, 0.3);
  --border-glass: rgba(255, 255, 255, 0.06);

  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 0 30px rgba(201, 169, 110, 0.15);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-primary);
}

/* Selection */
::selection {
  background: rgba(201, 169, 110, 0.3);
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
}

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

input, select {
  font-family: inherit;
  color: inherit;
}

/* --- Utility --- */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* --- Background Effects --- */
.bg-grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.bg-glow {
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 169, 110, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================
   NAVIGATION
   ============================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-lg) 0;
  transition: var(--transition-smooth);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-md) 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-logo-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo-icon svg {
  width: 36px;
  height: 36px;
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  position: relative;
  letter-spacing: 0.02em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold-primary);
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: var(--gold-light);
}

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

.nav-cta {
  padding: 10px 28px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  background: transparent;
}

.nav-cta:hover {
  background: var(--gold-primary);
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.nav-mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ============================
   HERO SECTION
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  filter: brightness(0.4);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 10, 15, 0.3) 0%,
    rgba(10, 10, 15, 0.6) 50%,
    rgba(10, 10, 15, 1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  padding: 0 var(--space-xl);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-primary);
  margin-bottom: var(--space-2xl);
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.hero-title .gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.75;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  animation: fadeInUp 0.8s ease-out 0.45s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 16px 40px;
  background: var(--gold-gradient);
  color: var(--bg-primary);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(201, 169, 110, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 169, 110, 0.45);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 16px 40px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(201, 169, 110, 0.1);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-4xl);
  margin-top: var(--space-4xl);
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

/* ============================
   INVENTORY / LISTINGS
   ============================ */
.inventory {
  position: relative;
  padding: var(--space-4xl) 0;
  z-index: 1;
}

.inventory-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.inventory-header-left {
  flex: 1;
}

/* Search & Filter Bar */
.filter-bar {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-wrapper svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 46px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition-fast);
  outline: none;
}

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

.search-input:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

.filter-select {
  padding: 14px 40px 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23c9a96e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  min-width: 180px;
  cursor: pointer;
  transition: var(--transition-fast);
  outline: none;
}

.filter-select:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

.filter-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Brand Filter Pills */
.brand-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.brand-pill {
  padding: 10px 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  background: transparent;
  letter-spacing: 0.03em;
}

.brand-pill:hover {
  border-color: var(--border-gold);
  color: var(--gold-primary);
  background: rgba(201, 169, 110, 0.06);
}

.brand-pill.active {
  background: var(--gold-primary);
  color: var(--bg-primary);
  border-color: var(--gold-primary);
  font-weight: 600;
}

/* Results Count */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.results-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.results-count span {
  color: var(--gold-primary);
  font-weight: 600;
}

/* Car Grid */
.car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--space-xl);
}

/* Car Card */
.car-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
}

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

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

.car-card-badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 2;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-featured {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

.badge-new {
  background: #22c55e;
  color: #fff;
}

.badge-deal {
  background: #ef4444;
  color: #fff;
}

.car-image {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: var(--bg-tertiary);
}

.car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.car-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 15, 0.7) 100%);
  pointer-events: none;
}

.car-details {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
}

.car-brand-year {
  font-size: 0.78rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 6px;
}

.car-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  line-height: 1.25;
}

.car-specs {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.car-spec {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.car-spec svg {
  width: 15px;
  height: 15px;
  color: var(--gold-dark);
}

.car-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.car-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.car-view-btn {
  padding: 10px 24px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: var(--transition-smooth);
}

.car-view-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-primary);
}

/* No Results */
.no-results {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  display: none;
}

.no-results.visible {
  display: block;
}

.no-results svg {
  width: 64px;
  height: 64px;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

.no-results h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.no-results p {
  color: var(--text-secondary);
}

/* ============================
   WHY CHOOSE US
   ============================ */
.why-us {
  padding: var(--space-4xl) 0;
  position: relative;
  z-index: 1;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.why-card {
  padding: var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: var(--transition-smooth);
}

.why-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.why-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.why-card-icon svg {
  width: 26px;
  height: 26px;
  color: var(--gold-primary);
}

.why-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.why-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================
   CONTACT / CTA SECTION
   ============================ */
.cta-section {
  padding: var(--space-4xl) 0;
  position: relative;
  z-index: 1;
}

.cta-box {
  text-align: center;
  padding: var(--space-4xl) var(--space-2xl);
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: var(--gold-gradient);
}

.cta-box .section-title {
  max-width: 600px;
  margin: 0 auto var(--space-md);
}

.cta-box .section-subtitle {
  margin: 0 auto var(--space-2xl);
}

.cta-contact-info {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

.cta-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cta-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--gold-primary);
}

/* ============================
   FOOTER
   ============================ */
.footer {
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-links {
  display: flex;
  gap: var(--space-xl);
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--gold-primary);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================
   CATALOG: BRAND GRID
   ============================ */
.catalog {
  position: relative;
  padding: var(--space-4xl) 0;
  z-index: 1;
}

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.brand-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-xl) var(--space-lg);
  /* Clean light "marque" tile so full-colour logos stay crisp */
  background: linear-gradient(160deg, #fdfdfb 0%, #efeae0 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  text-align: center;
  min-height: 210px;
}

.brand-box:hover {
  transform: translateY(-6px);
  border-color: var(--gold-primary);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--gold-primary);
}

.brand-box-logo {
  width: 124px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: var(--transition-smooth);
}

.brand-box:hover .brand-box-logo {
  transform: scale(1.05);
}

.brand-box-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Fallback when a logo image fails: show the brand initial */
.brand-box-logo.logo-fallback::after {
  content: attr(data-initial);
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 800;
  color: #1a1a25;
}

.brand-box-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #14141c;
}

.brand-box-count {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

/* ============================
   CATALOG: MODEL VIEW
   ============================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold-primary);
  transition: var(--transition-smooth);
  margin-bottom: var(--space-xl);
}
.back-btn:hover {
  background: var(--gold-primary);
  color: var(--bg-primary);
}
.back-btn svg { width: 16px; height: 16px; }

.model-view-header {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.model-view-logo {
  width: 104px;
  height: 76px;
  object-fit: contain;
  background: linear-gradient(160deg, #fdfdfb 0%, #efeae0 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  padding: 12px;
  flex-shrink: 0;
}

/* Car card additions for broker layout */
.car-zoom-hint {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg-primary);
  background: var(--gold-primary);
  opacity: 0;
  transform: translateY(6px);
  transition: var(--transition-smooth);
}
.car-card:hover .car-zoom-hint {
  opacity: 1;
  transform: translateY(0);
}

.car-image[data-role="open"], .car-name[data-role="open"] { cursor: pointer; }
.car-image .car-image img { background: var(--bg-tertiary); }

.car-card-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-md) 0 var(--space-lg);
}

.year-select-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.year-select {
  flex: 1;
  padding: 12px 40px 12px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-primary);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23c9a96e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
  outline: none;
  transition: var(--transition-fast);
}
.year-select:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}
.year-select option { background: var(--bg-secondary); color: var(--text-primary); }

.car-contact-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 24px;
  background: var(--gold-gradient);
  color: var(--bg-primary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.25);
}
.car-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 110, 0.4);
}
.car-contact-btn svg { width: 16px; height: 16px; }

/* ============================
   CAR VIEWER MODAL
   ============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: rgba(5, 5, 9, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fadeIn 0.25s ease-out;
}
.modal-overlay[hidden] { display: none; }

.modal {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card-hover);
  animation: fadeInUp 0.35s ease-out;
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 5;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: var(--transition-fast);
}
.modal-close:hover { background: var(--gold-primary); color: var(--bg-primary); }
.modal-close svg { width: 20px; height: 20px; }

/* Carousel */
.carousel {
  position: relative;
  height: 380px;
  background: linear-gradient(160deg, #1c1c28 0%, #0f0f16 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
}
.carousel-track { position: absolute; inset: 0; }

.carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
  pointer-events: none;
}
.carousel-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }
.carousel-slide img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55));
}

/* Curated real photos fill the frame instead of floating as a render */
.carousel-slide.is-photo {
  align-items: stretch;
  justify-content: stretch;
}
.carousel-slide.is-photo img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(10, 10, 15, 0.55);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: var(--transition-fast);
}
.carousel-arrow:hover { background: var(--gold-primary); color: var(--bg-primary); }
.carousel-arrow svg { width: 22px; height: 22px; }
.carousel-prev { left: var(--space-md); }
.carousel-next { right: var(--space-md); }

.carousel-dots {
  position: absolute;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 8px;
}
.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(240, 236, 228, 0.3);
  transition: var(--transition-fast);
}
.carousel-dot.active { background: var(--gold-primary); width: 26px; border-radius: var(--radius-full); }

/* Modal body */
.modal-body { padding: var(--space-xl) var(--space-2xl) var(--space-2xl); }

.modal-brand {
  font-size: 0.78rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  margin-bottom: 4px;
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.modal-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.modal-year-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.modal-controls .year-select { max-width: 220px; }

/* Color picker */
.modal-colors {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}
.modal-colors[hidden] { display: none; }

.color-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sw);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.25), 0 2px 6px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active {
  box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--gold-primary);
}

.modal-note {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-glass);
  border-left: 2px solid var(--gold-primary);
  border-radius: var(--radius-sm);
}

.modal-contact-btn { width: 100%; justify-content: center; }

/* ============================
   ANIMATIONS
   ============================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .car-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }

  .hero-stats {
    gap: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
    z-index: 999;
  }

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

  .nav-mobile-toggle {
    display: flex;
    z-index: 1001;
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 3.5rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .car-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
  }

  .inventory-header {
    text-align: center;
  }

  .brand-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .model-view-header {
    justify-content: center;
    text-align: center;
  }

  .carousel { height: 280px; }
  .modal-body { padding: var(--space-lg); }
  .modal-title { font-size: 1.4rem; }
  .modal-controls { flex-direction: column; align-items: flex-start; }

  .cta-contact-info {
    flex-direction: column;
    align-items: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .brand-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-sm);
    -webkit-overflow-scrolling: touch;
  }

  .brand-pill {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .car-image {
    height: 220px;
  }
}
