/* SAHA Global — ajustes visuales cargados en todas las páginas del sitio.
 * v1.5.0
 */

/* Ocultar banner wd-page-title donde WoodMart lo emite por defecto (cart,
 * checkout, páginas estáticas, entradas del blog). La tienda y categorías no
 * lo renderizan porque tienen la opción desactivada en WoodMart. */
.wd-page-title {
    display: none !important;
}

/* ===== Blog — legibilidad long-form =====
 * Scope: contenido de posts (widgets text-editor de Elementor en single-post).
 * Solo tipografía/espaciado (sin max-width, para no pelear con columnas Elementor).
 * No toca home ni páginas (body.single-post) ni grids de producto (no son text-editor).
 * Valores: revisión experto UX 2026-06-19. */

body.single-post .elementor-widget-text-editor {
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
}
body.single-post .elementor-widget-text-editor p {
    margin-bottom: 1.4em;
}

body.single-post .elementor-widget-text-editor h2 {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    margin-top: 1.8em;
    margin-bottom: 0.5em;
}
body.single-post .elementor-widget-text-editor h3 {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    color: #1a1a1a;
    margin-top: 1.5em;
    margin-bottom: 0.4em;
}

body.single-post .elementor-widget-text-editor ul,
body.single-post .elementor-widget-text-editor ol {
    padding-left: 1.4em;
    margin-bottom: 1.4em;
}
body.single-post .elementor-widget-text-editor li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

body.single-post .elementor-widget-text-editor table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.6em 0;
    font-size: 15px;
}
body.single-post .elementor-widget-text-editor th,
body.single-post .elementor-widget-text-editor td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
    vertical-align: top;
}
body.single-post .elementor-widget-text-editor th {
    font-weight: 600;
    background: #f5f5f5;
}

@media (min-width: 768px) {
    body.single-post .elementor-widget-text-editor {
        font-size: 17px;
        line-height: 1.75;
    }
    body.single-post .elementor-widget-text-editor h2 {
        font-size: 28px;
        margin-top: 2em;
    }
    body.single-post .elementor-widget-text-editor h3 {
        font-size: 20px;
    }
}

/* ===== Blog autoría sin Elementor =====
 * Contenido clásico (Gutenberg/HTML) envuelto en .saha-blog-content.
 * Aquí SÍ aplicamos cap de medida de lectura (no hay columnas Elementor que romper)
 * y enmarcado de fotos (borde sutil para que las imágenes claras no se pierdan). */
body.single-post .saha-blog-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
}
body.single-post .saha-blog-content p {
    margin-bottom: 1.4em;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}
