/* =========================================================
   Plásticos Genus — base.css
   Tokens de marca (brand.yaml), reset, tipografía y
   componentes compartidos por TODAS las páginas
   (header, footer, botones, badges, utilidades).
   ========================================================= */

:root {
  --color-primary: #04204C;
  --color-primary-light: #0B3B7A;
  --color-white: #FFFFFF;
  --color-surface: #F4F5F7;
  --color-border: #E2E8F0;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1EBE59;
  --color-text: #1A2433;
  --color-text-muted: #5B6472;

  --radius-card: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --max-width: 1200px;
  --header-height: 76px;

  --font-primary: "neue-haas-grotesk-display-pro-cufonfonts", "Roboto", Arial, sans-serif;

  --shadow-card: 0 4px 16px rgba(4, 32, 76, 0.08);
  --shadow-card-hover: 0 10px 28px rgba(4, 32, 76, 0.14);
}

/* ---------- Tipografía local: Neue Haas Grotesk Display Pro ----------
   Un único nombre de familia para los 8 pesos del kit (convención
   cufonfonts): el navegador elige el archivo exacto según font-weight.

   Mapeo de pesos — se conserva el mismo criterio de font-weight que ya
   usaba el sitio (normal/600/700/800); Medium se registra en 600 y
   Black en 800 porque el kit no incluye pesos "SemiBold" ni "ExtraBold"
   dedicados, así los weight ya usados en títulos, botones, badges y
   navegación matchean un archivo real en vez de una negrita sintética. */

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayXXThin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayXXThinItalic.ttf") format("truetype");
  font-weight: 100;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayXThin.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayXThinItalic.ttf") format("truetype");
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayThin.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayThinItalic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayLight.ttf") format("truetype");
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayLightItalic.ttf") format("truetype");
  font-weight: 350;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayRoman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayRomanItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayMediu.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayMediumItalic.ttf") format("truetype");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayBoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayBlack.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "neue-haas-grotesk-display-pro-cufonfonts";
  src: url("../fonts/NeueHaasDisplayBlackItalic.ttf") format("truetype");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Reset ---------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

/* ---------- Layout utilities ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 72px 0;
}

.section-header {
  max-width: 640px;
  margin: 0 0 40px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(4, 32, 76, 0.08);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--color-primary);
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 17px;
  margin: 0;
}

.section-alt {
  background: var(--color-surface);
}

/* Bloque de texto blanco con línea guía vertical a la izquierda y
   sobretítulo (.kicker) en mayúsculas — para texto sobre fotos/videos
   oscuros. Lo usan "Nuestra Misión" (nosotros.html) y las tarjetas de
   modelos (columnas.html); cada uno agrega solo lo suyo (ancho máximo,
   tamaño del título, padding-left más chico en tarjetas). */
.accent-text {
  border-left: 2px solid #ffffff;
  padding-left: 28px;
}

.accent-text .kicker {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 14px;
}

/* Versión clara (sobre fondo blanco): línea y sobretítulo en azul de marca. */
.accent-text--light {
  border-left-color: var(--color-primary);
}

.accent-text--light .kicker {
  color: var(--color-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.btn-primary:disabled:hover {
  background: var(--color-primary);
}

/* ---------- Botón dinámico "Agregar a cotización" (tarjeta y ficha) ----------
   .quote-action es siempre el mismo <div> en el DOM (nunca se reemplaza),
   así el fondo azul -> verde y el alto transicionan por CSS al pasar de
   "+ Agregar a cotización" al estado verde "✓ Agregado". */

.quote-action {
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  overflow: hidden;
  transition: background-color 0.25s ease, padding 0.25s ease;
}

.quote-action:hover {
  background: var(--color-primary-light);
}

.quote-action.in-cart,
.quote-action.in-cart:hover {
  background: #2f5d46;
}

.quote-add-btn {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: center;
}

.quote-action.in-cart {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px 7px 12px;
}

/* Estado "en cotización": etiqueta "✓ Agregado" + acción "Quitar". Sin
   cantidades — se indican en el comentario del paso 2 del drawer. */
.quote-added-label {
  flex: 1;
  text-align: center;
  color: var(--color-white);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}

.quote-added-check {
  margin-right: 2px;
}

.quote-remove-btn {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: transparent;
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}

.quote-remove-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- Pulso del botón del header al agregar/modificar cantidades ---------- */

@keyframes quoteTriggerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(4, 32, 76, 0.45);
  }
  100% {
    box-shadow: 0 0 0 9px rgba(4, 32, 76, 0);
  }
}

