/* استایل‌های اصلی ویجت دسته‌بندی گردونه */
.wcc-category-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 40px 10px;
    box-sizing: border-box;
}

.wcc-category-carousel-wrapper .swiper {
    width: 100%;
    max-width: 100%;
    padding: 20px 0;
    margin: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.wcc-category-carousel-wrapper .swiper-wrapper {
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.swiper-slide {
    box-sizing: border-box;
    display: flex !important;
    justify-content: center;
    align-items: center;
    overflow: visible;
    flex-shrink: 0;
    height: auto;
}

/* کلاس ویژه برای اسلایدهای قابل مشاهده */
.swiper-slide-visible .wcc-category-item {
    opacity: 1;
}

.wcc-category-item {
    position: relative;
    text-align: center;
    transition: color 0.3s ease;
    background: transparent;
    border-radius: 50%;
    overflow: visible;
    width: 100%;
    height: auto;
    max-width: 150px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* از اسکیل کل کارت در هاور پرهیز می‌کنیم تا بریده نشود */

.wcc-category-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
    position: relative;
}

.wcc-category-image {
    position: relative;
    overflow: visible;
    border-radius: 50%;
    width: 100%;
    max-width: 150px;
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

/* بوردر ساده در هاور */
.wcc-category-image::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: border-color 0.3s ease;
    z-index: -1;
}

.wcc-category-item:hover .wcc-category-image::before {
    border-color: #2c3e50;
}

.wcc-category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    transition: all 0.3s ease;
    border-radius: 0;
    position: relative;
    z-index: 1;
}

.wcc-category-title {
    font-size: 16px;
    font-weight: 400;
    color: #333;
    margin: 15px 0 0 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.wcc-category-item:hover .wcc-category-title {
    color: #2c3e50;
}

/* حذف کامل تمام سایه‌ها و افکت‌های پس‌زمینه */
.wcc-category-item,
.wcc-category-link,
.wcc-category-image,
.wcc-category-image img,
.wcc-category-title {
    box-shadow: none !important;
    text-shadow: none !important;
}

/* حذف هر گونه background غیر از دایره اصلی */
.wcc-category-item {
    background: transparent !important;
}

.wcc-category-item::before,
.wcc-category-item::after {
    display: none !important;
}

.wcc-category-link::before,
.wcc-category-link::after {
    display: none !important;
}

/* استایل‌های دکمه‌های ناوبری */
.wcc-category-carousel-wrapper .swiper-button-next,
.wcc-category-carousel-wrapper .swiper-button-prev {
    position: absolute;
    top: 50%;
    width: 45px;
    height: 45px;
    margin-top: -22px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #000000;
    /* حذف سایه و افزودن بوردر ظریف */
    box-shadow: none;
    border: 1px solid #e5e5e5;
}

.wcc-category-carousel-wrapper .swiper-button-next:hover,
.wcc-category-carousel-wrapper .swiper-button-prev:hover {
    background: #f0f0f0;
    transform: scale(1.1);
}

.wcc-category-carousel-wrapper .swiper-button-next {
    right: 10px;
}

.wcc-category-carousel-wrapper .swiper-button-prev {
    left: 10px;
}

.wcc-category-carousel-wrapper .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.wcc-category-carousel-wrapper .swiper-button-next:after,
.wcc-category-carousel-wrapper .swiper-button-prev:after {
    font-size: 14px;
    font-weight: bold;
}

/* استایل‌های نقطه‌های صفحه‌بندی */
.wcc-category-carousel-wrapper .swiper-pagination {
    position: relative;
    margin-top: 20px;
    /* چینش وسط با فلکس */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    left: 0 !important;
    right: 0 !important;
}

.wcc-category-carousel-wrapper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
}

.wcc-category-carousel-wrapper .swiper-pagination-bullet-active {
    background: #2c3e50;
    transform: scale(1.2);
}

/* امکان بیرون‌زدگی تصویر بدون دفرمه شدن */
.wcc-category-image {
    overflow: visible; /* اجازه بده تصویر از دایره بیرون بزند */
}

/* زوم نرم تصویر در هاور فقط روی خود تصویر */
/* توجه: بزرگنمایی هاور تصویر حذف شد تا با مقدار کنترل بزرگنمایی در المنتور تداخل نداشته باشد */

/* تنظیمات ریسپانسیو */
@media (max-width: 1280px) {
    .wcc-category-item,
    .wcc-category-image {
        max-width: 140px;
    }
}

@media (max-width: 1024px) {
    .wcc-category-carousel-wrapper {
        padding: 40px 50px;
    }
    
    .wcc-category-item,
    .wcc-category-image {
        max-width: 130px;
    }
}

@media (max-width: 768px) {
    .wcc-category-carousel-wrapper {
        padding: 30px 45px;
    }
    
    .wcc-category-item,
    .wcc-category-image {
        max-width: 120px;
    }
    
    .wcc-category-image {
        padding: 16px;
    }
    
    .wcc-category-title {
        font-size: 14px;
    }
    
    .wcc-category-carousel-wrapper .swiper-button-next,
    .wcc-category-carousel-wrapper .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17px;
    }
    
    .wcc-category-carousel-wrapper .swiper-button-next:after,
    .wcc-category-carousel-wrapper .swiper-button-prev:after {
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .wcc-category-item,
    .wcc-category-image {
        max-width: 110px;
    }
    
    .wcc-category-image {
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .wcc-category-carousel-wrapper {
        padding: 20px 40px;
    }
    
    .wcc-category-item,
    .wcc-category-image {
        max-width: 100px;
    }
    
    .wcc-category-image {
        padding: 13px;
    }
    
    .wcc-category-title {
        font-size: 12px;
        margin: 8px 0 0 0;
    }
}

/* انیمیشن‌های لودینگ */
.wcc-category-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* استایل‌های مخصوص RTL */
[dir="rtl"] .wcc-category-carousel-wrapper .swiper-button-next {
    left: 10px;
    right: auto;
}

[dir="rtl"] .wcc-category-carousel-wrapper .swiper-button-prev {
    right: 10px;
    left: auto;
}

/* حالت‌های خاص */
.wcc-category-item.no-image .wcc-category-image {
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcc-category-item.no-image .wcc-category-image:before {
    content: "📁";
    font-size: 48px;
    opacity: 0.3;
}