/* ============================================================
   DESGUACES BONAIRE · HEADER CUSTOM v3.6
   Estilo marketplace · Header fijo y menú responsive
   Contenedor: 1250px
   Azul: #002F8E
   Amarillo: #F9A400
============================================================ */
:root {
  --db-primary: #002F8E;
  --db-primary-dark: #001D5C;
  --db-accent: #F9A400;
  --db-accent-hover: #E69500;
  --db-text: #172238;
  --db-muted: #68758A;
  --db-background: #F6F8FC;
  --db-white: #FFFFFF;
  --db-border: #E3E9F1;
  --db-container: 1250px;
}
/* ============================================================
   CONTENEDOR GLOBAL
============================================================ */
@media (min-width: 1200px) {
  body .container {
    max-width: var(--db-container) !important;
  }
}
.db-hdr__container {
  width: 100%;
  max-width: var(--db-container);
  margin-inline: auto;
  box-sizing: border-box;
}
/* ============================================================
   NORMALIZACIÓN
============================================================ */
.db-hdr,
.db-hdr__utility {
  font-family: Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Arial, sans-serif;
  color: var(--db-text);
  background: var(--db-white);
}
.db-hdr *,
.db-hdr *::before,
.db-hdr *::after,
.db-hdr__utility *,
.db-hdr__utility *::before,
.db-hdr__utility *::after {
  box-sizing: border-box;
}
.db-hdr a,
.db-hdr__utility a {
  color: inherit;
  text-decoration: none;
}
.db-hdr button,
.db-hdr input {
  font-family: inherit;
}
/* ============================================================
   HEADER FIJO + ESPACIADOR
   JS activa la clase tras insertar el espaciador.
============================================================ */
.db-hdr-spacer {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  visibility: hidden;
}
#header.db-hdr-host--fixed {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 1200 !important;
  background: #fff;
  overflow: visible !important;
  box-shadow: 0 2px 12px rgba(12, 32, 64, .07);
}
#header:has(.db-hdr) .header-nav,
#header:has(.db-hdr) .header-top {
  background: #fff;
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}
/* ============================================================
   BANNER ORIGINAL
============================================================ */
.db-hdr-banner:empty {
  display: none;
}
/* ============================================================
   01 · TOP BAR
============================================================ */
.db-hdr__utility {
  width: 100%;
  border-bottom: 1px solid #EDF0F4;
}
.db-hdr__utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 36px;
}
/* ENLACES */
.db-hdr__utility-links,
.db-hdr__utility-right {
  display: flex;
  align-items: center;
  min-width: 0;
}
.db-hdr__utility-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  color: var(--db-text) !important;
  font-size: 11.5px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color .18s ease;
}
a.db-hdr__utility-link:hover {
  color: var(--db-primary) !important;
}
.db-hdr__utility-link svg {
  flex: none;
  color: var(--db-primary);
}
/* SOLICITAR ACCESO PRO */
.db-hdr__utility-link--pro {
  font-weight: 650;
}
.db-hdr__utility-link--pro svg:last-child {
  color: var(--db-muted);
  transition: transform .18s ease;
}
a.db-hdr__utility-link--pro:hover svg:last-child {
  transform: translate(2px, -2px);
}
/* ENLACES SIN CONFIGURAR */
.db-hdr__utility-link--disabled {
  cursor: default;
}
/* ============================================================
   02 · HEADER PRINCIPAL
============================================================ */
.db-hdr {
  background: #fff;
  border-bottom: 1px solid var(--db-border);
}
.db-hdr__main {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns:
    minmax(155px, 190px)
    minmax(0, 1fr)
    auto;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  min-height: 79px;
  padding-block: 12px;
}
/* ============================================================
   LOGOTIPO
============================================================ */
.db-hdr__brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  max-width: 190px;
  min-width: 0;
}
.db-hdr__logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 55px;
  object-fit: contain;
  object-position: left center;
}
.db-hdr__brand-text {
  font-size: 20px;
  font-weight: 750;
  line-height: 1.1;
  color: var(--db-primary);
}
/* ============================================================
   BUSCADOR AJAX SEINTO
============================================================ */
.db-hdr__search-area {
  position: relative;
  z-index: 50;
  width: 100%;
  min-width: 0;
}
.db-hdr__search-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 49px;
  padding: 3px 12px;
  background: #F0F2F5;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    background .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}