.quote-trigger-pulse {
  animation: quoteTriggerPulse 0.4s ease-out;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-light);
}

.btn-outline-dark {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-outline-dark:hover {
  background: rgba(4, 32, 76, 0.06);
}

/* Variante clara, para usar sobre fondos oscuros o fotografías */
.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--color-white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-white);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
}

.btn-whatsapp:hover {
  background: var(--color-whatsapp-dark);
}

.btn-block {
  width: 100%;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Pill / ghost CTA — usado en el header */
.btn-pill-ghost {
  background: rgba(4, 32, 76, 0.05);
  color: var(--color-primary);
  border: 1.5px solid rgba(4, 32, 76, 0.22);
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-weight: 600;
}

.btn-pill-ghost:hover {
  background: rgba(4, 32, 76, 0.1);
  border-color: rgba(4, 32, 76, 0.4);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 20px;
  min-height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

/* <picture> del isologo: display:contents lo saca del flujo para que el
   <img> interno (.logo-wordmark) se comporte como si fuera hijo directo
   de .logo, sin caja/wrapper extra que rompa el flex del navbar. */
.header-logo {
  display: contents;
}

/* Isologo "Plásticos Genus" en SVG, junto al isotipo en el navbar.
   Desktop: Logo-genus.svg ("PLÁSTICOS" + "GENUS" apilado, viewBox más
   alto). Mobile (≤768px, ver @media del header): <picture> cambia el
   origen a Logotipo.2.svg (solo "GENUS", una sola línea) — a la misma
   altura se lee mejor que el lockup completo achicado. */
.logo-wordmark {
  height: 32px;
  max-height: 40px;
  width: auto;
  display: inline-block;
  flex-shrink: 0;
}

.logo-text .sub {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Hover sin línea inferior: el enlace pasa de peso 500 a 600 con un
   resplandor suave. Para que el cambio de peso NO mueva el layout, el
   ::after invisible (data-label, lo setea nav.js) reserva siempre el
   ancho del texto en negrita — el enlace nunca cambia de tamaño. */
.main-nav a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, font-weight 0.2s ease, text-shadow 0.2s ease;
}

.main-nav a::after {
  content: attr(data-label);
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  font-weight: 600;
}

.main-nav a:hover {
  color: var(--color-primary);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Página actual: mantiene su indicador (línea inferior), no es un hover. */
.main-nav a[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 600;
  border-bottom-color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
  color: var(--color-primary);
}

/* Fondo oscuro semitransparente detrás del menú móvil off-canvas — mismo
   patrón que #quote-overlay (fixed + fade de opacity vía .visible,
   togglea el atributo hidden en nav.js), con su propio elemento para no
   interferir con el Drawer de cotización si en algún momento coinciden. */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 15, 38, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 300;
}

.nav-overlay.visible {
  opacity: 1;
}

/* Menú off-canvas de mobile (#mobile-nav): un elemento DISTINTO de
   .main-nav (el nav inline de escritorio), oculto por completo salvo
   dentro del breakpoint mobile — ver el porqué de que viva fuera de
   <header> en el comentario de nav.js § initNav. */
.mobile-nav {
  display: none;
}

/* ---------- Header mobile: logo a la izquierda, hamburguesa a la
   derecha ---------- */

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* Mobile: solo el wordmark "GENUS" (Logotipo.2.svg, vía <picture> más
     abajo) — se oculta el isotipo circular junto al logo del header. */
  .logo-mark {
    display: none;
  }

  .logo-wordmark {
    height: 24px;
    max-height: 28px;
  }

  /* El nav inline de escritorio y su CTA quedan reemplazados por el
     panel off-canvas (.mobile-nav) — ya no queda nada visible acá (el
     botón "+" se eliminó por completo). */
  .main-nav,
  .header-actions {
    display: none;
  }

  /* Panel off-canvas: entra desde la derecha, 65% del ancho de pantalla,
     esquinas izquierdas (superior E inferior) con radio pronunciado —
     la derecha queda pegada/recta al borde de la pantalla — y sombra
     sutil. Mismo mecanismo (position:fixed + transform:translateX +
     .open) que #quote-drawer, para que el gesto de abrir/cerrar sea
     consistente en todo el sitio. */
  .mobile-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 65%;
    max-width: 420px;
    background: #ffffff;
    box-shadow: -8px 0 28px rgba(3, 15, 38, 0.12);
    border-top-left-radius: 28px;
    border-bottom-left-radius: 28px;
    z-index: 301;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    gap: 8px;
    padding: 48px 20px 32px 32px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .mobile-nav.open {
    transform: translateX(0);
  }

  /* Tipografía unificada entre ítems y el botón CTA: misma font-family
     (heredada de .btn, que ya usa var(--font-primary)), mismo
     font-size (15px) y mismo font-weight base (500, Medium — nada de
     bold pesado). Primera letra mayúscula tal como está escrito en el
     HTML (sin text-transform), sin líneas divisorias. El estado activo
     NO usa subrayado: se distingue únicamente por un font-weight mayor
     (ver [aria-current="page"] más abajo). */
  .mobile-nav a:not(.mobile-nav-logo) {
    text-decoration: none;
    font-family: var(--font-primary);
    color: var(--color-primary);
    font-weight: 500;
    font-size: 15px;
    width: 100%;
    padding: 8px 0;
    transition: opacity 0.15s ease;
  }

  .mobile-nav a:not(.mobile-nav-logo):hover {
    opacity: 0.7;
  }

  .mobile-nav a[aria-current="page"] {
    font-weight: 700;
  }

  .mobile-nav-logo {
    margin-bottom: 20px;
  }

  .mobile-nav-logo img {
    height: 26px;
    width: auto;
    display: block;
  }

  .mobile-nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
    font-weight: 500;
    font-size: 15px;
  }
}

