/* 
 * Estilos para el carrusel de categorías
 * Imitando brands_carousel.css
 * views/css/categories_carousel.css
 */

.categories-carousel-container {
    padding: 40px 0;
    /* background-color: #f8f9fa; 
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;*/
}

.categories-carousel-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    position: relative;
}

.categories-carousel-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

.categories-carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.categories-carousel .carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.category-slide {
    flex: 0 0 auto;
    padding: 15px;
    box-sizing: border-box;
    animation: fadeInUp 0.6s ease forwards;
}

.category-slide:nth-child(2) { animation-delay: 0.1s; }
.category-slide:nth-child(3) { animation-delay: 0.2s; }
.category-slide:nth-child(4) { animation-delay: 0.3s; }

.category-item {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    position: relative;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 123, 255, 0.05) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
    pointer-events: none;
}

.category-item:hover::before {
    opacity: 1;
}

.category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.category-image {
    max-width: 40%;
    /* max-height: 80px; */
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.3);
    transition: filter 0.3s ease;
}

.category-item:hover .category-image {
    filter: grayscale(0);
}

.category-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-overlay {
    margin-top: 10px;
    text-align: center;
}

.category-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
}

/* Navegación del carrusel */
.categories-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    background: #fff;
    border: 2px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    color: #007bff;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: #007bff;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.carousel-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.carousel-prev {
    left: -25px;
}

.carousel-next {
    right: -25px;
}

/* Indicadores */
.categories-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #007bff;
    transform: scale(1.2);
}

.carousel-dot:hover {
    background: #6c757d;
}

/* Responsive */
@media (max-width: 1200px) {
    .category-slide {
        flex: 0 0 25%;
    }
}
@media (max-width: 992px) {
    .category-slide {
        flex: 0 0 33.333%;
    }
    .carousel-prev {
        left: -15px;
    }
    .carousel-next {
        right: -15px;
    }
    .category-item {
        height: 100px;
        padding: 15px;
    }
}
@media (max-width: 768px) {
    .category-slide {
        flex: 0 0 50%;
    }
    .categories-carousel-title {
        font-size: 1.5rem;
    }
    .category-item {
        height: 100px;
        padding: 15px;
    }
    .category-image {
        max-height: 60px;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    .carousel-prev,
    .carousel-next {
        left: 10px;
        right: 10px;
    }
    .carousel-next {
        right: 10px;
        left: auto;
    }
}
@media (max-width: 576px) {
    .category-slide {
        flex: 0 0 100%;
    }
    .categories-carousel-container {
        padding: 30px 0;
    }
    .categories-carousel-nav {
        display: none;
    }
}

/* Animación de carga */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.categories-carousel-nav {
    display: none;
}
