/* Aritex Premium · catálogo interactivo
   Sistema de diseño: design-system/aritex-premium/MASTER.md */

:root {
  --fondo-alto: #A2ABB2;
  --fondo-medio: #8C96A1;
  --fondo-bajo: #66707B;
  --panel: #5E6873;
  --panel-oscuro: #4C5661;
  --pizarra: #445664;
  --tinta: #1F2A35;
  --blanco: #fff;
  --linea-clara: rgba(255, 255, 255, .45);
  --linea-oscura: rgba(31, 42, 53, .35);
  --whatsapp: #1E6B47;
  --titulo: "Anton", "Arial Narrow", Impact, sans-serif;
  --texto: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rapido: 200ms;
  --medio: 280ms;
  --curva: cubic-bezier(.2, .7, .2, 1);
  --barra-alto: 60px;
  --nav-alto: 62px;
  --seguro-arriba: env(safe-area-inset-top, 0px);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--barra-alto) + 8px); }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--texto);
  font-size: 16px;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--fondo-medio);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--fondo-alto) 0%, var(--fondo-medio) 55%, var(--fondo-bajo) 100%);
}
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 2px solid var(--blanco); outline-offset: 3px; box-shadow: 0 0 0 5px var(--tinta); border-radius: 2px; }

.saltar {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 12px 16px; background: var(--tinta); color: var(--blanco); font-weight: 600; text-decoration: none;
}
.saltar:focus { top: calc(12px + var(--seguro-arriba)); }

main { min-height: 100dvh; outline: none; }
main.entrando { animation: entrar var(--medio) var(--curva); }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border: 0; border-radius: 2px;
  font-weight: 800; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  background: var(--blanco); color: var(--tinta);
  transition: transform var(--rapido) var(--curva), background-color var(--rapido);
}
.boton:active { transform: scale(.98); }
.boton.oscuro { background: var(--tinta); color: var(--blanco); }
.boton.wa { background: var(--whatsapp); color: var(--blanco); }
.boton.linea { background: transparent; color: inherit; border: 1.5px solid currentColor; }
.boton svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.boton.ancho { width: 100%; }
.enlace {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 4px;
}

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: calc(var(--barra-alto) + var(--seguro-arriba)); padding: var(--seguro-arriba) 6px 0;
  background: rgba(162, 171, 178, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(31, 42, 53, .08);
}
.barra-btn {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
  min-width: 44px; min-height: 44px; padding: 0 8px; border: 0; background: none;
  font-weight: 600; font-size: 14px; text-decoration: none; color: var(--tinta);
}
.barra-btn.icono { justify-content: center; padding: 0; }
.barra-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.barra-logo { justify-self: center; display: flex; align-items: center; min-height: 44px; padding: 0 4px; }
.barra-logo img { height: 20px; width: auto; filter: brightness(0) saturate(100%) invert(14%) sepia(14%) saturate(1200%) hue-rotate(170deg); }
.barra-acciones { justify-self: end; display: flex; gap: 2px; }
.contador {
  position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--tinta); color: var(--blanco);
  font-size: 11px; font-weight: 800; line-height: 20px; text-align: center;
}

