/* Kit-tools · Modelo 2 — sistema visual
   ------------------------------------------------------------------
   Idea: la web deja de ser un folleto y pasa a ser una herramienta.
   Buscador en la entrada, catálogo filtrable, solicitud que se va
   componiendo y paleta de comandos. Lo "moderno" sale de cómo se usa,
   no de degradados.

   - Fondo grafito con un punto de acero, no negro plano.
   - Un único acento: el naranja del logotipo. Solo para acciones y
     para el estado actual.
   - Archivo (con eje de anchura) para todo; IBM Plex Mono para datos.
   - Línea fina de 1 px como estructura, heredada del lenguaje de plano
     técnico del modelo 1.
   - Radios con jerarquía: panel 14 · tarjeta 10 · control 8 · chip pill.
   ------------------------------------------------------------------ */

:root {
  --bg: #0d1012;
  --bg-2: #111519;
  --surface: #161b1f;
  --raised: #1c2227;
  --line: rgba(214, 226, 235, 0.09);
  --line-2: rgba(214, 226, 235, 0.16);
  --line-3: rgba(214, 226, 235, 0.28);

  --text: #e8edf0;
  --muted: #a3adb4;   /* 8,4:1 sobre --bg */
  --faint: #7b868e;   /* 5,1:1 sobre --bg */

  --brand: #f39910;
  --brand-soft: #f6ae3f;
  --brand-ink: #14110a;
  --brand-wash: rgba(243, 153, 16, 0.12);
  --brand-line: rgba(243, 153, 16, 0.45);

  --r-panel: 14px;
  --r-card: 10px;
  --r-ctl: 8px;
  --r-pill: 999px;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 0.18s;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --bar-h: 64px;

  /* Rellenos sobre fondo oscuro (reposo · hover · contador) */
  --fill-1: rgba(255, 255, 255, 0.03);
  --fill-2: rgba(255, 255, 255, 0.055);
  --fill-3: rgba(255, 255, 255, 0.08);
  --grid-line: rgba(214, 226, 235, 0.06);
  --scrim: rgba(5, 7, 8, 0.62);
  --video-bg: #000;

  --danger: #e5664f;
  --danger-soft: #f08a76; /* texto de error sobre --bg */

  --shadow-panel: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  --shadow-dialog: 0 40px 100px -30px rgba(0, 0, 0, 0.9);
  --drop: rgba(0, 0, 0, 0.55); /* sombra de las piezas recortadas */
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; }
h1, h2 { font-stretch: 90%; text-wrap: balance; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }
kbd {
  font-family: var(--mono); font-size: 11px; line-height: 1;
  padding: 3px 5px; border-radius: 5px;
  border: 1px solid var(--line-2); background: var(--fill-1);
  color: var(--muted);
}
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

:focus-visible { outline: 2px solid var(--brand-soft); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand); color: var(--brand-ink); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: var(--r-ctl); font-weight: 600; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- tipografía de apoyo */
.label { font-family: var(--mono); font-size: 12.5px; color: var(--faint); letter-spacing: 0.01em; margin-bottom: 14px; }
.label--brand { color: var(--brand-soft); }
.link { color: var(--brand-soft); display: inline-flex; align-items: center; gap: 4px; border-bottom: 1px solid transparent; transition: border-color var(--fast) var(--ease); }
.link:hover { border-color: currentColor; }
.link .i { width: 14px; height: 14px; }
/* Un botón que se ve como enlace («Ver mi solicitud» en las respuestas) */
button.link { padding: 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: none; font: inherit; cursor: pointer; }

/* ---------------------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-ctl);
  font-size: 15px; font-weight: 560; white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn .i { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn--brand { background: var(--brand); color: var(--brand-ink); }
.btn--brand:hover { background: var(--brand-soft); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: var(--fill-1); }
.btn--ghost:hover { border-color: var(--line-3); background: var(--fill-2); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: transparent; color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--line-3); }

.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  background: var(--fill-3); color: var(--muted);
}
.count.has-items { background: var(--brand); color: var(--brand-ink); }
.count--inline { margin-left: 2px; }
.btn--brand .count--inline { background: color-mix(in srgb, var(--brand-ink) 18%, transparent); color: var(--brand-ink); }

/* Botón de añadir a la solicitud: estado en aria-pressed */
.add {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: transparent;
  font-family: var(--mono); font-size: 12.5px; color: var(--text); white-space: nowrap;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.add::before { content: "+"; font-size: 15px; line-height: 1; color: var(--brand-soft); }
.add:hover { border-color: var(--brand-line); background: var(--brand-wash); }
.add[aria-pressed="true"] { border-color: var(--brand-line); background: var(--brand-wash); color: var(--brand-soft); }
.add[aria-pressed="true"]::before { content: "✓"; font-size: 13px; }
.add__on { display: none; }
.add[aria-pressed="true"] .add__on { display: inline; }
.add[aria-pressed="true"] .add__off { display: none; }
.add--lg { height: 44px; padding: 0 18px; font-family: var(--font); font-size: 15px; font-weight: 560; }

/* ---------------------------------------------------------------- etiquetas y chips */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap;
}
a.tag:hover { color: var(--text); border-color: var(--line-3); }
.tag--brand { border-color: var(--brand-line); color: var(--brand-soft); background: var(--brand-wash); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chips--left { justify-content: flex-start; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 14px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 55%, transparent);
  font-size: 14px; color: var(--text);
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:hover { border-color: var(--line-3); background: var(--fill-2); }
.chip__n { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.chip[aria-pressed="true"], .chip[aria-current="page"] { border-color: var(--brand-line); background: var(--brand-wash); color: var(--brand-soft); }
.chip[aria-pressed="true"] .chip__n, .chip[aria-current="page"] .chip__n { color: var(--brand-soft); }

/* ---------------------------------------------------------------- barra superior */
.bar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.bar__in { display: flex; align-items: center; gap: 24px; height: var(--bar-h); }
.bar__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; white-space: nowrap; font-weight: 650; font-stretch: 88%; font-size: 19px; letter-spacing: -0.01em; }
.bar__brand img { width: auto; height: 26px; }
.bar__nav { display: flex; gap: 4px; margin-left: 8px; }
.bar__nav a { padding: 8px 12px; border-radius: var(--r-ctl); font-size: 14.5px; color: var(--muted); transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.bar__nav a:hover { color: var(--text); background: var(--fill-2); }
.bar__nav a[aria-current="page"] { color: var(--text); }
.bar__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.cmdk-open, .tray-open {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px;
  border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: var(--fill-1);
  font-size: 14px; color: var(--muted);
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.cmdk-open:hover, .tray-open:hover { color: var(--text); border-color: var(--line-3); }
.cmdk-open { min-width: 190px; }
.cmdk-open kbd { margin-left: auto; }
.bar__menu { display: none; width: 36px; height: 36px; place-items: center; border-radius: var(--r-ctl); border: 1px solid var(--line-2); background: transparent; color: var(--muted); }

/* En pantallas estrechas los botones se quedan en icono, pero el texto solo se
   oculta a la vista: con display:none el botón perdería su nombre accesible y
   el lector de pantalla diría solo "botón". Con seis apartados en el menú,
   el buscador se queda en icono antes y el menú se pliega a 900 px. */
@media (max-width: 1100px) {
  .bar__nav a { padding: 8px 10px; }
  .cmdk-open { min-width: 0; }
  .cmdk-open kbd { display: none; }
  .cmdk-open__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 900px) {
  .bar__menu { display: grid; }
  .tray-open__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bar__nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--bar-h);
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line-2);
  }
  .bar__nav.is-open { display: flex; }
  .bar__nav a { padding: 12px 0; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 16px; }
}

