/* Category Products Slider CSS */
.category-products-slider-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto 40px;
    padding: 0;
    background: transparent;
    overflow: hidden;
}

/* Remove header/title */
.slider-header {
    display: none;
}

.category-products-slider {
    position: relative;
    padding: 0 60px;
}

.slider-container {
    overflow: hidden;
    width: 100%;
    padding-bottom: 10px;
}

@media (max-width: 768px) {
    .slider-container {
        padding-bottom: 5px;
    }
}

.products-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 16px;
    transition: transform 0.3s ease;
    width: 100%;
}

/* Navigation Arrows - Centered và Bo tròn */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 2px solid #421AFF;
    border-radius: 50%;
    background: #fff;
    color: #421AFF;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.slider-nav:hover {
    background: #421AFF;
    color: #fff;
    box-shadow: 0 4px 12px rgba(66, 26, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}

.slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-prev {
    left: 6px;
}

.slider-next {
    right: 6px;
}

.slider-nav svg {
    width: 22px;
    height: 22px;
}

.slider-nav.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* Product Cards */
.product-item {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
}

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

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

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-right: 5px;
}

.badge.sale {
    background: #e74c3c;
}

.badge.out-of-stock {
    background: #95a5a6;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.product-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-name a:hover {
    color: #3498db;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 15px;
}

.product-price .woocommerce-Price-amount {
    color: #e74c3c;
}

.product-price del {
    color: #95a5a6;
    font-weight: 400;
    margin-right: 8px;
}

.product-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 10px ;
    border: 2px solid;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-add-to-cart {
    background: transparent;
    color: #e74c3c;
    border-color: #e74c3c;
}

.btn-add-to-cart:hover {
    background: #e74c3c;
    color: #fff;
    transform: translateY(-1px);
}

.btn-view-details {
    background: transparent;
    color: #666;
    border-color: #ddd;
}

.btn-view-details:hover {
    background: #f8f9fa;
    color: #333;
    border-color: #999;
    transform: translateY(-1px);
}

.btn-out-of-stock {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
}

.btn-added {
    background: #27ae60;
    color: #fff;
}

/* Footer Button - Centered */
.slider-footer {
    text-align: center;
    margin-top: 40px;
}

.btn-view-more {
    display: inline-block;
    padding: 15px 30px;
    background: #421AFF;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    background: #3516CC;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 26, 255, 0.3);
    color: #fff;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .products-container {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 14px;
    }
    
    .category-products-slider {
        padding: 0 52px;
    }
    
    .slider-nav {
        width: 44px;
        height: 44px;
    }
    
    .slider-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 992px) {
    .products-container {
        gap: 12px;
    }
    
    .category-products-slider {
        padding: 0 48px;
    }
    
    .slider-nav {
        width: 42px;
        height: 42px;
    }
    
    .slider-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .slider-prev {
        left: 5px;
    }
    
    .slider-next {
        right: 5px;
    }
}

@media (max-width: 768px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
    }
    
    .category-products-slider {
        padding: 0 42px;
    }
    
    .slider-nav {
        width: 36px;
        height: 36px;
    }
    
    .slider-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .slider-prev {
        left: 3px;
    }
    
    .slider-next {
        right: 3px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 13px;
        line-height: 1.2;
        margin-bottom: 6px;
    }
    
    .product-price {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .product-card:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 480px) {
    .products-container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
    }
    
    .category-products-slider {
        padding: 0 36px;
    }
    
    .slider-nav {
        width: 32px;
        height: 32px;
    }
    
    .slider-nav svg {
        width: 14px;
        height: 14px;
    }
    
    .slider-prev {
        left: 2px;
    }
    
    .slider-next {
        right: 2px;
    }
    
    .product-image {
        aspect-ratio: 1;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-name {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 5px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .product-price {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .btn-add-to-cart,
    .btn-view-details {
        padding: 6px 8px;
        font-size: 10px;
        border-width: 1px;
    }
    
    .product-actions {
        gap: 5px;
    }
    
    .badge {
        padding: 3px 6px;
        font-size: 10px;
    }
}