/* ---------- Badges ---------- */

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
}

.badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #030f26;
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand .logo {
  color: var(--color-white);
  margin-bottom: 14px;
}

.footer-brand .logo-mark {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 4px;
  box-sizing: border-box;
}

.footer-brand p {
  font-size: 14px;
  max-width: 280px;
  line-height: 1.6;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 14px;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--color-white);
}

/* Mismas 3 columnas que .footer-grid (1.3fr/1fr/1fr, mismo gap) para
   que .social-icons quede exactamente debajo de "Contactos" — mismo
   margen izquierdo que ese título y su lista, no solo un valor de
   padding aproximado. */
.footer-bottom {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  align-items: center;
  padding-top: 24px;
  font-size: 13px;
}

.footer-bottom > span {
  grid-column: 1 / 3;
}

/* Fila de redes sociales, alineada con la columna "Contactos" */
.social-icons {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
}

/* Sin círculo ni borde: ícono outline limpio, 24x24 exactos */
.social-icons a {
  display: flex;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 0.15s ease;
}

.social-icons a:hover {
  color: var(--color-white);
}

.social-icons svg {
  width: 100%;
  height: 100%;
}

/* ---------- WhatsApp flotante ---------- */

/* Botón circular simple, sin texto expandible ni tooltip — solo el
   ícono, para no taparle el área de clic a los íconos sociales
   (TikTok, el más próximo) que ahora quedan alineados con la columna
   "Contactos" del footer. */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: var(--color-white);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.48);
}

