﻿/**
 * Related Products Carousel Styles
 */

/* Carousel Layout and Spacing */
.related-products-carousel .slick-track {
    display: flex;
    gap: 20px;
}

.related-products-carousel .slick-slide {
    height: inherit;
    margin: 0 10px;
}

/* Product Card Styling */
.related-products-carousel .product-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

    .related-products-carousel .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

.related-products-carousel .product-img {
    height: 200px;
    object-fit: contain;
    padding: 1rem;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.related-products-carousel .product-card:hover .product-img {
    background-color: #ffffff;
}

.related-products-carousel .product-title {
    min-height: 2.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
    color: #333;
    transition: color 0.3s ease;
}

.related-products-carousel .product-card:hover .product-title a {
    color: #0d6efd !important;
}

/* Price Styling */
.related-products-carousel .current-price {
    font-size: 1.1rem;
    color: #0d6efd;
}

.related-products-carousel .previous-price {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Button Styling */
.related-products-carousel .btn {
    transition: all 0.3s ease;
}

.related-products-carousel .btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.25);
}

.related-products-carousel .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.35);
}

/* Navigation Arrows */
.related-products-carousel .slick-prev,
.related-products-carousel .slick-next {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1;
    transition: all 0.3s;
}

    .related-products-carousel .slick-prev:hover,
    .related-products-carousel .slick-next:hover {
        background: #f8f9fa;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    }

    .related-products-carousel .slick-prev:before,
    .related-products-carousel .slick-next:before {
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        font-size: 20px;
        color: #555;
        opacity: 1;
    }

    .related-products-carousel .slick-prev:before {
        content: '\f053'; /* fa-chevron-left */
    }

    .related-products-carousel .slick-next:before {
        content: '\f054'; /* fa-chevron-right */
    }

/* Pagination Dots */
.related-products-carousel .slick-dots {
    bottom: -35px;
}

    .related-products-carousel .slick-dots li button:before {
        font-size: 10px;
        opacity: 0.3;
    }

    .related-products-carousel .slick-dots li.slick-active button:before {
        opacity: 0.8;
        color: #0d6efd;
    }

/* Sale Badge */
.related-products-carousel .badge.bg-danger {
    transition: transform 0.3s ease;
}

.related-products-carousel .product-card:hover .badge.bg-danger {
    transform: scale(1.1);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .related-products-carousel .product-img {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .related-products-carousel .product-img {
        height: 160px;
    }

    .related-products-carousel .slick-prev,
    .related-products-carousel .slick-next {
        width: 35px;
        height: 35px;
    }

        .related-products-carousel .slick-prev:before,
        .related-products-carousel .slick-next:before {
            font-size: 16px;
        }
}

/* Fix for the card height issue */
.related-products-carousel .slick-track {
    display: flex !important;
}

.related-products-carousel .slick-slide {
    height: inherit !important;
    display: flex !important;
}

    .related-products-carousel .slick-slide > div {
        display: flex;
        height: 100%;
        width: 100%;
    }

.related-products-carousel .product-card {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.related-products-carousel .card {
    width: 100%;
}
