/* ============================================
   PRODUCT AUTO-SLIDER (All Screens)
   Horizontal auto-scrolling carousel for product sections
   Shows products in single line with smooth auto-slide
   ============================================ */

/* Product Slider Wrapper */
.product-auto-slider-wrapper {
    position: relative;
    margin-top: 30px;
    overflow: hidden;
    width: 100%;
}

/* Product Slider Container */
.product-auto-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 10px 0;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.product-auto-slider::-webkit-scrollbar {
    display: none;
}

/* Product Cards in Slider */
.product-auto-slider .product-card {
    flex: 0 0 280px;
    min-width: 280px;
    max-width: 280px;
    scroll-snap-align: start;
}

/* Match product card height from main product page */
.product-auto-slider .product-card .product-image {
    max-height: 220px;
}

.product-auto-slider .product-card .product-info {
    padding: 12px 15px;
}

.product-auto-slider .product-card .product-category {
    margin-bottom: 4px;
}

.product-auto-slider .product-card .product-title {
    font-size: 15px;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* Navigation Arrows */
.product-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #7d3cff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
}

.product-auto-slider-wrapper:hover .product-slider-nav {
    opacity: 1;
    visibility: visible;
}

[data-theme="dark"] .product-slider-nav {
    background: rgba(45, 45, 61, 0.95);
    color: #7d3cff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.product-slider-nav:hover {
    background: #7d3cff;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 25px rgba(125, 60, 255, 0.4);
}

.product-slider-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.product-slider-prev {
    left: 10px;
}

.product-slider-next {
    right: 10px;
}

/* Auto-slide indicator */
.product-slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #7d3cff 0%, #ff7f32 100%);
    width: 0;
    transition: width 5s linear;
    border-radius: 3px;
    z-index: 5;
}

.product-slider-progress.active {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .product-auto-slider .product-card {
        flex: 0 0 260px;
        min-width: 260px;
        max-width: 260px;
    }
}

@media (max-width: 992px) {
    .product-auto-slider .product-card {
        flex: 0 0 240px;
        min-width: 240px;
        max-width: 240px;
    }
    
    .product-slider-nav {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .product-auto-slider .product-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }
    
    .product-auto-slider {
        gap: 15px;
    }
    
    .product-slider-nav {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .product-slider-prev {
        left: 5px;
    }
    
    .product-slider-next {
        right: 5px;
    }
}

@media (max-width: 576px) {
    .product-auto-slider .product-card {
        flex: 0 0 200px;
        min-width: 200px;
        max-width: 200px;
    }
    
    .product-auto-slider {
        gap: 12px;
    }
    
    .product-slider-nav {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* Smooth fade effect on edges */
.product-auto-slider-wrapper::before,
.product-auto-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50px;
    z-index: 2;
    pointer-events: none;
}

.product-auto-slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--site-background, #fff) 0%, transparent 100%);
}

.product-auto-slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--site-background, #fff) 0%, transparent 100%);
}

[data-theme="dark"] .product-auto-slider-wrapper::before {
    background: linear-gradient(to right, #1a1a2e 0%, transparent 100%);
}

[data-theme="dark"] .product-auto-slider-wrapper::after {
    background: linear-gradient(to left, #1a1a2e 0%, transparent 100%);
}

/* Ensure single line - no wrapping */
.product-auto-slider-wrapper {
    white-space: nowrap;
}

.product-auto-slider .product-card {
    display: inline-block;
    vertical-align: top;
    white-space: normal;
}
