/* Pop-up Buen Fin - Diseño Profesional y Llamativo */

/* Overlay oscuro de fondo */
.buen-fin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in;
}

.buen-fin-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Contenedor del pop-up */
.buen-fin-popup {
    position: relative;
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #FF6347 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 85vh;
    width: 550px;
    padding: 40px 30px;
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    border: 3px solid #FFD700;
}

/* Efectos de brillo */
.buen-fin-popup::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shine 3s infinite;
}

/* Botón cerrar X */
.buen-fin-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #FFD700;
    border-radius: 50%;
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    line-height: 1;
}

.buen-fin-close:hover {
    background: #FFD700;
    color: #8B0000;
    transform: rotate(90deg) scale(1.1);
}

/* Contenido del pop-up */
.buen-fin-content {
    position: relative;
    z-index: 5;
}

/* Badge "Buen Fin" */
.buen-fin-badge {
    display: inline-block;
    background: #FFD700;
    color: #8B0000;
    font-size: 16px;
    font-weight: 900;
    padding: 8px 20px;
    border-radius: 25px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    animation: pulse 2s infinite;
}

/* Título principal */
.buen-fin-title {
    font-size: 42px;
    font-weight: 900;
    color: #FFFFFF;
    margin: 15px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Destacado especial */
.buen-fin-highlight {
    font-size: 52px;
    color: #FFEB3B;
    display: block;
    margin: 10px 0;
    text-shadow: 0 0 20px rgba(255, 235, 59, 0.8);
    animation: glow 1.5s ease-in-out infinite alternate;
}

/* Descripción */
.buen-fin-description {
    font-size: 20px;
    color: #FFFFFF;
    margin: 20px 0;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Lista de beneficios */
.buen-fin-benefits {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.buen-fin-benefits li {
    font-size: 18px;
    color: #FFFFFF;
    padding: 8px 0;
    font-weight: 600;
}

.buen-fin-benefits li::before {
    content: '✓';
    color: #FFD700;
    font-weight: bold;
    margin-right: 10px;
    font-size: 22px;
}

/* Botón de acción */
.buen-fin-cta {
    display: inline-block;
    background: #FFD700;
    color: #8B0000;
    font-size: 22px;
    font-weight: 900;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    margin-top: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    border: 3px solid #8B0000;
}

.buen-fin-cta:hover {
    background: #FFFFFF;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.5) rotate(-5deg);
        opacity: 0;
    }
    70% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 235, 59, 0.8), 0 0 30px rgba(255, 235, 59, 0.6);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 235, 59, 1), 0 0 50px rgba(255, 235, 59, 0.8);
    }
}

@keyframes shine {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .buen-fin-popup {
        width: 85vw;
        max-height: 80vh;
        padding: 30px 20px;
    }

    .buen-fin-title {
        font-size: 32px;
    }

    .buen-fin-highlight {
        font-size: 40px;
    }

    .buen-fin-description {
        font-size: 18px;
    }

    .buen-fin-benefits li {
        font-size: 16px;
    }

    .buen-fin-cta {
        font-size: 18px;
        padding: 12px 30px;
    }

    .buen-fin-badge {
        font-size: 14px;
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    .buen-fin-popup {
        width: 90vw;
        max-height: 75vh;
        padding: 25px 15px;
    }

    .buen-fin-title {
        font-size: 26px;
    }

    .buen-fin-highlight {
        font-size: 34px;
    }

    .buen-fin-description {
        font-size: 16px;
        margin: 15px 0;
    }

    .buen-fin-benefits {
        margin: 15px 0;
    }

    .buen-fin-benefits li {
        font-size: 15px;
        padding: 6px 0;
    }

    .buen-fin-cta {
        font-size: 16px;
        padding: 12px 25px;
    }

    .buen-fin-close {
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
}

/* Muy pequeñas pantallas */
@media (max-width: 360px) {
    .buen-fin-popup {
        padding: 20px 12px;
    }

    .buen-fin-title {
        font-size: 22px;
    }

    .buen-fin-highlight {
        font-size: 28px;
    }
}