/* ---------- Bienvenida ---------- */
.bienvenida { position: relative; height: 100dvh; min-height: 560px; overflow: hidden; color: var(--blanco); background: #2b333b; }
.bienvenida > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.bienvenida::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(25, 32, 40, .55) 0%, rgba(25, 32, 40, 0) 26%, rgba(25, 32, 40, 0) 45%, rgba(25, 32, 40, .9) 100%);
}
.bienvenida-c {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(28px + var(--seguro-arriba)) 24px calc(28px + var(--seguro-abajo));
  max-width: 560px; margin: 0 auto;
}
.bienvenida-c .logo { width: 190px; height: auto; margin: 0 auto; }
.bienvenida h1 { font-size: clamp(28px, 8vw, 40px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; margin-bottom: 10px; text-wrap: balance; }
.bienvenida p { font-size: 15px; margin-bottom: 22px; }
.bienvenida .acciones { display: grid; gap: 8px; }
.bienvenida .enlace { justify-self: center; color: var(--blanco); }

/* ---------- Encabezados de sección ---------- */
.seccion { padding: 20px 16px 0; max-width: 1280px; margin: 0 auto; }
.etiqueta { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.intro h1 { font-size: 26px; font-weight: 800; line-height: 1.15; margin: 4px 0 6px; text-wrap: balance; }
.intro p { font-size: 15px; max-width: 46ch; }

/* Buscador visible del menú */
.buscador-falso {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin-top: 16px; padding: 0 16px;
  border: 0; border-radius: 24px; background: rgba(255, 255, 255, .62); color: #38434e; font-size: 15px; text-align: left;
}
.buscador-falso svg, .campo-buscar svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Filtro de gramaje */
.filtro { margin-top: 18px; }
.filtro .etiqueta { display: block; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid var(--linea-oscura);
  background: transparent; font-size: 14px; font-weight: 600; color: var(--tinta);
  transition: background-color var(--rapido), color var(--rapido), border-color var(--rapido);
}
.chip[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: var(--blanco); }

/* ---------- Tarjetas con el recurso de marca ---------- */
.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 16px 12px 0; max-width: 1280px; margin: 0 auto; }
.tarjeta {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--blanco);
  background: var(--panel-oscuro); transition: transform var(--medio) var(--curva);
}
.tarjeta:active { transform: scale(.985); }
.lienzo {
  position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 3.5; container-type: inline-size;
  background: linear-gradient(180deg, #9AA3AB 0%, #828C96 100%);
}
.tarjeta .gigante {
  position: absolute; top: 5%; left: -2%; right: -2%;
  font-family: var(--titulo); font-weight: 400; text-transform: uppercase; text-align: center;
  color: var(--pizarra); line-height: .9; font-size: var(--tam, 56px); white-space: nowrap; pointer-events: none;
}
.tarjeta .figura { position: absolute; left: 0; right: 0; bottom: 0; height: 86%; display: flex; justify-content: center; }
.tarjeta .figura img { height: 100%; width: auto; max-width: none; object-fit: contain; object-position: bottom; }
.tarjeta .figura.doble { gap: 0; }
.tarjeta .figura.doble img { margin: 0 -6%; }
.tarjeta .pie { display: block; padding: 10px 12px 12px; }
.tarjeta .pie strong { display: block; font-size: 15px; font-weight: 800; line-height: 1.25; }
.tarjeta .pie span { display: block; font-size: 12px; line-height: 1.4; }
.tarjeta.ancha { grid-column: span 2; }
.tarjeta.ancha .lienzo { aspect-ratio: 16 / 9.5; }
.tarjeta.ancha .figura { height: 92%; }
.tarjeta.hojear .lienzo { background: var(--tinta); display: flex; align-items: center; justify-content: center; gap: 6%; padding: 8% 6%; }
.tarjeta.hojear .lienzo img { height: 100%; width: auto; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.tarjeta.hojear .lienzo img:nth-child(1) { transform: rotate(-4deg); }
.tarjeta.hojear .lienzo img:nth-child(2) { transform: rotate(3deg) translateY(4%); margin-left: -22%; }

/* Tarjeta de referencia (lista) */
.ref-tarjeta .lienzo { aspect-ratio: 3 / 3.6; }
.ref-tarjeta .tipo { font-size: 12px; }
.ref-tarjeta .tela { font-weight: 600; }
.ref-tarjeta .desde { margin-top: 4px; font-size: 13px !important; }
.ref-tarjeta .desde b { font-size: 16px; font-weight: 800; }
.minis { display: flex !important; flex-wrap: wrap; gap: 3px; margin-top: 6px; align-items: center; }
.minis svg { width: 16px; height: 16px; }
.minis .mas { display: inline !important; font-size: 11px; font-weight: 600; margin-left: 2px; }

/* Encabezado de categoría */
.cabecera-cat { position: relative; overflow: hidden; padding: 12px 0 0; container-type: inline-size; }
.cabecera-cat .gigante {
  display: block; text-align: center; white-space: nowrap; margin: 0 -2%;
  font-family: var(--titulo); text-transform: uppercase; color: var(--pizarra); line-height: .95;
  font-size: var(--tam, 120px); will-change: transform;
}
.cabecera-cat .texto { position: relative; padding: 8px 16px 0; max-width: 1280px; margin: 0 auto; }
.cabecera-cat h1 { font-size: 24px; font-weight: 800; line-height: 1.2; }
.cabecera-cat p { font-size: 14px; }
.vacio { padding: 28px 16px; text-align: center; font-weight: 600; }

/* ---------- Ficha de producto ---------- */
.ficha { padding-bottom: 0; }
.galeria { position: relative; }
.galeria-pista {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.galeria-pista::-webkit-scrollbar { display: none; }
.diapo { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 4 / 5; overflow: hidden; }
.diapo > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.diapo.prenda > img { object-fit: contain; object-position: center; }
.diapo.marca .gigante {
  position: absolute; top: 9%; left: -3%; right: -3%; text-align: center; white-space: nowrap;
  font-family: var(--titulo); text-transform: uppercase; color: var(--pizarra); line-height: .9;
  font-size: var(--tam, 128px); will-change: transform;
}
.diapo.marca > img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: auto; height: 92%; max-width: none; object-fit: contain; object-position: bottom; }
.diapo .leyenda {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; border-radius: 2px;
  background: rgba(31, 42, 53, .78); color: var(--blanco); font-size: 12px; font-weight: 600;
}
.galeria-nav { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 0 2px; }
.galeria-nav button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.galeria-nav button::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: rgba(31, 42, 53, .35); transition: width var(--rapido), background-color var(--rapido); }
.galeria-nav button[aria-current="true"]::before { width: 22px; background: var(--tinta); }
.galeria-flecha {
  position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -40px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .8); display: none; place-items: center;
}
.galeria-flecha svg { width: 22px; height: 22px; fill: none; stroke: var(--tinta); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.galeria-flecha.ant { left: 12px; } .galeria-flecha.sig { right: 12px; }

.info { background: var(--panel); color: var(--blanco); padding: 22px 18px 8px; }
.info.compra { padding-bottom: calc(150px + var(--seguro-abajo)); }
.info h1 { font-size: 30px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; text-transform: uppercase; }
.info .tipo { font-size: 15px; margin-top: 4px; }
.info .tela { font-size: 15px; font-weight: 800; }
.info .codigo { font-size: 13px; }
.bloque { margin-top: 26px; }
.bloque > .etiqueta { display: block; margin-bottom: 12px; }
.nota { margin-top: 10px; font-size: 13px; padding: 10px 12px; border-left: 3px solid var(--blanco); background: var(--panel-oscuro); }

/* Selector de color con mini camisetas */
.colores { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 10px 4px; }
.color {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 2px; border: 0; background: none; color: var(--blanco);
  font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center;
}
.color svg { width: 44px; height: 44px; transition: transform var(--rapido) var(--curva); }
.color[aria-pressed="true"] svg { outline: 2px solid var(--blanco); outline-offset: 3px; border-radius: 6px; }
.color[aria-pressed="true"]::after {
  content: ""; position: absolute; top: 0; right: 8px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--blanco) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%231F2A35' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.color .foto { display: block; font-size: 10px; font-weight: 400; opacity: .9; }

/* Precios por volumen */
.precios { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.precio { border-top: 2px solid var(--linea-clara); padding-top: 8px; transition: border-color var(--rapido); }
.precio b { display: block; font-size: clamp(17px, 5.2vw, 22px); font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.precio span { display: block; font-size: 12px; }
.precio.activo { border-top: 4px solid var(--blanco); padding-top: 6px; }
.precio.activo span::after { content: " · tu precio"; font-weight: 800; }
.precio-xxl { margin-top: 14px; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--linea-clara); }
.precio-xxl b { font-weight: 800; }
.pista { margin-top: 10px; font-size: 13px; }

/* Tabla de medidas */
.medidas { margin-top: 26px; border-top: 1px solid var(--linea-clara); border-bottom: 1px solid var(--linea-clara); }
.medidas summary {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px; cursor: pointer;
  font-size: 14px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; list-style: none;
}
.medidas summary::-webkit-details-marker { display: none; }
.medidas summary::after { content: "+"; font-size: 24px; font-weight: 400; transition: transform var(--rapido); }
.medidas[open] summary::after { transform: rotate(45deg); }
.tabla-scroll { overflow-x: auto; padding-bottom: 14px; }
.medidas table { width: 100%; border-collapse: collapse; font-size: 14px; text-align: center; }
.medidas th, .medidas td { padding: 8px 6px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.medidas thead th { font-weight: 800; }
.medidas tbody th { text-align: left; font-weight: 600; }
.medidas caption { caption-side: bottom; text-align: left; font-size: 12px; padding-top: 8px; }

/* Tallas y cantidades */
.tallas { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }
.talla { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 4px 4px 12px; border: 1.5px solid var(--linea-clara); }
.talla label { font-weight: 800; font-size: 15px; min-width: 32px; }
.talla label small { display: block; font-size: 10px; font-weight: 600; }
.paso { display: flex; align-items: center; }
.paso button {
  width: 44px; height: 44px; border: 0; background: none; color: var(--blanco); display: grid; place-items: center; padding: 0;
}
.paso button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.paso input {
  width: 40px; height: 40px; border: 0; border-radius: 2px; background: rgba(20, 28, 36, .32);
  text-align: center; font-weight: 800; font-size: 16px; color: var(--blanco); -moz-appearance: textfield;
}
.paso input::-webkit-outer-spin-button, .paso input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.talla.con-cantidad { border-color: var(--blanco); background: rgba(255, 255, 255, .08); }

/* Pasar páginas */
.paginar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--linea-clara); }
.paginar a { display: flex; flex-direction: column; justify-content: center; min-height: 60px; padding: 8px 12px; text-decoration: none; border: 1.5px solid var(--linea-clara); }
.paginar a span { font-size: 12px; }
.paginar a strong { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.paginar a.sig { text-align: right; }
.ver-catalogo { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 12px; }
.ver-catalogo .enlace { color: var(--blanco); }

/* Barra fija de agregar */
.agregar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-alto) + var(--seguro-abajo)); z-index: 25;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: rgba(76, 86, 97, .97); color: var(--blanco);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 -6px 20px rgba(20, 28, 36, .18);
}
.agregar .resumen { flex: none; min-width: 74px; font-size: 12px; line-height: 1.3; }
.agregar-wa { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--whatsapp); color: var(--blanco); }
.agregar-wa svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.agregar .resumen b { display: block; font-size: 16px; font-weight: 800; }
.agregar .boton { flex: 1; min-height: 52px; padding: 0 12px; font-size: 13px; letter-spacing: .06em; white-space: nowrap; }