body.single-post .saha-blog-content h2 {
    font-size: 26px; font-weight: 600; line-height: 1.3; color: #1a1a1a;
    margin-top: 1.8em; margin-bottom: 0.5em;
}
body.single-post .saha-blog-content h3 {
    font-size: 19px; font-weight: 600; line-height: 1.35; color: #1a1a1a;
    margin-top: 1.5em; margin-bottom: 0.4em;
}
body.single-post .saha-blog-content ul,
body.single-post .saha-blog-content ol { padding-left: 1.4em; margin-bottom: 1.4em; }
body.single-post .saha-blog-content li { margin-bottom: 0.5em; line-height: 1.7; }
body.single-post .saha-blog-content table {
    width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 15px;
}
body.single-post .saha-blog-content th,
body.single-post .saha-blog-content td {
    padding: 12px 14px; border-bottom: 1px solid #e5e5e5; text-align: left; vertical-align: top;
}
body.single-post .saha-blog-content th { font-weight: 600; background: #f5f5f5; }

/* Figuras: centradas, enmarcadas, con respiro */
body.single-post .saha-blog-content figure.saha-foto { margin: 2.5em auto; }
body.single-post .saha-blog-content figure.saha-foto img {
    width: 100%; height: auto; display: block;
    border: 1px solid #ececec; border-radius: 8px;
}
body.single-post .saha-blog-content figure.saha-foto.banda img { border: 0; border-radius: 0; }
body.single-post .saha-blog-content figure.saha-foto.chica { max-width: 480px; }
body.single-post .saha-blog-content figcaption {
    text-align: center; font-size: 14px; color: #777; font-style: italic; margin-top: 0.6em;
}

/* Fila foto-al-lado (imagen + texto en columnas; apila en móvil) */
body.single-post .saha-blog-content .saha-foto-lado {
    display: flex; gap: 1.6em; align-items: center; margin: 2.5em 0;
}
body.single-post .saha-blog-content .saha-foto-lado.derecha { flex-direction: row-reverse; }
body.single-post .saha-blog-content .saha-foto-lado .col-img { flex: 0 0 42%; }
body.single-post .saha-blog-content .saha-foto-lado .col-txt { flex: 1; }
body.single-post .saha-blog-content .saha-foto-lado .col-txt p { margin-bottom: 0; }
body.single-post .saha-blog-content .saha-foto-lado img {
    width: 100%; height: auto; display: block;
    border: 1px solid #ececec; border-radius: 8px;
}
@media (max-width: 767px) {
    body.single-post .saha-blog-content .saha-foto-lado { display: block; }
    body.single-post .saha-blog-content .saha-foto-lado .col-img { margin-bottom: 1.2em; }
}

/* Modo alineación izquierda + medida más angosta (recomendación experto) */
body.single-post .saha-blog-content.align-izq { max-width: 680px; }
body.single-post .saha-blog-content.align-izq p { text-align: left; hyphens: none; -webkit-hyphens: none; }

/* Callout: recuadro para dato clave / advertencia (respiro visual sin foto) */
body.single-post .saha-blog-content .saha-callout {
    background: #f7f7f7; border-left: 4px solid #1a1a1a;
    padding: 1em 1.25em; margin: 1.8em 0; border-radius: 0 6px 6px 0;
}
body.single-post .saha-blog-content .saha-callout.warn {
    border-left-color: #c0392b; background: #fdf3f2;
}
body.single-post .saha-blog-content .saha-callout p:last-child { margin-bottom: 0; }

/* Lista con check (checklists densos → escaneable) */
body.single-post .saha-blog-content ul.saha-check { list-style: none; padding-left: 0; }
body.single-post .saha-blog-content ul.saha-check li {
    position: relative; padding-left: 1.9em; margin-bottom: 0.8em;
}
body.single-post .saha-blog-content ul.saha-check li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: #2e7d32; font-weight: 700;
}

@media (min-width: 768px) {
    body.single-post .saha-blog-content { font-size: 17px; line-height: 1.75; }
    body.single-post .saha-blog-content h2 { font-size: 28px; margin-top: 2em; }
    body.single-post .saha-blog-content h3 { font-size: 20px; }
}

/* ===== Blog interlinking =====
 * .saha-guia-relacionada: bloque contextual en PDP/categoría hacia un blog.
 * .saha-sigue-leyendo: cross-links al final de cada post de blog. */

.saha-guia-relacionada {
    background: #f0f7ff;
    border-left: 3px solid #1a73e8;
    padding: 0.7em 1em;
    margin: 1.5rem 0;
    font-size: 15px;
    border-radius: 0 4px 4px 0;
}
.saha-guia-relacionada a {
    color: #1a73e8;
    text-decoration: underline;
}

body.single-post .saha-sigue-leyendo {
    margin: 2.5rem 0 1rem;
    padding: 1.2rem 1.4rem;
    background: #f7f7f7;
    border-top: 2px solid #1a1a1a;
    border-radius: 0 0 6px 6px;
}
body.single-post .saha-sigue-leyendo p {
    margin-bottom: 0.5em;
}
body.single-post .saha-sigue-leyendo ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}
body.single-post .saha-sigue-leyendo li {
    margin-bottom: 0.4em;
}
body.single-post .saha-sigue-leyendo a {
    color: #1a1a1a;
    text-decoration: underline;
}
