/* ============================================================
   iDEALCAR — HEADER / NAVBAR
   ============================================================ */

.top-banner {
  position: fixed;
  top: 0; left: 0; width: 100%;
  background: var(--color-gradient);
  color: #fff;
  text-align: center;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  z-index: 1001;
}

.main-nav {
  position: fixed;
  top: var(--banner-height);
  left: 0; width: 100%;
  background: var(--color-black);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo img { height: 42px; width: auto; }

.navbar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #f2f2f2;
  padding: 10px 4px;
  margin: 0 12px;
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: 2px;
  width: 0; height: 2px;
  background: var(--color-red);
  transition: width var(--transition);
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--color-red); }
.nav-link.active::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ext-links {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ext-links img { height: 42px; width: auto; opacity: 0.85; transition: opacity var(--transition); }
.ext-links a:hover img { opacity: 1; }

/* The copy of ext-links living inside .navbar is only meant for the
   mobile slide-out menu — hidden on desktop, shown in responsive.css */
.navbar .ext-links { display: none; }

/* Cart button */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.cart-btn:hover { border-color: var(--color-red); background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.cart-btn svg { width: 20px; height: 20px; stroke: #fff; }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--color-red); color: #fff;
  font-size: 11px; font-weight: 700;
  min-width: 19px; height: 19px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  transform: scale(0);
  transition: transform var(--transition);
}
.cart-badge.show { transform: scale(1); }

/* Account / login icon button */
.account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  transition: border-color var(--transition), transform var(--transition), color var(--transition), background var(--transition);
  color: #fff;
}
.account-btn:hover { border-color: var(--color-red); color: var(--color-red); background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }
.account-btn svg { width: 20px; height: 20px; }

.account-btn.is-online { position: relative; }
.account-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--color-black);
  background: #22c55e; /* green - logged-in client */
}
.account-btn.status-admin .account-status-dot {
  background: #9ca3af; /* gray - logged-in admin */
}

/* Hamburger (mobile only) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.hamburger span {
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav backdrop */
.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  opacity: 0; visibility: hidden;
  transition: opacity var(--transition);
}
.nav-backdrop.open { opacity: 1; visibility: visible; }