/* ---------- Hojear catálogo ---------- */
.hojear-vista { padding-bottom: calc(80px + var(--seguro-abajo)); }
.hojear-pista {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  height: calc(100dvh - var(--barra-alto) - var(--seguro-arriba) - 132px - var(--nav-alto) - var(--seguro-abajo)); min-height: 320px;
}
.hojear-pista::-webkit-scrollbar { display: none; }
.hoja-pdf { flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 12px; }
.hoja-pdf img { max-height: 100%; width: auto; aspect-ratio: 9 / 16; box-shadow: 0 10px 30px rgba(20, 28, 36, .35); background: var(--fondo-medio); }
.hojear-controles {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-alto) + var(--seguro-abajo)); z-index: 25;
  display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px;
  padding: 10px 12px; background: rgba(76, 86, 97, .97); color: var(--blanco);
}
.hojear-controles .centro { display: grid; gap: 6px; justify-items: center; text-align: center; }
.hojear-controles .num { font-size: 13px; font-weight: 600; }
.hojear-controles .boton { min-height: 44px; font-size: 13px; padding: 0 16px; }
.flecha {
  width: 52px; height: 52px; border: 1.5px solid var(--linea-clara); background: none; color: var(--blanco);
  display: grid; place-items: center; padding: 0;
}
.flecha svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.flecha:disabled { opacity: .35; cursor: default; }
.hojear-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px 0; }
.hojear-barra p { font-size: 14px; font-weight: 600; }

