/* Category Tabs Widget Styles */
.category-tabs-widget {
    width: 100%;
    background: transparent;
}

/* Swiper Tab Header */
.cat-tabs-swiper {
    width: 100%;
    padding: 20px 0 30px;
    background-color: transparent;
    border-bottom: 1px solid #eee;
}

.cat-tabs-swiper .swiper-wrapper {
    display: flex;
    justify-content: space-between;
}

.cat-tabs-swiper .swiper-slide {
    width: auto !important;
    flex: 1;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-tab-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
}

/* Tab Icon - Combined sprite image */
.cat-tab-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background-size: 100% 200%;
    background-position: center 0%;
    background-repeat: no-repeat;
    transition: background-position 0.3s ease;
    position: relative;
}

.swiper-slide:hover .cat-tab-icon,
.swiper-slide.active .cat-tab-icon {
    background-position: center 100%;
}

.swiper-slide.active .cat-tab-icon::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -5px;
    width: 12px;
    height: 12px;
    background: #00a0e9;
    border-radius: 50%;
}

/* Tab Title */
.cat-tab-title {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    transition: color 0.3s;
}

.swiper-slide:hover .cat-tab-title {
    color: #00a0e9;
}

.swiper-slide.active .cat-tab-title {
    color: #00a0e9;
    font-weight: bold;
}

/* Tab Content */
.cat-tabs-content {
    width: 100%;
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cat-tab-panel {
    display: none;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
}

.cat-tab-panel.active {
    display: flex;
}

/* Products Grid */
.cat-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.cat-products-grid.columns-2 .cat-product-item {
    width: calc(50% - 10px);
}

.cat-products-grid.columns-3 .cat-product-item {
    width: calc(33.33% - 14px);
}

.cat-products-grid.columns-4 .cat-product-item {
    width: calc(25% - 15px);
}

.cat-products-grid.columns-5 .cat-product-item {
    width: calc(20% - 16px);
}

.cat-products-grid.columns-6 .cat-product-item {
    width: calc(16.66% - 17px);
}

/* Product Item */
.cat-product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cat-product-item:hover {
    transform: translateY(-8px);
}

.cat-product-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Product Image */
.cat-product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9f9f9;
    transition: background-color 0.3s;
}

.cat-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cat-product-item:hover .cat-product-image img {
    transform: scale(1.08);
}

.cat-product-item:hover .cat-product-image {
    background: #e6f7ff;
}

/* Product Info */
.cat-product-info {
    padding: 15px;
}

.cat-product-title {
    font-size: 13px;
    color: #333;
    font-weight: normal;
    line-height: 1.4;
    height: 54px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    margin: 0 0 8px 0;
    transition: color 0.3s;
}

.cat-product-item:hover .cat-product-title {
    color: #00a0e9;
}

.cat-product-category {
    font-size: 12px;
    color: #00a0e9;
    font-weight: normal;
    margin: 0;
}

/* Responsive - Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .cat-products-grid[class*="columns-tablet-1"] .cat-product-item { width: 100%; }
    .cat-products-grid[class*="columns-tablet-2"] .cat-product-item { width: calc(50% - 10px); }
    .cat-products-grid[class*="columns-tablet-3"] .cat-product-item { width: calc(33.33% - 14px); }
    .cat-products-grid[class*="columns-tablet-4"] .cat-product-item { width: calc(25% - 15px); }
    .cat-products-grid[class*="columns-tablet-5"] .cat-product-item { width: calc(20% - 16px); }
    .cat-products-grid[class*="columns-tablet-6"] .cat-product-item { width: calc(16.66% - 17px); }
}

/* Responsive - Mobile (max-width: 767px) */
@media (max-width: 767px) {
    .cat-products-grid[class*="columns-mobile-1"] .cat-product-item { width: 100%; }
    .cat-products-grid[class*="columns-mobile-2"] .cat-product-item { width: calc(50% - 10px); }
    .cat-products-grid[class*="columns-mobile-3"] .cat-product-item { width: calc(33.33% - 14px); }
    .cat-products-grid[class*="columns-mobile-4"] .cat-product-item { width: calc(25% - 15px); }
    
    .cat-tabs-swiper {
        overflow: hidden;
    }
    
    .cat-tabs-swiper .swiper-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    
    .cat-tabs-swiper .swiper-slide {
        width: 50% !important;
        flex: none;
        margin-right: 0 !important;
    }
    
    .cat-tab-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        padding: 10px 5px;
    }
    
    .cat-tab-title {
        font-size: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 40px);
    }
    
    .cat-tabs-content {
        padding: 15px;
    }
}
