/* =========================================
   HOMAG PRODUCT GALLERY
========================================= */

.homag-product-gallery {
    width: 100%;
    max-width: 590px;

    display: grid;
    grid-template-columns: minmax(0, 470px) 100px;

    gap: 16px;

    direction: ltr;
    align-items: start;

    margin-inline: auto;
}


/* =========================================
   MAIN IMAGE
========================================= */

.homag-product-gallery__main {
    width: 100%;
    height: 540px;

    overflow: hidden;

    border-radius:36px;

    background: #f4f3f0;
}


.homag-product-gallery__main-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    border-radius: inherit;

    transition:
        opacity 0.2s ease,
        transform 0.25s ease;
}


/* =========================================
   THUMBNAILS
========================================= */

.homag-product-gallery__thumbs {
    width: 100px;
    height: 540px;

    display: flex;
    flex-direction: column;

    gap: 12px;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: none;
}


.homag-product-gallery__thumbs::-webkit-scrollbar {
    display: none;
}


.homag-product-gallery__thumb {
    width: 100px !important;
    height: 126px !important;

    min-width: 100px;
    min-height: 126px;

    padding: 0 !important;
    margin: 0 !important;

    flex: 0 0 126px;

    border: 2px solid transparent !important;
    border-radius: 15px !important;

    overflow: hidden;

    background: #f4f3f0 !important;

    cursor: pointer;

    box-shadow: none !important;

    appearance: none;
    -webkit-appearance: none;

    transition:
        border-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}


.homag-product-gallery__thumb:hover {
    transform: translateY(-2px);
}


.homag-product-gallery__thumb.is-active {
    border-color: #5277c7 !important;
}


.homag-product-gallery__thumb img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: none !important;

    object-fit: cover;
    object-position: center;

    border-radius: 12px;
}


/* =========================================
   ONLY ONE IMAGE
========================================= */

.homag-product-gallery.is-single {
    display: block;
    max-width: 470px;
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1024px) and (min-width: 768px) {

    .homag-product-gallery {
        max-width: 520px;

        grid-template-columns: minmax(0, 410px) 94px;

        gap: 14px;
    }


    .homag-product-gallery__main {
        height: 500px;
    }


    .homag-product-gallery__thumbs {
        width: 94px;
        height: 500px;

        gap: 10px;
    }


    .homag-product-gallery__thumb {
        width: 94px !important;
        height: 116px !important;

        min-width: 94px;
        min-height: 116px;

        flex: 0 0 116px;
    }


    .homag-product-gallery.is-single {
        max-width: 410px;
    }

}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {

    .homag-product-gallery {
        max-width: 100%;

        grid-template-columns: 1fr;

        gap: 12px;

        margin-inline: 0;
    }


    .homag-product-gallery__main {
        width: 100%;
        height: 600px;

        aspect-ratio: 4 / 5;

        border-radius:16px;
    }


    .homag-product-gallery__main-image {
        width: 100%;
        height: 100%;

        object-fit: contain;
    }


    .homag-product-gallery__thumbs {
        width: 100%;
        height: auto;

        flex-direction: row;

        gap: 10px;

        overflow-x: auto;
        overflow-y: hidden;

        padding-bottom: 2px;
    }


    .homag-product-gallery__thumb {
        width: 78px !important;
        height: 92px !important;

        min-width: 78px;
        min-height: 92px;

        flex: 0 0 78px;

        border-radius: 12px !important;
    }


    .homag-product-gallery__thumb img {
        border-radius: 9px;
    }


    .homag-product-gallery.is-single {
        max-width: 100%;
    }

}