/* ============================================
   ESTILOS PARA CARRUSELES DE CATEGORÍAS
   ✅ CSS Puro, sin librerías externas
   ✅ Transiciones suaves automáticas
   ============================================ */

/* Contenedor del carrusel de categoría */
.category-card-carousel {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
    height: 180px;
    min-height: 180px;
    border: 1px solid var(--border-color);
}

.category-card-carousel:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Contenedor de imágenes del carrusel */
.carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Imágenes del carrusel */
.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

/* Imagen activa visible */
.carousel-image.active {
    opacity: 1;
    z-index: 2;
}

/* Overlay de categoría sobre el carrusel */
.category-card-carousel .category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    padding: var(--spacing-md);
    color: var(--white);
    z-index: 10;
}

.category-card-carousel .category-name {
    font-size: clamp(1rem, 3vw, 1.125rem);
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.category-count {
    font-size: var(--font-size-sm);
    margin: 0;
    opacity: 0.9;
}

/* Indicadores del carrusel (puntos) */
.carousel-indicators {
    position: absolute;
    bottom: var(--spacing-sm);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.375rem;
    z-index: 15;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.carousel-indicators .indicator.active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* ============================================
   Responsive - Tablets
   ============================================ */
@media (min-width: 600px) {
    .category-card-carousel {
        height: 200px;
        min-height: 200px;
    }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 599px) {
    .category-card-carousel {
        height: 110px;
        min-height: 110px;
    }
    
    .category-card-carousel .category-overlay {
        padding: 0.5rem;
    }
    
    .category-card-carousel .category-name {
        font-size: 0.813rem;
        line-height: 1.2;
    }
    
    .category-count {
        font-size: 0.688rem;
    }
    
    .carousel-indicators {
        bottom: 0.25rem;
        padding: 0.25rem 0.5rem;
    }
    
    .carousel-indicators .indicator {
        width: 6px;
        height: 6px;
    }
    
    .carousel-indicators .indicator.active {
        width: 18px;
    }
}

/* ============================================
   Evitar parpadeo al cargar
   ============================================ */
.carousel-image:not(.active) {
    pointer-events: none;
}

/* Feedback táctil en móvil */
@media (max-width: 599px) {
    .category-card-carousel {
        -webkit-tap-highlight-color: rgba(255, 107, 53, 0.1);
    }
    
    .category-card-carousel:active {
        transform: scale(0.97);
        transition: transform 0.1s;
    }
}