.whatsapp-float svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ---------- Carrusel de imágenes (tarjetas de catálogo y ficha) ---------- */

.thumb-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.thumb-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  touch-action: pan-y;
}

.thumb-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Marca de agua del catálogo (assets/js/watermark.js) ----------
   Cada foto del catálogo va dentro de un .wm-frame (misma caja que tendría
   la foto sola) con una capa .wm-mark centrada encima. Los archivos de las
   fotos no se tocan.

   CÓMO AJUSTARLA (solo estas variables):
   --wm-large-size  diámetro del logo grande, en % del ancho de la foto.
   --wm-seal-size   diámetro del logo reducido (sello), en % del ancho.
   --wm-opacity     0–1, multiplica la opacidad final. Con el refuerzo de una
                    copia (~28 %) y 0.85 queda en ~24 %. Subir hacia 1 = más marcada.
   --wm-boost       refuerzo de opacidad. El PNG de la marca ya trae ~15 %
                    de opacidad propia; cada drop-shadow(0 0 0 #fff) suma una
                    copia encima: ninguno = ~15 %, uno = ~28 %, dos = ~48 %.
   CONTRASTE: el PNG de la marca es blanco. Con mix-blend-mode: difference se
   ve siempre, sin importar el fondo: sobre las piezas oscuras queda gris
   claro y sobre el fondo claro de la tarjeta queda gris oscuro (por eso
   cada .wm-frame tiene el mismo fondo --color-surface que la tarjeta y su
   propio contexto de apilado: así la mezcla es la misma en todas las vistas).
   Para volver a un logo blanco liso, quitar mix-blend-mode de .wm-mark. */
:root {
  --wm-large-size: 44%;
  --wm-seal-size: 22%;
  --wm-opacity: 0.85;
  --wm-boost: drop-shadow(0 0 0 #fff);
}

.wm-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background: var(--color-surface);
}

/* Dentro del carrusel el contenedor se comporta como la foto sola: ocupa un
   slide y NO se estira al alto del slide más alto (align-self) — así cada foto
   conserva exactamente el tamaño y el encuadre que tenía sin marca. */
.thumb-track .wm-frame {
  flex: 0 0 100%;
  align-self: flex-start;
}

.wm-frame > img {
  display: block;
}

/* Ficha de producto: el alto de la caja lo define la foto (no hay alto fijo
   como en la tarjeta 4:3), así que el contenedor se ajusta a ella. */
.detail-media .wm-frame {
  height: auto;
}

.wm-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--wm-size, var(--wm-large-size));
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  background: url("../img/catalogo/Marca%20de%20agua.png") center / contain no-repeat;
  opacity: var(--wm-opacity);
  filter: var(--wm-boost);
  mix-blend-mode: difference;
  pointer-events: none; /* no interfiere con clics, flechas, swipe ni la navegación */
  user-select: none;
}

.wm-large {
  --wm-size: var(--wm-large-size);
}

.wm-seal {
  --wm-size: var(--wm-seal-size);
}

.thumb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(4, 32, 76, 0.55);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  z-index: 2;
}

.thumb-carousel:hover .thumb-arrow,
.thumb-arrow:focus-visible {
  opacity: 1;
}

.thumb-arrow:hover {
  background: var(--color-primary);
}

.thumb-arrow-prev {
  left: 8px;
}

.thumb-arrow-next {
  right: 8px;
}

.thumb-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 5px;
  z-index: 2;
}

.thumb-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(4, 32, 76, 0.3);
  padding: 0;
  cursor: pointer;
}

.thumb-dot.active {
  background: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(4, 32, 76, 0.35);
}

/* Sin hover real (táctil): flechas siempre visibles, más tenues */
@media (hover: none) {
  .thumb-arrow {
    opacity: 1;
    background: rgba(4, 32, 76, 0.42);
  }
}