/* ---------- Pie ---------- */
.pie-sitio { margin-top: 36px; padding: 26px 16px 30px; background: var(--panel); color: var(--blanco); text-align: center; }
.pie-sitio .acciones { display: grid; gap: 10px; max-width: 420px; margin: 0 auto 18px; }
.pie-sitio p { font-size: 13px; }

/* ---------- Botones flotantes ---------- */
.flotantes {
  position: fixed; right: 14px; bottom: calc(16px + var(--seguro-abajo)); z-index: 26;
  display: flex; flex-direction: column; gap: 10px; transition: transform var(--medio) var(--curva);
}
.flotantes.alto { bottom: calc(90px + var(--seguro-abajo)); }
.flotante {
  position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0;
  display: grid; place-items: center; color: var(--blanco); text-decoration: none;
  box-shadow: 0 6px 18px rgba(20, 28, 36, .3);
}
.flotante svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flotante .relleno { fill: currentColor; stroke: none; }
.flotante.wa { background: var(--whatsapp); }
.flotante.pedido { background: var(--tinta); }
.flotante .contador { top: -2px; right: -2px; background: var(--blanco); color: var(--tinta); }
.flotante.latido { animation: latido 420ms var(--curva); }
@keyframes latido { 40% { transform: scale(1.12); } }

