/* ==========================================================================
   Manta Cruda — componentes propios de /telas/manta/cruda
   Arletex Design System v3.5 · prefijo `mcr-`
   Depende de landing-producto.css (tokens --ax-*, hero, sticky, chips, cross).
   --------------------------------------------------------------------------
   Mapa de registros (variación §11.6):
     Hero ............ @dossier   · Dossier-stack     · Top-rule     (global)
     .mcr-types ...... @technical · IndexRow          · Index-tab    · lift-orange
     .mcr-promos ..... @showcase  · RunInHeadline     · Crop-marks   · ghost-fill
     .ax-cross ....... @showcase  · LabelLateral      · Full-frame   (global)
     Tab Descripción . @technical · LabelLateral      · Side-rule    (tarjeta-beneficio)
     .mcr-uses ....... @gallery   · IndexRow          · Bleed-edge   · zoom de foto
     .mcr-faq ........ @dossier   · RunInHeadline     · Top-rule     · side-shift

   Reglas duras: radius 0, sombras sólidas sin blur, nada visible <14px,
   tap-size >=44px, prefers-reduced-motion.
   ========================================================================== */

/* Anclas por debajo del header fixed (113/104/158px según breakpoint). */
.ax-section[id] { scroll-margin-top: 116px; }


/* ==========================================================================
   Hero — subtítulo H2 de la ficha (conserva el H2 SEO del legacy)
   ========================================================================== */

.mcr-hero-sub {
    margin: var(--ax-space-6, 24px) 0 var(--ax-space-2, 8px);
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: clamp(0.86rem, 1.1vw, 1rem) !important;  /* style.css fuerza h2 a 30px !important */
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--ax-ink, #1F2530);
}


/* ==========================================================================
   .mcr-types — las cinco calidades de manta (reemplaza la tabla legacy
   y su carrusel móvil). Una fila por calidad con pestaña de índice.
   ========================================================================== */

