/* ============================================================================
   CLIK — cabecera, pie, botones y WhatsApp flotante compartidos por TODAS las
   páginas públicas (2026-11). Única fuente de estas piezas: antes vivían en
   css/marca.css (solo las páginas corporativas) y las páginas con
   css/landing.css tenían su propia cabecera y su propio pie.

   Es seguro cargarla junto a landing.css:
   - las variables de diseño se declaran SOBRE las propias piezas (no en
     :root), así no cambian las variables homónimas de landing.css;
   - los selectores van anclados a .nav-envoltura y .pie para ganarle a las
     reglas viejas de landing.css (.nav, .nav-acciones, .contenedor).
   Valores idénticos a los de :root en css/marca.css.
   ========================================================================== */

.nav-envoltura, .pie, .wa-flotante, .boton, .saltar {
  --tinta: #17212B; --tinta-2: #3A4856; --texto-2: #5B6B7F;
  --pizarra: #26323C; --pizarra-2: #34434F; --pizarra-texto: #C3CCD5;
  --petroleo: #075460; --petroleo-hover: #06444E; --petroleo-suave: #E7F0F1;
  --fondo: #F5F6F7; --superficie: #FFFFFF; --borde: #D8DEE4; --borde-suave: #E7EBEF;
  --fuente: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --t-xs: 0.8125rem; --t-sm: 0.875rem; --t-md: 1rem;
  --radio-sm: 8px; --ancho: 1180px; --gutter: clamp(16px, 4vw, 32px);
  --sombra-md: 0 1px 2px rgba(23, 33, 43, 0.05), 0 12px 28px -12px rgba(23, 33, 43, 0.18);
  --curva: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: var(--fuente);
}

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radio-sm);
  background: var(--tinta); color: #fff; font-weight: 600; text-decoration: none;
}
.saltar:focus { top: 12px; }