/* ---------- Hojas (pedido y búsqueda) ---------- */
.hoja {
  width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 14px 14px 0 0;
  background: var(--fondo-alto); color: var(--tinta); display: none; flex-direction: column; overflow: hidden;
}
.hoja[open] { display: flex; animation: subir var(--medio) var(--curva); }
.hoja::backdrop { background: rgba(20, 28, 36, .55); }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
.hoja-cabeza { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 6px 18px; border-bottom: 1px solid var(--linea-oscura); }
.hoja-cabeza h2 { font-size: 18px; font-weight: 800; }
.hoja-cuerpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px; }
.hoja-pie { padding: 14px 16px calc(14px + var(--seguro-abajo)); background: var(--panel); color: var(--blanco); }
.hoja-pie:empty { display: none; }

.campo-buscar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; background: var(--blanco); border-radius: 26px; }
.campo-buscar input { flex: 1; min-width: 0; height: 48px; border: 0; background: none; font-size: 16px; outline: none; }
.campo-buscar:focus-within { outline: 2px solid var(--tinta); outline-offset: 2px; }
.resultados { margin-top: 12px; display: grid; gap: 6px; }
.resultados a { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 10px 6px 6px; text-decoration: none; background: rgba(255, 255, 255, .45); }
.resultados img { width: 48px; height: 60px; object-fit: cover; object-position: top; background: var(--fondo-medio); }
.resultados strong { display: block; font-size: 15px; font-weight: 800; text-transform: uppercase; }
.resultados span { font-size: 13px; }
.resultados .sin { padding: 14px 6px; font-weight: 600; }