.mcr-types {
    background: var(--ax-paper, #FAF6EE);
    padding: clamp(56px, 8vw, 96px) 0;
}

.mcr-types__head {
    display: grid;
    gap: var(--ax-space-4, 16px);
    margin-bottom: clamp(40px, 6vw, 56px);
}

@media (min-width: 992px) {
    .mcr-types__head {
        grid-template-columns: 6fr 5fr;
        align-items: end;
        gap: clamp(32px, 5vw, 64px);
    }
}

.mcr-types__title {
    margin: 0.6rem 0 0;
    font-size: clamp(2rem, 4.6vw, 3.2rem) !important;  /* style.css fuerza h2 a 30px !important */
}

.mcr-types__lead {
    margin: 0;
    max-width: 52ch;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ax-ink, #1F2530);
}

.mcr-types__list {
    display: grid;
    gap: 44px 24px;           /* el hueco vertical deja ver la pestaña de índice */
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 576px) and (max-width: 991px) {
    .mcr-types__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.mcr-type {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas:
        "media name"
        "num   num"
        "facts facts"
        "cta   cta";
    gap: 16px;
    align-items: center;
    padding: 20px;
    background: var(--ax-white, #FFFFFF);
    border: 2px solid var(--ax-ink, #1F2530);
    transition: transform 180ms cubic-bezier(.22, 1, .36, 1),
                box-shadow 180ms cubic-bezier(.22, 1, .36, 1);
}

@media (min-width: 992px) {
    .mcr-type {
        grid-template-columns: 112px minmax(0, 1.25fr) minmax(0, 0.8fr) minmax(0, 1.6fr) auto;
        grid-template-areas: "media name num facts cta";
        gap: 28px;
        padding: 16px 24px 16px 16px;
    }
}

/* lift-orange */
@media (hover: hover) {
    .mcr-type:hover {
        transform: translate(-3px, -3px);
        box-shadow: 5px 5px 0 var(--ax-orange, #F15A29);
    }
    .mcr-type:hover .mcr-type__media img { transform: scale(1.06); }
}

/* Index-tab: pestaña con el número de fila, pegada al borde superior. */
.mcr-type__idx {
    position: absolute;
    left: -2px;
    bottom: 100%;
    padding: 5px 12px 4px;
    background: var(--ax-ink, #1F2530);
    color: var(--ax-white, #FFFFFF);
    font-family: var(--ax-font-mono, 'JetBrains Mono', ui-monospace, monospace);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
}

.mcr-type__media {
    grid-area: media;
    margin: 0;
    aspect-ratio: 1 / 1;   /* assets 500×500 */
    overflow: hidden;
    border: 1px solid var(--ax-ink, #1F2530);
}

.mcr-type__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;   /* el logo impreso queda abajo */
    transition: transform 320ms cubic-bezier(.22, 1, .36, 1);
}

.mcr-type__name { grid-area: name; }

.mcr-type__finish {
    display: inline-block;
    margin: 0 0 6px;
    padding: 3px 10px;
    background: var(--ax-cream, #F2EDE4);
    color: var(--ax-ink, #1F2530);
    font-family: var(--ax-font-mono, 'JetBrains Mono', ui-monospace, monospace);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mcr-type__finish--soft { background: var(--ax-yellow, #FFEB3B); }

.mcr-type__title {
    margin: 0;
    font-family: var(--ax-font-display, 'Anton', 'Arial Narrow', sans-serif);
    font-size: clamp(1.5rem, 2.4vw, 1.9rem) !important;  /* style.css fuerza h3 a 25px en móvil */
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--ax-ink, #1F2530);
}

.mcr-type__num {
    grid-area: num;
    margin: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--ax-font-display, 'Anton', 'Arial Narrow', sans-serif);
    font-size: clamp(3rem, 5vw, 3.75rem);
    line-height: 0.9;
    color: var(--ax-ink, #1F2530);
}

.mcr-type__unit {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ax-orange-deep, #B0401A);
}

.mcr-type__facts {
    grid-area: facts;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--ax-rule, #E5E1D7);
}

@media (min-width: 992px) {
    .mcr-type__facts { border-top: 0; border-left: 1px solid var(--ax-rule, #E5E1D7); }
}

.mcr-type__fact {
    padding: 10px 12px 0;
}

.mcr-type__fact + .mcr-type__fact { border-left: 1px solid var(--ax-rule, #E5E1D7); }

@media (min-width: 992px) {
    .mcr-type__fact { padding: 4px 16px; }
}

.mcr-type__fact dt {
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ax-muted, #6E6A60);
}

.mcr-type__fact dd {
    margin: 2px 0 0;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 17px;
    font-weight: 700;
    color: var(--ax-ink, #1F2530);
}

.mcr-type__cta {
    grid-area: cta;
    white-space: nowrap;
}

@media (max-width: 991px) {
    .mcr-type__cta { width: 100%; justify-content: center; }
}

.mcr-types__foot {
    margin: clamp(28px, 4vw, 40px) 0 0;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ax-ink, #1F2530);
}


/* Rótulo de grupo dentro de la sección (no es heading: conserva la
   jerarquía h2 sección → h3 nombre de cada manta). */
.mcr-types__group {
    margin: clamp(32px, 4vw, 44px) 0 clamp(20px, 2.4vw, 26px);
    padding-left: 14px;
    border-left: 6px solid var(--ax-orange, #F15A29);
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: clamp(0.86rem, 1.1vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ax-ink, #1F2530);
}

.mcr-types__group:first-of-type { margin-top: 0; }

/* Gramaje doble (140-145): baja un paso para que no desborde la celda. */
.mcr-type__num--dual { font-size: clamp(2rem, 3.4vw, 2.6rem); }


/* ==========================================================================
   .mcr-promos — banners legacy (rollos + Fiubags) con Crop-marks
   ========================================================================== */

.mcr-promos {
    background: var(--ax-white, #FFFFFF);
    padding: clamp(56px, 8vw, 88px) 0;
}

.mcr-promos__list {
    display: grid;
    gap: clamp(40px, 6vw, 64px);
}

.mcr-promos__title {
    margin: 0 0 clamp(16px, 2.4vw, 24px);
    max-width: 38ch;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: clamp(1.25rem, 2.4vw, 1.75rem) !important;  /* style.css fuerza h2 a 30px !important */
    font-weight: 700;
    line-height: 1.3;
    color: var(--ax-ink, #1F2530);
}

.mcr-promos__title a {
    color: var(--ax-orange-deep, #B0401A);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.mcr-promos__title i {
    color: var(--ax-orange, #F15A29);
    font-size: 0.8em;
}

/* Marco de corte: cuatro escuadras fuera de la imagen. */
.mcr-promos__frame {
    position: relative;
    display: block;
    padding: 14px;
}

.mcr-promos__frame::before,
.mcr-promos__frame::after,
.mcr-promos__crop::before,
.mcr-promos__crop::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--ax-ink, #1F2530);
    border-style: solid;
    pointer-events: none;
}

.mcr-promos__frame::before { top: 0;    left: 0;  border-width: 2px 0 0 2px; }
.mcr-promos__frame::after  { top: 0;    right: 0; border-width: 2px 2px 0 0; }
.mcr-promos__crop::before  { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.mcr-promos__crop::after   { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

.mcr-promos__frame img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--ax-ink, #1F2530);
}

.mcr-promos__frame:focus-visible {
    outline: 3px solid var(--ax-purple, #6A52A2);
    outline-offset: 2px;
}

.mcr-promos__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-top: var(--ax-space-4, 16px);
    padding: 10px 20px;
    border: 2px solid var(--ax-ink, #1F2530);
    background: transparent;
    color: var(--ax-ink, #1F2530);
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease;
}

/* ghost-fill */
.mcr-promos__link:hover,
.mcr-promos__link:focus-visible {
    background: var(--ax-ink, #1F2530);
    color: var(--ax-paper, #FAF6EE);
    text-decoration: none;
}

.mcr-promos__link:focus-visible {
    outline: 3px solid var(--ax-purple, #6A52A2);
    outline-offset: 2px;
}


/* ==========================================================================
   .mcr-uses — prendas de manta (Bleed-edge, pie solo con título)
   Grid CSS puro: vive en el tab "Usos", que nace oculto.
   ========================================================================== */

.mcr-uses {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 32px 0 8px;
    padding: 0;
    list-style: none;
}

@media (min-width: 992px) {
    .mcr-uses { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 575px) {
    .mcr-uses { grid-template-columns: 1fr; }
}

.mcr-use {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--ax-ink, #1F2530);
    border-left: 6px solid var(--ax-orange, #F15A29);
    text-align: left;
}

.mcr-use picture {
    display: block;
    aspect-ratio: 1 / 1;   /* assets 500×500 */
    overflow: hidden;
}

.mcr-use img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 320ms cubic-bezier(.22, 1, .36, 1);
}

.mcr-use__num {
    position: absolute;
    top: 0;
    left: 0;
    padding: 6px 10px;
    background: var(--ax-orange, #F15A29);
    color: var(--ax-ink, #1F2530);
    font-family: var(--ax-font-mono, 'JetBrains Mono', ui-monospace, monospace);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.mcr-use__cap {
    flex: 1 1 auto;
    padding: 12px 14px 14px;
    background: var(--ax-ink, #1F2530);
    color: var(--ax-white, #FFFFFF);
}

.mcr-use__title {
    margin: 0;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 16px !important;  /* style.css: h4 global */
    font-weight: 700;
    line-height: 1.3;
    color: var(--ax-white, #FFFFFF);
}

/* Sin descripción: el pie solo lleva el título; el hover acerca la foto. */
@media (hover: hover) {
    .mcr-use:hover img { transform: scale(1.04); }
}


/* Enlace de composición en el hero: ink + subrayado naranja (no azul Bootstrap). */
.ax-spec-list__value a {
    color: var(--ax-ink, #1F2530);
    text-decoration: underline;
    text-decoration-color: var(--ax-orange, #F15A29);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* Enlace dentro de la ficha técnica: ink + subrayado naranja (no azul Bootstrap). */
.product-infor-tab-content .tc-spec-value a {
    color: var(--ax-ink, #1F2530);
    text-decoration: underline;
    text-decoration-color: var(--ax-orange, #F15A29);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

/* tergal-catalan.css deja .tc-spec-label en 11px; piso de legibilidad 14px. */
.product-infor-tab-content .tc-spec-label {
    font-size: 14px;
    color: var(--ax-ink, #1F2530);
}

.mcr-info__title {
    margin: 0 0 12px;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: clamp(0.86rem, 1.1vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ax-ink, #1F2530);
}


/* ==========================================================================
   .mcr-faq — acordeón ax-faq.js (data-ax-faq), exclusivo por grupo.
   Sin JS, <details> nativo sigue funcionando (SEO intacto).
   ========================================================================== */

.mcr-faqsec__grid {
    display: grid;
    gap: clamp(1.75rem, 4vw, 3rem);
    align-items: start;
}

@media (min-width: 940px) {
    .mcr-faqsec__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
    .mcr-faqsec__aside { position: sticky; top: 130px; }
}

.mcr-faqsec__title { margin: 0.6rem 0 0; }

.mcr-faqsec__note {
    font-family: var(--ax-font-accent);
    font-style: italic;
    color: var(--ax-muted);
    font-size: clamp(1.02rem, 1.5vw, 1.18rem);
    line-height: 1.5;
    max-width: 42ch;
    margin: clamp(1rem, 2.4vw, 1.4rem) 0;
}

.mcr-faq { display: flex; flex-direction: column; gap: 12px; }

.mcr-faq__item {
    background: var(--ax-white);
    border: 1.5px solid var(--ax-rule);
    transition: border-color var(--ax-motion-fast) var(--ax-ease-out),
                box-shadow var(--ax-motion-fast) var(--ax-ease-out);
}

.mcr-faq__item:hover { border-color: var(--ax-ink); }

.mcr-faq__item[open] {
    border-color: var(--ax-ink);
    border-left: 4px solid var(--ax-orange);
    box-shadow: 5px 5px 0 var(--ax-ink);
}

.mcr-faq__q {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 44px;
    padding: clamp(13px, 1.8vw, 17px) clamp(16px, 2.2vw, 22px);
    /* side-shift */
    transition: padding-left var(--ax-motion-fast) var(--ax-ease-out);
}

.mcr-faq__q::-webkit-details-marker { display: none; }
.mcr-faq__q::marker { content: ""; }
.mcr-faq__item:hover .mcr-faq__q { padding-left: calc(clamp(16px, 2.2vw, 22px) + 5px); }

.mcr-faq__q:focus-visible {
    outline: 3px solid var(--ax-purple, #6A52A2);
    outline-offset: 2px;
}

.mcr-faq__q-text {
    flex: 1;
    font-family: var(--ax-font-body);
    font-weight: 700;
    font-size: clamp(0.98rem, 1.4vw, 1.12rem) !important;  /* style.css fuerza h3 a 25px en móvil */
    line-height: 1.35;
    color: var(--ax-ink);
    margin: 0;
    transition: color var(--ax-motion-fast) var(--ax-ease-out);
}

.mcr-faq__q::after {
    content: '+';
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    font-family: var(--ax-font-display);
    font-size: 1.35rem;
    line-height: 1;
    background: var(--ax-cream);
    color: var(--ax-orange-deep, #B0401A);
    border: 1.5px solid var(--ax-ink);
    transition: transform var(--ax-motion-fast) var(--ax-ease-out),
                background var(--ax-motion-fast) var(--ax-ease-out),
                color var(--ax-motion-fast) var(--ax-ease-out);
}

.mcr-faq__item[open] .mcr-faq__q-text { color: var(--ax-orange-deep, #B0401A); }

.mcr-faq__item[open] .mcr-faq__q::after {
    transform: rotate(45deg);
    background: var(--ax-orange);
    color: var(--ax-paper);
    border-color: var(--ax-orange);
}

.mcr-faq__a {
    font-family: var(--ax-font-body);
    font-size: clamp(0.95rem, 1.1vw, 1.0625rem);
    line-height: 1.65;
    color: var(--ax-muted);
    max-width: 72ch;
    padding: 0 clamp(16px, 2.2vw, 22px) clamp(16px, 2.2vw, 20px);
    margin: 0;
}

.mcr-faq__a strong { color: var(--ax-ink); }

.mcr-faq__a a {
    color: var(--ax-ink);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--ax-orange);
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}


/* ==========================================================================
   Motion — prefers-reduced-motion (regla dura)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .mcr-promos__link,
    .mcr-type,
    .mcr-type__media img,
    .mcr-use img,
    .mcr-faq__item,
    .mcr-faq__q,
    .mcr-faq__q-text,
    .mcr-faq__q::after {
        transition: none !important;
    }
    .mcr-use:hover img,
    .mcr-type:hover,
    .mcr-type:hover .mcr-type__media img { transform: none; }
}
