/* ==========================================================================
   AUTOVANTA NAVIGATION BAR & HEADER (LUXURY LIGHT THEME)
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(16, 19, 30, 0.08);
  box-shadow: 0 4px 20px rgba(16, 19, 30, 0.04);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(229, 9, 20, 0.25);
  box-shadow: 0 10px 30px rgba(16, 19, 30, 0.08);
  height: 72px;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Brand Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-emblem {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 18px var(--accent-red-glow);
}

.brand-emblem i {
  color: #fff;
  font-size: 1.1rem;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.brand-name span {
  color: var(--accent-red);
}

/* Navigation Links */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 20px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-red);
  transition: width var(--transition-fast);
  box-shadow: 0 0 8px var(--accent-red);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

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

/* Dropdown Menu Styles */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > .nav-link {
  cursor: pointer;
}

.nav-dropdown > .nav-link i.fa-chevron-down {
  font-size: 0.68rem;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover > .nav-link i.fa-chevron-down {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 270px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 16px 40px rgba(16, 19, 30, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 3px;
  z-index: 1050;
  list-style: none;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.dropdown-item i {
  color: var(--accent-red);
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
}

.dropdown-item:hover {
  background: var(--bg-input);
  color: var(--accent-red);
  transform: translateX(4px);
}

.dropdown-badge-indian {
  background: linear-gradient(135deg, #ff9933 0%, #138808 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: auto;
  letter-spacing: 0.05em;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 4px 6px;
}

/* ==========================================================================
   MEGA MENU: POPULAR BRANDS WITH BRANDED CARS
   ========================================================================== */
.nav-dropdown-brands {
  position: static !important;
}

.dropdown-mega-brands {
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  width: 980px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 1px solid var(--border-light, #e5e7eb);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(16, 19, 30, 0.16);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 1050;
  overflow: hidden;
}

.nav-dropdown-brands::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 16px;
}

.nav-dropdown-brands:hover .dropdown-mega-brands,
.dropdown-mega-brands:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mega-brands-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}

.mega-brands-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mega-brand-badge {
  background: linear-gradient(135deg, #e50914, #b20710);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mega-brand-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  font-weight: 500;
}

.mega-all-brands-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-red, #e50914);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s ease;
}

.mega-all-brands-btn:hover {
  transform: translateX(4px);
}

.mega-brands-body {
  display: flex;
  height: 420px;
}

.mega-brands-sidebar {
  width: 290px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-subtle, #f1f5f9);
  background: #ffffff;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-brands-sidebar::-webkit-scrollbar {
  width: 5px;
}
.mega-brands-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.mega-brand-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.mega-brand-tab:hover {
  background: #f1f5f9;
}

.mega-brand-tab.active {
  background: #fff1f2;
  border-color: rgba(229, 9, 20, 0.2);
}

.mega-brand-logo-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

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

.mega-brand-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mega-brand-name {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.mega-brand-count {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

.mega-brand-tab.active .mega-brand-name {
  color: #e50914;
}

.mega-brand-tab.active .mega-brand-count {
  color: #b20710;
}

.mega-brand-arrow {
  font-size: 0.7rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.mega-brand-tab.active .mega-brand-arrow {
  color: #e50914;
  transform: translateX(3px);
}

.mega-brands-showcase {
  flex: 1;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 16px 20px;
}

.mega-brands-showcase::-webkit-scrollbar {
  width: 5px;
}
.mega-brands-showcase::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.mega-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.mega-showcase-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mega-showcase-link {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e50914;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mega-showcase-link:hover {
  text-decoration: underline;
}

.mega-cars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mega-car-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.mega-car-card:hover {
  transform: translateY(-3px);
  border-color: #e50914;
  box-shadow: 0 10px 24px rgba(229, 9, 20, 0.1);
}

.mega-car-thumb {
  position: relative;
  width: 100%;
  height: 110px;
  background: #0f172a;
  overflow: hidden;
}

.mega-car-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.mega-car-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mega-car-details {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mega-car-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mega-car-price {
  font-size: 0.82rem;
  font-weight: 800;
  color: #e50914;
}

.mega-car-tagline {
  font-size: 0.68rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mega-brands-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: #ffffff;
  border-top: 1px solid var(--border-subtle, #f1f5f9);
}

.mega-footer-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mega-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  background: #f1f5f9;
  border-radius: 20px;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s ease;
}

.mega-chip:hover {
  background: #fee2e2;
  color: #e50914;
}

.mega-chip.chip-indian {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
  font-weight: 700;
}

.mega-chip.chip-indian:hover {
  background: #ffedd5;
}

/* Nav Actions (Search, Wishlist, Login, Test Drive) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.nav-icon-btn:hover {
  background: rgba(229, 9, 20, 0.1);
  border-color: var(--accent-red);
  color: var(--accent-red);
  transform: translateY(-2px);
}

.wishlist-count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--accent-red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px var(--accent-red);
}

.btn-nav-testdrive {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile Toggle Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px;
}

/* Mobile Drawer Menu */
.menu-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 4, 6, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.menu-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -380px;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-light);
  z-index: 1150;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  transition: right var(--transition-normal);
  box-shadow: -10px 0 40px rgba(16, 19, 30, 0.15);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.mobile-menu-close {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mobile-menu-close:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--bg-input);
  color: var(--accent-red);
}

.mobile-nav-link i {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-menu-footer {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
