/* Popup de Ofertas - Carrusel */
.offers-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.offers-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.offers-popup-overlay.show {
    opacity: 1;
}

.offers-popup {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    width: 800px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.offers-popup-overlay.show .offers-popup {
    transform: scale(1);
}

.offers-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
    line-height: 1;
}

.offers-popup-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg);
}

.offers-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.offers-carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.offers-carousel-item {
    display: none;
    width: 100%;
}

.offers-carousel-item.active {
    display: block;
}

.offers-carousel-item img {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    display: block;
}

/* Navegación del carrusel */
.offers-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 20px;
    z-index: 5;
}

.offers-carousel-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
}

.offers-carousel-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.offers-carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Indicadores */
.offers-carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 5;
}

.offers-carousel-indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.offers-carousel-indicator.active {
    background: white;
    transform: scale(1.3);
}

/* Contador */
.offers-carousel-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 5;
}

/* Responsive */
@media (max-width: 768px) {
    .offers-popup {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .offers-popup-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
        font-size: 20px;
    }

    .offers-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .offers-carousel-nav {
        padding: 0 10px;
    }

    .offers-carousel-counter {
        top: 10px;
        left: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }

    .offers-carousel-indicators {
        bottom: 15px;
        gap: 8px;
    }

    .offers-carousel-indicator {
        width: 8px;
        height: 8px;
    }
}

/* Animación de entrada */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.offers-popup {
    animation: slideInUp 0.4s ease-out;
}

/* Preloader para imágenes */
.offers-carousel-item.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.offers-carousel-item.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