.db-hdr__search-shell:hover {
  background: #EDEFF3;
}
.db-hdr__search-shell:focus-within {
  background: #fff;
  border-color: var(--db-primary);
  box-shadow: 0 0 0 3px rgba(0,47,142,.09);
}
/* CONTENEDOR HOOK */
.db-hdr__search-slot {
  position: relative;
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
.db-hdr__search-slot > * {
  max-width: 100%;
}
.db-hdr__search-slot form {
  max-width: 100%;
  margin-bottom: 0;
}
.db-hdr__search-slot input,
.db-hdr__search-slot select,
.db-hdr__search-slot button {
  font-family: inherit;
}
/* PERMITIR RESULTADOS AJAX */
.db-hdr__main,
.db-hdr__search-area,
.db-hdr__search-shell,
.db-hdr__search-slot {
  overflow: visible;
}
/* ============================================================
   ACCIONES DERECHA
============================================================ */
.db-hdr__actions {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  white-space: nowrap;
}
/* ¿NECESITAS AYUDA? */
.db-hdr__help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  color: var(--db-text) !important;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .18s ease;
}
.db-hdr__help:hover {
  color: var(--db-primary) !important;
}
/* CUENTA */
.db-hdr__account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 42px;
  flex: none;
  color: var(--db-text) !important;
  transition: color .18s ease;
}
.db-hdr__account:hover {
  color: var(--db-primary) !important;
}
/* CARRITO SEINTO */
.db-hdr__cart-area {
  position: relative;
  z-index: 65;
  display: flex;
  align-items: center;
  flex: none;
  min-width: 0;
}
.db-hdr__cart-slot {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
}
.db-hdr__cart-slot > * {
  max-width: 100%;
}
/* ============================================================
   03 · NAVEGACIÓN INFERIOR
============================================================ */
.db-hdr__nav {
  position: relative;
  z-index: 2;
  width: 100%;
  background: #fff;
  border-top: 1px solid #F0F1F4;
}
.db-hdr__nav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 47px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.db-hdr__nav-list > li {
  display: flex;
  align-items: center;
  flex: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.db-hdr__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 0 2px;
  color: var(--db-text) !important;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  transition: color .18s ease;
}
.db-hdr__nav-link:hover,
.db-hdr__nav-link[aria-current="page"] {
  color: var(--db-primary) !important;
}
.db-hdr__nav-link[aria-current="page"] {
  font-weight: 650;
}
/* INDICADOR ACTIVO */
.db-hdr__nav-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--db-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}
.db-hdr__nav-link:hover::after,
.db-hdr__nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}
/* ENLACES SIN URL */
.db-hdr__nav-link--disabled {
  opacity: .48;
  cursor: default;
}
.db-hdr__nav-link--disabled::after {
  display: none;
}
.db-hdr__nav-link--disabled:hover {
  color: var(--db-text) !important;
}
/* ============================================================
   ELEMENTOS MÓVILES
============================================================ */
.db-hdr__menu-toggle,
.db-hdr__mobile-heading,
.db-hdr__mobile-footer {
  display: none;
}
.db-hdr__backdrop[hidden] {
  display: none !important;
}
/* ============================================================
   ACCESIBILIDAD
============================================================ */
.db-hdr :is(a, button):focus-visible,
.db-hdr__utility a:focus-visible {
  outline: 2px solid var(--db-primary);
  outline-offset: 3px;
}
/* ============================================================
   DESKTOP COMPACTO
============================================================ */
@media (max-width: 1199px) {
  .db-hdr__main {
    grid-template-columns:
      minmax(145px, 170px)
      minmax(0, 1fr)
      auto;
    gap: 19px;
  }
  .db-hdr__logo {
    max-height: 50px;
  }
  .db-hdr__actions {
    gap: 14px;
  }
  .db-hdr__help {
    font-size: 12px;
  }
  .db-hdr__nav-list {
    gap: 14px;
  }
  .db-hdr__nav-link {
    font-size: 12px;
  }
}
/* ============================================================
   TABLET / MÓVIL
============================================================ */
@media (max-width: 1023px) {
  /* OCULTAR TOP BAR */
  .db-hdr__utility {
    display: none;
  }
  .db-hdr__container {
    padding-inline: 16px;
  }
  /* DOS FILAS */
  .db-hdr__main {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-areas:
      "toggle brand actions"
      "search search search";
    gap: 10px 14px;
    min-height: 0;
    padding-block: 11px;
  }
  /* HAMBURGUESA */
  .db-hdr__menu-toggle {
    grid-area: toggle;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: #fff;
    color: var(--db-text);
    border: 1px solid var(--db-border);
    border-radius: 10px;
    cursor: pointer;
  }
  /* LOGO */
  .db-hdr__brand {
    grid-area: brand;
    max-width: 185px;
  }
  .db-hdr__logo {
    max-height: 45px;
  }
  /* BUSCADOR */
  .db-hdr__search-area {
    grid-area: search;
    width: 100%;
    max-width: none;
  }
  .db-hdr__search-shell {
    min-height: 46px;
  }
  /* ACCIONES */
  .db-hdr__actions {
    grid-area: actions;
    gap: 13px;
  }
  .db-hdr__help {
    display: none;
  }
  .db-hdr__account {
    width: 38px;
    height: 42px;
  }
  /* ==========================================================
     MENÚ LATERAL
  ========================================================== */
  .db-hdr__nav {
    position: fixed;
    z-index: 1602;
    top: 0;
    left: 0;
    width: min(88vw, 365px);
    height: 100vh;
    height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border: 0;
    box-shadow: 12px 0 38px rgba(15,28,50,.16);
    transform: translateX(-105%);
    visibility: hidden;
    pointer-events: none;
    transition:
      transform .24s ease,
      visibility .24s ease;
  }
  .db-hdr__nav.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }
  /* CABECERA DRAWER */
  .db-hdr__mobile-heading {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 73px;
    padding-inline: 22px;
    background: #fff;
    border-bottom: 1px solid var(--db-border);
    color: var(--db-primary-dark);
    font-size: 17px;
    font-weight: 750;
  }
  .db-hdr__menu-close {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    padding: 0;
    background: var(--db-background);
    border: 1px solid var(--db-border);
    border-radius: 9px;
    color: var(--db-text);
    cursor: pointer;
  }
  /* ENLACES MÓVILES */
  .db-hdr__nav .db-hdr__container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 22px 24px;
  }
  .db-hdr__nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  .db-hdr__nav-list > li {
    display: block;
    width: 100%;
    border-bottom: 1px solid #EDF0F5;
  }
  .db-hdr__nav-link {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 53px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 550;
    white-space: normal;
  }
  .db-hdr__nav-link::after {
    display: none;
  }
  /* FOOTER MENÚ MÓVIL */
  .db-hdr__mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 24px;
  }
  .db-hdr__mobile-footer a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 47px;
    padding: 0 14px;
    background: var(--db-background);
    border: 1px solid var(--db-border);
    border-radius: 10px;
    color: var(--db-text);
    font-size: 13px;
    font-weight: 650;
  }
  /* OVERLAY */
  .db-hdr__backdrop:not([hidden]) {
    display: block;
    position: fixed;
    z-index: 1601;
    inset: 0;
    background: rgba(15,28,50,.46);
  }
  body.db-hdr-menu-open {
    overflow: hidden !important;
  }
}
/* ============================================================
   MÓVIL PEQUEÑO
============================================================ */
@media (max-width: 575px) {
  .db-hdr__container {
    padding-inline: 14px;
  }
  .db-hdr__main {
    gap: 9px 10px;
    padding-block: 10px;
  }
  .db-hdr__brand {
    max-width: 155px;
  }
  .db-hdr__logo {
    max-height: 39px;
  }
  .db-hdr__menu-toggle {
    width: 40px;
    height: 40px;
  }
  .db-hdr__actions {
    gap: 7px;
  }
  .db-hdr__search-shell {
    min-height: 44px;
    padding-inline: 9px;
  }
}
/* ============================================================
   ACCESIBILIDAD · REDUCIR MOVIMIENTO
============================================================ */
@media (prefers-reduced-motion: reduce) {
  .db-hdr *,
  .db-hdr *::before,
  .db-hdr *::after,
  .db-hdr__utility * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
