/* CostaCX Popup – Frontend Styles */
.ccxp-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;          /* oculto hasta que JS lo active */
    align-items: center;
    justify-content: center;
    padding: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.ccxp-overlay.ccxp-visible {
    display: flex;
    opacity: 1;
}

.ccxp-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    max-width: 680px;
    width: 100%;
    display: flex;
    overflow: hidden;
    position: relative;
    max-height: 92vh;
    transform: translateY(30px) scale(.97);
    transition: transform .35s ease;
}

.ccxp-overlay.ccxp-visible .ccxp-modal {
    transform: translateY(0) scale(1);
}

/* ── Imagen principal – columna izquierda (desktop) ── */
.ccxp-img-main-wrap {
    flex: 0 0 42%;
    min-height: 280px;
    overflow: hidden;
}

.ccxp-img-main-wrap a { display: block; height: 100%; }

.ccxp-img-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.ccxp-img-main:hover { transform: scale(1.04); }

/* ── Columna derecha ── */
.ccxp-content {
    flex: 1;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.ccxp-h3-top {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin: 0;
}

.ccxp-h2 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.ccxp-h2 a { color: inherit; text-decoration: none; }
.ccxp-h2 a:hover { text-decoration: underline; }

.ccxp-h3-sub1 {
    font-size: 15px;
    font-weight: 400;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.ccxp-h3-sub2 { font-size: 15px; margin: 0; }

/* ── Imagen pequeña ── */
.ccxp-img-small-wrap { border-radius: 8px; overflow: hidden; }
.ccxp-img-small-wrap a { display: block; }
.ccxp-img-small { width: 100%; height: auto; display: block; border-radius: 8px; transition: opacity .2s; }
.ccxp-img-small:hover { opacity: .9; }

/* ── Botón CTA ── */
.ccxp-btn {
    display: block;
    color: #fff !important;
    text-decoration: none !important;
    padding: 12px 20px;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    margin-top: 4px;
    transition: filter .2s, transform .15s;
}
.ccxp-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ── Botón cerrar ── */
.ccxp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background .2s;
    flex-shrink: 0;
}
.ccxp-close:hover { background: #c0392b; }

/* ══════════════════════════════════════════
   RESPONSIVE — tablet estrecha
══════════════════════════════════════════ */
@media (max-width: 600px) {

    .ccxp-overlay { padding: 10px; align-items: flex-end; }

    .ccxp-modal {
        flex-direction: column;
        max-height: 88vh;
        border-radius: 14px 14px 10px 10px;
        width: 100%;
    }

    /* Imagen principal: franja horizontal, menos alta */
    .ccxp-img-main-wrap {
        flex: 0 0 auto;
        height: 200px;
        min-height: unset;
        width: 100%;
    }

    .ccxp-img-main {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    /* Imagen secundaria visible en móvil */
    .ccxp-img-small-wrap { display: block !important; }

    /* Contenido más compacto */
    .ccxp-content {
        padding: 16px 16px 20px;
        gap: 7px;
        overflow-y: auto;
        max-height: calc(88vh - 200px);
    }

    .ccxp-h3-top { font-size: 12px; }

    .ccxp-h2 {
        font-size: 19px;
        line-height: 1.15;
    }

    .ccxp-h3-sub1 { font-size: 13px; line-height: 1.45; }
    .ccxp-h3-sub2 { font-size: 13px; }

    .ccxp-btn {
        padding: 11px 16px;
        font-size: 14px;
        margin-top: 2px;
    }
}

/* ══════════════════════════════════════════
   RESPONSIVE — móvil pequeño (< 380px)
══════════════════════════════════════════ */
@media (max-width: 380px) {

    .ccxp-img-main-wrap,
    .ccxp-img-main { height: 160px; }

    .ccxp-content {
        padding: 12px 14px 16px;
        max-height: calc(88vh - 160px);
    }

    .ccxp-h2 { font-size: 17px; }
    .ccxp-h3-sub1 { font-size: 12px; }
}
