/* Tipografía */
body {
  font-family: 'Montserrat', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
}

/* Header principal */
.custom-header {
  padding: 4rem 5rem;
  background: transparent;
  position: absolute;
  top: 0px;
  left: 0;
  width: 100%;
  z-index: 100;
}
.menu-toggle { 
  display: none; 
}
/* Contenedor del header */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

/* Logo */
.logo-area .site-logo {
  height: 55px;
}

/* Menú principal */
.main-nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  padding-right: 0.5rem;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu li a {
  text-decoration: none;
  color: white;
  font-weight: 400;
  font-size: 19px;
  padding: 0.6rem 0.7rem;
  border-radius: 20px;
  transition: background 0.3s ease;
}

.nav-menu li.current-menu-item a,
.nav-menu li a:hover {
  background-color: #033840;
  color: white;
  border-radius: 12px;
}

/* Submenú */
.nav-menu li ul {
  list-style: none;
  background-color: #033840;
  padding: 0.5rem 0.4rem;
  position: absolute;
  top: 110%;
  left: 50%;
  display: none;
  border-radius: 12px;
  z-index: 999;
  min-width: 180px;
  transform: translateX(-50%);
}

.nav-menu li:hover > ul {
  display: block;
}

.nav-menu li ul li a {
  color: white!important;
  padding: 0.5rem 1rem;
  display: block;
  font-weight: 300;
  font-size: 0.9rem;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

.nav-menu li ul li a:hover {
  background-color: #6265fe;
}

/* Login + Carrito */
.user-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.login-icon{
  display: inline-block;
  margin-left: 15px;
}
.cart-icon {
  display: inline-block;
}

.login-icon a,
.cart-icon a {
  color: white;
  font-size: 1.3rem;
  transition: color 0.3s ease;
  position: relative;
    display: block;  /* quita baseline shift */
}

.login-icon a:hover,
.cart-icon a:hover {
  background-color: #033840;
  border-radius: 12px;
  padding: 0.3rem;
}

/* Contador del carrito */
.cart-contents .count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: #01022b;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 2px 6px;
  line-height: 1;
}

/* ===== Header sólo en página Carrito ===== */
body.woocommerce-cart header.custom-header {
  background: #033840 !important;
}

/* Links del menú principal dentro del header custom */
body.woocommerce-cart header.custom-header .nav-menu .menu-link,
body.woocommerce-cart header.custom-header .nav-menu li a {
  color: #ffffff !important;
}

/* Estado activo */
body.woocommerce-cart header.custom-header .nav-menu li.current-menu-item > a.menu-link,
body.woocommerce-cart header.custom-header .nav-menu li.current-menu-item > a {
  background: #ffffff !important;
  color: #033840 !important;
  border-radius: 6px;
}

/* Hover */
body.woocommerce-cart header.custom-header .nav-menu li > a.menu-link:hover,
body.woocommerce-cart header.custom-header .nav-menu li > a:hover {
  background: #0e00da !important;
  color: #ffffff !important;
}

/* Iconos login y carrito */
body.woocommerce-cart header.custom-header .login-icon a,
body.woocommerce-cart header.custom-header .cart-icon a {
  color: #ffffff !important;
}
body.woocommerce-cart header.custom-header .login-icon a:hover,
body.woocommerce-cart header.custom-header .cart-icon a:hover {
  background: #0e00da !important;
  color: #ffffff !important;
}

/* ===== Header sólo en página Finalizar compra ===== */
body.woocommerce-checkout header.custom-header {
  background: #033840 !important;
}

/* Links del menú principal dentro del header custom */
body.woocommerce-checkout header.custom-header .nav-menu .menu-link,
body.woocommerce-checkout header.custom-header .nav-menu li a {
  color: #ffffff !important;
}

/* Estado activo */
body.woocommerce-checkout header.custom-header .nav-menu li.current-menu-item > a.menu-link,
body.woocommerce-checkout header.custom-header .nav-menu li.current-menu-item > a {
  background: #ffffff !important;
  color: #033840 !important;
  border-radius: 6px;
}

/* Hover */
body.woocommerce-checkout header.custom-header .nav-menu li > a.menu-link:hover,
body.woocommerce-checkout header.custom-header .nav-menu li > a:hover {
  background: #0e00da !important;
  color: #ffffff !important;
}

/* Iconos login y carrito */
body.woocommerce-checkout header.custom-header .login-icon a,
body.woocommerce-checkout header.custom-header .cart-icon a {
  color: #ffffff !important;
}
body.woocommerce-checkout header.custom-header .login-icon a:hover,
body.woocommerce-checkout header.custom-header .cart-icon a:hover {
  background: #0e00da !important;
  color: #ffffff !important;
}


