/*
 * Control de caducidades — Almacenes. Página informativa primero: qué es el control de caducidades, cómo se interpreta
 * por lote, en qué se distingue de FEFO y, después, cómo se define el criterio en Evidence ERP.
 * Concepto: "la etiqueta de lote". La fecha de caducidad se imprime en cada lote. Ámbar = el lote que vence primero;
 * verde azulado = el lote con mayor vida útil; azul marino = el producto; dorado = las acciones.
 * El hero es el producto X del ejemplo en tres modos (radios, sin JS ni :has): Caducidad informativa (la fecha como
 * referencia), Caducidad inventariable (el inventario por lote con su fecha) y Lectura operativa (los dos lotes en la
 * línea de noviembre a abril). Sin líneas sobre la tarjeta.
 * Display Darker Grotesque (alta y estrecha, para fechas grandes) con cifras tabulares; cuerpo Inter.
 * Movimiento: al cargar, la foto se acerca; al cambiar de modo, las etiquetas de lote entran y los marcadores caen en
 * su fecha. Al hacer scroll, el flujo avanza, solo donde el navegador lo soporta y sin movimiento reducido.
 */
[data-function-layout="caducidades"] {
    --cq-ink: #041f49;
    --cq-ink-tint: #e4eaf4;
    --cq-a: #b8641a;
    --cq-a-tint: #fbefe1;
    --cq-b: #13806c;
    --cq-b-tint: #e1f3ee;
    --cq-gold: #fac63f;
    --cq-gold-tint: #fff3cf;
    --cq-paper: #f1f3f6;
    --cq-rule: #e0e5ea;
    --cq-line: #c3ccd3;
    --cq-muted: #4a5260;
    --cq-text: #1f2937;
    --cq-display: "Darker Grotesque", "Arial Narrow", system-ui, sans-serif;
    --cq-ease: cubic-bezier(.2, .7, .2, 1);
    font-variant-numeric: lining-nums;
}
[data-function-layout="caducidades"] .cv-hero-title,
[data-function-layout="caducidades"] .cv-section-title,
[data-function-layout="caducidades"] .cv-form-title { font-family: var(--cq-display); font-weight: 800; letter-spacing: -.005em; }
[data-function-layout="caducidades"] .cv-section-title { font-size: clamp(2.3rem, 3.3vw, 3.05rem); line-height: 1; }
[data-function-layout="caducidades"] .cq-narrow { max-width: 52rem; }

