/* =========================
   AGREGADO: FIX GLOBAL ANTI SCROLL LATERAL EN MOBILE
   (NO BORRA NADA, SOLO AGREGA)
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== TU BASE.CSS ORIGINAL (SIN BORRAR NADA) ===== */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #fafafa;
}
@font-face {
  font-family: "Blanka";
  src: url("../fonts/Blanka.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* NAVBAR */
.navbar {
  background:
    radial-gradient(circle at top, rgba(34, 211, 238, 0.08), transparent 55%),
    radial-gradient(
      circle at 70% 20%,
      rgba(167, 139, 250, 0.1),
      transparent 55%
    ),
    var(--bg);

  padding: 0.8rem 0;
  box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;

  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.45rem;
  font-family: "Blanka", system-ui, sans-serif;
  text-decoration: none;
  color: #e8ecff;
}

.nav-links a {
  margin-left: 1rem;
  text-decoration: none;
  color: #e8ecff;
  font-weight: 500;
}

.nav-cart {
  font-size: 22px;
  margin-left: 10px;
  position: relative;
}

.cart-count {
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -8px;
  right: -10px;
}

.carrito-panel {
  position: fixed;
  right: -400px;
  top: 0;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.15);
  transition: 0.3s;
  padding: 20px;
  z-index: 2000;
}

.carrito-panel.open {
  right: 0;
}

.carrito-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 1500;
}
.carrito-overlay.show {
  display: block;
}

.btn-checkout {
  display: block;
  background: #ff9800;
  color: white;
  padding: 10px;
  margin-top: 20px;
  text-align: center;
  border-radius: 6px;
}

/* =========================
   MENU ESCRITORIO
    ========================= */
.menu-desktop {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger {
  display: none;
}

.menu-mobile {
  display: none;
}

/* =========================
   HAMBURGER MENU
========================= */

.hamburger {
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
  color: #e8ecff;
  display: none;
}

/* Menú desplegable */
.menu-mobile {
  position: absolute;
  top: 60px;
  right: 1rem;
  background: #fff;
  border: 1px solid var(--color-borde);
  border-radius: 12px;
  padding: 0.8rem;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 999;
}

.menu-mobile a {
  text-decoration: none;
  color: #111;
  font-size: 0.95rem;
}

.menu-mobile a:hover {
  text-decoration: underline;
}

.menu-user {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.menu-logout {
  color: #c62828;
  font-weight: 600;
}

/* Badge carrito */
.menu-mobile .badge {
  background: #e53935;
  color: #fff;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
  /* ocultar menú desktop */
  .menu-desktop {
    display: none;
  }

  /* mostrar hamburguesa */
  .hamburger {
    display: block;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
  }

  /* menú desplegable */
  .menu-mobile.show {
    display: flex;
  }
}
