/* ==========================================================================
   Catálogo Escribens — hoja de estilos
   Basada en el Manual de Identidad Corporativa de Escribens.
   Todo lo que define la marca vive en :root; cambiar aquí cambia todo.
   ========================================================================== */

:root {
  /* Paleta del manual */
  --diantree: #00263b;        /* azul base (Pantone 539 C) */
  --naranja: #fe5200;         /* International Orange (Orange 021 C) */
  --concreto: #f2f2f2;        /* Concrete (663 C) */
  --cologne: #00a1ab;         /* Eau de Cologne (7467 C) */
  --lonestar: #700000;        /* Lonestar (1815 C) */

  /* Apoyo derivado de la paleta */
  --blanco: #ffffff;
  --tinta: var(--diantree);
  --tinta-2: #4a5d69;
  --tinta-3: #8796a0;
  --filete: #dfe3e6;
  --diantree-2: #0b3550;      /* superficie sobre azul */
  --diantree-3: #1d4a66;      /* bordes sobre azul */

  /* Tipografía: el manual usa TT Hoves Pro. Si está instalada o con licencia web, se usa;
     si no, Plus Jakarta Sans (titulares y texto) y Barlow Semi Condensed (etiquetas). */
  --f-titulo: "TT Hoves Pro", "Plus Jakarta Sans", system-ui, sans-serif;
  --f-texto: "TT Hoves Pro", "Plus Jakarta Sans", system-ui, sans-serif;
  --f-etiqueta: "TT Hoves Pro Condensed", "Barlow Semi Condensed", "Arial Narrow", sans-serif;

  --barra-alto: 112px;
  --paginador-alto: 64px;
}

/* Color de sección: cada marca de producto usa un color del manual */
.sec--naranja  { --sec: var(--naranja);  --sec-txt: var(--blanco); }
.sec--lonestar { --sec: var(--lonestar); --sec-txt: var(--blanco); }
.sec--diantree { --sec: var(--diantree); --sec-txt: var(--blanco); }
.sec--cologne  { --sec: var(--cologne);  --sec-txt: var(--blanco); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #0d1f2b;
  background-image: radial-gradient(circle at 50% -10%, #12405c 0, #04141f 70%);
  background-attachment: fixed;
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--cologne); outline-offset: 2px; }

/* ---------- Barra superior ---------- */
.barra {
  position: sticky; top: 0; z-index: 20;
  background: var(--diantree); color: var(--blanco);
  border-bottom: 4px solid var(--naranja);
  box-shadow: 0 6px 24px rgb(0 0 0 / .35);
}
.barra__fila { display: flex; align-items: center; gap: 16px; max-width: 1480px; margin: 0 auto; padding: 12px 24px; }
.barra__fila--filtros { padding-top: 0; flex-wrap: wrap; row-gap: 8px; }
.barra__logo { flex: none; }
.barra__logo img { height: 36px; width: auto; }

