/* =========================================================
   PRODUCT GALLERY
   ========================================================= */

.product-gallery {
    width: 100%;
}


/* ---------------------------------------------------------
   Main Gallery Area
   --------------------------------------------------------- */

.product-gallery__main {
    position: relative;

    width: 100%;
    max-width: 1100px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 600px;
}


/* ---------------------------------------------------------
   Main Image Box
   Figma: approx. 898 x 600
   --------------------------------------------------------- */

.product-gallery__image-wrap {
    width: 898px;
    max-width: calc(100% - 160px);
    height: 600px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1f1f1;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.product-gallery__image-wrap:focus-visible {
    outline: 2px solid #B38A05;
    outline-offset: 3px;
}

.product-gallery__zoom-hint {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #B38A05;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
    pointer-events: none;
}


/* ---------------------------------------------------------
   Main Image
   --------------------------------------------------------- */

.product-gallery__image {
    display: block;

    width: 100%;
    height: 100% !important;

    object-fit: contain;
    object-position: center;

    transition: opacity 0.25s ease;
}


/* ---------------------------------------------------------
   Navigation Arrows
   Normal: white / gold
   Hover: gold / white
   --------------------------------------------------------- */

.product-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;

    padding: 0;
    margin: 0;

    border: 1px solid #B38A05 !important;
    border-radius: 50% !important;

    background: #fff !important;
    color: #B38A05 !important;

    box-shadow: none !important;

    font-size: 10px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color .2s ease,
        color .2s ease;
}


/* Icon */
.product-gallery__arrow i {
    color: inherit !important;
    font-size: 10px;
    line-height: 1;
}


/* Hover */
.product-gallery__arrow:hover,
.product-gallery__arrow:focus {
    background: #B38A05 !important;
    color: #fff !important;
    border-color: #B38A05 !important;
}


/* Position */
.product-gallery__arrow--prev {
    left: 38px;
}

.product-gallery__arrow--next {
    right: 38px;
}


/* ---------------------------------------------------------
   Thumbnails Wrapper
   Align with left edge of main image
   --------------------------------------------------------- */

.product-gallery__thumbs {
    display: flex;
    align-items: flex-start;
    gap: 20px;

    width: 898px;
    max-width: calc(100% - 160px);

    margin: 16px auto 0;

    overflow-x: auto;
}


/* ---------------------------------------------------------
   Thumbnail
   Figma: approx. 181 x 181
   --------------------------------------------------------- */

.product-gallery__thumb {
    flex: 0 0 181px;

    width: 181px;
    height: 181px;

    padding: 0;

    border: 1px solid transparent;
    border-radius: 0;

    background: #f1f1f1;

    overflow: hidden;
    cursor: pointer;

    transition:
        border-color 0.2s ease,
        opacity 0.2s ease;
}

.product-gallery__thumb img {
    display: block;

    width: 100%;
    height: 100% !important;

    object-fit: contain;
    object-position: center;
}


/* Active thumbnail */

.product-gallery__thumb.is-active {
    border-color: #B38A05;
}


/* Hover */

.product-gallery__thumb:hover {
    opacity: 0.85;
}

/* Full-size image popup */
body.product-gallery-lightbox-open { overflow: hidden; }

.product-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    background: rgba(0,0,0,.92);
}

.product-gallery-lightbox.is-open { display: block; }
.product-gallery-lightbox__dialog,
.product-gallery-lightbox__stage { width: 100%; height: 100%; }

.product-gallery-lightbox__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 70px 80px;
    box-sizing: border-box;
}

.product-gallery-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto !important;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform .2s ease;
}

.product-gallery-lightbox.is-zoomed .product-gallery-lightbox__image {
    max-width: none;
    max-height: none;
    transform: scale(1.75);
    cursor: zoom-out;
}

.product-gallery-lightbox__close,
.product-gallery-lightbox__zoom,
.product-gallery-lightbox__arrow {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.92) !important;
    color: #B38A05 !important;
    cursor: pointer;
}

.product-gallery-lightbox__close,
.product-gallery-lightbox__zoom { top: 20px; width: 42px; height: 42px; }
.product-gallery-lightbox__close { right: 20px; font-size: 30px; line-height: 1; }
.product-gallery-lightbox__zoom { right: 72px; font-size: 15px; }
.product-gallery-lightbox__arrow { top: 50%; width: 46px; height: 46px; transform: translateY(-50%); }
.product-gallery-lightbox__arrow--prev { left: 20px; }
.product-gallery-lightbox__arrow--next { right: 20px; }

.product-gallery-lightbox__close:hover,
.product-gallery-lightbox__zoom:hover,
.product-gallery-lightbox__arrow:hover {
    background: #B38A05 !important;
    color: #fff !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media only screen and (max-width: 959px) {

    .product-gallery__main {
        max-width: 100%;
        min-height: auto;
    }

    .product-gallery__image-wrap {
        width: calc(100% - 100px);
        max-width: none;
        height: 520px;
    }

    .product-gallery__thumbs {
        width: calc(100% - 100px);
        max-width: none;
    }

    .product-gallery__thumb {
        flex-basis: 140px;
        width: 140px;
        height: 140px;
    }

    .product-gallery__arrow--prev {
        left: 10px;
    }

    .product-gallery__arrow--next {
        right: 10px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media only screen and (max-width: 575px) {

    .product-gallery-lightbox__stage { padding: 70px 15px; }
    .product-gallery-lightbox__arrow { width: 38px; height: 38px; }
    .product-gallery-lightbox__arrow--prev { left: 8px; }
    .product-gallery-lightbox__arrow--next { right: 8px; }

    .product-gallery__image-wrap {
        width: 100%;
        height: 360px;
    }

    .product-gallery__thumbs {
        width: 100%;
        gap: 10px;
        margin-top: 10px;
    }

    .product-gallery__thumb {
        flex-basis: 90px;
        width: 90px;
        height: 90px;
    }

    .product-gallery__arrow {
        width: 26px;
        height: 26px;
    }

    .product-gallery__arrow--prev {
        left: 8px;
    }

    .product-gallery__arrow--next {
        right: 8px;
    }

}
