/* ═══════════════════════════════════════════════════════════
   Financiación Premium v1.1 — CSS
   Diseño compacto para columna derecha · tema Warehouse
   Colores: SeQura #00a19a · Aplazame #1F5BFF (corporativo)
═══════════════════════════════════════════════════════════ */

.fp-financing-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 4px;
    font-family: inherit;
    font-size: 13px;
}

.fp-block {
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.fp-block--sequra:hover {
    border-color: #b2e0de;
    box-shadow: 0 3px 12px rgba(0, 161, 154, 0.1);
}

.fp-block--aplazame:hover {
    border-color: #a0b8ff;
    box-shadow: 0 3px 12px rgba(31, 91, 255, 0.1);
}

.fp-block__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 8px;
    border-bottom: 1px solid #f2f2f2;
}

.fp-block--sequra .fp-block__header { background: #f0fafa; }
.fp-block--aplazame .fp-block__header { background: #f5f7ff; }

.fp-block__title {
    font-size: 12.5px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.fp-logo-sequra  { width: 70px;  height: 18px; flex-shrink: 0; }
.fp-logo-aplazame { width: 105px; height: 20px; flex-shrink: 0; }

.fp-block__body { padding: 10px 12px 12px; }

.fp-block__footer {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-top: 1px solid #f2f2f2;
    font-size: 10px;
    color: #aaa;
    line-height: 1.3;
}

.fp-icon { width: 12px; height: 12px; flex-shrink: 0; color: #ccc; }

/* ── SeQura ── */
sequra-promotion { display: block; min-height: 36px; }

.fp-sequra-fallback { display: block; }
.fp-sequra-fallback.is-visible { display: block; }

.fp-installments {
    display: flex;
    align-items: stretch;
    border: 1px solid #c8e9e7;
    border-radius: 6px;
    overflow: hidden;
    background: #f0fafa;
}

.fp-installment-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 9px 6px;
    gap: 1px;
}

.fp-installment-divider { width: 1px; background: #c0e5e3; flex-shrink: 0; }

.fp-installment-num  { font-size: 20px; font-weight: 700; color: #00a19a; line-height: 1; }
.fp-installment-label { font-size: 9px; color: #007d78; text-transform: uppercase; letter-spacing: .06em; }
.fp-installment-amount { font-size: 11.5px; font-weight: 600; color: #222; margin-top: 3px; }

.fp-sequra-disclaimer {
    font-size: 10px; color: #bbb; margin: 7px 0 0;
    font-style: italic; line-height: 1.3;
}

/* ── Aplazame (colores corporativos: #1F5BFF) ── */
.fp-aplazame-widget { min-height: 36px; display: block; }

.fp-aplazame-banner { display: block; }
.fp-aplazame-banner.is-visible { display: block; }

.fp-aplazame-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.fp-aplazame-pill {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: #f0f4ff;
    border: 1.5px solid #c0d0ff;
    border-radius: 6px;
    padding: 6px 10px;
    flex: 1;
}

.fp-aplazame-desde { font-size: 11px; color: #888; white-space: nowrap; }

.fp-aplazame-monthly {
    font-size: 17px;
    font-weight: 700;
    color: #1F5BFF;
    font-style: normal;
    line-height: 1;
}

.fp-aplazame-mes { font-size: 11px; color: #888; white-space: nowrap; }

.fp-aplazame-cta {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    background: #1F5BFF;
    color: #fff !important;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.fp-aplazame-cta:hover { background: #1648e0; }

.fp-aplazame-sub { font-size: 10px; color: #aaa; margin: 0; line-height: 1.4; }

.fp-config-notice {
    padding: 8px 12px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    font-size: 11px;
    color: #856404;
    line-height: 1.4;
}

@media (max-width: 400px) {
    .fp-aplazame-row { flex-wrap: wrap; }
    .fp-aplazame-cta { width: 100%; justify-content: center; }
    .fp-installment-num { font-size: 17px; }
}

/* ── Sticky imágenes del producto (columna izquierda) ────── */
/* Evita el descuadre cuando la columna derecha es más larga  */
@media (min-width: 768px) {
    .page-product .images-container,
    .page-product .product-images-container,
    .page-product #product-images-thumbs,
    .page-product .product-cover {
        position: sticky;
        top: 20px;
    }
}

/* ── Sticky corregido: compensa header fijo del tema Warehouse ── */
@media (min-width: 768px) {
    .page-product .images-container,
    .page-product .product-images-container,
    .page-product #product-images-thumbs,
    .page-product .product-cover {
        position: sticky;
        /* Calcula el offset real via JS — ver financiacion_premium.js */
        top: var(--fp-header-height, 90px);
        /* Limita la altura para que nunca sobrepase la pantalla */
        max-height: calc(100vh - var(--fp-header-height, 90px) - 20px);
        overflow: visible;
    }
}