/* ---------------------------------------------------------------- portada */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(calc(100svh - var(--bar-h)), 900px);
  display: grid; align-items: center;
  padding-block: clamp(56px, 9vh, 96px);
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -3; opacity: 0.5; filter: saturate(0.75); }
/* Viñeta centrada: oscurece donde va el buscador y deja respirar el vídeo en los bordes */
.hero__veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 60% 55% at 50% 48%, color-mix(in srgb, var(--bg) 90%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, color-mix(in srgb, var(--bg) 25%, transparent) 100%),
    linear-gradient(to bottom, color-mix(in srgb, var(--bg) 20%, transparent) 0%, transparent 30%, transparent 70%, var(--bg) 100%);
}
/* Retícula de plano técnico, desvanecida hacia los bordes */
.hero__grid {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  /* En una máscara solo cuenta la opacidad: #000 no es un color de diseño */
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
.hero__in { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 1080px; }
/* Buscador y resultados comparten una columna algo más estrecha que los chips */
.hero .finder, .hero .results { max-width: 760px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 12px;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 60%, transparent);
  font-size: 13.5px; color: var(--muted); margin-bottom: 28px;
  transition: border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.pill:hover { color: var(--text); border-color: var(--brand-line); }
.pill .i { width: 14px; height: 14px; }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash); }
@media (max-width: 520px) {
  /* En pantallas estrechas la píldora puede ocupar dos líneas sin romperse */
  .pill { height: auto; min-height: 34px; padding: 7px 14px 7px 12px; line-height: 1.35; text-align: left; font-size: 13px; }
  .pill__dot { flex-shrink: 0; }
}
.hero__title { font-size: clamp(2.6rem, 6.2vw, 4.75rem); line-height: 1; font-stretch: 86%; font-weight: 620; letter-spacing: -0.025em; }
.hero__lede { max-width: 56ch; margin: 20px 0 32px; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.125rem); }

.finder {
  position: relative; display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 8px 8px 18px; border-radius: var(--r-panel);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 var(--fill-1) inset, var(--shadow-panel);
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.finder:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-wash), var(--shadow-panel); }
.finder > .i { color: var(--faint); width: 20px; height: 20px; }
.finder input {
  flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent;
  font-size: clamp(16px, 1.6vw, 18px); color: var(--text);
}
.finder input::placeholder { color: var(--faint); }
.finder input::-webkit-search-cancel-button { filter: invert(0.6); }
.finder__go { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 18px; border: 0; border-radius: 9px; background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 15px; }
.finder__go:hover { background: var(--brand-soft); }
.finder__go kbd { border-color: color-mix(in srgb, var(--brand-ink) 20%, transparent); background: color-mix(in srgb, var(--brand-ink) 10%, transparent); color: var(--brand-ink); }
.hero .chips { margin-top: 18px; }

@media (max-width: 560px) {
  .finder { flex-wrap: wrap; padding: 8px; }
  .finder > .i { display: none; }
  .finder input { flex-basis: 100%; padding-inline: 8px; }
  .finder__go { width: 100%; justify-content: center; }
}

/* Resultados del buscador */
.results {
  width: 100%; margin-top: 18px; text-align: left;
  border-radius: var(--r-panel); border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.res__parse { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.res__parse strong { font-weight: 500; color: var(--text); }
.res__close { margin-left: auto; }
.res__groups { max-height: min(56vh, 520px); overflow: auto; overscroll-behavior: contain; }
.res__group { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.res__group:last-child { border-bottom: 0; }
.res__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.res__head img { height: 22px; width: auto; opacity: 0.9; }
.res__head h3 { font-size: 15.5px; font-stretch: 92%; }
.res__head .link { margin-left: auto; font-size: 13px; }
.res__fam { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.res__fam:first-of-type { border-top: 0; }
.res__fam b { font-weight: 560; font-size: 14.5px; }
.res__fam span { grid-column: 1; font-size: 13.5px; color: var(--muted); }
.res__fam .add { grid-row: 1 / span 2; grid-column: 2; }
.res__none { padding: 22px 18px; color: var(--muted); }
.res__none strong { color: var(--text); font-weight: 560; }
.res__none .link { margin-top: 8px; }

/* Banda de logos */
.band { border-block: 1px solid var(--line); background: var(--bg-2); }
.band__in { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; padding-block: 30px; }
.band__t { font-size: 15px; color: var(--muted); font-stretch: 92%; }
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px 28px; align-items: center; }
.logos a { display: grid; place-items: center; height: 40px; }
.logos img { max-height: 30px; width: auto; max-width: 100%; opacity: 0.5; transition: opacity var(--fast) var(--ease); }
.logos a:hover img, .logos a:focus-visible img { opacity: 1; }
@media (max-width: 860px) {
  .band__in { grid-template-columns: 1fr; gap: 20px; }
  .logos { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------------- secciones */
.sec { padding-block: clamp(72px, 9vw, 120px); }
.sec--tight { padding-block: clamp(40px, 5vw, 64px); }
.sec--line { border-top: 1px solid var(--line); }
.sec__head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.sec__head h2 { font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
.sec__head p:not(.label) { margin-top: 14px; color: var(--muted); font-size: 1.05rem; max-width: 56ch; }

/* Pasos: esto sí es una secuencia, de ahí la numeración */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.step { background: var(--bg); padding: 28px 28px 32px; }
.step__n { display: block; font-family: var(--mono); font-size: 12.5px; color: var(--brand-soft); margin-bottom: 36px; }
.step h3 { font-size: 1.2rem; font-stretch: 92%; margin-bottom: 8px; }
.step p { color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .step__n { margin-bottom: 16px; } }

/* Rejilla de operaciones */
.ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.op { display: flex; flex-direction: column; gap: 10px; background: var(--bg); padding: 22px 22px 24px; min-height: 172px; transition: background-color var(--fast) var(--ease); }
a.op:hover { background: var(--surface); }
a.op:hover .op__name { color: var(--brand-soft); }
.op__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.op__name { font-size: 1.15rem; font-weight: 600; font-stretch: 90%; transition: color var(--fast) var(--ease); }
.op__n { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.op__fams { font-size: 14px; color: var(--muted); line-height: 1.5; }
.op__brands { margin-top: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); line-height: 1.5; }
@media (max-width: 1000px) { .ops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ops { grid-template-columns: 1fr; } .op { min-height: 0; } }

/* Bloque destacado texto + medio */
.feature { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.feature__text h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 18px; }
.feature__text p { color: var(--muted); margin-bottom: 18px; }
.feature__text .tags { margin: 6px 0 26px; }
.feature__media .film__frame { border-radius: var(--r-panel); }
.feature__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-panel); border: 1px solid var(--line); filter: saturate(0.85); }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } }

/* Vídeos */
.films { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.film { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--bg-2); }
.film__frame { position: relative; aspect-ratio: 16 / 9; background: var(--video-bg); overflow: hidden; border: 1px solid var(--line); }
.film .film__frame { border: 0; border-bottom: 1px solid var(--line); }
.film__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.film__body { padding: 18px 20px 22px; }
.film__brand { display: inline-block; font-family: var(--mono); font-size: 12px; color: var(--brand-soft); margin-bottom: 8px; }
.film__body h3 { font-size: 1.05rem; font-stretch: 94%; margin-bottom: 6px; }
.film__body p { font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .films { grid-template-columns: 1fr; } }

/* Datos */
.facts { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.facts > div { padding: 22px 24px; border-left: 1px solid var(--line); }
.facts > div:first-child { border-left: 0; }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-bottom: 10px; }
.facts dd { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 600; font-stretch: 86%; line-height: 1; letter-spacing: -0.02em; }
.facts dd small { display: block; margin-top: 8px; font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--faint); letter-spacing: 0; }
@media (max-width: 820px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts > div { border-left: 0; border-top: 1px solid var(--line); }
  .facts > div:nth-child(-n+2) { border-top: 0; }
  .facts > div:nth-child(even) { border-left: 1px solid var(--line); }
}

/* Cierre */
.close { border-top: 1px solid var(--line); background: linear-gradient(to bottom, var(--bg-2), var(--bg)); }
.close__in { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-block: clamp(56px, 7vw, 88px); }
.close h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); margin-bottom: 10px; }
.close p { color: var(--muted); max-width: 52ch; }
.close__actions { display: flex; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
@media (max-width: 820px) { .close__in { flex-direction: column; align-items: flex-start; } }

/* ---------------------------------------------------------------- cabecera de página */
.phead { padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 80% 120% at 0% 0%, color-mix(in srgb, var(--brand) 5%, transparent), transparent 60%); }
.phead--brand { padding-block: 20px 0; border-bottom: 0; background: none; }
.phead h1 { font-size: clamp(2.2rem, 5vw, 3.75rem); font-stretch: 86%; }
.phead__lede { margin-top: 16px; max-width: 62ch; color: var(--muted); font-size: 1.075rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-3); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--muted); }
.opnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

