.wc-category-carousel-wrapper {
    padding: 30px 0;
    position: relative;
    width: 100%;
}

.wc-category-carousel {
    width: 100%;
    height: 100%;
    padding: 20px 10px;
}

.wc-category-slide {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}

.wc-category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 20px 15px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    height: 100%;
    width: 100%;
}

.wc-category-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.wc-category-image {
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #f8f9fa;
    transition: border-color 0.3s ease;
    /* Dynamic sizes will be set by JavaScript */
    width: 120px;
    height: 120px;
}

.wc-category-link:hover .wc-category-image {
    border-color: #007cba;
}

.wc-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wc-category-link:hover .wc-category-image img {
    transform: scale(1.1);
}

.wc-category-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
}

.wc-category-count {
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 12px;
    display: inline-block;
}

.wc-category-carousel-no-categories {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

/* Swiper Navigation */
.wc-category-carousel .swiper-button-next,
.wc-category-carousel .swiper-button-prev {
    color: #007cba;
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.wc-category-carousel .swiper-button-next:after,
.wc-category-carousel .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

.wc-category-carousel .swiper-button-next:hover,
.wc-category-carousel .swiper-button-prev:hover {
    background: #007cba;
    color: white;
    transform: scale(1.1);
}

/* Swiper Pagination */
.wc-category-carousel .swiper-pagination {
    position: relative;
    margin-top: 20px;
}

.wc-category-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    transition: all 0.3s ease;
}

.wc-category-carousel .swiper-pagination-bullet-active {
    background: #007cba;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-category-carousel-wrapper {
        padding: 20px 0;
    }
    
    .wc-category-carousel {
        padding: 15px 5px;
    }
    
    .wc-category-image {
        width: 100px !important;
        height: 100px !important;
    }
    
    .wc-category-title {
        font-size: 14px;
    }
    
    .wc-category-link {
        padding: 15px 10px;
    }
    
    .wc-category-carousel .swiper-button-next,
    .wc-category-carousel .swiper-button-prev {
        display: none;
    }
}

@media (max-width: 480px) {
    .wc-category-image {
        width: 80px !important;
        height: 80px !important;
    }
    
    .wc-category-link {
        padding: 12px 8px;
    }
    
    .wc-category-title {
        font-size: 13px;
    }
}

/* Loading state */
.wc-category-carousel-wrapper.loading {
    opacity: 0.7;
}

.wc-category-carousel-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}


/* Fallback grid layout when Swiper fails */
.swiper-fallback {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.swiper-fallback .swiper-wrapper {
    display: contents;
}

.swiper-fallback .swiper-slide {
    width: auto !important;
    height: auto !important;
}