.related-products-section {
    text-align: center;

    /* Dark background */
    padding: 40px 20px;
    border-radius: 10px;
    color: #ffffff;
    overflow: hidden;
    /* Prevent overflow from large slides */
}

.related-products-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #FFFFFF;
    text-align: start;
    padding-left: 5%;
    /* Use percentage for responsiveness */
}

.related-products-subtitle {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #FFFFFF;
    text-align: start;
    padding-left: 5%;
    /* Use percentage for responsiveness */
}

/* Adjust for smaller screens */
@media (max-width: 768px) {

    .related-products-title,
    .related-products-subtitle {
        padding-left: 10px;
        /* Less padding for smaller screens */
    }
}

/* Adjust for even smaller screens (mobile) */
@media (max-width: 480px) {

    .related-products-title,
    .related-products-subtitle {
        padding-left: 15px;
        /* Increase padding for smaller mobile screens */
    }
}

.related-products-carousel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mobile / Small Screen Adjustments */
@media (max-width: 768px) {
    .related-products-carousel {
        padding: 10px;
        /* Adjust padding */
    }

    /* Make each slide take full width on mobile */
    .swiper-slide {
        width: 100% !important;
        margin: 0 0 10px 0;
        /* Remove horizontal margins, add vertical margin */
        padding: 10px;
        /* Adjust padding for mobile */
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
        /* Optionally hide navigation on mobile */
    }

    /* Adjust pagination for mobile */
    .swiper-pagination {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Extra small screens (portrait mobile) */
@media (max-width: 480px) {
    .swiper-slide {
        width: 100% !important;
        /* Take full width */
        height: auto;
        /* Adjust height to auto for better scaling */
    }

    /* Optional: Hide carousel title on very small screens */
    .related-products-title {
        font-size: 18px;
        text-align: center;
    }
}

.swiper-wrapper {
    display: flex;
    justify-content: space-between;
}

.swiper-slide {
    width: 524.17px;
    /* Fixed width for each slide */
    height: 550px;
    /* Increased height slightly to better accommodate title */
    margin: 0 10px;
    /* Space between slides */
    margin-right: 0px !important;
    /* Card background */
    display: flex;
    flex-direction: column;
    /* Stack image and title vertically */
    justify-content: flex-start;
    /* Align items towards the top */
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    /* Center-align content inside the slide */
}

.related-product-image {
    width: 524.17px;
    /* Fixed width */
    height: 450px;
    /* Adjusted height to give space for title */
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 5px;
    /* Reduced margin between image and title */
}

.related-product-title {
    font-family: Inter;
    font-size: 22px;
    font-weight: 400;
    line-height: 28px;
    margin: 5px 0;
    /* Reduced margin to keep title closer to image */
    color: #ffffff;
    /* Product name color */
    text-align: center;
    /* Tighter line spacing for better appearance */
}

.swiper-button-next,
.swiper-button-prev {
    color: #ffffff;
    font-size: 1.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    font-size: unset !important;
}

.swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #FFFFFF;
}