/* ---------------------------------------------------------------- catálogo */
.catalog { padding-block: 32px clamp(64px, 8vw, 104px); }
.cbar { display: grid; gap: 14px; margin-bottom: 24px; }
.cbar__search { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: var(--r-card); border: 1px solid var(--line-2); background: var(--bg-2); max-width: 520px; transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.cbar__search:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-wash); }
.cbar__search .i { color: var(--faint); }
.cbar__search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15.5px; }
.cbar__search input::placeholder { color: var(--faint); }
.cbar__count { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }

.blist { border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.brow {
  display: grid; grid-template-columns: 150px 1fr 170px 44px; gap: 24px; align-items: center;
  padding: 22px 24px; border-top: 1px solid var(--line); background: var(--bg);
  transition: background-color var(--fast) var(--ease);
}
.brow:first-child { border-top: 0; }
.brow:hover { background: var(--bg-2); }
.brow[hidden] { display: none; }
.brow__logo { display: grid; place-items: center start; height: 44px; }
.brow__logo img { max-height: 32px; width: auto; opacity: 0.75; transition: opacity var(--fast) var(--ease); }
.brow:hover .brow__logo img { opacity: 1; }
.brow__name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 1.2rem; font-stretch: 90%; margin-bottom: 6px; }
.brow__name a:hover { color: var(--brand-soft); }
.brow__main p { color: var(--muted); font-size: 14.5px; margin-bottom: 12px; max-width: 64ch; }
.brow__meta { display: grid; gap: 8px; margin: 0; }
.brow__meta div { display: flex; justify-content: space-between; gap: 12px; }
.brow__meta dt { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.brow__meta dd { margin: 0; font-size: 13.5px; text-align: right; }
.brow__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctl); border: 1px solid var(--line-2); color: var(--muted); transition: all var(--fast) var(--ease); }
.brow:hover .brow__go { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); }
.blist--compact .brow { grid-template-columns: 130px 1fr 44px; }
.blist--compact .brow__meta { display: none; }
@media (max-width: 900px) {
  .brow, .blist--compact .brow { grid-template-columns: 1fr 40px; gap: 14px 16px; }
  .brow__logo { grid-column: 1 / -1; height: 32px; }
  .brow__logo img { max-height: 26px; }
  .brow__main { grid-column: 1; }
  .brow__meta { display: none; }
  .brow__go { grid-column: 2; grid-row: 2; align-self: start; }
}
.empty { padding: 36px 24px; border: 1px dashed var(--line-2); border-radius: var(--r-panel); text-align: center; color: var(--muted); }
.empty p { max-width: 52ch; margin: 0 auto 18px; }
.empty strong { color: var(--text); font-weight: 560; }

/* ---------------------------------------------------------------- ficha de marca */
.brand { padding-block: 12px clamp(56px, 7vw, 96px); }
.brand__in { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(32px, 6vw, 80px); align-items: start; }
.brand__logo { display: flex; align-items: center; height: 56px; margin-bottom: 28px; }
.brand__logo img { max-height: 48px; width: auto; }
.brand__main h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-stretch: 86%; margin-bottom: 16px; }
.brand__lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.45; color: var(--text); margin-bottom: 20px; max-width: 46ch; font-stretch: 96%; }
.brand__main > p:not(.brand__lede):not(.label) { color: var(--muted); margin-bottom: 14px; max-width: 64ch; }
.brand__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.prose p { margin-bottom: 16px; }
@media (max-width: 960px) { .brand__in { grid-template-columns: 1fr; } }

.spec { border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2); overflow: hidden; }
.spec--sticky { position: sticky; top: calc(var(--bar-h) + 24px); }
.spec__t { padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--faint); letter-spacing: 0.01em; }
.spec dl { margin: 0; }
.spec dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 13px 20px; border-top: 1px solid var(--line); }
.spec dl > div:first-child { border-top: 0; }
.spec dt { font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 2px; }
.spec dd { margin: 0; font-size: 14.5px; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 960px) { .spec--sticky { position: static; } }

/* Familias */
.fams { border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.fam { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px 24px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--line); background: var(--bg); }
.fam:first-child { border-top: 0; }
.fam h3 { font-size: 1.02rem; font-stretch: 94%; margin-bottom: 4px; }
.fam p { color: var(--muted); font-size: 14px; }
.fams--tight { border: 0; border-radius: 0; }
.fams--tight .fam { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 0; background: transparent; }
@media (max-width: 720px) {
  .fam { grid-template-columns: 1fr auto; }
  .fam .tags { grid-column: 1 / -1; grid-row: 2; }
}

