/* ===========================
   GLOBAL RESET & VARIABLES
=========================== */
:root {
  --red: #e50914;
  --black: #070707;
  --white: #f7f7f7;
  --page-padding: 4.4%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #080808;
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

/* ===========================
   NAVBAR
=========================== */
.navbar {
  width: 100%;
  height: 78px;
  padding: 0 4.5%;
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: sticky;
  top: 0;
  z-index: 10000;
  box-sizing: border-box;
}

.navbar a,
.navbar button {
  cursor: pointer !important;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  cursor: pointer;
}

.logo img {
  display: block;
  height: 80px;
  max-height: 101px;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

.nav-links {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 2.2vw, 36px);
  margin-left: auto;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #f3f4f6;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s ease;
  cursor: pointer;
}

.nav-link:hover,
.nav-item:hover .nav-link {
  color: #ffffff;
}

.nav-chevron {
  stroke: currentColor;
  transition: transform 0.25s ease;
  opacity: 0.85;
  display: inline-block;
}

.nav-item:hover .nav-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* DROPDOWNS */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #0d0d0f;
  border: 1px solid #282830;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  padding: 8px 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 10002;
}

.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 11px 20px;
  color: #c8c8d0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.nav-dropdown a:hover {
  background: #18181f;
  color: #ff1e27;
  padding-left: 24px;
}

.nav-actions-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-button {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-left: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.search-button:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  transform: scale(1.05);
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  padding: 0 10px;
  transition: all 0.2s ease;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: #0d0d12;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 99995;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 24px 20px;
  box-sizing: border-box;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.6);
}

.mobile-nav-drawer.active {
  transform: translateX(0);
}

.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.mobile-logo img {
  height: 38px;
  width: auto;
  display: block;
}

.mobile-nav-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 10px;
  color: #d2d2dc;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
  background: rgba(229, 9, 20, 0.12);
  color: #ff202b;
}

/* ================= CARS MEGA MENU ================= */
.cars-menu-wrapper {
  position: static;
}

.cars-mega-menu {
  position: fixed;
  top: 77px; /* 1px hover gap fix */
  left: 3.35vw;
  right: 3.35vw;
  width: auto;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  color: #171717;
  padding: 45px 55px 0;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.18);
  display: none;
  z-index: 10001;
  box-sizing: border-box;
}

/* Open on hover & click */
.cars-menu-wrapper:hover .cars-mega-menu,
.cars-menu-wrapper:focus-within .cars-mega-menu,
.cars-menu-wrapper.active .cars-mega-menu {
  display: block;
}

.mega-menu-content {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1.6fr;
  gap: 55px;
  align-items: start;
}

.mega-column {
  display: flex;
  flex-direction: column;
  padding-right: 55px;
  border-right: 1px solid #e8e8e8;
}

.mega-column:last-child {
  border-right: none;
  padding-right: 0;
}

.mega-column h3 {
  color: #e50914;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0 18px;
}

.mega-column a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  color: #171717;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.mega-column a:hover {
  color: #e60000;
}

.mega-column a span {
  color: #999999;
}

.mega-menu-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-left: 25%;
  margin-top: 25px;
  border-top: 1px solid #e8e8e8;
}

.mega-menu-bottom a {
  padding: 35px 15px;
  text-align: center;
  text-decoration: none;
  color: #e50914;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-right: 1px solid #e8e8e8;
  cursor: pointer;
}

.mega-menu-bottom a:last-child {
  border-right: none;
}

.cars-mega-menu::-webkit-scrollbar {
  width: 8px;
}

.cars-mega-menu::-webkit-scrollbar-thumb {
  background: #999999;
  border-radius: 10px;
}

.cars-mega-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Responsive */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .cars-mega-menu {
    display: none !important;
  }
}


/* ===== MOBILE NAVBAR & DRAWER RESPONSIVE FIX ===== */
@media (max-width: 900px) {
  .navbar {
    height: 66px;
    padding: 0 16px;
    gap: 12px;
  }

  .logo img {
    height: 48px;
    max-height: 52px;
  }

  .nav-actions-wrap {
    margin-left: auto;
    gap: 10px;
  }

  .search-button,
  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    margin-left: 0;
  }
} 