/* ---------- Superficies ---------- */
[data-function-layout="caducidades"] .cq-paper { background: var(--cq-paper); }
[data-function-layout="caducidades"] .cq-navy { background: var(--cq-ink); color: #fff; }
[data-function-layout="caducidades"] .cq-navy .cv-section-title { color: #fff; }
[data-function-layout="caducidades"] .cq-split { display: grid; gap: 2.5rem 4rem; align-items: center; }
[data-function-layout="caducidades"] .cq-split--top { align-items: start; }
[data-function-layout="caducidades"] .cq-lead { max-width: 42rem; margin-top: 1.25rem; color: var(--cq-text); font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.75; }
[data-function-layout="caducidades"] .cq-navy .cq-lead--on-dark { color: rgb(255 255 255 / .86); }

/* ---------- Hero ---------- */
[data-function-layout="caducidades"] #inicio { background: linear-gradient(155deg, #041f49 0%, #0a2c5c 70%, #0f3870 100%); color: #fff; }
[data-function-layout="caducidades"] #inicio .function-hero__overlay {
    background:
        linear-gradient(180deg, transparent 65%, rgb(4 31 73 / .7) 100%),
        linear-gradient(90deg, rgb(4 31 73 / .97) 0%, rgb(4 31 73 / .9) 42%, rgb(10 44 92 / .72) 70%, rgb(15 56 112 / .55) 100%);
}
[data-function-layout="caducidades"] .rh-hero-layout { position: relative; z-index: 1; align-items: center; }
[data-function-layout="caducidades"] #inicio .cv-hero-title { max-width: 18ch; color: #fff; font-size: clamp(2.6rem, 4.4vw, 3.9rem); line-height: .98; }
[data-function-layout="caducidades"] #inicio .cv-hero-description { max-width: 36rem; margin-top: 1.5rem; color: rgb(255 255 255 / .86); font-size: 1.02rem; }
[data-function-layout="caducidades"] .cq-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
[data-function-layout="caducidades"] #inicio .cv-primary-button { border-color: var(--cq-gold); background: var(--cq-gold); color: var(--cq-ink); box-shadow: 0 14px 30px rgb(0 0 0 / .3); text-decoration: none; }
[data-function-layout="caducidades"] #inicio .cv-primary-button:hover,
[data-function-layout="caducidades"] #inicio .cv-primary-button:focus-visible { background: #ffd666; }
[data-function-layout="caducidades"] #inicio .cv-primary-button:focus-visible { outline: 3px solid var(--cq-gold); outline-offset: 3px; }

/* El producto X y el criterio de caducidad. */
[data-function-layout="caducidades"] .cq-shelf { position: relative; justify-self: center; width: 100%; max-width: 34rem; min-width: 0; margin: 0; padding: 1.1rem 1.1rem .9rem; overflow: hidden; border-radius: .6rem; background: #fff; box-shadow: 0 24px 50px rgb(0 0 0 / .35); color: var(--cq-text); font-variant-numeric: lining-nums tabular-nums; }
[data-function-layout="caducidades"] .cq-shelf .cv-icon { width: 15px; height: 15px; flex-basis: 15px; flex-shrink: 0; }
[data-function-layout="caducidades"] .cq-shelf p,
[data-function-layout="caducidades"] .cq-shelf ol { margin: 0; }
[data-function-layout="caducidades"] .cq-input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
[data-function-layout="caducidades"] .cq-shelf .cq-shelf__title { display: flex; align-items: center; gap: .45rem; color: var(--cq-ink); font-family: var(--cq-display); font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
[data-function-layout="caducidades"] .cq-shelf__title .cv-icon { color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-shelf .cq-modes { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .75rem; }
[data-function-layout="caducidades"] .cq-mode { padding: .32rem .7rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--cq-rule); color: var(--cq-ink); cursor: pointer; font-size: .74rem; font-weight: 800; transition: background-color .2s, box-shadow .2s, color .2s; }
[data-function-layout="caducidades"] .cq-mode:hover { box-shadow: inset 0 0 0 1px var(--cq-line); }
[data-function-layout="caducidades"] .cq-product { display: grid; gap: .6rem; margin-top: .9rem; padding: .85rem .9rem .9rem; border-radius: .45rem; background: var(--cq-paper); box-shadow: inset 0 3px 0 var(--cq-ink); }
[data-function-layout="caducidades"] .cq-shelf .cq-product__head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; color: var(--cq-ink); }
[data-function-layout="caducidades"] .cq-product__head b { font-family: var(--cq-display); font-size: 1.5rem; font-weight: 900; line-height: 1; }
[data-function-layout="caducidades"] .cq-product__head span { color: var(--cq-muted); font-size: .72rem; font-weight: 700; }
[data-function-layout="caducidades"] .cq-shelf .cq-product__info { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border-radius: .35rem; background: #fff; box-shadow: inset 0 0 0 1px var(--cq-rule); color: var(--cq-muted); font-family: var(--cq-display); font-size: 1.35rem; font-weight: 800; }
[data-function-layout="caducidades"] .cq-product__info small { font-family: Inter, system-ui, sans-serif; font-size: .7rem; font-weight: 700; }
[data-function-layout="caducidades"] .cq-lots { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
/* La etiqueta de cada lote, con la fecha impresa. */
[data-function-layout="caducidades"] .cq-shelf .cq-lot { display: grid; gap: .1rem; padding: .55rem .7rem .6rem; border-radius: .35rem; background: #fff; }
[data-function-layout="caducidades"] .cq-lot__name { font-size: .78rem; font-weight: 800; }
[data-function-layout="caducidades"] .cq-lot__date { display: grid; font-family: var(--cq-display); font-size: 1.65rem; font-weight: 900; line-height: 1; }
[data-function-layout="caducidades"] .cq-lot__date small { font-family: Inter, system-ui, sans-serif; font-size: .6rem; font-weight: 700; line-height: 1.4; }
[data-function-layout="caducidades"] .cq-lot--a { box-shadow: inset 4px 0 0 var(--cq-a), inset 0 0 0 1px var(--cq-rule); color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-lot--b { box-shadow: inset 4px 0 0 var(--cq-b), inset 0 0 0 1px var(--cq-rule); color: var(--cq-b); }
[data-function-layout="caducidades"] .cq-line { position: relative; display: none; padding-top: 1.7rem; }
[data-function-layout="caducidades"] .cq-line__months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0; border-top: 2px solid var(--cq-ink); list-style: none; }
[data-function-layout="caducidades"] .cq-line__months li { padding-top: .25rem; color: var(--cq-muted); font-size: .68rem; font-weight: 700; text-align: center; }
[data-function-layout="caducidades"] .cq-line__months li + li { box-shadow: inset 1px 0 0 var(--cq-rule); }
[data-function-layout="caducidades"] .cq-pin { position: absolute; top: 0; left: calc(var(--cq-at) * 1%); display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50% 50% 50% 0; color: #fff; font-size: .72rem; font-weight: 800; transform: translateX(-50%) rotate(-45deg); }
[data-function-layout="caducidades"] .cq-pin--a { background: var(--cq-a); }
[data-function-layout="caducidades"] .cq-pin--b { background: var(--cq-b); }
[data-function-layout="caducidades"] .cq-shelf .cq-status { min-height: 2.8em; margin-top: .75rem; color: var(--cq-ink); font-size: .76rem; font-weight: 700; line-height: 1.4; }
[data-function-layout="caducidades"] .cq-s { display: none; }
[data-function-layout="caducidades"] .cq-shelf figcaption { margin-top: .4rem; color: var(--cq-muted); font-size: .66rem; line-height: 1.4; }

[data-function-layout="caducidades"] #cq-m-0:checked ~ .cq-modes .cq-mode--0,
[data-function-layout="caducidades"] #cq-m-1:checked ~ .cq-modes .cq-mode--1,
[data-function-layout="caducidades"] #cq-m-2:checked ~ .cq-modes .cq-mode--2 { background: var(--cq-ink); box-shadow: none; color: #fff; }
[data-function-layout="caducidades"] #cq-m-1:checked ~ .cq-product .cq-product__info,
[data-function-layout="caducidades"] #cq-m-2:checked ~ .cq-product .cq-product__info { display: none; }
[data-function-layout="caducidades"] #cq-m-1:checked ~ .cq-product .cq-lots,
[data-function-layout="caducidades"] #cq-m-2:checked ~ .cq-product .cq-lots { display: grid; }
[data-function-layout="caducidades"] #cq-m-2:checked ~ .cq-product .cq-line { display: block; }
[data-function-layout="caducidades"] #cq-m-0:checked ~ .cq-status .cq-s--0,
[data-function-layout="caducidades"] #cq-m-1:checked ~ .cq-status .cq-s--1,
[data-function-layout="caducidades"] #cq-m-2:checked ~ .cq-status .cq-s--2 { display: inline; }
[data-function-layout="caducidades"] #cq-m-0:focus-visible ~ .cq-modes .cq-mode--0,
[data-function-layout="caducidades"] #cq-m-1:focus-visible ~ .cq-modes .cq-mode--1,
[data-function-layout="caducidades"] #cq-m-2:focus-visible ~ .cq-modes .cq-mode--2 { outline: 3px solid var(--cq-gold); outline-offset: 2px; }

@media (prefers-reduced-motion: no-preference) {
    [data-function-layout="caducidades"] #inicio .function-hero__media img { animation: cq-zoom 18s ease-out both; }
    /* Al cambiar de modo, las etiquetas entran y los marcadores caen en su fecha. */
    [data-function-layout="caducidades"] .cq-lot,
    [data-function-layout="caducidades"] .cq-s { animation: cq-tick .3s var(--cq-ease) backwards; }
    [data-function-layout="caducidades"] .cq-lot--b { animation-delay: .06s; }
    [data-function-layout="caducidades"] .cq-pin { animation: cq-drop .4s var(--cq-ease) .1s backwards; }
}

/* ---------- 1. Qué es: registrar una fecha o usarla como regla ---------- */
[data-function-layout="caducidades"] .cq-key { margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: .5rem; background: var(--cq-gold-tint); box-shadow: inset 4px 0 0 var(--cq-gold); }
[data-function-layout="caducidades"] .cq-key p { margin: 0; color: var(--cq-text); font-size: 1rem; line-height: 1.6; }
[data-function-layout="caducidades"] .cq-key .cq-key__title { display: flex; align-items: center; gap: .45rem; margin-bottom: .3rem; color: var(--cq-ink); font-family: var(--cq-display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
[data-function-layout="caducidades"] .cq-key__title .cv-icon { width: 18px; height: 18px; flex-basis: 18px; color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; margin: 0; }
[data-function-layout="caducidades"] .cq-two p { margin: 0; }
[data-function-layout="caducidades"] .cq-two .cq-two__side { display: grid; align-content: start; gap: .35rem; padding: 1.1rem; border-radius: .5rem; background: var(--cq-paper); color: var(--cq-muted); font-size: .95rem; font-weight: 500; line-height: 1.45; }
[data-function-layout="caducidades"] .cq-two__side b { color: var(--cq-ink); font-family: var(--cq-display); font-size: 1.55rem; font-weight: 800; line-height: 1.05; }
/* La fecha como sello sobre el empaque. */
[data-function-layout="caducidades"] .cq-tag { display: grid; justify-self: start; margin-bottom: .4rem; padding: .35rem .6rem; border-radius: .3rem; font-family: var(--cq-display); font-size: 1.5rem; font-weight: 900; line-height: 1; }
[data-function-layout="caducidades"] .cq-tag small { font-family: Inter, system-ui, sans-serif; font-size: .62rem; font-weight: 700; line-height: 1.5; }
[data-function-layout="caducidades"] .cq-two__side--0 .cq-tag { background: #fff; box-shadow: inset 0 0 0 1px var(--cq-line); color: var(--cq-muted); }
[data-function-layout="caducidades"] .cq-two__side--1 { background: var(--cq-a-tint); }
[data-function-layout="caducidades"] .cq-two__side--1 .cq-tag { background: var(--cq-a); color: #fff; }
[data-function-layout="caducidades"] .cq-two .cq-two__sectors { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: .4rem; }
[data-function-layout="caducidades"] .cq-two__sectors span { padding: .35rem .75rem; border-radius: 999px; background: var(--cq-ink); color: #fff; font-size: .85rem; font-weight: 700; }

/* ---------- 2. El problema y el aviso hacia Evidence ---------- */
[data-function-layout="caducidades"] .cq-uses { display: grid; gap: 1.5rem 2rem; margin: 2.25rem 0 0; padding: 0; list-style: none; }
[data-function-layout="caducidades"] .cq-uses li { display: grid; align-content: start; gap: .8rem; padding-top: 1.1rem; border-top: 3px solid var(--cq-a); }
[data-function-layout="caducidades"] .cq-uses__icon { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: .45rem; background: var(--cq-a-tint); color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-uses__icon .cv-icon { width: 20px; height: 20px; flex-basis: 20px; }
[data-function-layout="caducidades"] .cq-uses p { margin: 0; color: var(--cq-ink); font-size: 1.05rem; font-weight: 600; line-height: 1.5; }
[data-function-layout="caducidades"] .cq-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 2.6rem; padding: 1.4rem 1.6rem; border-radius: .6rem; background: var(--cq-ink); color: #fff; }
[data-function-layout="caducidades"] .cq-cta p { max-width: 44rem; margin: 0; color: rgb(255 255 255 / .86); font-size: 1rem; line-height: 1.6; }
[data-function-layout="caducidades"] .cq-cta .cq-cta__title { margin-bottom: .3rem; color: #fff; font-family: var(--cq-display); font-size: 1.8rem; font-weight: 800; line-height: 1.05; }
[data-function-layout="caducidades"] .cq-cta .cq-cta__button { border-color: var(--cq-gold); background: var(--cq-gold); color: var(--cq-ink); text-decoration: none; }
[data-function-layout="caducidades"] .cq-cta .cq-cta__button:hover,
[data-function-layout="caducidades"] .cq-cta .cq-cta__button:focus-visible { background: #ffd666; }
[data-function-layout="caducidades"] .cq-cta .cq-cta__button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- Tablas ---------- */
[data-function-layout="caducidades"] .cq-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
[data-function-layout="caducidades"] .cq-table thead th { padding: .8rem 1rem; border-bottom: 3px solid var(--cq-rule); color: var(--cq-muted); font-size: .95rem; font-weight: 700; text-align: left; vertical-align: bottom; }
[data-function-layout="caducidades"] .cq-table tbody th,
[data-function-layout="caducidades"] .cq-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--cq-rule); font-size: 1.02rem; line-height: 1.5; text-align: left; vertical-align: top; }
[data-function-layout="caducidades"] .cq-table tbody th { color: var(--cq-ink); font-family: var(--cq-display); font-size: 1.4rem; font-weight: 800; line-height: 1.15; }
[data-function-layout="caducidades"] .cq-table td { color: var(--cq-muted); font-weight: 500; }
[data-function-layout="caducidades"] .cq-layer__icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-right: .6rem; border-radius: .4rem; background: var(--cq-ink); color: var(--cq-gold); vertical-align: -.45rem; }
[data-function-layout="caducidades"] .cq-layer__icon .cv-icon { width: 16px; height: 16px; flex-basis: 16px; }

/* ---------- 3. Producto, lote, caducidad y movimiento: cada capa un nivel más adentro ---------- */
[data-function-layout="caducidades"] .cq-table--layers thead th:first-child { width: 48%; }
[data-function-layout="caducidades"] .cq-table--layers tbody th { padding-left: calc(1rem + var(--cq-d) * 1.1rem); }
[data-function-layout="caducidades"] .cq-table--layers tbody tr:nth-child(3) th { color: var(--cq-a); }

/* ---------- 4. El ejemplo, como etiquetas de lote ---------- */
[data-function-layout="caducidades"] .cq-table--labels { margin-top: 1.6rem; border-collapse: separate; border-spacing: 0 .6rem; }
[data-function-layout="caducidades"] .cq-table--labels thead th { border-bottom: 0; padding-bottom: 0; }
[data-function-layout="caducidades"] .cq-table--labels tbody th,
[data-function-layout="caducidades"] .cq-table--labels td { border-bottom: 0; background: #fff; vertical-align: middle; }
[data-function-layout="caducidades"] .cq-table--labels tbody tr td:first-child { border-radius: .45rem 0 0 .45rem; color: var(--cq-ink); font-weight: 700; }
[data-function-layout="caducidades"] .cq-table--labels tbody tr td:last-child { border-radius: 0 .45rem .45rem 0; }
[data-function-layout="caducidades"] .cq-table--labels .cq-td--date { font-family: var(--cq-display); font-size: 1.9rem; font-weight: 900; line-height: 1; }
[data-function-layout="caducidades"] .cq-tr--a td:first-child { box-shadow: inset 5px 0 0 var(--cq-a); }
[data-function-layout="caducidades"] .cq-tr--a th,
[data-function-layout="caducidades"] .cq-tr--a .cq-td--date { color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-tr--b td:first-child { box-shadow: inset 5px 0 0 var(--cq-b); }
[data-function-layout="caducidades"] .cq-tr--b th,
[data-function-layout="caducidades"] .cq-tr--b .cq-td--date { color: var(--cq-b); }

/* ---------- 5. Control de caducidades y FEFO ---------- */
[data-function-layout="caducidades"] .cq-lanes { display: grid; gap: 1rem; margin: 0; }
[data-function-layout="caducidades"] .cq-lanes p { margin: 0; }
[data-function-layout="caducidades"] .cq-lanes .cq-lane { display: grid; gap: .3rem; padding: 1.2rem 1.3rem; border-radius: .55rem; color: var(--cq-muted); font-size: .98rem; font-weight: 500; line-height: 1.5; }
[data-function-layout="caducidades"] .cq-lane small { justify-self: start; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 800; }
[data-function-layout="caducidades"] .cq-lane b { font-family: var(--cq-display); font-size: 1.8rem; font-weight: 800; line-height: 1.05; }
[data-function-layout="caducidades"] .cq-lane--0 { background: var(--cq-b-tint); box-shadow: inset 0 0 0 2px var(--cq-b); }
[data-function-layout="caducidades"] .cq-lane--0 small { background: var(--cq-b); color: #fff; }
[data-function-layout="caducidades"] .cq-lane--0 b { color: var(--cq-b); }
[data-function-layout="caducidades"] .cq-lane--1 { border: 2px dashed var(--cq-line); background: #fff; }
[data-function-layout="caducidades"] .cq-lane--1 small { background: var(--cq-paper); color: var(--cq-muted); }
[data-function-layout="caducidades"] .cq-lane--1 b { color: var(--cq-muted); }

/* ---------- 6. El criterio, antes de inventariar ---------- */
[data-function-layout="caducidades"] .cq-order { display: grid; gap: .9rem; margin: 0; padding: 0; list-style: none; }
[data-function-layout="caducidades"] .cq-order__step { display: grid; grid-template-columns: 3rem minmax(0, 1fr); align-items: center; gap: .1rem 1rem; padding: 1rem 1.2rem; border-radius: .5rem; background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .18); color: rgb(255 255 255 / .82); font-size: .98rem; line-height: 1.45; }
[data-function-layout="caducidades"] .cq-order__step i { display: grid; grid-row: span 2; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: rgb(255 255 255 / .12); color: #fff; font-family: var(--cq-display); font-size: 1.8rem; font-style: normal; font-weight: 900; }
[data-function-layout="caducidades"] .cq-order__step b { color: #fff; font-family: var(--cq-display); font-size: 1.6rem; font-weight: 800; line-height: 1.05; }
/* El primer paso es el que fija la regla. */
[data-function-layout="caducidades"] .cq-order .cq-order__step--0 { background: var(--cq-gold); box-shadow: none; color: var(--cq-ink); }
[data-function-layout="caducidades"] .cq-order__step--0 i { background: var(--cq-ink); color: var(--cq-gold); }
[data-function-layout="caducidades"] .cq-order__step--0 b { color: var(--cq-ink); }

/* ---------- 7. En Evidence ERP ---------- */
[data-function-layout="caducidades"] .cq-table--data { margin-top: 1.6rem; background: #fff; box-shadow: 0 1px 0 var(--cq-rule); }
[data-function-layout="caducidades"] .cq-table--data thead th:first-child { width: 44%; }
[data-function-layout="caducidades"] .cq-table--data tbody th { font-size: 1.35rem; }

/* ---------- 8. Informativa vs. inventariable ---------- */
[data-function-layout="caducidades"] .cq-table--3 { margin-top: 1.6rem; }
[data-function-layout="caducidades"] .cq-table--3 thead th:first-child { width: 26%; }
[data-function-layout="caducidades"] .cq-table .cq-chip { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: .45rem; border-radius: .4rem; }
[data-function-layout="caducidades"] .cq-chip .cv-icon { width: 17px; height: 17px; flex-basis: 17px; }
[data-function-layout="caducidades"] .cq-chip--info { background: var(--cq-paper); box-shadow: inset 0 0 0 1px var(--cq-line); color: var(--cq-muted); }
[data-function-layout="caducidades"] .cq-chip--inv { background: var(--cq-b); color: #fff; }
[data-function-layout="caducidades"] .cq-table--3 td:last-child { background: var(--cq-b-tint); color: var(--cq-ink); font-weight: 600; }

/* ---------- 9. El flujo y las empresas ---------- */
[data-function-layout="caducidades"] .cq-flow { margin-top: 1.6rem; padding: 1.1rem 1.2rem; border-radius: .5rem; background: #fff; box-shadow: inset 4px 0 0 var(--cq-gold); }
[data-function-layout="caducidades"] .cq-flow p { margin: 0; }
[data-function-layout="caducidades"] .cq-flow .cq-flow__title { display: flex; align-items: center; gap: .45rem; margin-bottom: .8rem; color: var(--cq-ink); font-family: var(--cq-display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
[data-function-layout="caducidades"] .cq-flow__title .cv-icon { width: 17px; height: 17px; flex-basis: 17px; color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-flow ol { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin: 0; padding: 0; list-style: none; }
[data-function-layout="caducidades"] .cq-flow li { position: relative; padding: .3rem .85rem; border-radius: 999px; background: var(--cq-ink-tint); color: var(--cq-ink); font-family: var(--cq-display); font-size: 1.25rem; font-weight: 800; }
[data-function-layout="caducidades"] .cq-flow li:nth-child(2) { background: var(--cq-a); color: #fff; }
[data-function-layout="caducidades"] .cq-flow li:last-child { background: var(--cq-ink); color: #fff; }
[data-function-layout="caducidades"] .cq-flow li:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -1.45rem; width: .55rem; height: .55rem; border-top: 2px solid var(--cq-a); border-right: 2px solid var(--cq-a); transform: translateY(-50%) rotate(45deg); }
[data-function-layout="caducidades"] .cq-fit { display: grid; gap: .8rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
[data-function-layout="caducidades"] .cq-fit li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: start; gap: .8rem; color: var(--cq-ink); font-size: 1.05rem; font-weight: 600; line-height: 1.5; }
[data-function-layout="caducidades"] .cq-fit .cv-icon { box-sizing: content-box; width: 16px; height: 16px; padding: .3rem; border-radius: 50%; background: var(--cq-b); color: #fff; stroke-width: 2.4; }

/* ---------- Contenido relacionado ---------- */
[data-function-layout="caducidades"] .cq-related { display: grid; gap: .8rem; margin-top: 1.6rem; }
[data-function-layout="caducidades"] .cq-related__link { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; border-radius: .55rem; background: #fff; box-shadow: inset 0 0 0 1.5px var(--cq-ink); color: var(--cq-ink); text-decoration: none; transition: box-shadow .2s; }
[data-function-layout="caducidades"] .cq-related__link:hover { box-shadow: inset 0 0 0 2.5px var(--cq-ink); }
[data-function-layout="caducidades"] .cq-related__link:focus-visible { outline: 3px solid var(--cq-ink); outline-offset: 3px; }
[data-function-layout="caducidades"] .cq-related__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .45rem; background: var(--cq-a-tint); color: var(--cq-a); }
[data-function-layout="caducidades"] .cq-related__icon .cv-icon { width: 22px; height: 22px; flex-basis: 22px; }
[data-function-layout="caducidades"] .cq-related__link b { display: block; font-family: var(--cq-display); font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
[data-function-layout="caducidades"] .cq-related__link small { display: block; margin-top: .2rem; color: var(--cq-muted); font-size: .92rem; font-weight: 500; line-height: 1.45; }
[data-function-layout="caducidades"] .cq-related__go .cv-icon { width: 20px; height: 20px; flex-basis: 20px; }

/* ---------- Entradas al hacer scroll ---------- */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        /* El flujo avanza. */
        [data-function-layout="caducidades"] .cq-flow li { animation: cq-from-left linear both; animation-timeline: view(); animation-range: entry 10% cover 30%; }
    }
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
    [data-function-layout="caducidades"] .cq-related,
    [data-function-layout="caducidades"] .cq-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [data-function-layout="caducidades"] .cq-lanes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    [data-function-layout="caducidades"] .rh-hero-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    [data-function-layout="caducidades"] .cq-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [data-function-layout="caducidades"] .cq-related { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    [data-function-layout="caducidades"] .cq-uses { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    [data-function-layout="caducidades"] .cq-lanes { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
    [data-function-layout="caducidades"] #inicio .function-hero__overlay { background: linear-gradient(180deg, rgb(4 31 73 / .95) 0%, rgb(4 31 73 / .86) 50%, rgb(10 44 92 / .7) 100%); }
    [data-function-layout="caducidades"] #inicio .cv-hero-title { max-width: none; }
}
@media (max-width: 767px) {
    [data-function-layout="caducidades"] .cq-hero__actions > * { width: 100%; }
    [data-function-layout="caducidades"] .cq-shelf { padding: .9rem .8rem .8rem; }
    [data-function-layout="caducidades"] .cq-lot__date { font-size: 1.35rem; }
    [data-function-layout="caducidades"] .cq-two { grid-template-columns: minmax(0, 1fr); }
    [data-function-layout="caducidades"] .cq-cta { padding: 1.2rem; }
    [data-function-layout="caducidades"] .cq-cta > a { width: 100%; }
    [data-function-layout="caducidades"] .cq-flow ol { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
    [data-function-layout="caducidades"] .cq-flow li:not(:last-child)::after { top: auto; right: auto; bottom: -.95rem; left: 1.2rem; transform: rotate(135deg); }
    [data-function-layout="caducidades"] .cq-table--layers thead,
    [data-function-layout="caducidades"] .cq-table--data thead,
    [data-function-layout="caducidades"] .cq-table--labels thead,
    [data-function-layout="caducidades"] .cq-table--3 thead { display: none; }
    [data-function-layout="caducidades"] .cq-table--layers,
    [data-function-layout="caducidades"] .cq-table--layers tbody,
    [data-function-layout="caducidades"] .cq-table--layers tr,
    [data-function-layout="caducidades"] .cq-table--layers tbody th,
    [data-function-layout="caducidades"] .cq-table--layers td,
    [data-function-layout="caducidades"] .cq-table--data,
    [data-function-layout="caducidades"] .cq-table--data tbody,
    [data-function-layout="caducidades"] .cq-table--data tr,
    [data-function-layout="caducidades"] .cq-table--data tbody th,
    [data-function-layout="caducidades"] .cq-table--data td,
    [data-function-layout="caducidades"] .cq-table--labels,
    [data-function-layout="caducidades"] .cq-table--labels tbody,
    [data-function-layout="caducidades"] .cq-table--labels tr,
    [data-function-layout="caducidades"] .cq-table--labels tbody th,
    [data-function-layout="caducidades"] .cq-table--labels td,
    [data-function-layout="caducidades"] .cq-table--3,
    [data-function-layout="caducidades"] .cq-table--3 tbody,
    [data-function-layout="caducidades"] .cq-table--3 tr,
    [data-function-layout="caducidades"] .cq-table--3 tbody th,
    [data-function-layout="caducidades"] .cq-table--3 td { display: block; width: 100%; }
    [data-function-layout="caducidades"] .cq-table--layers tr,
    [data-function-layout="caducidades"] .cq-table--data tr,
    [data-function-layout="caducidades"] .cq-table--3 tr { padding: .75rem .25rem; border-bottom: 1px solid var(--cq-rule); }
    [data-function-layout="caducidades"] .cq-table--layers tbody th,
    [data-function-layout="caducidades"] .cq-table--layers td,
    [data-function-layout="caducidades"] .cq-table--data tbody th,
    [data-function-layout="caducidades"] .cq-table--data td,
    [data-function-layout="caducidades"] .cq-table--3 tbody th,
    [data-function-layout="caducidades"] .cq-table--3 td { padding: .3rem 0; border: 0; }
    [data-function-layout="caducidades"] .cq-table--layers tbody th { padding-left: calc(var(--cq-d) * .8rem); }
    [data-function-layout="caducidades"] .cq-table--3 td::before,
    [data-function-layout="caducidades"] .cq-table--labels td::before,
    [data-function-layout="caducidades"] .cq-table--labels th::before { content: attr(data-label); display: block; color: var(--cq-muted); font-family: Inter, system-ui, sans-serif; font-size: .78rem; font-weight: 700; }
    [data-function-layout="caducidades"] .cq-table--labels tr { margin-bottom: .7rem; padding: .7rem .9rem; border-radius: .45rem; background: #fff; }
    [data-function-layout="caducidades"] .cq-table--labels tr.cq-tr--a { box-shadow: inset 5px 0 0 var(--cq-a); }
    [data-function-layout="caducidades"] .cq-table--labels tr.cq-tr--b { box-shadow: inset 5px 0 0 var(--cq-b); }
    [data-function-layout="caducidades"] .cq-table--labels tbody th,
    [data-function-layout="caducidades"] .cq-table--labels td { padding: .25rem 0; background: transparent; }
    [data-function-layout="caducidades"] .cq-table--labels tbody tr td:first-child,
    [data-function-layout="caducidades"] .cq-table--labels tbody tr td:last-child { border-radius: 0; box-shadow: none; }
    [data-function-layout="caducidades"] .cq-table--3 td:last-child { padding: .4rem .5rem; border-radius: .3rem; }
    [data-function-layout="caducidades"] .cq-related__link { grid-template-columns: 3rem minmax(0, 1fr); }
    [data-function-layout="caducidades"] .cq-related__go { display: none; }
}

@keyframes cq-zoom { from { transform: scale(1.08); } }
@keyframes cq-tick { from { opacity: 0; transform: translateY(-.35rem); } }
@keyframes cq-drop { from { opacity: 0; transform: translate(-50%, -.8rem) rotate(-45deg); } }
@keyframes cq-from-left { from { opacity: 0; transform: translateX(-1.5rem); } }