/* Grupos por marca (páginas de operación) */
.groups { display: grid; gap: 20px; }
.group { border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px 24px 8px; background: var(--bg); }
.group__head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.group__logo img { height: 26px; width: auto; opacity: 0.8; }
.group__head h2 { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-stretch: 90%; }
.group__head h2 a:hover { color: var(--brand-soft); }
.group__meta { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* ---------------------------------------------------------------- contacto */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; gap: 22px; }
.req { margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2); overflow: hidden; }
.req legend { float: left; width: 100%; padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.req__list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); }
.req__list li:first-child { border-top: 0; }
.req__list b { font-weight: 560; font-size: 15px; }
.req__list span { grid-column: 1; font-size: 13px; color: var(--muted); }
.req__list .icon-btn { grid-row: 1 / span 2; grid-column: 2; width: 32px; height: 32px; }
.req__empty { clear: both; padding: 16px 20px; color: var(--muted); font-size: 14.5px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-size: 14px; font-weight: 520; }
.opt { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--faint); margin-left: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--bg-2); font-size: 15.5px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.field textarea { resize: vertical; line-height: 1.5; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-wash); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: 13px; color: var(--faint); }
.err { font-size: 13.5px; color: var(--danger-soft); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--muted); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); }
.form__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact__main { min-width: 0; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.form__fallo { padding: 14px 18px; border: 1px solid color-mix(in srgb, var(--danger) 55%, transparent); border-radius: var(--r-card); background: color-mix(in srgb, var(--danger) 8%, transparent); font-size: 14.5px; color: var(--muted); }
.form__fallo b { color: var(--text); font-weight: 600; }
/* Solicitud enviada: ocupa el sitio del formulario. */
.enviada { display: grid; gap: 14px; padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2); }
.form[hidden], .enviada[hidden] { display: none; }
.enviada:focus { outline: none; }
.enviada__t { font-size: clamp(1.75rem, 3.4vw, 2.4rem); }
.enviada p { color: var(--muted); max-width: 60ch; }
.enviada p b { color: var(--text); font-weight: 560; }
.enviada__k { margin-top: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.enviada__lista li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.enviada__lista li:last-child { border-bottom: 1px solid var(--line); }
.enviada__lista b { font-weight: 560; }
.enviada__lista span { color: var(--muted); font-size: 13.5px; }
.enviada__msg { white-space: pre-line; }

/* Aviso legal y privacidad: texto para leer. */
.legal { max-width: 68ch; }
.legal h2 { margin: 36px 0 12px; font-size: 1.3rem; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin-bottom: 12px; }
.legal b { color: var(--text); font-weight: 560; }
.legal ul { margin-bottom: 12px; padding-left: 1.2em; list-style: disc; }
.legal li { margin-bottom: 8px; padding-left: 4px; }
.legal dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 24px; margin: 16px 0; }
.legal dt { color: var(--faint); }
.legal dd { margin: 0; }
.legal__fecha { margin-top: 36px; font-size: 13px; color: var(--faint); }
@media (max-width: 520px) { .legal dl { grid-template-columns: 1fr; gap: 2px; } .legal dd { margin-bottom: 10px; } }

/* ---------------------------------------------------------------- pie */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 14px; }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1.4fr; gap: 32px; padding-block: 56px 40px; }
.foot__brand img { width: auto; height: 30px; margin-bottom: 14px; }
.foot__brand strong { color: var(--text); font-weight: 560; }
.foot__t { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--faint); margin-bottom: 12px; letter-spacing: 0.01em; }
.foot a:hover { color: var(--text); }
.foot__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-block: 20px 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.foot__cmp { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--brand-soft); }
.foot__cmp .i { width: 14px; height: 14px; }
@media (max-width: 900px) { .foot__in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot__in { grid-template-columns: 1fr; } .foot__cmp { margin-left: 0; } }

/* ---------------------------------------------------------------- diálogos */
dialog { padding: 0; border: 0; background: transparent; color: var(--text); max-width: none; max-height: none; }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.cmdk { width: min(640px, calc(100vw - 32px)); margin: 12vh auto auto; }
.cmdk__box { border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2); box-shadow: var(--shadow-dialog); overflow: hidden; }
.cmdk__head { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk__head .i { color: var(--faint); }
.cmdk__head input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; font-size: 17px; }
.cmdk__head input::placeholder { color: var(--faint); }
.cmdk__list { max-height: min(52vh, 440px); overflow: auto; padding: 6px; overscroll-behavior: contain; }
.cmdk__group { padding: 10px 12px 6px; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.cmdk__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-ctl); cursor: pointer; font-size: 15px; }
.cmdk__item small { font-size: 13px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk__item .cmdk__type { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.cmdk__item[aria-selected="true"] { background: var(--surface); box-shadow: inset 2px 0 0 var(--brand); }
.cmdk__item[aria-selected="true"] .cmdk__type { color: var(--brand-soft); }
.cmdk__empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14.5px; }
.cmdk__foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
.cmdk__foot kbd { margin-right: 3px; }
@media (max-width: 560px) { .cmdk { margin-top: 8px; } .cmdk__foot { display: none; } }

.tray { margin: 0 0 0 auto; height: 100dvh; width: min(440px, 100vw); }
.tray__panel { display: flex; flex-direction: column; height: 100%; background: var(--bg-2); border-left: 1px solid var(--line-2); }
.tray__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.tray__head h2 { font-size: 1.3rem; font-stretch: 90%; }
.tray__hint { padding: 14px 20px 0; font-size: 13.5px; color: var(--faint); }
.tray__list { flex: 1; overflow: auto; padding: 10px 12px; }
.tray__item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.tray__item b { font-weight: 560; font-size: 15px; }
.tray__item span { grid-column: 1; font-size: 13px; color: var(--muted); }
.tray__item .icon-btn { grid-row: 1 / span 2; grid-column: 2; width: 32px; height: 32px; }
.tray__empty { flex: 1; padding: 32px 20px; color: var(--muted); }
.tray__empty .link { margin-top: 10px; }
.tray__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px 20px; border-top: 1px solid var(--line); }

/* Apertura de diálogos (solo con movimiento permitido) */
@media (prefers-reduced-motion: no-preference) {
  .cmdk[open] .cmdk__box { animation: kt-pop 0.2s var(--ease); }
  .tray[open] .tray__panel { animation: kt-slide 0.28s var(--ease); }
  dialog[open]::backdrop { animation: kt-fade 0.2s var(--ease); }
}
@keyframes kt-pop { from { opacity: 0; transform: translateY(-8px) scale(0.985); } }
@keyframes kt-slide { from { transform: translateX(24px); opacity: 0; } }
@keyframes kt-fade { from { opacity: 0; } }

