/*
* 2025 (c) AVDB MOTO
*
* MODULE Avdbpartaccesoryslider
*
* @author    Badr
* @copyright Copyright (c) , AVDB MOTO
* @license   Commercial
* @version   1.0.0
*/

/* category Slider Styles */
.category-slider-section {
    padding-bottom: 40px;
    min-height: 240px;
}

.category-slider-wrapper {
    position: relative;
    margin: 0 50px;
    z-index: 0;
    height: 230px;
}

.category-swiper {
    overflow: hidden;
    padding: 20px 0;
    height: 230px !important;
    width: 100% !important;
}

.category-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 160px !important;
    flex-shrink: 0;
}

.category-slide-link {
    display: block;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease;
    /* width: 85%; */
    
    min-width: 120px;
    max-width: 230px;
}

.category-slide-link:hover {
    transform: translateY(-5px);
    text-decoration: none;
}

.category-logo-container {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 130px;
    width: 160px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease;
    flex-shrink: 0;
    flex-grow: 0;
}

.category-logo-container:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.category-logo-img {
    /* LAYOUT SHIFT FIX: Exact dimensions - no max-width/height - MADE LARGER */
    width: 120px !important;
    height: 120px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* LAYOUT SHIFT FIX: Prevent container from changing size */
    flex-shrink: 0;
    flex-grow: 0;
    overflow: hidden;
    position: relative;
}

.category-logo-img img {
    width: 120px !important;
    height: 120px !important;
    object-fit: contain;
    /* LAYOUT SHIFT FIX: Prevent any size changes */
    flex-shrink: 0;
    /* Add background to prevent flash */
    background-color: #f5f5f5;
    border-radius: 4px;
    /* Prevent image decode shifts */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.category-info-box {
    text-align: center;
    /* LAYOUT SHIFT FIX: Fixed height for text area */
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-title {
    font-size: 14px;
    color: #333;
    /* LAYOUT SHIFT FIX: Fixed line height prevents text shifts */
    line-height: 16px !important;
    /* height: 16px !important; */
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
}

/* Navigation Buttons */
.category-nav-prev,
.category-nav-next {
    position: absolute !important;
    top: 50% !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    z-index: 10 !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
}

.category-nav-prev {
    left: -45px !important;
}

.category-nav-next {
    right: -45px !important;
}

.category-nav-prev:hover,
.category-nav-next:hover {
    opacity: 0.8 !important;
}

.category-nav-prev i,
.category-nav-next i {
    font-size: 20px !important;
    color: #666 !important;
    transition: color 0.3s ease !important;
}

.category-nav-prev:hover i,
.category-nav-next:hover i {
    color: white !important;
}

.swiper-button-disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-slider-wrapper {
        margin: 0 30px;
    }

    .category-nav-prev {
        left: -15px !important;
        width: 35px !important;
        height: 35px !important;
    }

    .category-nav-next {
        right: -15px !important;
        width: 35px !important;
        height: 35px !important;
    }

    .category-nav-prev i,
    .category-nav-next i {
        font-size: 18px !important;
    }

    /* .category-logo-container {
        padding: 15px;
        height: 70px;
    }

    .category-logo-img {
        max-height: 50px;
    } */
}

@media (max-width: 480px) {
    .category-slider-section {
        padding-bottom: 0;
        padding-top: 15px;
    }
    /* .category-slider-wrapper {
        margin: 0 20px;
    }

    .category-logo-container {
        padding: 10px;
        height: 60px;
    }

    .category-logo-img {
        max-height: 40px;
    }

    .category-title {
        font-size: 10px;
    } */
}

.category-swiper:not(.swiper-initialized) {
    visibility: hidden;
}

.category-swiper.swiper-initialized {
    visibility: visible;
}