/* ===================================
   Category-wise Products Slider
   =================================== */

.products-section {
    padding: 60px 0;
    background: #ffffff;
}

.category-products-section {
    margin-bottom: 50px;
}

.category-products-section:last-child {
    margin-bottom: 0;
}

.category-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.category-header-emoji {
    font-size: 2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #2d7a3e;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #1f5a2b;
    gap: 10px;
}

.view-all-link span {
    transition: transform 0.3s ease;
}

.view-all-link:hover span {
    transform: translateX(4px);
}

/* Products Slider */
.products-slider-wrapper {
    position: relative;
    padding: 0 50px;
}

.products-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 10px 0;
}

.products-slider::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.products-slider .product-card {
    flex: 0 0 280px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.products-slider .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #2d7a3e;
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f9f9f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2d7a3e;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e74c3c;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.product-info {
    padding: 16px;
}

.product-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 6px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name-hi {
    font-size: 0.9rem;
    color: #646970;
    margin: 0 0 12px 0;
}

.product-price {
    margin: 12px 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

/* Slider Navigation Buttons */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    color: #1d2327;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.slider-nav-btn:hover {
    background: #2d7a3e;
    color: white;
    border-color: #2d7a3e;
    box-shadow: 0 4px 12px rgba(45, 122, 62, 0.3);
}

.slider-nav-btn.prev {
    left: 0;
}

.slider-nav-btn.next {
    right: 0;
}

.slider-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-nav-btn:disabled:hover {
    background: white;
    color: #1d2327;
    border-color: #e0e0e0;
}

/* Responsive Design */
@media (max-width: 640px) {
    .products-section {
        padding: 40px 0;
    }
    
    .category-products-section {
        margin-bottom: 40px;
    }
    
    .category-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .category-section-title {
        font-size: 1.4rem;
    }
    
    .products-slider-wrapper {
        padding: 0 40px;
    }
    
    .products-slider {
        gap: 12px;
    }
    
    .products-slider .product-card {
        flex: 0 0 240px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .slider-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .category-header-icon,
    .category-header-emoji {
        width: 32px;
        height: 32px;
        font-size: 1.5rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .products-slider .product-card {
        flex: 0 0 260px;
    }
    
    .category-section-title {
        font-size: 1.6rem;
    }
}

@media (min-width: 1025px) {
    .products-slider .product-card {
        flex: 0 0 280px;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.product-card {
    animation: slideIn 0.4s ease forwards;
}