/* ---------- Drawer: Solicitud de cotización ----------
   Compartido por todas las páginas (assets/js/quote-drawer.js). El botón
   del header (.quote-trigger) lo abre; las tarjetas del catálogo agregan
   productos vía .quote-add-btn. Carrito persistido en localStorage. */

.quote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 15, 38, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 300;
}

.quote-overlay.visible {
  opacity: 1;
}

.quote-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100vw);
  background: var(--color-white);
  box-shadow: -12px 0 40px rgba(3, 15, 38, 0.18);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.quote-drawer.open {
  transform: translateX(0);
}

.quote-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.quote-drawer-header h2 {
  font-size: 19px;
  font-weight: 400;
  color: var(--color-primary);
  margin: 0;
}

.quote-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin: -6px;
  color: var(--color-text-muted);
  display: flex;
  transition: color 0.15s ease;
}

.quote-close:hover {
  color: var(--color-primary);
}

.quote-close svg {
  width: 20px;
  height: 20px;
}

.quote-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Estado A: sin productos */
.quote-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
}

.quote-empty p {
  color: var(--color-text-muted);
  font-size: 15px;
  max-width: 280px;
  margin: 0;
  line-height: 1.5;
}

/* Estado B: lista de selección (paso 1/2) */
.quote-subtitle {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 20px;
}

.quote-list {
  list-style: none;
  margin: 0 0 28px;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--color-border);
  flex: 1;
}

.quote-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.quote-item:last-child {
  border-bottom: none;
}

.quote-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.quote-item-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.quote-item-name {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.3;
}

.quote-item-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.quote-item-remove {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #fdecea;
  color: #b3261e;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.quote-item-remove:hover {
  background: #f5c2bd;
  color: #8a1a12;
}

/* Aclaración bajo la lista (paso 1) y bajo la etiqueta del comentario (paso 2):
   las cantidades ya no se eligen con controles, se escriben en el comentario. */
.quote-qty-note,
.quote-field-hint {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.quote-field-hint {
  margin: 0 0 8px;
}

.quote-drawer-footer {
  flex-shrink: 0;
  padding-top: 8px;
}

/* Estado C: datos del cliente (paso 2/2) */
.quote-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  transition: color 0.15s ease;
}

.quote-back-btn:hover {
  color: var(--color-primary);
}

.quote-back-btn svg {
  width: 16px;
  height: 16px;
}

.quote-summary {
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.quote-summary-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--color-surface);
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  font-family: var(--font-primary);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-primary);
}

.quote-summary-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.quote-summary-toggle[aria-expanded="true"] .quote-summary-chevron {
  transform: rotate(180deg);
}

.quote-summary-content {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
}

.quote-summary-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(4, 32, 76, 0.08);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.quote-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.quote-form .form-field {
  margin-bottom: 16px;
}

.quote-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-family: var(--font-primary);
  font-size: 15px;
  color: var(--color-text);
  background: var(--color-surface);
  box-sizing: border-box;
}

.quote-form textarea {
  resize: vertical;
  min-height: 72px;
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
  background: var(--color-white);
}

.quote-optional-tag {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-text-muted);
}