.buscador {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--diantree-2); border: 1px solid var(--diantree-3);
  padding: 0 14px; height: 44px; max-width: 620px; margin-left: auto;
  transition: border-color .15s;
}
.buscador:focus-within { border-color: var(--naranja); }
.buscador svg { color: #8fb0c4; flex: none; }
.buscador input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--blanco); font-size: 15px; height: 100%; }
.buscador input::placeholder { color: #8fa6b4; }

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--f-titulo); font-weight: 800; font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
}
.boton--naranja { background: var(--naranja); color: var(--blanco); }
.boton--naranja:hover { background: #ff6d24; }
.boton--azul { background: var(--diantree); color: var(--blanco); }
.boton--azul:hover { background: var(--naranja); }
.boton--borde { background: transparent; color: var(--diantree); box-shadow: inset 0 0 0 2px var(--diantree); }
.boton--borde:hover { background: var(--concreto); }
.boton--wa { background: #1fa855; color: var(--blanco); }

.marcas { display: flex; gap: 4px; }
.marcas button {
  height: 34px; padding: 0 14px; cursor: pointer;
  background: transparent; color: #c4d3dc; border: 1px solid var(--diantree-3);
  font-family: var(--f-etiqueta); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
}
.marcas button:hover { color: var(--blanco); border-color: #3c6a87; }
.marcas button[aria-selected="true"] { background: var(--naranja); border-color: var(--naranja); color: var(--blanco); }

.selector select {
  height: 34px; padding: 0 34px 0 12px; cursor: pointer; appearance: none;
  background: var(--diantree-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fe5200' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  border: 1px solid var(--diantree-3); color: var(--blanco); font-size: 14px;
}
.conteo { margin: 0 0 0 auto; font-family: var(--f-etiqueta); font-weight: 500; font-size: 15px; color: #9fb6c4; letter-spacing: .02em; }
.conteo b { color: var(--blanco); font-weight: 700; }

/* ---------- Visor ---------- */
.visor {
  display: flex; justify-content: center; align-items: flex-start; gap: 28px;
  padding: 32px 24px calc(var(--paginador-alto) + 40px); outline: 0;
}
.visor .hoja { width: min(100%, 860px, calc((100vh - var(--barra-alto) - var(--paginador-alto) - 72px) * 210 / 297)); animation: entrar .35s ease both; }
.visor--doble .hoja { width: min(48%, 820px, calc((100vh - var(--barra-alto) - var(--paginador-alto) - 72px) * 210 / 297)); }
@keyframes entrar { from { transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .visor .hoja { animation: none; } }

/* ==========================================================================
   LA HOJA (A4). Todo en unidades cqw: 1cqw = 1% del ancho de la hoja,
   así la página se ve igual en pantalla y en el PDF.
   ========================================================================== */
.hoja {
  container-type: inline-size;
  position: relative; isolation: isolate;
  aspect-ratio: 210 / 297;
  background: var(--concreto);
  box-shadow: 0 24px 60px rgb(0 0 0 / .45);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Franja lateral de color con palabra gigante (recurso del manual) */
.hoja__franja {
  position: absolute; z-index: -1; top: 0; right: 0; bottom: 0; width: 15cqw;
  background: var(--sec);
  overflow: hidden;
}
.hoja__palabra {
  position: absolute; top: 0; bottom: 0; right: -3.2cqw;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-titulo); font-weight: 800; font-size: 19cqw; line-height: 1; letter-spacing: -.02em;
  text-transform: uppercase; white-space: nowrap; text-align: center;
  color: rgb(255 255 255 / .13);
}
.hoja__num {
  position: absolute; top: 4.6cqw; right: 0; width: 15cqw; text-align: center;
  font-family: var(--f-titulo); font-weight: 800; font-size: 4.8cqw; line-height: 1; color: var(--blanco);
}
.hoja__num small { display: block; margin-top: .8cqw; font-family: var(--f-etiqueta); font-weight: 600; font-size: 1.3cqw; letter-spacing: .14em; opacity: .75; }

/* Cabecera */
.hoja__cab {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqw;
  padding: 5.2cqw 19cqw 0 5cqw; height: 15cqw; flex: none;
}
.hoja__cab img { height: 6.2cqw; width: auto; }
.hoja__seccion { text-align: right; line-height: 1; min-width: 0; }
.hoja__eti { display: block; font-family: var(--f-etiqueta); font-weight: 600; font-size: 1.3cqw; letter-spacing: .16em; text-transform: uppercase; color: var(--tinta-2); }
.hoja__marca { display: block; margin-top: .6cqw; font-family: var(--f-titulo); font-weight: 800; font-size: 3.6cqw; text-transform: uppercase; color: var(--diantree); }
.hoja__cats {
  display: block; margin-top: .7cqw; max-width: 44cqw;
  font-family: var(--f-etiqueta); font-weight: 500; font-size: 1.35cqw; letter-spacing: .06em; text-transform: uppercase; color: var(--sec);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Rejilla 4 × 3 — la última columna monta sobre la franja, como en el manual */
.hoja__rejilla {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 1.8cqw; padding: 3.6cqw 7cqw 2.6cqw 5cqw;
}

/* Pie */
.hoja__pie {
  display: flex; align-items: center; gap: 2cqw; flex: none;
  height: 6.6cqw; margin: 0 19cqw 0 5cqw;
  border-top: .2cqw solid var(--diantree);
  font-family: var(--f-etiqueta); font-weight: 600; font-size: 1.3cqw; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2);
}
.hoja__pie img { height: 2.2cqw; width: auto; }
.hoja__pie span:last-child { margin-left: auto; }

/* ---------- Ficha de producto ---------- */
.prod {
  position: relative; display: flex; flex-direction: column; min-height: 0;
  background: var(--blanco); border: 0; padding: 0; text-align: left; cursor: pointer;
  box-shadow: 0 .3cqw 1cqw rgb(0 38 59 / .08);
  transition: transform .15s, box-shadow .15s;
}
.prod:hover { transform: translateY(-.4cqw); box-shadow: 0 1.4cqw 2.8cqw rgb(0 38 59 / .18); }
.prod:focus-visible { outline: .45cqw solid var(--naranja); outline-offset: .2cqw; }

.prod__foto { position: relative; flex: 1 1 auto; min-height: 0; display: grid; place-items: center; padding: 2.2cqw 1.4cqw .8cqw; }
.prod__foto img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.prod__fab {
  position: absolute; top: .9cqw; left: 1.3cqw;
  font-family: var(--f-etiqueta); font-weight: 700; font-size: 1.05cqw; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-3);
}
.prod__piezas {
  position: absolute; top: .7cqw; right: .7cqw;
  font-family: var(--f-etiqueta); font-weight: 700; font-size: 1.1cqw; letter-spacing: .04em; text-transform: uppercase;
  background: var(--concreto); color: var(--diantree); padding: .2cqw .7cqw;
}

.prod__info { flex: none; padding: 0 1.3cqw 1.3cqw; }
.prod__nombre {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-family: var(--f-titulo); font-size: 1.22cqw; line-height: 1.2; text-transform: uppercase; color: var(--diantree);
  min-height: calc(1.22cqw * 1.2 * 3);
}
.prod__nombre strong { display: block; font-weight: 800; font-size: 1.85cqw; line-height: 1.05; letter-spacing: -.01em; }
.prod__nombre span { font-weight: 400; }

/* Pestaña de código: sale del borde izquierdo, como "COD: ESC-TAL-0126" */
.prod__cod {
  display: block; width: max-content; max-width: calc(100% + 1.3cqw);
  margin: .8cqw 0 0 -1.3cqw; padding: .45cqw 1.3cqw .4cqw;
  background: var(--sec); color: var(--sec-txt);
  font-family: var(--f-etiqueta); font-weight: 700; font-size: 1.12cqw; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.prod__datos { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1cqw; margin-top: 1cqw; }
.prod__dato { min-width: 0; }
.prod__dato small {
  display: block; font-family: var(--f-etiqueta); font-weight: 500; font-size: .95cqw; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2);
}
.prod__dato b {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  margin-top: .15cqw; min-height: calc(1.32cqw * 1.15 * 2);
  font-family: var(--f-titulo); font-weight: 800; font-size: 1.32cqw; line-height: 1.15; color: var(--sec);
}

/* ---------- Portada ---------- */
.hoja--portada { background: var(--diantree); color: var(--blanco); }
.portada { position: relative; flex: 1; display: flex; flex-direction: column; padding: 8cqw 8cqw 7cqw; min-height: 0; }
.portada__simbolo { position: absolute; z-index: -1; right: -14cqw; top: -6cqw; width: 78cqw; opacity: .08; filter: grayscale(1) brightness(3); }
.portada__logo { width: 62cqw; }
.portada__titulo {
  margin: 9cqw 0 0; font-family: var(--f-titulo); font-weight: 800; font-size: 8.4cqw; line-height: .95; letter-spacing: -.02em; text-transform: uppercase;
}
.portada__titulo span { display: block; font-weight: 400; font-size: 5.4cqw; letter-spacing: 0; }
.portada__edicion {
  display: inline-block; align-self: flex-start; margin-top: 2.6cqw; padding: .8cqw 2.4cqw .7cqw;
  background: var(--naranja); font-family: var(--f-etiqueta); font-weight: 700; font-size: 1.9cqw; letter-spacing: .12em; text-transform: uppercase;
}
.portada__marcas { flex: 1; min-height: 0; display: grid; grid-template-rows: repeat(3, 1fr); gap: 2cqw; margin: 6cqw 0 5cqw; }
.portada__marca { position: relative; display: block; overflow: hidden; border-left: 1.4cqw solid var(--sec); background: var(--diantree-2); }
.portada__marca img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.portada__marca:hover img { transform: scale(1.04); }
.portada__marca span {
  position: absolute; left: 0; bottom: 0; padding: .7cqw 1.8cqw .6cqw; background: var(--sec); color: var(--sec-txt);
  font-family: var(--f-etiqueta); font-weight: 700; font-size: 1.5cqw; letter-spacing: .12em; text-transform: uppercase;
}
.portada__datos {
  display: flex; gap: 5cqw; padding-top: 2.6cqw; border-top: .2cqw solid rgb(255 255 255 / .25);
  font-family: var(--f-etiqueta); font-weight: 500; font-size: 1.6cqw; letter-spacing: .1em; text-transform: uppercase; color: #a9c0ce;
}
.portada__datos b { display: block; font-family: var(--f-titulo); font-weight: 800; font-size: 4.2cqw; letter-spacing: -.01em; color: var(--naranja); }

/* ---------- Índice ---------- */
.indice { flex: 1; display: flex; flex-direction: column; padding: 2cqw 19cqw 2cqw 5cqw; min-height: 0; }
.indice__titulo { margin: 0 0 3.4cqw; font-family: var(--f-titulo); font-weight: 800; font-size: 6.4cqw; line-height: .95; text-transform: uppercase; color: var(--diantree); }
.indice__titulo span { display: block; font-weight: 400; font-size: 4cqw; }
.indice__marca { margin-bottom: 2.8cqw; }
.indice__marca h3 {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 0 .6cqw; padding: .9cqw 1.4cqw .8cqw; background: var(--sec); color: var(--sec-txt);
  font-family: var(--f-titulo); font-weight: 800; font-size: 2.1cqw; text-transform: uppercase;
}
.indice__marca h3 small { font-family: var(--f-etiqueta); font-weight: 600; font-size: 1.3cqw; letter-spacing: .1em; }
.indice__marca ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 3cqw; }
.indice__marca li { break-inside: avoid; }
.indice__marca a {
  display: flex; align-items: baseline; gap: .8cqw; padding: .55cqw 0;
  border-bottom: .12cqw solid var(--filete); color: var(--diantree); text-decoration: none;
  font-size: 1.4cqw; line-height: 1.2;
}
.indice__marca a:hover { color: var(--naranja); }
.indice__marca a i { flex: 1; border-bottom: .15cqw dotted #b9c3c9; transform: translateY(-.35cqw); }
.indice__marca a b { font-family: var(--f-titulo); font-weight: 800; font-size: 1.5cqw; color: var(--sec); }
.indice__marca a small { font-family: var(--f-etiqueta); color: var(--tinta-3); font-size: 1.2cqw; }
.indice__nota { margin: auto 0 0; padding: 1.4cqw 1.8cqw; background: var(--blanco); border-left: .7cqw solid var(--naranja); font-size: 1.35cqw; color: var(--tinta-2); }

/* ---------- Sin resultados ---------- */
.vacio { flex: 1; display: grid; place-content: center; text-align: center; padding: 8cqw 22cqw 8cqw 8cqw; }
.vacio h2 { font-family: var(--f-titulo); font-weight: 800; font-size: 5cqw; margin: 0 0 1.6cqw; text-transform: uppercase; color: var(--diantree); }
.vacio p { font-size: 2cqw; color: var(--tinta-2); margin: 0; }

/* ---------- Paginador ---------- */
.paginador {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 15;
  display: flex; align-items: center; gap: 4px; padding: 6px;
  background: var(--diantree); color: var(--blanco); box-shadow: 0 10px 30px rgb(0 0 0 / .5);
  border-bottom: 3px solid var(--naranja);
}
.paginador__btn { width: 44px; height: 44px; display: grid; place-items: center; border: 0; cursor: pointer; background: var(--diantree-2); color: var(--blanco); }
.paginador__btn:hover:not(:disabled) { background: var(--naranja); }
.paginador__btn:disabled { opacity: .35; cursor: default; }
.paginador__actual { display: flex; align-items: center; gap: 6px; padding: 0 10px; white-space: nowrap; font-family: var(--f-etiqueta); font-weight: 600; font-size: 17px; color: #9fb6c4; }
.paginador__actual input {
  width: 3.4em; height: 36px; text-align: center; background: var(--diantree-2); border: 1px solid var(--diantree-3); color: var(--blanco);
  font-family: var(--f-titulo); font-weight: 800; font-size: 16px; -moz-appearance: textfield;
}
.paginador__actual input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- Ficha ampliada ---------- */
.ficha {
  width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; background: var(--concreto); color: var(--diantree);
  box-shadow: 0 30px 80px rgb(0 0 0 / .6);
}
.ficha::backdrop { background: rgb(0 20 32 / .8); backdrop-filter: blur(3px); }
.ficha__cerrar { position: absolute; top: 0; right: 0; z-index: 2; margin: 0; }
.ficha__cerrar button { width: 48px; height: 48px; border: 0; cursor: pointer; background: var(--diantree); color: var(--blanco); font-size: 28px; line-height: 1; }
.ficha__cerrar button:hover { background: var(--naranja); }
.ficha__cuerpo { position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; isolation: isolate; }
.ficha__franja { position: absolute; z-index: -1; top: 0; bottom: 0; left: 38%; width: 16%; background: var(--sec); overflow: hidden; }
.ficha__franja span {
  position: absolute; top: 0; bottom: 0; left: -10%; writing-mode: vertical-rl; transform: rotate(180deg);
  font-family: var(--f-titulo); font-weight: 800; font-size: 150px; line-height: 1; text-transform: uppercase; color: rgb(255 255 255 / .14); white-space: nowrap;
}
.ficha__foto { display: grid; place-items: center; padding: 48px 24px 48px 40px; min-height: 460px; }
.ficha__foto img { max-height: 440px; width: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgb(0 38 59 / .25)); }
.ficha__datos { padding: 52px 44px 36px 32px; display: flex; flex-direction: column; background: var(--concreto); }
.ficha__eti { font-family: var(--f-etiqueta); font-weight: 600; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--tinta-2); }
.ficha__nombre { margin: 10px 0 0; font-family: var(--f-titulo); font-size: 22px; font-weight: 400; line-height: 1.15; text-transform: uppercase; }
.ficha__nombre strong { display: block; font-weight: 800; font-size: 40px; line-height: 1; letter-spacing: -.02em; }
.ficha__cod { display: inline-block; align-self: flex-start; margin: 16px 0 0 -32px; padding: 7px 32px 6px; background: var(--sec); color: var(--sec-txt); font-family: var(--f-etiqueta); font-weight: 700; font-size: 17px; letter-spacing: .04em; }
.ficha__specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 24px; margin: 26px 0 0; }
.ficha__specs div { padding-bottom: 12px; border-bottom: 1px solid #d6dbde; }
.ficha__specs dt { font-family: var(--f-etiqueta); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-2); }
.ficha__specs dd { margin: 4px 0 0; font-family: var(--f-titulo); font-weight: 800; font-size: 22px; line-height: 1.15; color: var(--sec); overflow-wrap: anywhere; }
.ficha__orig { margin: 20px 0 0; font-size: 14px; color: var(--tinta-2); }
.ficha__orig code { font-family: var(--f-etiqueta); font-size: 15px; color: var(--diantree); }
.ficha__acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 26px; }
.ficha__copiado { font-family: var(--f-etiqueta); font-weight: 700; color: var(--cologne); align-self: center; opacity: 0; transition: opacity .2s; }
.ficha__copiado.si { opacity: 1; }

.aviso { color: var(--blanco); text-align: center; padding: 40px; }
.impresion { display: none; }

/* ---------- Pantallas medianas ---------- */
@media (max-width: 980px) {
  :root { --barra-alto: 108px; }
  .barra__fila { padding: 10px 16px; gap: 10px; }
  .barra__logo img { height: 28px; }
  .conteo { width: 100%; margin: 0; order: 3; }
  .ficha__cuerpo { grid-template-columns: 1fr; }
  .ficha__franja { left: auto; right: 0; width: 22%; bottom: auto; height: 340px; }
  .ficha__franja span { font-size: 110px; }
  .ficha__foto { min-height: 0; height: 340px; padding: 28px 28% 20px 24px; }
  .ficha__foto img { max-height: 290px; }
  .ficha__datos { padding: 24px 20px 24px; }
  .ficha__cod { margin-left: -20px; padding-left: 20px; }
  .ficha__nombre strong { font-size: 30px; }
  .ficha__nombre { font-size: 18px; }
}

/* ---------- Móvil: la hoja se vuelve fluida, 2 columnas ---------- */
@media (max-width: 699px) {
  body { background: #04141f; }
  .barra__fila { flex-wrap: wrap; }
  .barra__logo img { height: 24px; }
  .buscador { order: 3; flex-basis: 100%; max-width: none; margin: 0; height: 42px; }
  .boton--naranja { margin-left: auto; height: 36px; padding: 0 12px; }
  .marcas { overflow-x: auto; max-width: 100%; }
  .marcas button { padding: 0 10px; font-size: 13px; }
  .selector { flex: 1; }
  .selector select { width: 100%; }
  .visor { padding: 0 0 calc(var(--paginador-alto) + 32px); }
  .visor .hoja, .visor--doble .hoja { width: 100%; }

  .hoja { aspect-ratio: auto; container-type: normal; box-shadow: none; }
  .hoja__franja { width: 56px; }
  .hoja__palabra { font-size: 84px; right: -14px; }
  .hoja__num { top: 22px; width: 56px; font-size: 20px; }
  .hoja__num small { font-size: 9px; margin-top: 4px; }
  .hoja__cab { flex-direction: column; align-items: flex-start; gap: 14px; height: auto; padding: 22px 72px 0 16px; }
  .hoja__cab img { height: 30px; }
  .hoja__seccion { text-align: left; }
  .hoja__eti { font-size: 11px; }
  .hoja__marca { font-size: 22px; margin-top: 4px; }
  .hoja__cats { font-size: 12px; max-width: none; white-space: normal; margin-top: 4px; }
  .hoja__rejilla { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; gap: 10px; padding: 18px 28px 16px 16px; }
  .hoja__pie { margin: 0 72px 0 16px; font-size: 10px; height: 44px; border-top-width: 2px; }
  .hoja__pie img { height: 16px; }

  .prod:hover { transform: none; }
  .prod__foto { aspect-ratio: 1; flex: none; padding: 22px 10px 6px; }
  .prod__fab { font-size: 9px; top: 7px; left: 10px; }
  .prod__piezas { font-size: 10px; top: 6px; right: 6px; padding: 1px 6px; }
  .prod__info { padding: 0 10px 11px; }
  .prod__nombre { font-size: 11px; min-height: calc(11px * 1.2 * 3); }
  .prod__nombre strong { font-size: 15px; }
  .prod__cod { font-size: 11px; margin: 7px 0 0 -10px; padding: 3px 10px; max-width: calc(100% + 10px); }
  .prod__datos { gap: 6px; margin-top: 8px; }
  .prod__dato small { font-size: 9px; }
  .prod__dato b { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }

  .portada { padding: 36px 22px 28px; }
  .portada__logo { width: 78%; }
  .portada__titulo { font-size: 34px; margin-top: 40px; }
  .portada__titulo span { font-size: 22px; }
  .portada__edicion { font-size: 12px; padding: 5px 12px 4px; margin-top: 14px; }
  .portada__marcas { gap: 10px; margin: 28px 0 24px; }
  .portada__marca { aspect-ratio: 886 / 319; border-left-width: 8px; }
  .portada__marca span { font-size: 11px; padding: 4px 10px; }
  .portada__datos { font-size: 11px; gap: 20px; padding-top: 14px; }
  .portada__datos b { font-size: 24px; }

  .indice { padding: 6px 72px 20px 16px; }
  .indice__titulo { font-size: 32px; margin-bottom: 18px; }
  .indice__titulo span { font-size: 20px; }
  .indice__marca { margin-bottom: 20px; }
  .indice__marca h3 { font-size: 16px; padding: 7px 10px; margin-bottom: 4px; }
  .indice__marca h3 small { font-size: 11px; }
  .indice__marca ol { columns: 1; }
  .indice__marca a { font-size: 14px; padding: 9px 0; gap: 6px; border-bottom-width: 1px; }
  .indice__marca a b { font-size: 14px; }
  .indice__marca a small { font-size: 11px; }
  .indice__marca a i { border-bottom-width: 1px; transform: translateY(-3px); }
  .indice__nota { font-size: 13px; padding: 12px 14px; border-left-width: 5px; margin-top: 10px; }

  .vacio { padding: 60px 80px 60px 24px; }
  .vacio h2 { font-size: 22px; }
  .vacio p { font-size: 15px; }
  .paginador { bottom: 10px; }
}

/* ---------- Impresión / PDF: una hoja A4 por página, 12 productos ---------- */
@page { size: A4; margin: 0; }
@media print {
  body { background: none; }
  .barra, .visor, .paginador, .ficha, noscript { display: none !important; }
  .impresion { display: block; }
  .impresion .hoja {
    width: 210mm; height: 297mm; aspect-ratio: auto; box-shadow: none;
    break-after: page; page-break-after: always;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .impresion .hoja:last-child { break-after: auto; page-break-after: auto; }
  .prod { break-inside: avoid; box-shadow: none; border: .12cqw solid var(--filete); }
}
