/* Base styles for Swiper */
.swiper-container {
    width: 100%;
    height: 500px; /* Default height */
    overflow: hidden; /* This hides any scrollbar that might appear */
    position: relative; /* Ensures that positioning of child elements is relative to this container */

}

.swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: cover; /* This ensures images cover the slide area without distorting aspect ratios */
}





.phgallery-img {
    height: 500px;
    width: auto;
}

.swiper-wrapper {
    display: flex;
    flex-wrap: nowrap;
    height: 100%; /* Ensure wrapper has the same fixed height */
}

.swiper-slide {
    flex: 0 0 auto;
    height: 100%; /* Ensure each slide has the same fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 10px; /* Gap between slides */
    width: auto;
}

.swiper-navigation {
    text-align: left;
    display: flex;
    padding-left: 10px;
    gap: 30px;
    padding-top: 40px;
}

.swiper-button-prev, .swiper-button-next {
    background-color: #f3f3f3; /* Light grey background */
    border: none;
    width: 40px; /* Reduced width */
    height: 40px; /* Reduced height */
    z-index: 10;
    cursor: pointer;
    display: flex; /* Ensures content is centered */
    justify-content: center; /* Center the icon within the button */
    align-items: center;
    border-radius: 50%; /* Makes the background round */
    color: #801d31; /* Initial color for the icon */
    transition: background-color 0.3s, color 0.3s; /* Smooth transition for hover effects */
    position: relative; /* Ensures proper stacking and relative positioning */
}

.swiper-button-prev:hover, .swiper-button-next:hover {
    color: #6f192b; /* Color on hover */
    background-color: #e0e0e0; /* Slightly darker grey on hover */
}

/* Specific adjustments for icon size, depending on your method (e.g., FontAwesome) */
.swiper-button-prev i, .swiper-button-next i {
    font-size: 18px; /* Adjust this value to scale the icons as needed */
    color: inherit; /* Ensures icons use the color of the parent button */
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 27px;
}

.swiper-slide {
    position: relative;
    overflow: hidden;
}

.image-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    text-align: center;
    opacity: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
}

.swiper-slide:hover .image-title {
    transform: translateY(0);
    opacity: 1;
}

.request-quote-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #801d31;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 2px;
    z-index: 10;
    width: 40px;
    height: 40px;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out, opacity 0.5s ease-in-out;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide:hover .request-quote-button {
    opacity: 1;
    visibility: visible;
}
.fancybox-content .request-quote-button {
    opacity: 1;
    visibility: visible;
}

.request-quote-button:hover {
    width: 330px;
    padding: 0 21px;
}


.request-quote-button::before {
    content: "!";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.request-quote-button:hover::before {
    opacity: 0;
}

.request-quote-button::after {
    content: "Richiedi un preventivo per questo prodotto";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.request-quote-button:hover::after {
    opacity: 1;
}




/*lightbox*/

/* Lightbox navigation buttons */
.fancybox-button--arrow_left, .fancybox-button--arrow_right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
}

.fancybox-button--arrow_left {
    left: 10px;
}

.fancybox-button--arrow_right {
    right: 10px;
}

.fancybox-button--close {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
}

/* Title overlay */
.fancybox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}
/* Responsive adjustments for smaller devices */
@media (max-width: 768px) {
    .swiper-container {
        height: 300px; /* Reduced height for mobile */
    }

    .swiper-slide img {
        height: 100%; /* Ensures the image covers the adjusted height */
        object-fit: contain; /* Adjust if you prefer the images to fit within the container without cropping */
    min-width: unset;
        width: auto;
    }
.swiper-slide {
    max-width: 100%!important;
}
}
