/* ════════════════════════════════
   HEADER
════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 76px;
  background: rgba(5, 8, 22, 0.94);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(0,212,255,0.10);
  box-shadow: 0 1px 30px rgba(0,0,0,0.5), 0 0 0 0.5px rgba(32,64,255,0.08);
}

.hdr-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 32px;
}

/* Logo */
.hdr-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 4px;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  height: 40px;
  overflow: hidden;
}

.hdr-logo-img {
  height: 36px;
  max-height: 36px;
  width: auto;
  max-width: 150px;
  display: block;
  object-fit: contain;
}

.hdr-logo .logo-main { color: #fff; }
.hdr-logo .logo-accent { color: var(--accent2); }

/* Nav */
.hdr-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hdr-link {
  position: relative;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.hdr-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.hdr-link.active {
  color: var(--neon-pink);
  background: rgba(0,170,255,0.08);
}

.hdr-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--neon-blue);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--neon-blue);
}

/* Actions */
.hdr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Wallet pill */
.hdr-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 207, 255, 0.05);
  border: 1px solid rgba(0, 207, 255, 0.15);
  border-radius: 40px;
  padding: 7px 16px 7px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hdr-wallet:hover {
  background: rgba(0, 207, 255, 0.10);
  border-color: rgba(0, 207, 255, 0.32);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 207, 255, 0.18);
}

.wallet-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
  flex-shrink: 0;
}

.wallet-label {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
  margin-right: 2px;
}

.wallet-amount {
  font-weight: 700;
}

/* Account icon */
.hdr-account {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  border: 1px solid rgba(255,255,255,0.08);
}

.hdr-account:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.hdr-account svg {
  width: 18px;
  height: 18px;
}

/* Cart button */
.hdr-cart {
  position: relative;
  width: 42px;
  height: 42px;
  background: var(--neon-purple);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-purple);
}

.hdr-cart:hover {
  background: #9040ff;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(123, 44, 255, 0.55);
}

.hdr-cart svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent2);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--dark);
}

/* Contenedor mobile-only: oculto siempre en desktop (sin media query = sin caché) */
.hdr-mobile-extras {
  display: none;
}

/* Botón hamburguesa */
.hdr-toggle {
  display: none;
  font-size: 24px;
  line-height: 1;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
}

.hdr-toggle:hover {
  background: rgba(255,255,255,0.08);
}

/* MOBILE */
@media (max-width: 768px) {
  .site-header {
    height: auto;
  }

  /* Barra superior mobile: altura fija, sin wrap para la primera fila */
  .hdr-inner {
    padding: 0 16px;
    min-height: 60px;
    height: auto;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  /* Orden: Logo(1) | Cart+Actions(2, empujado a la derecha) | Hamburger(3) | Nav(4) */
  .hdr-logo {
    order: 1;
    flex: 1;
    height: auto;
    max-width: 130px;
  }

  .hdr-logo-img {
    max-height: 30px;
    max-width: 120px;
  }

  .hdr-actions {
    order: 2;
    gap: 6px;
    flex-shrink: 0;
  }

  .hdr-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
    flex-shrink: 0;
    font-size: 22px;
    padding: 4px 8px;
  }

  /* En mobile: solo el carrito permanece en hdr-actions */
  .hdr-wallet {
    display: none;
  }

  .hdr-account {
    display: none;
  }

  .hdr-cart {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .hdr-cart svg {
    width: 17px;
    height: 17px;
  }

  .cart-badge {
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
    border-radius: 8px;
  }

  /* Menú desplegable — fila completa debajo */
  .hdr-nav {
    order: 4;
    display: none;
    flex-direction: column;
    width: 100%;
    background: rgba(10,15,44,0.98);
    border: 1px solid rgba(0,207,255,0.1);
    padding: 6px;
    border-radius: 12px;
    margin-top: 2px;
    margin-bottom: 8px;
    gap: 0;
  }

  .hdr-nav.active {
    display: flex;
  }

  /* Links dentro del menú */
  .hdr-link {
    width: 100%;
    padding: 13px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    font-size: 13px;
  }

  .hdr-link:last-child {
    border-bottom: none;
  }

  .hdr-link.active::after {
    display: none;
  }

  /* Contenedor mobile-extras */
  .hdr-mobile-extras {
    order: 5;
    width: 100%;
    padding: 0 0 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .hdr-mobile-extras.active {
    display: flex;
  }

  /* ── Card de Saldo ── */
  .hdr-wallet-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(
      120deg,
      rgba(110,231,160,0.10) 0%,
      rgba(255,255,255,0.04) 100%
    );
    border: 1px solid rgba(110,231,160,0.22);
    border-left: 3px solid #6ee7a0;
    box-shadow: 0 2px 16px rgba(110,231,160,0.08);
    color: rgba(255,255,255,0.65);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
  }

  .hdr-wallet-nav:hover {
    background: linear-gradient(
      120deg,
      rgba(110,231,160,0.16) 0%,
      rgba(255,255,255,0.07) 100%
    );
    border-color: rgba(110,231,160,0.4);
    box-shadow: 0 4px 22px rgba(110,231,160,0.15);
  }

  /* Dot pulsante */
  .hdr-wallet-nav .wallet-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6ee7a0;
    box-shadow: 0 0 0 0 rgba(110,231,160,0.6);
    animation: walletPulse 2s ease-in-out infinite;
  }

  @keyframes walletPulse {
    0%   { box-shadow: 0 0 0 0   rgba(110,231,160,0.6); }
    60%  { box-shadow: 0 0 0 6px rgba(110,231,160,0);   }
    100% { box-shadow: 0 0 0 0   rgba(110,231,160,0);   }
  }

  /* Label "SALDO" */
  .hdr-wallet-nav-label {
    flex-shrink: 0;
    color: rgba(255,255,255,0.5);
    font-size: 10px;
    letter-spacing: 1.2px;
  }

  /* Monto: alineado a la derecha, brillante */
  .hdr-wallet-nav .wallet-amount {
    margin-left: auto;
    color: #6ee7a0;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
    line-height: 1;
    display: inline !important;
    text-shadow:
      0 0 10px rgba(255,255,255,0.75),
      0 0 24px rgba(110,231,160,0.5);
  }

  .hdr-wallet-nav .wallet-amount * {
    display: inline !important;
  }

  /* ── Botón Iniciar sesión ── */
  .hdr-login-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: linear-gradient(
      120deg,
      rgba(0,212,255,0.12) 0%,
      rgba(32,64,255,0.08) 100%
    );
    border: 1px solid rgba(0,212,255,0.25);
    color: var(--neon-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    box-shadow: 0 2px 12px rgba(0,212,255,0.08);
  }

  .hdr-login-nav::before {
    content: '→';
    font-size: 15px;
    opacity: 0.7;
  }

  .hdr-login-nav:hover {
    background: linear-gradient(
      120deg,
      rgba(0,212,255,0.22) 0%,
      rgba(32,64,255,0.14) 100%
    );
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,212,255,0.22);
  }
}