/* ---------------------------------------------------------------- movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .hero__video { display: none; }
  .hero { background: var(--bg) url("/images/photos/corte-cnc.jpg") center / cover no-repeat; }
  .hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: color-mix(in srgb, var(--bg) 72%, transparent); }
}

/* ---------------------------------------------------------------- fuentes
   Patrón de "fuentes" de los motores de respuesta (Morphic, AI Sources de
   21st): lista numerada de citas que se despliegan en el sitio. Con
   <details> nativo: teclado y lector de pantalla sin JavaScript. */
.sources { display: grid; gap: 8px; max-width: 860px; counter-reset: none; }
.source { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--bg); transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease); }
.source:hover { border-color: var(--line-2); }
.source[open] { border-color: var(--line-2); background: var(--bg-2); }
.source summary {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 16px; gap: 14px; align-items: center;
  padding: 14px 16px; cursor: pointer; list-style: none;
}
.source summary::-webkit-details-marker { display: none; }
.source summary::after {
  content: ""; width: 8px; height: 8px; justify-self: center;
  border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint);
  transform: rotate(45deg) translateY(-2px); transition: transform var(--fast) var(--ease);
}
.source[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.source__n {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px;
  border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11.5px; color: var(--brand-soft);
}
.source__t { font-size: 15px; font-weight: 520; min-width: 0; }
.source__host { font-family: var(--mono); font-size: 12px; color: var(--faint); white-space: nowrap; }
.source__body { padding: 0 16px 16px 58px; }
.source__body p { color: var(--muted); font-size: 14.5px; margin-bottom: 10px; max-width: 70ch; }
.source__k { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-right: 8px; }
.source__body .link { font-size: 14px; }
@media (max-width: 600px) {
  .source summary { grid-template-columns: 24px minmax(0, 1fr) 16px; gap: 10px; }
  .source__host { grid-column: 2; grid-row: 2; }
  .source__body { padding-left: 50px; }
}

/* Fuentes resumidas en los resultados del buscador */
.res__src { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.res__src a { color: var(--muted); border-bottom: 1px solid var(--line-2); }
.res__src a:hover { color: var(--text); border-color: var(--line-3); }

/* ---------------------------------------------------------------- material de producto
   Renders recortados a fondo transparente: Media Bank de Dormer Pramet y
   fichas de producto de Comand Tool. */

/* Lámina de muestras: cuadrícula de línea fina, como una hoja técnica */
.feature--specimen { grid-template-columns: 5fr 6fr; }
.specimens {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden;
}
.specimen { margin: 0; display: flex; flex-direction: column; background: var(--bg); }
.specimen__img {
  position: relative; aspect-ratio: 1 / 1;
  background: radial-gradient(circle at 50% 55%, var(--raised) 0%, var(--bg) 70%);
}
/* La imagen va fuera del flujo: si no, una pieza alta (una broca) estira su
   celda y rompe la cuadrícula. La caja manda; la imagen se ajusta dentro. */
.specimen__img img {
  position: absolute; inset: 12%; width: 76%; height: 76%; object-fit: contain;
  filter: drop-shadow(0 18px 24px var(--drop));
}
.specimen figcaption { display: flex; gap: 10px; align-items: baseline; padding: 12px 16px 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.specimen__ref { font-family: var(--mono); font-size: 12px; color: var(--brand-soft); }
@media (max-width: 900px) { .feature--specimen { grid-template-columns: 1fr; } }

/* La lámina con su pie: de dónde son las imágenes */
.sheet { margin: 0; }
.sheet__cap a { color: var(--muted); border-bottom: 1px solid var(--line-2); transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.sheet__cap a:hover { color: var(--text); border-color: var(--line-3); }

/* Bloque en espejo: en escritorio la lámina pasa a la izquierda. El orden del
   documento no cambia (texto primero), así el móvil y el teclado siguen igual. */
@media (min-width: 901px) {
  .feature--rev { grid-template-columns: 6fr 5fr; }
  .feature--rev > :first-child { grid-column: 2; grid-row: 1; }
  .feature--rev > :last-child { grid-column: 1; grid-row: 1; }
}

/* Galería de modelos de una familia (ficha de marca). 4 o 2 columnas, nunca 3:
   con 8 modelos, 3 columnas dejarían una celda vacía del color de la línea. */
.specimens--gal { grid-template-columns: repeat(4, 1fr); }
.specimen__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center;
  padding: 12px 16px 14px; border-top: 1px solid var(--line);
}
.specimen__foot .specimen__ref { grid-column: 1; }
.specimen__dato { grid-column: 1; font-size: 13.5px; color: var(--muted); }
.specimen__foot .add { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 1000px) { .specimens--gal { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .specimen__foot { grid-template-columns: minmax(0, 1fr); }
  .specimen__foot .add { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 10px; }
}

/* De la fila de una familia a su galería de modelos */
.fam__more { margin-top: 8px; font-family: var(--mono); font-size: 12.5px; }

/* Para qué usa Kit-tools cada marca */
.brow__ref { font-family: var(--mono); font-size: 12px; color: var(--brand-soft); margin: -2px 0 8px !important; }
.spec__ref { color: var(--brand-soft); }

/* Fotografía de aplicación a todo lo ancho */
.shot { padding-bottom: clamp(48px, 6vw, 80px); }
.shot__fig { margin: 0; }
/* Una foto vertical a todo lo ancho medía más que la pantalla: se recorta a
   una altura máxima. */
.shot__fig img { width: 100%; height: auto; max-height: min(72vh, 640px); object-fit: cover; border-radius: var(--r-panel); border: 1px solid var(--line); }

/* Empresa: las instalaciones (el vídeo en cámara rápida, alto, y cuatro fotos) */
.sede { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 14px; }
.sede figure { margin: 0; }
.sede__clip { grid-row: span 3; display: grid; grid-template-rows: minmax(0, 1fr) auto; }   /* el vídeo, a lo alto de las 6 fotos (3 filas de 2) */
.sede__marco { position: relative; min-height: 0; border-radius: var(--r-panel); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.sede__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sede__foto img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-panel); border: 1px solid var(--line); }
.sede figcaption { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.sede__cred { margin-top: 14px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.sede__mapa { margin-top: 22px; }
@media (max-width: 760px) {
  .sede { grid-template-columns: 1fr 1fr; }
  .sede__clip { grid-column: 1 / -1; grid-row: auto; }
  .sede__marco { aspect-ratio: 4 / 5; }
}
.shot__fig figcaption, .sheet__cap { margin-top: 10px; font-family: var(--mono); font-size: 12px; color: var(--faint); }

/* Familias con imagen */
.fam--img { grid-template-columns: 104px minmax(0, 1fr) auto auto; }
.fams--tight .fam--img { grid-template-columns: 88px minmax(0, 1fr) auto; }
.fam__img {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  border-radius: var(--r-card); background: radial-gradient(circle at 50% 55%, var(--raised) 0%, var(--bg-2) 72%);
  border: 1px solid var(--line);
}
.fam__img img {
  position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain;
  filter: drop-shadow(0 8px 10px var(--drop));
}
@media (max-width: 720px) {
  .fam--img { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .fam--img .tags { grid-column: 2 / -1; grid-row: 2; }
  .fams--tight .fam--img { grid-template-columns: 64px minmax(0, 1fr) auto; }
}

/* Miniatura en los resultados del buscador */
.res__fam.has-img { grid-template-columns: 44px minmax(0, 1fr) auto; }
.res__fam.has-img b, .res__fam.has-img span { grid-column: 2; }
.res__fam.has-img .add { grid-column: 3; grid-row: 1 / span 2; }
.res__img {
  grid-row: 1 / span 2; grid-column: 1; width: 44px; height: 44px; object-fit: contain; padding: 4px;
  border-radius: var(--r-ctl); background: var(--raised); border: 1px solid var(--line);
}

/* En una lista con imágenes, las familias sin imagen dejan el hueco de la
   columna para que los textos queden alineados. */
.fams { --fam-img: 104px; --fam-gap: 24px; }
.fams--tight { --fam-img: 88px; }
.fams:has(.fam--img) .fam:not(.fam--img) { padding-left: calc(22px + var(--fam-img) + var(--fam-gap)); }
.fams--tight:has(.fam--img) .fam:not(.fam--img) { padding-left: calc(var(--fam-img) + var(--fam-gap)); }
@media (max-width: 720px) {
  .fams { --fam-img: 72px; --fam-gap: 16px; }
  .fams--tight { --fam-img: 64px; }
}

/* ================================================================ modelo 3
   Tipos de producto en vez de familias con referencias. Tarjetas que leen
   designaciones normalizadas y caja para añadir cualquier referencia. */

/* Rejillas de productos. Con la línea de 1 px como fondo, una celda vacía se
   vería gris: por eso cada rejilla tiene un número de columnas que divide
   exacto a sus casillas (10 → 5 o 2; 9 y 3 → 3 o 1; 4 → 4 o 2). */
.ops__t { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--faint); margin: 0 0 12px; }
.ops + .ops__t { margin-top: 32px; }
.ops--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ops--5 .op { padding: 20px 18px 22px; }
/* En columnas estrechas, el recuento baja bajo el nombre si no cabe al lado */
.ops--5 .op__top { flex-wrap: wrap; row-gap: 2px; }
.op__name { overflow-wrap: break-word; }
.ops--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .ops--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .ops--3 { grid-template-columns: 1fr; } .ops--3 .op { min-height: 0; } }
@media (max-width: 560px) { .ops--5 { grid-template-columns: 1fr; } .ops--5 .op { min-height: 0; } }

/* Índice de productos: filas de tipo (sin logo) */
.brow--tipo { grid-template-columns: minmax(0, 1fr) 170px 44px; }
.brow__grupo { font-family: var(--mono); font-size: 12px; color: var(--faint); margin-bottom: 6px !important; }
.brow__brands { font-family: var(--mono); font-size: 12px; color: var(--faint) !important; line-height: 1.6; }
@media (max-width: 900px) {
  .brow--tipo { grid-template-columns: minmax(0, 1fr) 40px; }
  .brow--tipo .brow__go { grid-row: 1; align-self: center; }
}

/* Marcas dentro de un tipo de producto */
.fam--marca { grid-template-columns: 120px minmax(0, 1fr) auto auto; }
.fams--tight .fam--marca { grid-template-columns: 110px minmax(0, 1fr) auto; }
.fams--tight .fam--marca .tags { display: none; }
.fam__logo { display: grid; place-items: center start; height: 40px; }
.fam__logo img { max-height: 28px; max-width: 108px; width: auto; opacity: 0.8; transition: opacity var(--fast) var(--ease); }
.fam--marca:hover .fam__logo img { opacity: 1; }
.fam--marca h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.fam--marca h3 a:hover { color: var(--brand-soft); }
.fam__ref { font-family: var(--mono); font-size: 12px; color: var(--brand-soft) !important; margin-bottom: 4px; }
@media (max-width: 720px) {
  .fam--marca, .fams--tight .fam--marca { grid-template-columns: minmax(0, 1fr) auto; }
  .fam--marca .fam__logo { grid-column: 1 / -1; grid-row: 1; height: 28px; }
  .fam--marca .fam__logo img { max-height: 22px; }
  .fam--marca .fam__main { grid-column: 1; grid-row: 2; }
  .fam--marca .add { grid-column: 2; grid-row: 2; }
  .fam--marca .tags { grid-column: 1 / -1; grid-row: 3; }
}

/* Láminas de 1, 2 o 4 imágenes */
.specimens--c1 { grid-template-columns: 1fr; max-width: 340px; }
.specimens--c2 { grid-template-columns: repeat(2, 1fr); }
.specimens--c4 { grid-template-columns: repeat(4, 1fr); }
.specimens--c2 { max-width: 720px; }
@media (max-width: 900px) { .specimens--c4 { grid-template-columns: repeat(2, 1fr); } }

/* Resultados del buscador: grupos por tipo de producto */
.res__head .res__timg { width: 36px; height: 36px; object-fit: contain; padding: 3px; opacity: 1; border-radius: var(--r-ctl); background: var(--raised); border: 1px solid var(--line); }
.res__n { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.res__fam b .tag { margin-left: 6px; vertical-align: 1px; }
.res__src--all { margin: 0; padding: 12px 18px 14px; }
.res__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 12px; }

/* Lectura de una designación (plaquita ISO, rosca, cono, pinza) o de una
   referencia libre */
.decode {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: start;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--brand) 4%, transparent);
}
.decode__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.decode__k { font-family: var(--mono); font-size: 12px; color: var(--brand-soft); }
.decode__code { font-family: var(--mono); font-size: 16px; font-weight: 500; letter-spacing: 0.02em; }
.decode__parts { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.decode__parts li { padding: 3px 10px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.decode__note { grid-column: 1; font-size: 13.5px; color: var(--muted); max-width: 64ch; }
.decode .add { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
@media (max-width: 560px) {
  .decode { grid-template-columns: minmax(0, 1fr); }
  .decode .add { grid-column: 1; grid-row: auto; justify-self: start; }
}
/* Respuestas del buscador a lo que no es un producto (precio, contacto, qué
   es…): la misma lectura, con un título normal y sus acciones debajo. */
.decode--resp { grid-template-columns: minmax(0, 1fr); }
.decode__t { font-weight: 560; font-size: 15px; }
.decode__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.decode__acts .add { grid-column: auto; grid-row: auto; }
.res__sug-t { align-self: center; margin-right: 4px; font-size: 13px; color: var(--muted); }
.cmdk__item--resp { align-items: flex-start; }
.cmdk__item--resp > span:first-child { flex: none; max-width: 42%; }
.cmdk__item--resp small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Caja para añadir cualquier referencia a la solicitud */
.refbox {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px 40px; align-items: center;
  padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2);
}
.refbox__t { font-size: clamp(1.25rem, 2vw, 1.55rem); font-stretch: 92%; margin-bottom: 8px; }
.refbox__text p { color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.refbox__row { display: flex; gap: 10px; }
.refbox__row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--line-2); background: var(--bg); font-family: var(--mono); font-size: 14.5px;
  transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.refbox__row input::placeholder { color: var(--faint); }
.refbox__row input:focus-visible { outline: 0; border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-wash); }
.refbox__out { grid-column: 2; min-height: 1.5em; font-size: 13.5px; color: var(--muted); }
.refbox__out:empty { display: none; }
.refbox__out b { color: var(--text); font-weight: 560; }
@media (max-width: 860px) { .refbox { grid-template-columns: minmax(0, 1fr); } .refbox__out { grid-column: 1; } }
/* En columna, flex: 1 se comería el alto del campo: aquí no crece. */
@media (max-width: 480px) { .refbox__row { flex-direction: column; } .refbox__row input { flex: none; } }

/* Pie: enlaces a los otros modelos */
.foot__cmp a { text-decoration: underline; text-underline-offset: 3px; }

.res__sug { margin-top: 12px; }

/* Catálogos vigentes, en una página de producto: filas de "dónde mirarlo",
   con la portada del catálogo en pequeño */
.cats { border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.cat {
  display: grid; grid-template-columns: 40px 150px minmax(0, 1fr) auto auto; gap: 8px 22px; align-items: center;
  padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg);
}
.cat:first-child { border-top: 0; }
.cat__portada { display: block; width: 40px; aspect-ratio: 360 / 509; overflow: hidden; border-radius: 3px; border: 1px solid var(--line-2); background: var(--raised); }
.cat__portada img { width: 100%; height: 100%; object-fit: cover; }
.cat__brand { font-weight: 560; font-size: 14.5px; }
a.cat__brand:hover { color: var(--brand-soft); }
.cat__t { display: inline-flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: 540; }
.cat__t .i { width: 14px; height: 14px; color: var(--faint); flex: none; }
.cat__t:hover { color: var(--brand-soft); }
.cat__t:hover .i { color: currentColor; }
.cat__src { margin-top: 3px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.cat__pg { justify-self: end; font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* La página a la que abre, destacada: es lo que se busca en la fila */
.cat__pg--ve { padding: 3px 10px; border: 1px solid var(--brand-line); border-radius: var(--r-pill); background: var(--brand-wash); color: var(--brand-soft); }
.cats__more { margin-top: 18px; color: var(--muted); font-size: 14.5px; }
/* Filas seguidas de la misma marca: el nombre solo en la primera */
.cat--cont { border-top-style: dashed; }
@media (max-width: 760px) {
  .cat { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 14px; padding: 14px 16px; }
  .cat__portada { grid-row: 1 / span 3; align-self: start; }
  .cat__brand, .cat__main, .cat__pg { grid-column: 2; }
  .cat__pg { justify-self: start; margin-top: 4px; }
  .cat .add { grid-column: 3; grid-row: 1 / span 3; align-self: center; }
  .cat--cont .cat__brand { display: none; }
}

/* Página de catálogos: filtros por producto y por marca, y una tarjeta por
   catálogo con su portada y un botón por producto que abre su página */
.catf { display: grid; gap: 14px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--bg-2); }
.catf__fila { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: start; }
.catf__t { padding-top: 9px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
/* Marcas sin catálogo del producto elegido: en segundo plano */
.catf .chip.is-sin { opacity: 0.4; }
.catf__n { margin-left: 108px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
@media (max-width: 640px) {
  .catf { padding: 16px; }
  .catf__fila { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .catf__t { padding-top: 0; }
  .catf__n { margin-left: 0; }
  /* En el móvil, cada fila de filtros se desliza de lado */
  .catf .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px; scrollbar-width: none; }
  .catf .chips::-webkit-scrollbar { display: none; }
  .catf .chip { flex: none; }
}

.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 32px 22px; margin-top: 28px; }
.sec__head + .cgrid { margin-top: 0; }
.ccard { display: flex; flex-direction: column; min-width: 0; }
.ccard[hidden] { display: none; }
.ccard__portada {
  display: block; aspect-ratio: 360 / 509; overflow: hidden; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--raised);
  box-shadow: 0 18px 30px -22px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s var(--ease), border-color var(--fast) var(--ease);
}
.ccard__portada img { width: 100%; height: 100%; object-fit: cover; }
.ccard__portada:hover { transform: translateY(-3px); border-color: var(--line-3); }
.ccard__cuerpo { padding-top: 14px; }
.ccard__marca { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.ccard__t { margin-top: 3px; font-size: 1.05rem; font-weight: 600; font-stretch: 94%; line-height: 1.3; }
.ccard__t a:hover { color: var(--brand-soft); }
.ccard__meta { margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--faint); }
.ccard__secc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.csec {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; padding: 5px 10px;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--fill-1);
  font-size: 13px; line-height: 1.3; color: var(--text);
  transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.csec b { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--brand-soft); white-space: nowrap; }
.csec:hover { border-color: var(--brand-line); background: var(--brand-wash); }
/* El producto elegido en los filtros: el botón que hay que pulsar */
.ccard__secc .is-on .csec { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.ccard__secc .is-on .csec b { color: var(--brand-ink); }
@media (max-width: 560px) {
  .cgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .ccard__t { font-size: 0.98rem; }
  .csec { font-size: 12.5px; padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) { .ccard__portada:hover { transform: none; } }

/* Enlace al catálogo dentro de un resultado del buscador */
.res__cat { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-family: var(--mono); font-size: 12px; color: var(--brand-soft); white-space: nowrap; }
.res__cat .i { width: 12px; height: 12px; }
.res__cat:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Visor de catálogos: el PDF, en su página, dentro de la web */
html.con-visor { overflow: hidden; }
.visor { width: min(1180px, calc(100vw - 32px)); height: calc(100dvh - 32px); margin: 16px auto; }
.visor__panel { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2); box-shadow: var(--shadow-dialog); }
.visor__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); }
/* El título es lo primero que se encoge: la barra cabe en una línea y la X
   no salta sola a la siguiente */
.visor__t { flex: 1 1 0; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 560; }
.visor__nav, .visor__zoom { display: flex; align-items: center; gap: 6px; }
.visor__pag input {
  width: 4.2em; height: 36px; padding: 0 6px; text-align: center; font-family: var(--mono); font-size: 14px;
  border: 1px solid var(--line-2); border-radius: var(--r-ctl); background: var(--bg); color: var(--text);
}
.visor__pag input:focus { outline: none; border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-wash); }
.visor__de { min-width: 4.6em; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.visor .icon-btn:disabled { opacity: 0.35; cursor: default; }
.visor__pdf { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--brand-soft); }
.visor__pdf .i { width: 14px; height: 14px; }
.visor__pdf:hover { text-decoration: underline; text-underline-offset: 3px; }
.visor__area { position: relative; flex: 1; overflow: auto; overscroll-behavior: contain; background: var(--bg); outline: none; }
.visor__hoja { display: grid; place-items: center; width: max-content; min-width: 100%; min-height: 100%; padding: 16px; }
.visor__hoja canvas { display: block; background: #fff; border-radius: 2px; box-shadow: 0 12px 34px -14px rgba(0, 0, 0, 0.7); transition: opacity 0.2s var(--ease); }
.visor__area.is-cargando .visor__hoja canvas { opacity: 0.4; }
.visor__estado { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; pointer-events: none; }
.visor__estado:empty { display: none; }
.visor__estado p {
  display: grid; justify-items: center; gap: 12px; max-width: 44ch; padding: 18px 22px; text-align: center;
  border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--bg-2); color: var(--muted); font-size: 14.5px;
  pointer-events: auto;
}
.visor__estado strong { color: var(--text); font-weight: 560; }
.visor__area.is-cargando .visor__estado p::before {
  content: ""; width: 160px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent) -80px 0 / 80px 100% no-repeat, var(--line-2);
  animation: visor-barra 1.1s linear infinite;
}
@keyframes visor-barra { to { background-position: 160px 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .visor__area.is-cargando .visor__estado p::before { animation: none; background: var(--brand-line); } }
/* Buscar dentro del catálogo: destacado (es lo que más se usa) */
.visor__buscar { position: relative; flex: 0 1 280px; min-width: 180px; }
.visor__buscar > .i { position: absolute; left: 12px; top: 18px; width: 16px; height: 16px; translate: 0 -50%; color: var(--brand-soft); pointer-events: none; }
.visor__buscar input {
  width: 100%; height: 36px; padding: 0 12px 0 36px; font-size: 14px;
  border: 1px solid var(--brand-line); border-radius: var(--r-pill); background: var(--bg); color: var(--text);
}
.visor__buscar input::placeholder { color: var(--faint); }
.visor__buscar input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.visor__res {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 3; width: min(520px, calc(100vw - 32px));
  max-height: min(60vh, 460px); overflow: auto; overscroll-behavior: contain; padding: 6px;
  border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--bg-2); box-shadow: var(--shadow-pop);
}
.visor__resn { padding: 8px 10px; font-size: 13.5px; color: var(--muted); }
.visor__hits { margin: 0; padding: 0; list-style: none; }
.visor__hit {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text);
  font: inherit; font-size: 13.5px; line-height: 1.45; text-align: left; cursor: pointer;
}
.visor__hit:hover, .visor__hit:focus-visible { background: var(--fill-2); }
.visor__hit b { font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--brand-soft); white-space: nowrap; }
.visor__hit span { color: var(--muted); overflow-wrap: anywhere; }
.visor__hit mark { padding: 0 2px; border-radius: 3px; background: var(--brand-wash); color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.visor__mas { padding: 8px 10px; font-size: 13px; color: var(--faint); }
/* Lo buscado, marcado sobre la página (como un rotulador) */
.visor__lienzo { position: relative; }
.visor__marca {
  position: absolute; border-radius: 3px; pointer-events: none;
  background: rgba(243, 153, 16, 0.34); box-shadow: 0 0 0 2px rgba(243, 153, 16, 0.95); mix-blend-mode: multiply;
}
@media (prefers-reduced-motion: no-preference) { .visor__marca { animation: visor-marca 0.8s var(--ease) 2; } }
@keyframes visor-marca { 50% { box-shadow: 0 0 0 7px rgba(243, 153, 16, 0.35); } }
@media (max-width: 640px) {
  .visor { width: 100vw; height: 100dvh; margin: 0; }
  .visor__panel { border: 0; border-radius: 0; }
  .visor__bar { gap: 8px 10px; padding: 8px 10px 10px 16px; }
  .visor__t { flex-basis: calc(100% - 60px); order: 0; font-size: 14px; }
  .visor__x { order: 1; }
  .visor__buscar { order: 2; flex: 1 1 100%; }
  .visor__buscar input { height: 42px; font-size: 16px; }
  .visor__buscar > .i { top: 21px; }
  .visor__res { width: 100%; max-height: 58vh; }
  .visor__nav { order: 3; }
  .visor__zoom { order: 4; }
  /* En el móvil, el PDF original como botón de icono: cabe en la fila de
     navegación y la barra se queda en tres filas */
  .visor__pdf { order: 5; margin-left: auto; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-ctl); }
  .visor__pdft { display: none; }
  /* Navegación, zoom y PDF en una fila de 375 px */
  .visor .icon-btn { width: 38px; height: 38px; }
  .visor__pag input { width: 3.4em; height: 38px; }
  .visor__de { min-width: 0; }
  .visor__nav { gap: 4px; }
  .visor__pdf { width: 38px; height: 38px; }
  .visor__hoja { padding: 8px; }
}


