/* ============================================================================
   Clienty · legacy-product-fix.css · IT-1.b (v0.71.0)
   Corrige fichas de producto con contenido heredado de Elementor mientras se
   migran una a una a Producto FAST. Causa raíz verificada en la BD: 74
   productos publicados traen <svg viewBox="..."> SIN width/height (checks de
   listas y flechas de acordeón). Sin el CSS de Elementor, esos SVG se expanden
   al ancho completo (icono gigante) y empujan su texto un "salto" más abajo.
   Sustituye al archivo manual emergency-product-fix.css del servidor.
   Ámbito: descripción/extracto del producto nativo y cuerpo Woo FAST.
   ========================================================================== */

/* --- 1) Cualquier SVG heredado sin dimensiones queda a tamaño de icono ----- */
.cwd-single-product__description svg:not([width]):not([height]),
.cwd-single-product__excerpt svg:not([width]):not([height]),
.cwd-fast-woo-body svg:not([width]):not([height]),
.cwd-single-product__description li > svg,
.cwd-fast-woo-body li > svg {
    width: 1.1em !important;
    height: 1.1em !important;
    min-width: 1.1em;
    max-width: 1.1em;
    display: inline-block;
    vertical-align: -0.15em;
    fill: currentColor;
    flex: 0 0 auto;
}

/* --- 2) Listas con icono: icono y frase en la MISMA línea, sin salto ------- */
.cwd-single-product__description ul,
.cwd-fast-woo-body ul {
    list-style: none;
    margin: 0.9em 0;
    padding-left: 0;
}

.cwd-single-product__description ul > li,
.cwd-fast-woo-body ul > li {
    display: flex;
    align-items: flex-start;
    gap: 0.55em;
    margin: 0.4em 0;
    line-height: 1.55;
}

.cwd-single-product__description ul > li > svg:first-child,
.cwd-fast-woo-body ul > li > svg:first-child {
    margin-top: 0.22em; /* alinea el check con la primera línea de texto */
    color: #22c55e;
}

/* Listas ordenadas y listas dentro de tablas: comportamiento normal */
.cwd-single-product__description ol,
.cwd-fast-woo-body ol {
    padding-left: 1.4em;
}

/* --- 3) Flechas de acordeón heredadas (pares 192/512 y 320/512) ------------ */
/* Sin el JS de Elementor se pintan las dos flechas (abierta y cerrada).
   Las reducimos a tamaño de texto y atenuamos la segunda para que no
   parezcan dos iconos sueltos. */
.cwd-single-product__description svg[viewBox="0 0 192 512"],
.cwd-single-product__description svg[viewBox="0 0 320 512"],
.cwd-fast-woo-body svg[viewBox="0 0 192 512"],
.cwd-fast-woo-body svg[viewBox="0 0 320 512"] {
    width: 0.8em !important;
    height: 0.8em !important;
    min-width: 0.8em;
    max-width: 0.8em;
    margin-right: 0.4em;
    opacity: 0.65;
}

.cwd-single-product__description svg[viewBox="0 0 192 512"] + svg[viewBox="0 0 320 512"],
.cwd-fast-woo-body svg[viewBox="0 0 192 512"] + svg[viewBox="0 0 320 512"] {
    display: none; /* oculta la flecha duplicada del estado alterno */
}

/* --- 4) Medios heredados nunca desbordan ----------------------------------- */
.cwd-single-product__description img,
.cwd-fast-woo-body img {
    max-width: 100%;
    height: auto;
}

.cwd-single-product__description iframe,
.cwd-fast-woo-body iframe {
    max-width: 100%;
}

/* --- 5) Respiración razonable del contenido heredado ----------------------- */
.cwd-single-product__description h2,
.cwd-single-product__description h3,
.cwd-single-product__description h5 {
    margin: 1.4em 0 0.5em;
}

.cwd-single-product__description > p:first-child {
    margin-top: 0;
}

/* Enlaces de preguntas del acordeón heredado: que parezcan interactivos */
.cwd-single-product__description a[tabindex="0"],
.cwd-fast-woo-body a[tabindex="0"] {
    display: inline-block;
    font-weight: 600;
    margin: 0.35em 0;
}
