/* ============================= */
/* NAVBAR                        */
/* ============================= */

.navbar {
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 5%;
  transition: all 0.35s ease;
}

.nav-container {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 20px;
}

/* Logo */
.logo img {
  height: 42px;
  display: block;
}

/* Menú */
.menu {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  position: relative;
  transition: 0.3s;
  font-family: 'Inter', sans-serif;
}

.menu a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  background: var(--celeste-acento);
  left: 0;
  bottom: -6px;
  transition: 0.3s;
}

.menu a:hover::after {
  width: 100%;
}

/* Actions */
.actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.login {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: 0.3s;
}

.login:hover {
  color: var(--celeste-acento);
}

/* Botón catálogo */
.btn-catalogo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--celeste-acento), #009ed6);
  color: white !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0, 194, 255, 0.25);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-catalogo i {
  font-size: 18px;
}

.btn-catalogo:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 30px rgba(0, 194, 255, 0.35);
  background: linear-gradient(135deg, #00b4ee, #007fb0);
}

/* Ícono carrito */
.icon-cart {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  color: white;
  cursor: pointer;
  transition: 0.3s;
  flex-shrink: 0;
}

.icon-cart:hover {
  color: var(--celeste-acento);
  transform: scale(1.1);
}

/* Hamburguesa */
.menu-toggle {
  display: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}

/* ============================= */
/* BÚSQUEDA NAVBAR (DESKTOP)     */
/* ============================= */

.nav-busqueda {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 200px;
  max-width: 280px;
  width: 100%;
}

.nav-busqueda-icon {
  position: absolute;
  left: 12px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
  transition: color 0.3s;
}

.nav-busqueda-input {
  width: 100%;
  padding: 9px 16px 9px 36px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  color: white;
  font-size: 13.5px;
  outline: none;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.nav-busqueda-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.nav-busqueda-input:focus {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--celeste-acento);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.18);
}

/* Adaptación cuando el navbar está scrolled (fondo blanco) */
.navbar.scrolled .nav-busqueda-input {
  background: rgba(10, 31, 68, 0.06);
  border-color: rgba(10, 31, 68, 0.2);
  color: var(--azul-principal);
}

.navbar.scrolled .nav-busqueda-input::placeholder {
  color: rgba(10, 31, 68, 0.4);
}

.navbar.scrolled .nav-busqueda-icon {
  color: rgba(10, 31, 68, 0.5);
}

.navbar.scrolled .nav-busqueda-input:focus {
  background: white;
  border-color: var(--celeste-acento);
}

/* Búsqueda dentro del sidebar (solo móvil) */
.nav-busqueda-sidebar {
  display: none;
  position: relative;
  width: 100%;
  margin-top: 8px;
}

.nav-busqueda-sidebar-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 17px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}

.nav-busqueda-sidebar-input {
  width: 100%;
  padding: 10px 16px 10px 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  color: white;
  font-size: 14px;
  outline: none;
}

.nav-busqueda-sidebar-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.nav-busqueda-sidebar-input:focus {
  border-color: var(--celeste-acento);
  background: rgba(255, 255, 255, 0.15);
}
.menu-item {
  position: relative;
  display: flex;
  align-items: center;
}

.menu-link {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  position: relative;
  transition: 0.3s;
}

.submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 240px;
  background: white;
  border-radius: 14px;
  padding: 12px 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.28s ease;
  z-index: 1200;
}

/* .submenu a {
  display: block;
  padding: 11px 18px;
  color: var(--azul-principal) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: 0.25s;
}

.submenu a:hover {
  background: #f3f8ff;
  color: var(--celeste-acento) !important;
  padding-left: 24px;
} */
.submenu a {
  display: block;
  width: fit-content;
  padding: 4px 0;
  margin: 7px 18px;
  color: var(--azul-principal) !important;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s, transform 0.25s;
  position: relative;
}

