/* Header de disproquilim.com — fuente única (2026-10-27). Ver /dq/header.inc.
   Depende sólo de las variables de colors_and_type.css (con respaldo literal). */

.dqh {
  --dqh-grad: var(--grad-brand, linear-gradient(135deg, #1916A8 0%, #152FBE 32%, #1299D5 62%, #20E7AF 100%));
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft, #E4E8F0);
  box-shadow: 0 2px 14px rgba(25, 22, 168, .05);
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
/* Sobre el hero oscuro de la home, hasta que se hace scroll */
body[data-hero-oscuro] .dqh:not(.is-solido):not(.is-abierto) {
  background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
  border-bottom-color: transparent; box-shadow: none;
}
/* Las páginas sin hero oscuro necesitan dejarle lugar al header fijo */
body:not([data-hero-oscuro]) { padding-top: var(--dqh-alto, 84px); }

.dqh__fila {
  display: flex; align-items: center; gap: 28px; height: 84px;
}

/* Logo: dos imágenes, se muestra la que corresponde al fondo */
.dqh__logo { flex: none; display: flex; align-items: center; }
.dqh__logo img { height: 40px; width: auto; display: block; }
.dqh__logo-claro { display: none !important; }
body[data-hero-oscuro] .dqh:not(.is-solido):not(.is-abierto) .dqh__logo-claro { display: block !important; }
body[data-hero-oscuro] .dqh:not(.is-solido):not(.is-abierto) .dqh__logo-color { display: none !important; }

/* Navegación */
.dqh__nav { display: flex; align-items: center; gap: 26px; flex: none; }
.dqh__nav a {
  font-size: 14.5px; font-weight: 500; color: var(--fg2, #4B5675);
  text-decoration: none; padding: 6px 0; transition: color 150ms;
}
.dqh__nav a:hover, .dqh__nav a[aria-current="page"] { color: var(--fg1, #1916A8); }
body[data-hero-oscuro] .dqh:not(.is-solido):not(.is-abierto) .dqh__nav a { color: rgba(255, 255, 255, .8); }
body[data-hero-oscuro] .dqh:not(.is-solido):not(.is-abierto) .dqh__nav a:hover { color: #fff; }

/* ── Buscador ─────────────────────────────────────────────────────────── */
.dqh__buscar {
  position: relative; flex: 1 1 auto; min-width: 0; max-width: 440px; margin-left: auto;
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 5px 0 15px;
  border: 2px solid transparent; border-radius: 999px;
  background: linear-gradient(#fff, #fff) padding-box, var(--dqh-grad) border-box;
  box-shadow: 0 4px 16px rgba(21, 47, 190, .08);
  transition: box-shadow 150ms ease;
}
.dqh__buscar:focus-within { box-shadow: 0 0 0 4px rgba(32, 231, 175, .2); }
.dqh__lupa { flex: none; color: #1299D5; }
.dqh__buscar input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 16px; /* 16px: menos, y iOS hace zoom al enfocar */
  color: var(--fg1, #1916A8);
}
.dqh__buscar input::placeholder { color: var(--fg3, #8A93AD); }
.dqh__buscar input::-webkit-search-cancel-button { display: none; }
.dqh__limpiar {
  flex: none; width: 28px; height: 28px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 19px; line-height: 1;
  background: var(--border-soft, #E4E8F0); color: var(--fg2, #4B5675);
}
.dqh__limpiar[hidden] { display: none; }
.dqh__ir {
  flex: none; width: 36px; height: 36px; border-radius: 999px; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: var(--dqh-grad);
}

/* Panel de sugerencias */
.dqh__panel {
  position: absolute; top: calc(100% + 10px); left: -2px; right: -2px; z-index: 5;
  min-width: min(420px, calc(100vw - 32px));
  background: #fff; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--border-soft, #E4E8F0);
  box-shadow: 0 18px 48px rgba(5, 10, 48, .18);
  max-height: calc(100vh - 120px); overflow-y: auto;
}
.dqh__panel[hidden] { display: none; }
.dqh__sec {
  padding: 12px 16px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fg3, #8A93AD);
}
.dqh__cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; }
.dqh__cat {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--fg1, #1916A8); background: var(--accent-soft, #E0FBF1);
}
.dqh__cat em { font-style: normal; font-size: 11.5px; color: var(--fg3, #8A93AD); }
.dqh__op {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; text-decoration: none;
  border-top: 1px solid var(--border-soft, #EEF1F6);
}
.dqh__op:first-of-type { border-top: 0; }
.dqh__op[aria-selected="true"], .dqh__op:hover { background: #F3F7FF; }
.dqh__op-ico {
  flex: none; width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  background: var(--accent-soft, #E0FBF1); color: #152FBE;
}
.dqh__op-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dqh__op-n {
  font-size: 14.5px; font-weight: 700; color: var(--fg1, #1916A8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dqh__op-n mark { background: none; color: #1299D5; }
.dqh__op-m { font-size: 12.5px; color: var(--fg3, #8A93AD); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dqh__op-p { flex: none; text-align: right; display: flex; flex-direction: column; gap: 2px; }
.dqh__op-p b { font-size: 14px; color: var(--fg1, #1916A8); }
.dqh__op-p span { font-size: 11.5px; color: var(--fg3, #8A93AD); }
.dqh__op-p .ok { color: #0E9F6E; }
.dqh__todos {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px;
  font-size: 14px; font-weight: 700; text-decoration: none; color: #fff; background: var(--dqh-grad);
}
.dqh__todos[aria-selected="true"], .dqh__todos:hover { filter: brightness(1.08); }
.dqh__vacio { padding: 16px; font-size: 14px; line-height: 1.55; color: var(--fg2, #4B5675); }
.dqh__vacio b { color: var(--fg1, #1916A8); }
.dqh__vacio .btn { margin-top: 12px; }
.dqh__carga { padding: 16px; font-size: 13.5px; color: var(--fg3, #8A93AD); }

/* Acciones */
.dqh__acciones { flex: none; display: flex; align-items: center; gap: 10px; }
.dqh__cta { padding: 12px 20px; font-size: 14.5px; gap: 8px; }
.dqh__burger {
  display: none; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center; background: transparent;
  border: 1px solid var(--border-soft, #E4E8F0); color: var(--fg1, #1916A8);
}
body[data-hero-oscuro] .dqh:not(.is-solido):not(.is-abierto) .dqh__burger { color: #fff; border-color: rgba(255, 255, 255, .35); }

/* Menú plegable */
.dqh__menu { background: #fff; border-top: 1px solid var(--border-soft, #E4E8F0); padding: 6px 0 16px; }
.dqh__menu[hidden] { display: none; }
.dqh__menu-nav { display: flex; flex-direction: column; }
.dqh__menu-nav a {
  padding: 14px 2px; font-size: 16px; font-weight: 600; text-decoration: none;
  color: var(--fg1, #1916A8); border-bottom: 1px solid var(--border-soft, #EEF1F6);
}
.dqh__menu-nav a:last-child { border-bottom: 0; }

/* Las secciones de la home quedan debajo del header fijo al saltar a un ancla */
#soluciones, #sectores, #beneficios, #productos, #contacto, #categorias { scroll-margin-top: 100px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .dqh__fila { gap: 20px; }
  .dqh__nav { gap: 20px; }
  .dqh__cta span { display: none; }           /* queda el ícono de WhatsApp */
  .dqh__cta { padding: 0; width: 46px; height: 46px; justify-content: center; border-radius: 999px; }
}
@media (max-width: 1020px) {
  .dqh__nav { display: none; }
  .dqh__burger { display: inline-flex; }
}
/* Teléfono: el buscador baja a su propia fila, a todo el ancho */
@media (max-width: 720px) {
  /* `.dqh >` para ganarle a `.container { padding: 0 18px }` de tienda.css,
     que se carga después en el catálogo y anulaba el relleno vertical. */
  .dqh > .dqh__fila { flex-wrap: wrap; height: auto; gap: 10px 12px; padding-top: 10px; padding-bottom: 12px; }
  .dqh__logo img { height: 32px; }
  .dqh__acciones { margin-left: auto; }
  .dqh__cta { width: 42px; height: 42px; }
  .dqh__burger { width: 42px; height: 42px; }
  .dqh__buscar { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; height: 44px; }
  .dqh__panel { min-width: 0; max-height: calc(100vh - 150px); }
  /* El hero de la home arranca debajo de las dos filas del header */
  body[data-hero-oscuro] #inicio { padding-top: calc(var(--dqh-alto, 118px) + 28px) !important; }
  body:not([data-hero-oscuro]) { padding-top: var(--dqh-alto, 118px); }
}
@media (max-width: 380px) {
  .dqh__logo img { height: 28px; }
}
/* Teléfono (2026-10-30, Alejandro; todo el sitio): fila 1 = logo + «Cotizar
   por WhatsApp» con texto; fila 2 = buscador + menú. El HTML no cambia:
   .dqh__acciones se disuelve (display: contents) y sus dos botones se reparten
   entre las filas con `order`. */
@media (max-width: 720px) {
  .dqh__acciones { display: contents; }
  .dqh__logo { order: 1; }
  .dqh > .dqh__fila { column-gap: 8px; }
  .dqh__logo img { height: clamp(20px, calc(11vw - 12px), 36px); }
  .dqh__cta { order: 2; margin-left: auto; width: auto; height: auto;
    padding: clamp(8px, 2.4vw, 11px) clamp(9px, 2.8vw, 16px); gap: clamp(4px, 1.3vw, 7px);
    border-radius: 999px; white-space: nowrap;
    font-size: clamp(9.5px, 3.05vw, 14px); line-height: 1.1; }
  /* «Cotizar por WhatsApp» en UNA línea: letra y logo se escalan con el ancho */
  .dqh__cta span { display: inline; }
  .dqh__cta svg { flex-shrink: 0; width: clamp(14px, 4.2vw, 18px); height: auto; }
  .dqh__buscar { order: 3; flex: 1 1 calc(100% - 56px); min-width: 0; }
  .dqh__burger { order: 4; flex: none; width: 44px; height: 44px; }
  /* Mismo degradado que la flecha del buscador. !important porque la regla del
     header transparente (.dqh:not(.is-solido):not(.is-abierto)) pesa más. */
  .dqh__burger { background: var(--dqh-grad) !important;
    border: 0 !important; color: #fff !important; box-shadow: 0 4px 14px rgba(21, 47, 190, .3); }
}

/* Menú lateral (2026-10-30, Alejandro; todo el sitio): sale por la izquierda,
   deja ver la página detrás con un velo, botón de cerrar con el degradado de
   marca. El velo y el botón los crea header.js.
   El header lleva backdrop-filter, que vuelve a .dqh el contenedor de lo
   `position: fixed` de adentro: con el menú abierto se apaga, si no el panel
   quedaría encerrado en el alto del header. */
@media (max-width: 1020px) {
  .dqh.is-abierto { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .dqh__menu {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 2;
    width: min(80vw, 340px); overflow-y: auto; overscroll-behavior: contain;
    padding: calc(env(safe-area-inset-top, 0px) + 76px) 0 28px;
    border-top: 0; box-shadow: 10px 0 36px rgba(10, 14, 60, .28);
    animation: dqh-entra 260ms cubic-bezier(.2, .8, .2, 1);
  }
  .dqh__menu .container { padding: 0 24px; }
  .dqh__menu-nav a { padding: 15px 2px; font-size: 17px; }
  .dqh__velo {
    position: fixed; inset: 0; z-index: 1;
    background: rgba(8, 12, 48, .42);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: dqh-velo 220ms ease-out;
  }
  .dqh__velo[hidden] { display: none; }
  .dqh__cerrar {
    position: absolute; top: calc(env(safe-area-inset-top, 0px) + 18px); right: 18px;
    width: 44px; height: 44px; border: 0; border-radius: 999px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; background: var(--dqh-grad);
    box-shadow: 0 6px 18px rgba(21, 47, 190, .35);
  }
  .dqh__cerrar:active { transform: scale(.95); }
  html.dqh-bloqueo, html.dqh-bloqueo body { overflow: hidden; }
  html.dqh-bloqueo .dqw-flota, html.dqh-bloqueo .dqp-fab { visibility: hidden; }
}
@media (min-width: 1021px) { .dqh__velo, .dqh__cerrar { display: none; } }
@keyframes dqh-entra { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes dqh-velo { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) { .dqh { transition: none; } .dqh__menu, .dqh__velo { animation: none !important; } }
