/**
 * Widget Botón fijo en móvil (inv_cta_fijo)
 * La barra se mueve al <body> por JS; los valores --inv-cta-* los ponen los controles del widget.
 */

.inv-cta {
    --inv-cta-bg: #20142e;
    --inv-cta-color: #fff;
    --inv-cta-radius: 10px;

    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990; /* por debajo de los popups de Elementor y del lightbox */
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -4px 16px rgba(32, 20, 46, 0.12);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s 0.25s;
}

.inv-cta.is-visible {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.25s ease;
}

/* Selector doble: gana a los estilos globales de botón y enlace del kit */
.inv-cta .inv-cta__btn.inv-cta__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 16px;
    border-radius: var(--inv-cta-radius);
    background: var(--inv-cta-bg);
    color: var(--inv-cta-color);
    font-family: "Clash Display", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.inv-cta .inv-cta__btn.inv-cta__btn:active {
    transform: scale(0.98);
}

.inv-cta .inv-cta__btn.inv-cta__btn:focus-visible {
    outline: 2px solid #505dc3;
    outline-offset: 2px;
}

/* Reserva el alto de la barra para que no tape el final del contenido */
html.inv-cta-on body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

/* Editor de Elementor: se ve en su sitio para poder editarla */
.elementor-editor-active .inv-cta,
.elementor-editor-preview .inv-cta {
    position: static;
    transform: none;
    visibility: visible;
    box-shadow: none;
    padding: 0;
}

@media (prefers-reduced-motion: reduce) {
    .inv-cta,
    .inv-cta.is-visible {
        transition: none;
    }
}

/* Editor: que se vea que es la barra fija del móvil, no un tercer botón de la ficha */
.elementor-editor-active .inv-cta,
.elementor-editor-preview .inv-cta {
    position: relative;
    margin-top: 10px;
    padding: 26px 10px 10px;
    border: 1.5px dashed #a59fb6;
    border-radius: 12px;
    opacity: .8;
}
.elementor-editor-active .inv-cta::before,
.elementor-editor-preview .inv-cta::before {
    content: "Botón fijo del móvil · solo aparece abajo al bajar por la ficha en el móvil";
    position: absolute;
    top: 6px;
    left: 10px;
    font: 600 11px/1.3 "Plus Jakarta Sans", sans-serif;
    color: #6f6880;
}

/* ---------- Coche fijo arriba (móvil): foto, nombre, cuota y precio bajo la cabecera ---------- */
.inv-top { display: none; }
@media (max-width: 767px) {
    .inv-top {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        top: var(--inv-top-y, 0px);
        z-index: 985; /* bajo la cabecera y los popups */
        background: #fff; /* sólido: las fotos de portada llevan fondo blanco */
        border-bottom: 1px solid #eceaf2;
        box-shadow: 0 6px 16px -10px rgba(32, 20, 46, .25);
        opacity: 0;
        transform: translateY(-8px);
        visibility: hidden;
        pointer-events: none;
        transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
    }
    .inv-top.is-visible { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity .2s ease, transform .2s ease; }
}
/* Selector doble: gana a los estilos globales de botón del kit */
.inv-top .inv-top__in.inv-top__in {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 0; padding: 6px 16px;
    border: 0; border-radius: 0; background: none; color: #20142e; text-align: left; cursor: pointer;
    font: 400 14px/1.2 "Plus Jakarta Sans", sans-serif; text-transform: none; letter-spacing: 0; -webkit-tap-highlight-color: transparent;
}
.inv-top .inv-top__in:focus-visible { outline: 2px solid #505dc3; outline-offset: -3px; }
.inv-top__img { flex: none; width: 64px; height: 40px; object-fit: contain; }
.inv-top__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.inv-top__t { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 600 15px/1.15 "Clash Display", sans-serif; color: #20142e; }
.inv-top__v { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: #6f6880; text-transform: uppercase; letter-spacing: .04em; }
.inv-top__p { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.inv-top__c { font: 800 16px/1.1 "Plus Jakarta Sans", sans-serif; color: #505dc3; letter-spacing: -.01em; }
.inv-top__c small { font-size: 12px; font-weight: 500; }
.inv-top__pr { font-size: 12px; color: #6f6880; }
@media (prefers-reduced-motion: reduce) { .inv-top, .inv-top.is-visible { transition: none; } }
/* Editor: se ve como aviso, no como parte de la ficha */
.elementor-editor-active .inv-top, .elementor-editor-preview .inv-top { display: block; position: relative; opacity: .8; visibility: visible; transform: none; margin-top: 10px; border: 1.5px dashed #a59fb6; border-radius: 12px; padding-top: 20px; }
.elementor-editor-active .inv-top::before, .elementor-editor-preview .inv-top::before { content: "Coche fijo arriba · solo en el móvil al bajar por la ficha"; position: absolute; top: 4px; left: 10px; font: 600 11px/1.3 "Plus Jakarta Sans", sans-serif; color: #6f6880; }
