/* ==========================================================
   HEADER / NAV - header.css
   ========================================================== */

/* ── Fixed Nav ─────────────────────────────────────────── */
.ac-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.ac-nav.scrolled {
  background: rgba(14, 14, 16, 0.82) !important;
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom-color: var(--glass-stroke);
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

.ac-nav.transparent {
  background: transparent;
  border-bottom-color: transparent;
}

/* ── Nav Container ─────────────────────────────────────── */
.nav-inner {
  width: var(--wrap);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Logo ──────────────────────────────────────────────── */
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 48px;
  width: auto;
}

/* ── Nav Filters (homepage only) ───────────────────────── */
.nav-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
  max-width: 680px;
  margin-inline: auto;
}

@media (max-width: 1024px) {
  .nav-filters { display: none; }
}

.nf-sel {
  position: relative;
}

.nf-sel select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 8px 36px 8px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.nf-sel select:hover,
.nf-sel select:focus {
  background-color: rgba(255,255,255,0.2);
  outline: none;
}

.nf-sel select option { background: var(--bg2); color: var(--ink); }

.nf-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 100px;
  padding: 8px 16px;
  flex: 1;
  min-width: 0;
  transition: background 0.2s;
}

.nf-search:focus-within {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.35);
}

.nf-search svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }

.nf-search input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13px;
  width: 100%;
  min-width: 0;
}

.nf-search input::placeholder { color: rgba(255,255,255,0.5); }

.nf-drive {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 100px;
  padding: 4px;
}

.nf-drive button {
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nf-drive button.on {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.nf-drive .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.nf-drive button[data-v="electric"] .d { background: #22c55e; }
.nf-drive button[data-v="hybrid"]  .d { background: #f59e0b; }

/* ── Nav Right Actions ─────────────────────────────────── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.nav-action-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

.nav-action-btn svg { width: 18px; height: 18px; }
.nav-action-btn i { font-size: 18px; line-height: 1; display: flex; align-items: center; justify-content: center; }

.nav-pill {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 20px;
  border-radius: 100px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}

.nav-pill:hover { background: rgba(255,255,255,0.25); }

@media (max-width: 1024px) {
  .nav-pill.desktop-only { display: none; }
}

/* ── Left Social / Burger zone ─────────────────────────── */
.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Phone popup ───────────────────────────────────────── */
.hdr-phone { position: relative; }

.phone-popup {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--bg2);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  min-width: 220px;
  box-shadow: var(--shadow-glass);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}

.hdr-phone.open .phone-popup {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.phone-popup a {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  padding: 4px 0;
  transition: color 0.15s;
}

.phone-popup a:hover { color: var(--red); }

/* ── Mobile Burger ─────────────────────────────────────── */
.mobile-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.12);
  color: #fff;
  z-index: 1001;
}

.mobile-burger svg { width: 22px; height: 22px; }

@media (max-width: 1024px) {
  .mobile-burger { display: flex; }
}

/* ── Mobile Menu Overlay ───────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 12, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  padding: 100px 32px 40px;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  overflow-y: auto;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  padding: 14px 16px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  border-radius: var(--radius-xs);
  transition: background 0.15s, color 0.15s;
}

.mobile-menu a:hover, .mobile-menu a.active {
  background: rgba(255,255,255,0.06);
  color: var(--red);
}

.mobile-menu .mob-divider {
  height: 1px;
  background: var(--glass-stroke);
  margin: 8px 0;
}

.mobile-menu .mob-small {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 16px;
}

/* ── Search Overlay ────────────────────────────────────── */
.ac-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: clamp(60px, 10vh, 120px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.ac-search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.ac-search-modal {
  width: min(680px, 100% - 48px);
  background: var(--bg2);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
  transform: translateY(-16px);
  transition: transform 0.3s var(--ease-spring);
}

.ac-search-overlay.open .ac-search-modal {
  transform: translateY(0);
}

.ac-search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-stroke);
}

.sh-icon { width: 18px; height: 18px; opacity: 0.5; flex-shrink: 0; }

.ac-search-head input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 16px;
  color: var(--ink);
}

.ac-search-head input::placeholder { color: var(--ink-3); }

.sh-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--ink-2);
  font-size: 16px;
  transition: background 0.15s, color 0.15s;
}

.sh-close:hover { background: rgba(255,255,255,0.15); color: var(--ink); }

.ac-search-body {
  padding: 20px;
  min-height: 120px;
  max-height: 50vh;
  overflow-y: auto;
}

.ac-search-hint {
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
  padding: 24px 0;
}

/* Search results */
.ac-search-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.asr-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  transition: background 0.15s;
}

.asr-item a:hover { background: rgba(255,255,255,0.06); }

.asr-title { font-size: 15px; font-weight: 600; }

.asr-price { font-size: 13px; color: var(--ink-2); }

.ac-search-empty {
  text-align: center;
  padding: 24px;
  color: var(--ink-2);
  font-size: 14px;
}
