/* ═══════════════════════════════════════════════════════════════
   NEXUM HEADER CSS
═══════════════════════════════════════════════════════════════ */

/* ── TOP BANNER ───────────────────────────────────────────────── */
.nx-top-banner {
  background: var(--gold);
  height: var(--banner-h);
  display: flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  color: var(--deep-night);
  overflow: hidden;
  position: relative;
  z-index: var(--z-sticky);
}
.nx-banner-track {
  display: flex;
  gap: 64px;
  white-space: nowrap;
  animation: nx-banner-scroll 18s linear infinite;
}
.nx-banner-track:hover { animation-play-state: paused; }
@keyframes nx-banner-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.nx-banner-item { flex-shrink: 0; }

/* ── HEADER PRINCIPAL ─────────────────────────────────────────── */
.nx-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(10, 15, 26, 0);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition:
    background      var(--dur-slow) var(--ease),
    backdrop-filter var(--dur-slow) var(--ease),
    border-color    var(--dur-slow) var(--ease),
    box-shadow      var(--dur-slow) var(--ease);
}
.nx-header.is-scrolled,
body:not(.home) .nx-header {
  background: rgba(10, 15, 26, 0.94);
  backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.35);
}

.nx-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 32px;
}

/* ── LOGO ─────────────────────────────────────────────────────── */
.nx-logo { display: flex; flex-direction: column; flex-shrink: 0; gap: 1px; }
.nx-logo img { height: 36px; width: auto; }
.nx-logo__text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-tight);
  color: var(--warm-white);
  line-height: 1;
}
.nx-logo__sub {
  font-size: 8px;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--gold);
}

/* ── NAV DESKTOP ──────────────────────────────────────────────── */
.nx-nav { display: flex; }
.nx-nav__list { display: flex; gap: 4px; align-items: center; }
.nx-nav__item { position: relative; }

.nx-nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--warm-white-70);
  transition: color var(--dur-fast), background var(--dur-fast);
  cursor: pointer;
}
.nx-nav__link:hover,
.nx-nav__link.is-active   { color: var(--warm-white); background: var(--gold-bg); }
.nx-nav__link.is-active   { color: var(--gold); }

.nx-nav__arrow { transition: transform var(--dur-base) var(--ease); flex-shrink: 0; }
.nx-nav__item--has-mega:hover .nx-nav__arrow { transform: rotate(180deg); }

/* ── MEGA-MENU ────────────────────────────────────────────────── */
.nx-mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: 520px;
  background: var(--midnight);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity   var(--dur-base) var(--ease),
    transform var(--dur-base) var(--ease);
  z-index: var(--z-dropdown);
}
.nx-mega-menu.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.nx-mega-menu__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  padding: 8px;
}

.nx-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-sm);
  transition: background var(--dur-fast);
}
.nx-mega-item:hover          { background: var(--gold-bg); }
.nx-mega-item__icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gold-bg);
  border: 1px solid var(--line-gold);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
}
.nx-mega-item__icon svg    { width: 20px; height: 20px; }
.nx-mega-item__title {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--warm-white);
  margin-bottom: 4px;
}
.nx-mega-item__desc {
  font-size: var(--text-xs);
  color: var(--warm-white-70);
  line-height: var(--lh-snug);
}

/* ── ACCIONES HEADER ──────────────────────────────────────────── */
.nx-header-actions { display: flex; align-items: center; gap: 6px; }

.nx-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--warm-white-70);
  border: 1px solid transparent;
  transition: all var(--dur-fast);
  cursor: pointer;
  position: relative;
}
.nx-icon-btn svg { width: 20px; height: 20px; }
.nx-icon-btn:hover {
  color: var(--warm-white);
  background: var(--gold-bg);
  border-color: var(--line-gold);
}

.nx-cart-badge {
  position: absolute;
  top: 5px; right: 5px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--deep-night);
  font-size: 9px;
  font-weight: var(--fw-black);
  display: grid;
  place-items: center;
  line-height: 1;
}
.nx-cart-badge.is-empty { display: none; }

/* ── BÚSQUEDA OVERLAY ─────────────────────────────────────────── */
.nx-search-box {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: rgba(10, 15, 26, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
}
.nx-search-box.is-open { opacity: 1; pointer-events: all; }
.nx-search-box__inner  { width: min(640px, 90vw); position: relative; }
.nx-search-box .search-form input[type="search"] {
  width: 100%;
  padding: 18px 56px 18px 24px;
  background: var(--midnight);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  color: var(--warm-white);
  font-family: var(--font-ui);
  font-size: var(--text-lg);
  outline: none;
}
.nx-search-close {
  position: absolute;
  top: 50%; right: 16px;
  transform: translateY(-50%);
  color: var(--warm-white-70);
  font-size: 20px;
  cursor: pointer;
  min-width: 44px; min-height: 44px;
  display: grid;
  place-items: center;
}

/* ── HAMBURGER ────────────────────────────────────────────────── */
.nx-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
}
.nx-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--warm-white);
  border-radius: 1px;
  transition: all var(--dur-base) var(--ease);
}

/* ── MENÚ MÓVIL ───────────────────────────────────────────────── */
.nx-mobile-nav {
  position: fixed;
  top: 0; right: -100%;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--midnight);
  border-left: 1px solid var(--line-gold);
  z-index: var(--z-modal);
  padding: 80px 28px 40px;
  overflow-y: auto;
  transition: right var(--dur-slow) var(--ease);
}
.nx-mobile-nav.is-open { right: 0; }
.nx-mobile-nav ul      { display: flex; flex-direction: column; gap: 4px; }
.nx-mobile-nav a {
  display: block;
  padding: 12px 0;
  font-size: var(--text-md);
  font-weight: var(--fw-medium);
  color: var(--warm-white-70);
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-fast);
}
.nx-mobile-nav a:hover             { color: var(--gold); }
.nx-mobile-nav .btn                { margin-top: 24px; text-align: center; justify-content: center; }
.nx-mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-modal) - 1);
  display: none;
}
.nx-mobile-nav.is-open ~ .nx-mobile-overlay { display: block; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nx-nav         { display: none; }
  .nx-hamburger   { display: flex; }
  .nx-header-cta  { display: none; }
}
@media (max-width: 768px) {
  .nx-top-banner { font-size: 10px; }
}
