/**
 * header.css — Cabecera en vivo de holoplaza-plantillas
 * ---------------------------------------------------------------------------
 * Header propio de dos bandas para holoplazatcg.com (tema hijo GeneratePress).
 * Sustituto del header de Elementor Pro: fondo oscuro, acento naranja y tipografia
 * Montserrat (ya declarada globalmente por el tema, NO se declara aqui).
 *
 * El markup lo genera el modulo del plugin con clases FIJAS (hplt-lh__*).
 * Este fichero solo maqueta; el estado movil abierto lo controla un JS externo
 * anadiendo la clase .hplt-lh--open al contenedor .hplt-lh.
 * ---------------------------------------------------------------------------
 */

/* =========================================================================
   Generales
   ========================================================================= */
.hplt-lh {
  background: #051518;
  color: #fff;
  box-sizing: border-box;
}
.hplt-lh *,
.hplt-lh *::before,
.hplt-lh *::after {
  box-sizing: border-box;
}

/* =========================================================================
   Banda 1 (logo + buscador + acciones)
   ========================================================================= */
.hplt-lh__bar1 {
  background: #051518;
}
.hplt-lh__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */
.hplt-lh__logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.hplt-lh__logo img {
  max-height: 60px;
  width: auto;
  display: block;
}
.hplt-lh__title {
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  text-decoration: none;
}

/* =========================================================================
   Buscador (pill blanco centrado)
   ========================================================================= */
.hplt-lh__search {
  flex: 0 1 620px;
  max-width: 620px;
  margin-left: auto; /* buscador + iconos forman un bloque que se centra entre el logo (izq) y el borde */
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  height: 44px;
  padding: 0 6px 0 18px;
}
.hplt-lh__search-input {
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  outline: none;
  color: #14201f;
  font-size: 15px;
  min-width: 0;
}
.hplt-lh__search-input::placeholder {
  color: #8a9296;
  opacity: 1; /* Firefox baja la opacidad por defecto */
}
.hplt-lh__search-btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #0D373F; /* la lupa hereda currentColor */
}
.hplt-lh__search-btn svg {
  width: 20px;
  height: 20px;
}

/* =========================================================================
   Acciones (cuenta + carrito + hamburguesa)
   ========================================================================= */
.hplt-lh__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-right: auto; /* cierra el bloque buscador+iconos y lo centra: los iconos quedan junto al buscador */
}
.hplt-lh__icon {
  color: #fff;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: color .15s;
}
.hplt-lh__icon svg {
  width: 34px;
  height: 34px;
}
.hplt-lh__icon:hover,
.hplt-lh__icon:focus {
  color: #FF8C42;
}

/* Carrito y badge de conteo */
.hplt-lh__cart {
  position: relative;
}
.hplt-lh__cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #FF8C42;
  color: #051518;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-sizing: border-box;
}

/* Hamburguesa: oculta en escritorio, visible en movil */
.hplt-lh__toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.hplt-lh__toggle svg {
  width: 24px;
  height: 24px;
}

/* =========================================================================
   Banda 2 (menu horizontal centrado)
   ========================================================================= */
.hplt-lh__bar2 {
  border-top: 1px solid rgba(255, 255, 255, .14);
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  background: #051518;
}
.hplt-lh__nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}
.hplt-lh__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px 8px;
  min-height: 52px;
}
.hplt-lh__menu > li {
  position: relative;
}
.hplt-lh__menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 14px 16px;
  white-space: nowrap;
  transition: color .15s;
}
.hplt-lh__menu > li > a:hover,
.hplt-lh__menu > li > a:focus,
.hplt-lh__menu > li.current-menu-item > a {
  color: #FF8C42;
}
/* Flechita en items con submenu */
.hplt-lh__menu > li.menu-item-has-children > a::after {
  content: "\25BE"; /* ▾ */
  font-size: 11px;
  opacity: .85;
}

/* =========================================================================
   Submenus (dropdown en escritorio)
   ========================================================================= */
.hplt-lh__menu li .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #0b1e22;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s;
  z-index: 100;
}
.hplt-lh__menu li:hover > .sub-menu,
.hplt-lh__menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.hplt-lh__menu .sub-menu li {
  position: relative;
}
.hplt-lh__menu .sub-menu li a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 9px 16px;
  font-size: 14px;
  transition: background .15s, color .15s;
}
.hplt-lh__menu .sub-menu li a:hover,
.hplt-lh__menu .sub-menu li a:focus {
  background: rgba(255, 140, 66, .12);
  color: #FF8C42;
}
/* Submenus anidados (nivel 2+): salen hacia el lateral. Defensivo. */
.hplt-lh__menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}

/* =========================================================================
   Responsive (breakpoint 768px)
   ========================================================================= */
@media (max-width: 768px) {
  /* Mostrar hamburguesa */
  .hplt-lh__toggle {
    display: inline-flex;
  }

  /* Banda 1 a dos filas: logo/acciones arriba, buscador debajo */
  .hplt-lh__inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  .hplt-lh__logo {
    margin-right: auto;
  }
  .hplt-lh__search {
    order: 5;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
  }
  /* En movil las acciones vuelven a la fila superior junto al logo: sin el
     margin-right:auto del escritorio (que las descentraria). */
  .hplt-lh__actions {
    margin-right: 0;
  }

  /* Banda 2 oculta por defecto; visible solo con el menu abierto */
  .hplt-lh__bar2 {
    display: none;
  }
  .hplt-lh.hplt-lh--open .hplt-lh__bar2 {
    display: block;
  }

  /* Menu en vertical */
  .hplt-lh--open .hplt-lh__menu {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }
  .hplt-lh--open .hplt-lh__menu > li > a {
    padding: 12px 16px;
  }

  /* Submenus expandidos en linea (no flotantes) */
  .hplt-lh--open .hplt-lh__menu .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    background: transparent;
    padding-left: 12px;
    min-width: 0;
  }
  .hplt-lh--open .hplt-lh__menu .sub-menu .sub-menu {
    left: auto;
    top: auto;
  }
}
