.custom-gallery,
.custom-gallery-hover {
    height: 45vh;
    position: relative;
    overflow: hidden;
}

.custom-gallery .gallery-image,
.custom-gallery-hover .gallery-image-first,
.custom-gallery-hover .gallery-image-second {
    width: 100%;
    height: 45vh;
    min-height: 45vh;
    max-height: 45vh;
    object-fit: cover;
    transition: all .35s ease-in-out;
}

.custom-gallery-hover .gallery-image-first {
    opacity: 1;
}

.custom-gallery-hover .gallery-image-second {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.custom-gallery-hover:hover .gallery-image-first {
    opacity: 0;
}

.custom-gallery-hover:hover .gallery-image-second {
    opacity: 1;
}

.related-hover-wrapper {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    opacity: 0;
    width: 100%;
    padding: 16px;
    gap: 8px;
    justify-content: center;
    align-items: center;
    background-color: unset;
    transform: translateY(10%);
    z-index: 5;
    transition: all .35s ease-in-out;
}

.related-hover-wrapper a {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 44px !important;
    width: 44px !important;
    padding: 4px;
    background-color: #FFF;
    outline: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.14) !important;
    transition: all .2s ease;
}

.related-hover-wrapper a:hover {
    outline: 1px solid rgba(0, 0, 0, 0.30);
}

.related-hover-wrapper img {
    object-fit: contain;
    background-color: #FFF;
    width: auto;
    height: 100% !important;
    max-width: 40px !important;
    max-height: 40px !important;
}

.custom-gallery:hover .related-hover-wrapper,
.custom-gallery-hover:hover .related-hover-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.related-hover-wrapper .related-products-list {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

@media screen and (max-width: 767px){

    .custom-gallery,
    .custom-gallery-hover {
        height: 40vh;
    }

    .custom-gallery .gallery-image,
    .custom-gallery-hover .gallery-image-first,
    .custom-gallery-hover .gallery-image-second {
        height: 40vh;
        min-height: 40vh;
        max-height: 40vh;
    }

    .related-hover-wrapper {
        opacity: 1;
        transform: translate(0);
        top: 0;
        justify-content: left;
        height: fit-content;
        padding: 8px;
        gap: 4px;
    }

    .related-hover-wrapper a {
        padding: 1px;
        max-width: 28px;
        max-height: 28px !important;
        box-shadow: unset !important;
        outline: 1px solid rgba(0, 0, 0, 0.20);
    }

    .related-hover-wrapper img {
        height: 100% !important;
        max-width: 28px !important;
        max-height: 28px !important;
    }

}
