/* ============================================
   ADS CAROUSEL - Pasarela de anuncios
   ============================================ */

/* DESPUÉS */
.ads-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 40px;                /* ← Evitar colapso a 0 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Asegurar que los slides tengan altura */
.ads-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 40px;                /* ← Evitar colapso */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ad-transition, 600ms) cubic-bezier(0.4, 0, 0.2, 1),
                visibility var(--ad-transition, 600ms);
    z-index: 1;
}


/* Contenedor de slides */
.ads-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.ads-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Logo de la marca */
.ads-slide.logo-slide {
    background: #ffffff;
}

.ads-slide.logo-slide img {
    max-height: 80%;
    max-width: 70%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Animación pulse para el logo */
.ads-slide.logo-slide.pulse img {
    animation: ad-logo-pulse 2s ease-in-out infinite;
}

@keyframes ad-logo-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

/* Anuncios */
.ads-slide.ad-slide {
    cursor: pointer;
}

.ads-slide.ad-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Indicadores de posición (dots) */
.ads-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.ads-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.ads-dot.active {
    background: #ffffff;
    width: 18px;
    border-radius: 10px;
}

/* Badge "Anuncio" */
.ads-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    z-index: 5;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Barra de progreso */
.ads-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff6b4a, #ff9a3c);
    z-index: 10;
    transition: width 0.1s linear;
}

/* Estados de carga */
.ads-carousel.loading .ads-slide {
    opacity: 0;
}

.ads-carousel.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top-color: #ff6b4a;
    border-radius: 50%;
    animation: ad-spinner 0.8s linear infinite;
}

@keyframes ad-spinner {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .ads-dots {
        bottom: 6px;
        gap: 4px;
        padding: 3px 8px;
    }
    
    .ads-dot {
        width: 5px;
        height: 5px;
    }
    
    .ads-dot.active {
        width: 14px;
    }
    
    .ads-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
    }
  }