/* Reemplaza texto "Contacto" por ícono */
.nav-menu li a[href*="/contacto"] {
  font-size: 0; /* Oculta el texto */
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Agrega el ícono de teléfono */
.nav-menu li a[href*="/contacto"]::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  content: "\f095"; /* unicode fa-phone */
  font-size: 18px;
  color: #fff;
  line-height: 1;
}

/* Hover igual que tus links */
.nav-menu li a[href*="/contacto"]:hover {
  background-color: #033840;
    border-radius: 12px;
  padding: 0.3rem;
}
.nav-menu li a[href*="/contacto"]:hover::before {
  color: #fff !important;  /* aquí sí cambia el color del ícono */
}
/* ===========================
   TABLETS (≤ 1024px)
   =========================== */
@media (max-width: 1024px) {
  .custom-header {
    padding: 2.8rem 3rem;
  }

  .logo-area .site-logo {
    height: 48px;
  }

  .nav-menu li a {
    font-size: 17px;
    padding: 0.5rem 0.6rem;
  }

  .user-actions {
    gap: 1.2rem;
  }

  .login-icon a,
  .cart-icon a {
    font-size: 1.2rem;
  }

  .nav-menu li ul {
    min-width: 160px;
    top: 100%;
  }
}

/* ===========================
   TELÉFONOS (≤ 768px)
   =========================== */
@media (max-width: 768px) {
  /* Header base */
  .custom-header {
    padding: 1.5rem 1.2rem;
    position: fixed;
    background: rgba(3, 56, 64, 0.95);
    backdrop-filter: blur(6px);
  }

  .header-container {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  /* Logo */
  .logo-area .site-logo {
    height: 44px;
  }

  /* Ocultar menú grande y mostrar botón */
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.6rem;
    color: white;
    background: none;
    border: none;
    margin-left: auto;
  }

  /* Menú móvil visible cuando se activa */
  .main-nav.active {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    background: rgba(3, 56, 64, 0.97);
    border-radius: 10px;
    padding: 1rem 0;
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li a {
    display: block;
    width: 100%;
    padding: 0.8rem 1.2rem;
    font-size: 17px;
    text-align: left;
    color: #fff;
  }

  .nav-menu li a:hover,
  .nav-menu li.current-menu-item a {
    background-color: #0e00da;
    border-radius: 0;
  }

  /* Submenús */
  .nav-menu li ul {
    position: static;
    transform: none;
    display: none;
    background: #022e47;
    padding: 0;
    width: 100%;
    border-radius: 0;
  }

  .nav-menu li.open > ul {
    display: block;
  }

  .nav-menu li ul li a {
    padding: 0.6rem 1.6rem;
    font-size: 15px;
  }

  /* Login + carrito */
  .user-actions {
    margin-left: auto;
    gap: 1.4rem;
  }

  .login-icon a,
  .cart-icon a {
    font-size: 1.3rem;
    padding: 0.3rem;
    background-color: transparent;
  }

  .login-icon a:hover,
  .cart-icon a:hover {
    background-color: #0e00da;
  }

  /* Ícono contacto */
  .nav-menu li a[href*="/contacto"] {
    width: 40px;
    height: 40px;
  }
  .nav-menu li a[href*="/contacto"]::before {
    font-size: 18px;
  }

  /* Corrige posición del contador */
  .cart-contents .count {
    top: -5px;
    right: -8px;
    font-size: 11px;
  }
}

/* ===========================
   TELÉFONOS PEQUEÑOS (≤ 480px)
   =========================== */
@media (max-width: 480px) {
  .custom-header {
    padding: 1.2rem 1rem;
  }

  .logo-area .site-logo {
    height: 40px;
  }

  .menu-toggle {
    font-size: 1.5rem;
  }

  .main-nav.active {
    border-radius: 8px;
    padding: 0.8rem 0;
  }

  .nav-menu li a {
    padding: 0.7rem 1rem;
    font-size: 16px;
  }

  .nav-menu li ul li a {
    padding-left: 1.8rem;
  }

  .user-actions {
    gap: 1rem;
  }

  .login-icon a,
  .cart-icon a {
    font-size: 1.2rem;
  }

  .cart-contents .count {
    top: -4px;
    right: -6px;
    font-size: 10px;
    padding: 1.5px 5px;
  }
}

/* ===========================
   EXTRA SMALL (≤ 360px)
   =========================== */
@media (max-width: 360px) {
  .custom-header {
    padding: 1rem 0.8rem;
  }

  .logo-area .site-logo {
    height: 36px;
  }

  .nav-menu li a {
    font-size: 15px;
    padding: 0.6rem 0.8rem;
  }

  .user-actions {
    gap: 0.8rem;
  }

  .login-icon a,
  .cart-icon a {
    font-size: 1.1rem;
  }
}
