/* 🧭 Header / Navbar limpio y ocultable */
#navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: #ffffff; /* Fondo blanco puro */
  box-shadow: 0 1px 0 rgba(0,0,0,0.07);
  display: flex;
  justify-content: center;
  transition: transform 0.3s ease, background 0.3s ease;
  z-index: 1000;
}

/* Efecto al ocultarse */
#navbar.hidden {
  transform: translateY(-100%);
}

.nav-container {
  width: 90%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0;
}

/* Marca del logo */
.brand {
  font-family: 'Caprasimo', cursive;
  font-size: 1.8rem;
}

/* Enlaces de navegación */
.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-negro);
  font-weight: 500;
  transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Botón verde del carrito */
.btn-cart {
  background: var(--color-verde);
  color: white !important;
  padding: 0.5rem 1.4rem;
  border-radius: 25px;
  font-weight: 600;
}

/* =========================================================
   BOTÓN MENÚ HAMBURGUESA
   ========================================================= */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-negro);
  padding: 0;
  z-index: 1100; /* para quedar sobre el menú móvil */
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background-color: var(--color-negro);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animación al activar */
.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* =========================================================
   RESPONSIVE (para móviles y tablets)
   ========================================================= */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    background: #fff;
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    text-align: center;
    padding: 2rem 0;
    gap: 2rem;
    transition: right 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
    font-weight: 500;
  }

  .btn-cart {
    padding: 0.6rem 1.6rem;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* =========================================================
   EXTRA PEQUEÑAS PANTALLAS
   ========================================================= */
@media (max-width: 480px) {
  .brand {
    font-size: 1.5rem;
  }

  .nav-links a {
    font-size: 1rem;
  }

  .btn-cart {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
  }
}