/* Imagen de cada tipo de producto en su casilla: el recorte, encajado; la
   fotografía, a sangre. */
.op__img {
  position: relative; display: block; aspect-ratio: 16 / 10; margin: -22px -22px 4px; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 60%, var(--raised) 0%, var(--bg) 75%);
}
.ops--5 .op__img { margin: -20px -18px 4px; }
.op__img img {
  position: absolute; inset: 10% 14%; width: 72%; height: 80%; object-fit: contain;
  filter: drop-shadow(0 12px 16px var(--drop)); transition: transform 0.35s var(--ease);
}
.op__img--foto img { inset: 0; width: 100%; height: 100%; object-fit: cover; filter: none; }
a.op:hover .op__img img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { a.op:hover .op__img img { transform: none; } }

/* Herramienta especial: no se elige marca, se pide. En el buscador, un aviso;
   en su página, un formulario. */
.pide {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 16px; margin-bottom: 12px;
  border: 1px solid var(--brand-line); border-radius: var(--r-card); background: var(--brand-wash);
}
.pide__img { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border-radius: var(--r-ctl); background: var(--raised); }
.pide__img img { width: 48px; height: 48px; object-fit: contain; }
.pide__txt { font-size: 14px; color: var(--muted); }
.pide__txt b { display: block; font-size: 15px; color: var(--text); }
.pide__go { height: 40px; }
@media (max-width: 560px) {
  .pide { grid-template-columns: 48px minmax(0, 1fr); }
  .pide__go { grid-column: 1 / -1; }
}

.pedido { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.pedido__img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-panel); background: radial-gradient(circle at 50% 55%, var(--raised) 0%, var(--bg) 75%); }
.pedido__img img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; filter: drop-shadow(0 18px 24px var(--drop)); }
.pedido__form { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line-2); border-radius: var(--r-panel); background: var(--bg-2); }
.pedido__t { margin-bottom: 10px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.pedido__form > p { margin-bottom: 18px; color: var(--muted); }
.pedido__l { display: block; margin-bottom: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--faint); }
.pedido__form textarea {
  width: 100%; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5;
  border: 1px solid var(--line-2); border-radius: var(--r-card); background: var(--bg); color: var(--text);
}
.pedido__form textarea:focus { outline: none; border-color: var(--brand-line); box-shadow: 0 0 0 4px var(--brand-wash); }
.pedido__acc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pedido__out { min-height: 1.4em; margin-top: 10px; font-size: 14px; color: var(--brand-soft); }
.pedido__out .link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
@media (max-width: 900px) { .pedido { grid-template-columns: 1fr; } }
