/* =============================================================
   BLOQUES DE CONVERSIÓN + BARRA FIJA DEL MÓVIL — «Edición Clínica»
   Los emite includes/EcConversion.php (blog/post.php y producto.php).
   Medición: assets/js/ec-cta.js. Tokens: assets/css/edicion-clinica.css.
   ============================================================= */

.ec-cta {
    position: relative;
    margin: 2em 0;
    padding: 22px 20px 20px;
    background: var(--ec-card-bg, #fff);
    border: 1px solid var(--ec-border, rgba(46, 36, 41, 0.10));
    border-radius: var(--ec-radius-card-lg, 18px);
    box-shadow: var(--ec-shadow-featured, 0 16px 36px -22px rgba(139, 95, 131, 0.55));
    font-family: var(--ec-font-body, 'Outfit', sans-serif);
    color: var(--ec-ink, #2E2429);
    overflow: hidden;
}

.ec-cta::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--ec-rose, #B8728E);
}

.ec-cta-eyebrow {
    font-family: var(--ec-font-mono, monospace);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ec-mauve, #8B5F83);
}

.ec-cta .ec-cta-title {
    font-family: var(--ec-font-display, Georgia, serif) !important;
    font-weight: 400;
    font-size: 26px;
    line-height: 1.15;
    color: var(--ec-ink, #2E2429);
    margin: 6px 0 8px !important;
}

.ec-cta .ec-cta-text {
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ec-text-2, #4A3D43);
    margin: 0 0 16px !important;
}

.ec-cta-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.ec-cta a.ec-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    background: var(--ec-rose-cta, #9C5876);
    color: #fff !important;
    border-radius: var(--ec-radius-pill, 999px);
    font-weight: 600;
    font-size: 15.5px;
    text-decoration: none !important;
    transition: background var(--ec-transition, 200ms ease);
}

.ec-cta a.ec-cta-btn:hover {
    background: var(--ec-rose-cta-hover, #8F4F6A);
}

.ec-cta a.ec-cta-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--ec-tap-min, 44px);
    color: var(--ec-mauve, #8B5F83) !important;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none !important;
}

.ec-cta a.ec-cta-link:hover {
    text-decoration: underline !important;
}

.ec-cta .ec-cta-advice {
    margin: 14px 0 0 !important;
    padding-top: 14px;
    border-top: 1px solid var(--ec-border, rgba(46, 36, 41, 0.10));
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ec-text-2, #4A3D43);
}

.ec-cta .ec-cta-advice a {
    color: var(--ec-rose-text, #9C5876) !important;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ec-cta .ec-cta-intl {
    margin: 8px 0 0 !important;
    font-size: 12.5px;
    line-height: 1.45;
    font-style: italic;
    color: var(--ec-muted, #6E5F66);
}

@media (min-width: 600px) {
    .ec-cta {
        padding: 26px 28px 24px;
    }

    .ec-cta .ec-cta-title {
        font-size: 30px;
    }

    .ec-cta-actions {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px 18px;
    }

    .ec-cta a.ec-cta-btn {
        min-height: 46px;
    }
}

/* ---------- Barra fija del móvil (< 768 px) ---------- */
.ec-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)) 14px;
    background: rgba(247, 243, 241, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--ec-border-12, rgba(46, 36, 41, 0.12));
    font-family: var(--ec-font-body, 'Outfit', sans-serif);
    transform: translateY(110%);
    transition: transform 220ms ease;
}

.ec-sticky[hidden] {
    display: none;
}

.ec-sticky.is-on {
    transform: translateY(0);
}

.ec-sticky-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ec-ink, #2E2429);
    min-height: 44px;
}

.ec-sticky-text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-sticky-btn {
    flex: 0 0 auto;
    background: var(--ec-rose-cta, #9C5876);
    color: #fff;
    border-radius: var(--ec-radius-pill, 999px);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
}

.ec-sticky-close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--ec-muted, #6E5F66);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}

@media (min-width: 768px) {
    .ec-sticky {
        display: none !important;
    }
}

/* Con la barra visible, el pie no queda tapado. */
@media (max-width: 767.98px) {
    body.ec-has-sticky {
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }
}

/* Microtexto obligatorio en la barra de la ficha (Legal 2.3: enlace comercial identificado). */
.ec-aff-micro {
    display: block;
    font-size: 11px;
    line-height: 1.2;
    color: var(--ec-muted, #6E5F66);
    letter-spacing: 0.02em;
}