.quote-form-error {
  margin-bottom: 16px;
  font-size: 13.5px;
  color: #b3261e;
  background: #fdecea;
  border: 1px solid #f5c2bd;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

/* Campo dinámico: Empresa / Tipo de Cliente */
.quote-tabs {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 10px;
}

.quote-tab {
  flex: 1;
  background: var(--color-surface);
  border: none;
  cursor: pointer;
  padding: 9px 12px;
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.quote-tab + .quote-tab {
  border-left: 1px solid var(--color-border);
}

.quote-tab:hover {
  color: var(--color-primary);
}

.quote-tab.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.quote-success-icon {
  width: 48px;
  height: 48px;
  color: var(--color-whatsapp-dark);
}

/* Transición sutil y rápida entre paso 1 y paso 2 (fade + slide horizontal) */
.quote-transition-out {
  opacity: 0;
  transform: translateX(-16px);
}

.quote-transition-out-reverse {
  opacity: 0;
  transform: translateX(16px);
}

.quote-transition-in {
  opacity: 0;
  transform: translateX(16px);
}

.quote-transition-in-reverse {
  opacity: 0;
  transform: translateX(-16px);
}

@media (max-width: 480px) {
  .quote-drawer {
    width: 100vw;
  }
}

/* ---------- Mobile (compartido) ---------- */

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-bottom > span {
    grid-column: auto;
  }

  .social-icons {
    grid-column: auto;
  }
}

@media (max-width: 960px) and (min-width: 721px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* "Contactos" pasa a envolver a la fila 2 / columna 1 de este grid de
     2 columnas (el tercer ítem del footer-grid no tiene su propia
     columna a la derecha acá) — en vez de perseguir ese wrap con
     .footer-bottom, se simplifica a una columna apilada y alineada a
     la izquierda, que coincide con ese mismo margen. */
  .footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .footer-bottom > span {
    grid-column: auto;
  }

  .social-icons {
    grid-column: auto;
  }
}

/* ---------- Widget lateral "Últimos vistos" (assets/js/recent-viewed.js) ----------
   Fijo en el borde derecho, encima del botón de WhatsApp (bottom 20px +
   50px de alto + 18px de aire). La solapa (.recent-tab) queda siempre
   visible; plegado = el panel se desliza fuera de pantalla hacia la derecha
   y solo asoma la solapa. */

.recent-widget {
  --recent-panel-w: 236px;
  position: fixed;
  right: 0;
  bottom: 88px;
  z-index: 190;
  display: flex;
  align-items: flex-end;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.recent-widget[hidden] {
  display: none;
}

.recent-widget.collapsed {
  transform: translateX(var(--recent-panel-w));
}

.recent-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 34px;
  padding: 12px 0;
  border: none;
  border-radius: 10px 0 0 10px;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: -3px 4px 14px rgba(4, 32, 76, 0.22);
  transition: background 0.15s ease;
}

.recent-tab:hover {
  background: var(--color-primary-light);
}

.recent-tab span {
  writing-mode: vertical-rl;
  white-space: nowrap;
}

.recent-tab svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.recent-widget.collapsed .recent-tab svg {
  transform: rotate(180deg);
}

.recent-panel {
  width: var(--recent-panel-w);
  max-height: min(56vh, 420px);
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 6px 20px rgba(4, 32, 76, 0.16);
  overflow: hidden;
}

.recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.recent-clear {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-primary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: underline;
}

.recent-clear:hover {
  color: var(--color-primary);
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.15s ease;
}

.recent-item:hover {
  background: var(--color-surface);
}

.recent-thumb {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--color-surface);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.recent-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.recent-code {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.recent-name {
  font-size: 12px;
  line-height: 1.3;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .recent-widget {
    --recent-panel-w: 200px;
    bottom: 82px;
  }

  .recent-tab {
    width: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recent-widget,
  .recent-tab svg {
    transition: none;
  }
}

/* Campo trampa anti-spam de los formularios (enviar.php): fuera de pantalla,
   las personas no lo ven ni lo completan; los bots sí. */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Aviso de respaldo de los enlaces de mail (nav.js § initMailLinks): aparece
   solo si el clic en un mailto: no abrió ningún programa de correo. */
.mail-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 310;
  width: min(92vw, 460px);
  padding: 14px 16px;
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card-hover);
  font-size: 0.9rem;
}
.mail-notice-text {
  margin: 0 0 10px;
  line-height: 1.4;
}
.mail-notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.mail-notice-btn {
  appearance: none;
  display: inline-block;
  padding: 7px 12px;
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.mail-notice-btn:hover {
  border-color: var(--color-primary);
}
.mail-notice-close {
  appearance: none;
  margin-left: auto;
  padding: 2px 8px;
  background: none;
  border: 0;
  color: var(--color-text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