/* Pedido */
.pedido-vacio { padding: 24px 6px; text-align: center; }
.pedido-vacio p { margin-bottom: 16px; font-weight: 600; }
.linea-pedido { padding: 12px 0; border-bottom: 1px solid var(--linea-oscura); }
.linea-pedido .cab { display: flex; gap: 12px; align-items: flex-start; }
.linea-pedido img { width: 56px; height: 70px; object-fit: cover; object-position: top; background: var(--fondo-medio); flex: none; }
.linea-pedido .datos { flex: 1; min-width: 0; }
.linea-pedido strong { display: block; font-size: 15px; font-weight: 800; text-transform: uppercase; }
.linea-pedido .sub { font-size: 13px; }
.linea-pedido .quitar { min-height: 44px; padding: 0 6px; border: 0; background: none; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linea-pedido .tallas-pedido { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.linea-pedido .tp { display: flex; align-items: center; border: 1.5px solid var(--linea-oscura); }
.linea-pedido .tp b { padding: 0 4px 0 10px; font-size: 14px; }
.linea-pedido .tp .paso button { color: var(--tinta); }
.linea-pedido .tp .paso input { color: var(--tinta); background: rgba(255, 255, 255, .5); width: 36px; }
.linea-pedido .subtotal { margin-top: 6px; font-size: 13px; text-align: right; }
.niveles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.niveles span { padding: 6px 4px; font-size: 11px; text-align: center; border-top: 2px solid var(--linea-clara); }
.niveles span.activo { border-top: 4px solid var(--blanco); font-weight: 800; padding-top: 4px; }
.totales { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.totales b { font-size: 24px; font-weight: 800; }
.hoja-pie .pista { margin: 0 0 12px; }
.hoja-pie .acciones { display: grid; gap: 4px; }
.hoja-pie .enlace { justify-self: center; color: var(--blanco); }

/* Aviso breve */
.aviso {
  position: fixed; left: 50%; bottom: calc(var(--nav-alto) + 90px + var(--seguro-abajo)); z-index: 40;
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 2px;
  background: var(--tinta); color: var(--blanco); font-size: 14px; font-weight: 600;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity var(--rapido), transform var(--rapido) var(--curva);
}
.aviso.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tablet y computador ---------- */
@media (min-width: 768px) {
  .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 20px 24px 0; }
  .seccion { padding: 28px 24px 0; }
  .intro h1 { font-size: 34px; }
  
  .cabecera-cat .texto { padding: 8px 24px 0; }
  .diapo { aspect-ratio: 1 / 1; }
  .galeria-flecha { display: grid; }
  .hoja { margin: auto; border-radius: 12px; max-height: 86dvh; }
}
@media (min-width: 1024px) {
  .rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ficha-c { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); max-width: 1280px; margin: 0 auto; align-items: start; }
  .info.cabeza { padding: 34px 36px 24px; }
  .historia-cab { padding-inline: 36px; }
  .galeria { position: sticky; top: var(--barra-alto); }
  .diapo { aspect-ratio: 4 / 5; max-height: calc(100dvh - var(--barra-alto) - 60px); }
  .info.compra { padding: 10px 36px 40px; }
  .ficha { padding-bottom: 0; }
  .agregar { position: sticky; bottom: calc(var(--nav-alto) + var(--seguro-abajo)); margin: 26px -36px -40px; padding: 14px 36px; box-shadow: none; }
  .bienvenida > img { object-position: 50% 35%; }
  .bienvenida-c { max-width: 640px; }
  .hoja-pdf { padding: 24px; }
}
@media (min-width: 1440px) {
  .rejilla { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (hover: hover) {
  .tarjeta:hover { transform: translateY(-3px); }
  .chip:hover { border-color: var(--tinta); }
  .boton:hover { filter: brightness(1.06); }
}

/* Movimiento reducido: estado final sin desplazamientos */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .gigante { transform: none !important; }
}

/* Ajustes de botones largos en pantallas angostas */
.hoja-pie .boton, .pie-sitio .boton { font-size: 13px; letter-spacing: .06em; padding: 0 14px; }

/* El nombre gigante es decorativo: se pinta desde el atributo para que no cuente como texto */
.gigante::before { content: attr(data-texto); }

/* ---------- Barra de navegación inferior ---------- */
body.con-nav main { padding-bottom: calc(var(--nav-alto) + var(--seguro-abajo)); }
.barra-espacio { width: 44px; justify-self: end; }
.navegacion {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--nav-alto) + var(--seguro-abajo)); padding: 0 4px var(--seguro-abajo);
  background: var(--tinta); color: var(--blanco);
  box-shadow: 0 -4px 18px rgba(20, 28, 36, .2);
}
.nav-item {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 44px; border: 0; background: none; color: rgba(255, 255, 255, .86); text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.nav-item svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item .relleno { fill: currentColor; stroke: none; }
.nav-item[aria-current="page"] { color: var(--blanco); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 26%; right: 26%; height: 3px; background: var(--blanco); }
.nav-item.wa svg { color: #5BD18B; }
.nav-item .contador { top: 4px; right: calc(50% - 22px); background: var(--blanco); color: var(--tinta); }
.nav-item.latido svg { animation: latido 420ms var(--curva); }
@media (min-width: 768px) {
  .navegacion { left: 50%; right: auto; transform: translateX(-50%); width: min(560px, 100%); border-radius: 14px 14px 0 0; }
}

/* ---------- Peso de la tela sobre la foto ---------- */
.diapo.marca { container-type: inline-size; }
.gsm {
  position: absolute; z-index: 2; right: 5cqw; top: calc(var(--tope, 6%) + var(--tam, 40cqw) * .9);
  padding: .45em .75em; border-radius: 2px; background: var(--tinta); color: var(--blanco);
  font-family: var(--texto); font-weight: 800; font-size: max(11px, 3.6cqw); line-height: 1; letter-spacing: .08em; white-space: nowrap;
}
.lienzo { --tope: 5%; }
.lienzo .gsm { font-size: max(10px, 4.4cqw); }
.diapo.marca { --tope: 9%; }
.diapo.prenda-sola > img { height: 70%; bottom: 7%; }

/* ---------- Encabezado de la ficha ---------- */
.destacados { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.destacados li { padding: 6px 10px; border: 1.5px solid var(--linea-clara); font-size: 13px; font-weight: 600; }
.destacados li:first-child { background: var(--blanco); color: var(--tinta); border-color: var(--blanco); font-weight: 800; }
.desde-ficha { margin-top: 12px; font-size: 13px; }
.desde-ficha b { font-size: 18px; font-weight: 800; }

/* ---------- La prenda en detalle (cambia al hacer scroll) ---------- */
.historia { background: var(--panel-oscuro); color: var(--blanco); padding-top: 26px; }
.historia-cab { padding: 0 18px 14px; }
.historia-cab h2 { font-size: 20px; font-weight: 800; line-height: 1.2; margin-top: 4px; }
.historia-visual {
  position: sticky; top: calc(var(--barra-alto) + var(--seguro-arriba)); z-index: 2;
  height: clamp(260px, 42svh, 460px); overflow: hidden; container-type: inline-size; --tope: 6%;
  background: linear-gradient(180deg, #9AA3AB 0%, #828C96 100%);
}
.historia-visual .gigante {
  position: absolute; top: 6%; left: -2%; right: -2%; text-align: center; white-space: nowrap;
  font-family: var(--titulo); text-transform: uppercase; color: var(--pizarra); line-height: .9; font-size: var(--tam);
}
.lamina {
  position: absolute; inset: 16% 12% 5%; display: flex; justify-content: center; align-items: flex-start;
  transform-origin: 50% 0%; transition: transform 650ms var(--curva), opacity 400ms var(--curva);
}
.lamina img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(20, 28, 36, .25)); }
.hv-modelo {
  position: absolute; left: 50%; bottom: 0; height: 92%; width: auto; max-width: none;
  transform: translateX(-50%) translateY(12px); opacity: 0; transition: opacity 400ms var(--curva), transform 500ms var(--curva);
}
.hv-detalle {
  position: absolute; right: 5%; bottom: 7%; width: 36%; max-width: 190px; aspect-ratio: 1; margin: 0; overflow: hidden;
  border-radius: 50%; border: 3px solid var(--blanco); box-shadow: 0 10px 24px rgba(20, 28, 36, .35);
  opacity: 0; transform: scale(.8); transition: opacity 350ms var(--curva), transform 450ms var(--curva);
}
.hv-detalle img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hv-detalle.pdf { border-radius: 12px; }
.hv-detalle.pdf img { object-position: 50% 50%; }
.hv-punto {
  position: absolute; left: 50%; top: 28%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%;
  border: 2px solid var(--blanco); opacity: 0; transition: opacity 300ms;
}
.historia-visual .gsm { transition: transform 450ms var(--curva); transform-origin: 100% 0; }

.historia-visual[data-vista="cuello"] .lamina { transform: scale(2.2); }
.historia-visual[data-vista="cuello"] .hv-detalle { opacity: 1; transform: none; }
.historia-visual[data-vista="cuello"] .hv-punto { opacity: 1; animation: pulso 1.6s ease-out infinite; }
.historia-visual[data-vista="tela"] .lamina { transform: scale(1.9); transform-origin: 50% 55%; }
.historia-visual[data-vista="gramaje"] .gsm { transform: scale(1.7); }
.historia-visual[data-vista="fit"] .lamina { opacity: 0; transform: scale(.94); }
.historia-visual[data-vista="fit"] .hv-modelo { opacity: 1; transform: translateX(-50%); }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }

.historia-pasos { position: relative; z-index: 1; }
.paso-h {
  min-height: 58svh; padding: 22px 18px 28px;
  border-top: 1px solid rgba(255, 255, 255, .14); opacity: .55; transition: opacity 300ms;
}
.paso-h.activo { opacity: 1; }
.paso-h h3 { font-size: 24px; font-weight: 800; line-height: 1.15; margin: 6px 0 8px; text-wrap: balance; }
.paso-h p { font-size: 15px; max-width: 46ch; }
.paso-h .dato { margin-top: 10px; font-weight: 600; }
.paso-h .boton { margin-top: 16px; }
.minis.grandes { gap: 6px; margin: 4px 0 10px; }
.minis.grandes svg { width: 30px; height: 30px; }
.escala { margin-top: 16px; max-width: 360px; }
.escala-barra { position: relative; display: block; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgba(255, 255, 255, .35), var(--blanco)); }
.escala-marca { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--blanco); border: 4px solid var(--tinta); }
.escala-ext { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; }

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: 6px; }
.faq-item { background: rgba(255, 255, 255, .5); padding: 0 14px; }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; cursor: pointer; font-weight: 800; font-size: 15px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; font-weight: 400; flex: none; transition: transform var(--rapido); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 14px; font-size: 15px; }
#hoja-preguntas .hoja-pie .pista { margin: 0 0 10px; }

@media (prefers-reduced-motion: reduce) {
  .lamina, .hv-modelo, .hv-detalle, .historia-visual .gsm { transition: none !important; }
  .historia-visual[data-vista] .hv-punto { animation: none; }
}

/* Sin foto de prenda sola: se usa el modelo y no se acerca a la cara */
.historia-visual.sin-prenda .lamina { inset: 8% 8% 0; align-items: flex-end; }
.historia-visual.sin-prenda[data-vista="cuello"] .lamina { transform: none; }
.historia-visual.sin-prenda .hv-punto { display: none; }
.historia-visual.sin-prenda[data-vista="tela"] .lamina { transform: scale(1.7); transform-origin: 50% 62%; }