.submenu a:hover {
  color: var(--celeste-acento) !important;
  transform: translateX(6px);
}
.menu-item:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ============================= */
/* NAVBAR SCROLLED               */
/* ============================= */

.navbar.scrolled {
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  padding: 10px 5%;
}

.navbar.scrolled .menu a,
.navbar.scrolled .login {
  color: var(--azul-principal);
}

.navbar.scrolled .menu-toggle {
  color: var(--azul-principal);
}

/* En móvil el sidebar siempre tiene fondo oscuro, los links van blancos */
@media (max-width: 900px) {
  .navbar.scrolled .menu a {
    color: white;
  }

  
}

.navbar.scrolled .icon-cart {
  color: var(--azul-principal);
}

/* El botón cerrar y overlay solo existen en móvil */
.menu-close {
  display: none;
}

.menu-overlay {
  display: none;
}

/* ============================= */
/* NAVBAR INTERIOR / PÁGINAS INTERNAS */
/* ============================= */

.navbar.navbar-solid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  padding: 10px 5%;
}

.navbar.navbar-solid .menu a,
.navbar.navbar-solid .login {
  color: var(--azul-principal);
}

.navbar.navbar-solid .menu-toggle {
  color: var(--azul-principal);
}

.navbar.navbar-solid .icon-cart {
  color: var(--azul-principal);
}

.navbar.navbar-solid .nav-busqueda-input {
  background: rgba(10, 31, 68, 0.06);
  border-color: rgba(10, 31, 68, 0.2);
  color: var(--azul-principal);
}

.navbar.navbar-solid .nav-busqueda-input::placeholder {
  color: rgba(10, 31, 68, 0.4);
}

.navbar.navbar-solid .nav-busqueda-icon {
  color: rgba(10, 31, 68, 0.5);
}

.navbar.navbar-solid .nav-busqueda-input:focus {
  background: white;
  border-color: var(--celeste-acento);
}

/* ============================= */
/* RESPONSIVE NAVBAR             */
/* ============================= */

@media (max-width: 900px) {

  .nav-container {
    grid-template-columns: auto auto;
    justify-content: space-between;
    padding: 0;
  }

  /* Ocultar barra del grid en móvil */
  .nav-busqueda {
    display: none;
  }

  /* Mostrar búsqueda dentro del sidebar */
  .nav-busqueda-sidebar {
    display: block;
  }

  /* Sidebar móvil */
  .menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(160deg, #07152f 0%, #0a1f44 45%, #0f2c66 100%);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px 40px;
    transition: left 0.3s ease;
    z-index: 1001;
    box-shadow: 4px 0 30px rgba(0,0,0,0.4), inset -2px 0 0 rgba(0, 194, 255, 0.35);
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Viso superior izquierdo — triángulo celeste */
  .menu::before {
    content: "";
    position: absolute;
    top: -50px;
    left: -50px;
    width: 220px;
    height: 220px;
    background: linear-gradient(135deg, rgba(0, 194, 255, 0.28), transparent 70%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
    pointer-events: none;
  }

  /* Viso inferior derecho — destello radial */
  .menu::after {
    content: "";
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 194, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
  }

  .menu.active {
    left: 0;
  }

  .menu a {
    color: white;
    font-size: 16px;
    position: relative;
    z-index: 1;
  }

  /* Botón cerrar (✕) */
  .menu-close {
    position: relative;
    z-index: 1;
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-bottom: 8px;
  }

  .menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
  }

  /* Overlay oscuro al fondo */
  .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .menu-overlay.active {
    opacity: 1;
    pointer-events: all;
  }

  /* Mostrar hamburguesa */
  .menu-toggle {
    display: block;
  }

  /* Acciones: ocultar botón catálogo y login, dejar solo carrito */
  .btn-catalogo {
    display: none;
  }

  .login {
    display: none;
  }
    .navbar.navbar-solid .menu a {
    color: white;
  }

}

@media (max-width: 480px) {
  .logo img {
    height: 34px;
  }
}