/* ── Botones ──────────────────────────────────────────────────────────── */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--radio-sm);
  font: 600 var(--t-md)/1 var(--fuente); text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .18s var(--curva), border-color .18s var(--curva), color .18s var(--curva);
}
.boton svg { width: 18px; height: 18px; flex: none; }
.boton--primario { background: var(--petroleo); color: #fff; }
.boton--primario:hover { background: var(--petroleo-hover); }
.boton--secundario { background: var(--superficie); color: var(--tinta); border-color: var(--borde); }
.boton--secundario:hover { border-color: var(--tinta-2); }
.boton--claro { background: #fff; color: var(--pizarra); }
.boton--claro:hover { background: var(--petroleo-suave); }
.boton--contorno-claro { color: #fff; border-color: rgba(255, 255, 255, 0.35); background: transparent; }
.boton--contorno-claro:hover { border-color: #fff; }
.boton--chico { min-height: 40px; padding: 0 16px; font-size: var(--t-sm); }

/* ── Cabecera ─────────────────────────────────────────────────────────── */
.nav-envoltura {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--curva);
}
.nav-envoltura--scroll { border-bottom-color: var(--borde-suave); }
.nav-envoltura .contenedor,
.pie .contenedor { width: min(100% - 2 * var(--gutter), var(--ancho)); max-width: none; margin-inline: auto; padding: 0; }
.nav-envoltura .nav {
  display: flex; align-items: center; justify-content: flex-start; gap: 24px; min-height: 68px;
  padding: 0; max-width: none;
}
.nav-envoltura .nav-marca { display: inline-flex; align-items: center; gap: 10px; flex: none; min-height: 44px; text-decoration: none; }
.nav-envoltura .nav-marca img { width: 64px; height: auto; display: block; }
.nav-producto {
  padding: 3px 9px; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
  background: var(--acento-suave, var(--petroleo-suave)); color: var(--acento, var(--petroleo));
}
.nav-envoltura .nav-panel { display: flex; align-items: center; gap: 28px; flex: 1; }
.nav-envoltura .nav-enlaces { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding: 0; }
.nav-envoltura .nav-enlaces a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: var(--radio-sm);
  color: var(--tinta-2); font-size: var(--t-sm); font-weight: 500; text-decoration: none;
}
.nav-envoltura .nav-enlaces a:hover { color: var(--tinta); background: var(--fondo); }
.nav-envoltura .nav-enlaces a[aria-current="page"] { color: var(--petroleo); font-weight: 600; background: var(--petroleo-suave); }
.nav-envoltura .nav-acciones { display: flex; align-items: center; gap: 8px; }
.nav-envoltura .nav-ingresar {
  color: var(--tinta); font-size: var(--t-sm); font-weight: 600; text-decoration: none;
  padding: 0 10px; min-height: 40px; display: inline-flex; align-items: center; border-radius: var(--radio-sm);
}
.nav-envoltura .nav-ingresar:hover { background: var(--fondo); }
.nav-envoltura .nav-menu-btn {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border-radius: var(--radio-sm);
  border: 1px solid var(--borde); background: #fff; color: var(--tinta); cursor: pointer;
  align-items: center; justify-content: center; padding: 0;
}
.nav-envoltura .nav-menu-btn svg { width: 20px; height: 20px; }
.nav-envoltura .nav-menu-btn .icono-cerrar { display: none; }
.menu-abierto .nav-envoltura .nav-menu-btn .icono-abrir { display: none; }
.menu-abierto .nav-envoltura .nav-menu-btn .icono-cerrar { display: block; }
.nav-envoltura :focus-visible { outline: 3px solid var(--petroleo); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 899px) {
  .nav-envoltura .nav-menu-btn { display: inline-flex; }
  .nav-envoltura .nav-panel {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: #fff; border-bottom: 1px solid var(--borde);
    box-shadow: var(--sombra-md);
    display: none;
  }
  .menu-abierto .nav-envoltura .nav-panel { display: flex; }
  .nav-envoltura .nav-enlaces { flex-direction: column; margin: 0; gap: 0; }
  .nav-envoltura .nav-enlaces li { width: 100%; }
  .nav-envoltura .nav-enlaces a {
    display: flex; width: 100%; min-height: 48px; font-size: var(--t-md); padding: 0 4px;
    border-bottom: 1px solid var(--borde-suave); border-radius: 0;
  }
  .nav-envoltura .nav-enlaces a[aria-current="page"] { padding: 0 8px; }
  .nav-envoltura .nav-acciones { flex-direction: column; align-items: stretch; gap: 10px; }
  .nav-envoltura .nav-acciones .boton,
  .nav-envoltura .nav-ingresar { justify-content: center; min-height: 48px; font-size: var(--t-md); }
  .nav-envoltura .nav-ingresar { border: 1px solid var(--borde); }
}

/* ── Pie ──────────────────────────────────────────────────────────────── */
.pie { background: var(--pizarra); color: var(--pizarra-texto); padding: 56px 0 28px; font-size: var(--t-sm); line-height: 1.6; }
.pie a { color: var(--pizarra-texto); text-decoration: none; }
.pie a:hover { color: #fff; text-decoration: underline; }
.pie-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.pie-marca img { width: 64px; height: auto; display: block; }
.pie-marca p { margin: 14px 0 0; max-width: 30ch; line-height: 1.55; }
.pie-redes { display: flex; gap: 8px; margin-top: 18px; }
.pie-redes a { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: var(--radio-sm); border: 1px solid var(--pizarra-2); }
.pie-redes a:hover { border-color: var(--pizarra-texto); text-decoration: none; }
.pie-redes svg { width: 18px; height: 18px; }
.pie-col { display: flex; flex-direction: column; gap: 10px; }
.pie-col h2 {
  font-family: var(--fuente); font-size: var(--t-xs); font-weight: 600; line-height: 1.2;
  letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin: 0 0 4px;
}
.pie-correo { word-break: break-word; }
.pie-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--pizarra-2); }
.pie-base p { margin: 0; }
.pie :focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 4px; }
@media (max-width: 899px) { .pie-grid { grid-template-columns: 1fr 1fr; } .pie-marca { grid-column: 1 / -1; } }
@media (max-width: 479px) { .pie-grid { grid-template-columns: 1fr; } }

/* ── WhatsApp flotante ────────────────────────────────────────────────── */
.wa-flotante {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #128C4A; color: #fff; box-shadow: var(--sombra-md);
}
.wa-flotante svg { width: 28px; height: 28px; }
.wa-flotante:hover { background: #0E7A40; }
/* Mientras el aviso de cookies está abierto, el botón no compite con él. */
body:has(#cookie-aviso) .wa-flotante { display: none; }

/* Aviso de cookies (js/cookie-consent.js): en móvil abajo y compacto, sin tapar
   el contenido principal. */
@media (max-width: 700px) {
  html body #cookie-aviso { top: auto !important; bottom: 12px !important; left: 12px !important; right: 12px !important; max-width: none !important; }
}
@media (max-width: 599px) {
  .wa-flotante { width: 50px; height: 50px; right: 14px; bottom: 14px; }
}
