/* Cabecera compacta: conserva el menú y los enlaces administrados en WordPress. */
.header-actions {
  align-items: center;
}

.header-bar {
  transition: height .2s ease;
}

.header-logo img {
  transition: width .2s ease;
}

/* Las pestañas conservan la altura de Contacto aunque no haya una opción activa.
   El tramo oculto detrás de la barra también cubre el desplazamiento del hover. */
.header-wrap:not(.is-compact) .main-nav {
  height: 4.875rem;
  align-items: stretch;
}

.header-wrap:not(.is-compact) .main-nav .nav-link {
  height: 100%;
  align-items: center;
  padding: 1.625rem .75rem .625rem;
  line-height: 1.15;
  letter-spacing: .025rem;
}

.header-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 3.125rem;
  height: 3.125rem;
  padding: .25rem;
  border: 0;
  border-radius: .25rem;
  background: transparent;
  color: var(--amarillo);
  cursor: pointer;
}

.header-menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 2.625rem;
  height: 2.125rem;
}

.header-menu-icon span {
  width: 100%;
  height: .375rem;
  border-radius: .1875rem;
  background: currentColor;
}

.header-wrap.is-compact .header-bar {
  height: 5rem;
}

.header-wrap.is-compact .header-logo img {
  width: 8.5rem;
}

.header-wrap.is-compact .header-actions {
  gap: 1.0625rem;
}

.header-wrap.is-compact .header-store {
  position: relative;
}

.header-wrap.is-compact .header-store::before {
  content: '';
  position: absolute;
  left: -.5625rem;
  top: .1875rem;
  bottom: .1875rem;
  width: .0625rem;
  background: var(--amarillo);
  pointer-events: none;
}

.header-wrap.is-compact .nav-btn {
  width: 3.125rem;
  height: 3.125rem;
  padding: .4375rem;
  gap: 0;
  border: 0;
  background: transparent !important;
  color: var(--amarillo) !important;
  transform: none;
  box-shadow: none;
}

.header-wrap.is-compact .nav-btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  filter: none;
}

.header-wrap.is-compact .header-action-label {
  display: none;
}

.header-wrap.is-compact .nav-btn:hover,
.header-menu-toggle:hover {
  opacity: .8;
}

.header-wrap :is(button, a):focus-visible {
  outline: .125rem solid var(--amarillo);
  outline-offset: .1875rem;
}

/* El mismo menú pasa de pestañas a desplegable; no hay una segunda navegación. */
.header-wrap.is-compact .main-nav {
  top: calc(100% + .625rem);
  bottom: auto;
  left: 2.5rem;
  transform: none;
  z-index: 1;
  width: calc(100% - 5rem);
  max-width: 22rem;
  max-height: calc(100dvh - 11rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  flex-direction: column;
  align-items: stretch;
  gap: .375rem;
  padding: .75rem;
  border-radius: .625rem;
  background: var(--negro);
  box-shadow: 0 .375rem .75rem rgba(0, 0, 0, .2);
}

.header-wrap.is-compact .main-nav .nav-link {
  flex: none;
  justify-content: flex-start;
  align-items: center;
  min-height: 3.25rem;
  height: auto;
  padding: .875rem 1rem;
  border-radius: .375rem;
  font-family: 'OwnersXXNarrow-XBlack', sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
  line-height: 1.1;
  text-align: left;
  background: transparent;
  color: var(--amarillo);
  transform: none;
  box-shadow: none;
}

.header-wrap.is-compact .main-nav .nav-link br {
  display: none;
}

.header-wrap.is-compact .main-nav .nav-link:hover,
.header-wrap.is-compact .main-nav .nav-link--active {
  background: var(--rosado);
  color: white;
}

@media (max-width: 48rem) {
  .header-wrap.is-compact .header-bar {
    height: 4.166667rem;
    padding: 0 .5rem;
  }

  .header-wrap.is-compact .header-logo img {
    width: 8rem;
  }

  .header-wrap.is-compact .header-actions {
    gap: .25rem;
  }

  .header-menu-toggle,
  .header-wrap.is-compact .nav-btn {
    width: 2.75rem;
    height: 3.666667rem;
  }

  .header-menu-icon {
    width: 1.75rem;
    height: 1.5rem;
  }

  .header-menu-icon span {
    height: .25rem;
  }

  .header-wrap.is-compact .nav-btn-icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .header-wrap.is-compact .header-store::before {
    left: -.1875rem;
    top: .916667rem;
    bottom: .916667rem;
  }

  .header-wrap.is-compact .main-nav {
    left: .6875rem;
    width: calc(100% - 1.375rem);
    max-width: none;
    max-height: calc(100dvh - 9rem);
  }

  .header-wrap.is-compact .main-nav .nav-link {
    min-height: 3.666667rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-wrap {
    animation: none;
  }

  .header-bar,
  .header-logo img {
    transition: none;
  }
}
