/* Carousels */
.related-section {
    margin: 40px 0;
}

.carousel {
    overflow: hidden;
    position: relative;
    padding: 10px 0;
    scroll-behavior: smooth;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
}

.carousel-track {
    display: flex;
    gap: 20px;
    animation: scroll 35s linear infinite;
    will-change: transform;
}

.carousel:hover .carousel-track {
    animation-play-state: paused;
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }   /* 50% because we duplicated the list */
}
@media (min-width: 989px) {
    .carousel-track {
        animation-duration: 20s;  /* Faster on mobile */
    
    }
    .product-card {
        min-width: 220px;
        background: inherit;
        border: 1px  solid currentColor ;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(231, 68, 3, 0.15);
    }

    .product-card img {
        width: 100%;

        max-height: 180px;
        object-fit: cover;
    }


    .product-info {
        padding: 14px;
    }

    .product-name {
        font-weight: 600;
        font-size: 1.05rem;
        margin: 0 0 4px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-brand {
        color: inherit;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .product-price {
        font-weight: 700;
        color: #e74c3c;
        font-size: 1.15rem;
        margin: 6px 0;
    }

    /* Reviews Modal */
    #reviews-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.85);
        z-index: 10000;
        align-items: center;
        justify-content: center;
    }

    #reviews-modal .modal-content {
        
        width: 90%;
        max-width: 700px;
        max-height: 85vh;
        border-radius: 16px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #reviews-modal .modal-header {
        padding: 20px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #reviews-modal .modal-body {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }

    .review {
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .review:last-child {
        border: none;
        margin-bottom: 0;
    }
}
@media (max-width: 988px) {
    .carousel-track {
        animation-duration: 20s;  /* Faster on mobile */
    
    }
    .product-card {
        min-width: 220px;
        background: inherit;
        border: 1px  solid currentColor ;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(231, 68, 3, 0.15);
    }

    .product-card img {
        width: 100%;

        max-height: 180px;
        object-fit: cover;
    }


    .product-info {
        padding: 14px;
    }

    .product-name {
        font-weight: 600;
        font-size: 1.05rem;
        margin: 0 0 4px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-brand {
        color: inherit;
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .product-price {
        font-weight: 700;
        color: #e74c3c;
        font-size: 1.15rem;
        margin: 6px 0;
    }

    /* Reviews Modal */
    #reviews-modal {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.85);
        z-index: 10000;
        align-items: center;
        justify-content: center;
    }

    #reviews-modal .modal-content {
        
        width: 90%;
        max-width: 700px;
        max-height: 85vh;
        border-radius: 16px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #reviews-modal .modal-header {
        padding: 20px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    #reviews-modal .modal-body {
        padding: 20px;
        overflow-y: auto;
        flex: 1;
    }

    .review {
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .review:last-child {
        border: none;
        margin-bottom: 0;
    }
}