/**
 * Infinite Product Slider Styles - PREFIXED & COMPLETE
 * 
 * Place this file in: wp-content/themes/astra-child/slider/slider.css
 */

/* CSS Variables */
:root {
    --ips-slide-duration: 40s;
}

/* Main Container */
.ips-slider-section {
    width: 100%;
    overflow: hidden;
    padding: 60px 0;
    background: transparent;
    position: relative;
}

.ips-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Carousel Container */
.ips-carousel {
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px;
    padding: 10px 0;
    position: relative;
}

.ips-track {
    display: flex;
    gap: 25px;
    width: max-content;
    will-change: transform;
}

/* Animation for left sliding (first row) */
.ips-track-left {
    animation: ips-slideLeft var(--ips-slide-duration) linear infinite;
}

/* Keyframes - PREFIXED */
@keyframes ips-slideLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-33.333%));
    }
}

/* Pause on hover */
.ips-track:hover {
    animation-play-state: paused;
}

/* Product Card Styles */
.ips-product-card {
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    flex-grow: 0;
}

.ips-card-wrapper {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ips-card-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Product Image */
.ips-image-container {
    position: relative;
    width: 100%;
    padding-top: 85%;
    overflow: hidden;
    background: #f7fafc;
}

.ips-image-container a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ips-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ips-card-wrapper:hover .ips-image-container img {
    transform: scale(1.05);
}

/* Product Info */
.ips-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ips-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.ips-title a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ips-title a:hover {
    color: #9E59F7;
}

/* Product Price */
.ips-price {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    color: #9E59F7;
}

.ips-price del {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    margin-right: 8px;
}

.ips-price ins {
    text-decoration: none;
    color: #9E59F7;
}

/* Action Buttons */
.ips-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

.ips-buy-btn {
    flex: 1;
    background: linear-gradient(90deg, #9E59F7 0%, #417FF6 100%);
    color: #ffffff;
    border: none;
    border-radius: 100px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(158, 89, 247, 0.3);
    
    letter-spacing: 0.5px;
}

.ips-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(158, 89, 247, 0.4);
    background: linear-gradient(90deg, #b370ff 0%, #5a94ff 100%);
}

.ips-buy-btn:active {
    transform: translateY(0);
}

.ips-wishlist-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.ips-wishlist-btn:hover {
    border-color: #9E59F7;
    background: rgba(158, 89, 247, 0.1);
    color: #9E59F7;
}

.ips-wishlist-btn.ips-active {
    border-color: #9E59F7;
    background: rgba(158, 89, 247, 0.2);
    color: #9E59F7;
}

.ips-wishlist-btn.ips-active svg {
    fill: #9E59F7;
}

.ips-wishlist-btn svg {
    width: 20px;
    height: 20px;
    transition: fill 0.3s ease;
}

/* No Products Message */
.ips-no-products {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    padding: 40px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --ips-slide-duration: 30s;
    }

    .ips-product-card {
        min-width: 280px;
        max-width: 280px;
    }
    
    .ips-title {
        font-size: 15px;
        min-height: 40px;
    }
    
    .ips-price {
        font-size: 18px;
    }
    
    .ips-buy-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .ips-info {
        padding: 16px;
    }
    
    .ips-carousel {
        margin-bottom: 20px;
    }
    
    .ips-track {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .ips-product-card {
        min-width: 260px;
        max-width: 260px;
    }
    
    .ips-slider-section {
        padding: 40px 0;
    }
    
    .ips-track {
        gap: 15px;
    }
}

/* Smooth scrolling performance */
@media (prefers-reduced-motion: reduce) {
    .ips-track {
        animation: none !important;
    }
    
    .ips-track {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .ips-product-card {
        scroll-snap-align: start;
    }
}