/* ==========================================================================
   Mesh Liso — componentes propios de /telas/mesh/liso
   Arletex Design System v3.5 · prefijo `ml-`
   Depende de landing-producto.css (tokens --ax-*, hero, sticky, sheet, cross)
   y de tergal-catalan.css (.tc-specs-grid de la ficha técnica).
   --------------------------------------------------------------------------
   Mapa de registros (variación §11.6):
     Hero ............ @dossier   · Dossier-stack  · Top-rule      (global)
     .ax-cross ....... @showcase  · LabelLateral   · Full-frame    (global)
     Tab Descripción . @technical · LabelLateral   · Side-rule     (tarjeta-beneficio)
     .ml-uses ........ @gallery   · IndexRow       · Bleed-edge    · zoom de foto
     .ml-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)
   ========================================================================== */

.ml-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);
}

/* Primer H2 del hero, pegado al H1 (conserva el «Tela Malla» legacy). */
.ml-hero-sub--lead {
    margin-top: var(--ax-space-3, 12px);
    color: var(--ax-orange-deep, #B0401A);
}

/* Muestrario del hero: 16 colores en una sola tira. El hint de arriba dice
   qué hacen los dots (el legacy lo decía con una flechita). */
.ml-swatch-hint {
    display: block;
    margin: 0 0 8px;
    font-family: var(--ax-font-body, 'Lato', system-ui, sans-serif);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.3;
    color: var(--ax-muted, #6E6A60);
}

.ml-swatch-hint strong { color: var(--ax-ink, #1F2530); }

/* 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;
}


/* ==========================================================================
   Tab Descripción — ficha técnica sobre .tarjeta-beneficio (global)
   ========================================================================== */

/* 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);
}

/* Lista de los 16 colores dentro de la ficha técnica: la celda «Colores»
   la escribe en texto corrido, aquí sólo se ajusta el interlineado. */
.product-infor-tab-content .tc-spec-value--colores {
    line-height: 1.5;
    font-weight: 400;
}


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

.ml-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) {
    .ml-uses { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

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

.ml-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;
}

.ml-use picture {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

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

.ml-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;
}

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

.ml-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);
}

@media (hover: hover) {
    .ml-use:hover img { transform: scale(1.04); }
}


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

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

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

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

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

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

.ml-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);
}

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

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

.ml-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);
}

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

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

.ml-faq__q-text {
    flex: 1;
    margin: 0;
    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);
    transition: color var(--ax-motion-fast) var(--ax-ease-out);
}

.ml-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);
}

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

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

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

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

.ml-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) {
    .ml-use img,
    .ml-faq__item,
    .ml-faq__q,
    .ml-faq__q-text,
    .ml-faq__q::after {
        transition: none !important;
    }
    .ml-use:hover img { transform: none; }
}
