
/* ==========================================================
   PETERS PRODUCT REVIEWS
   PRODUCT IMAGE GALLERY
   ========================================================== */

.ppr-product-gallery {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    margin: 0 0 28px;
}

/* Main square image container */

.ppr-gallery-main {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1 / 1;

    background: #101b38;

    border: 1px solid #234d83;
    border-radius: 14px;

    overflow: hidden;
}

/* Full image, no cropping */

.ppr-gallery-main img.ppr-gallery-active {
    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;
    object-position: center;

    transform: none;
}

/* Arrow navigation */

.ppr-gallery-prev,
.ppr-gallery-next {
    position: absolute;
    top: 50%;
    z-index: 5;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    padding: 0;

    background: rgba(4, 15, 34, 0.82);
    color: #ffffff;

    border: 1px solid #38dfff;
    border-radius: 50%;

    font-size: 25px;
    line-height: 1;

    cursor: pointer;

    transform: translateY(-50%);
    transition:
        background 0.2s,
        border-color 0.2s;
}

.ppr-gallery-prev {
    left: 12px;
}

.ppr-gallery-next {
    right: 12px;
}

.ppr-gallery-prev:hover,
.ppr-gallery-next:hover {
    background: #04c7ed;
    color: #061126;
}

.ppr-gallery-prev:focus-visible,
.ppr-gallery-next:focus-visible,
.ppr-gallery-thumb:focus-visible {
    outline: 3px solid #ffca20;
    outline-offset: 3px;
}

.ppr-gallery-prev[hidden],
.ppr-gallery-next[hidden] {
    display: none;
}

/* Thumbnail row */

.ppr-gallery-thumbnails {
    display: flex;
    flex-wrap: nowrap;

    gap: 10px;
    padding: 12px 2px;

    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #04d9f8 #101b38;
}

/* Thumbnail buttons */

.ppr-gallery-thumb {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 88px;

    width: 88px;
    height: 88px;

    padding: 3px;

    background: #101b38;

    border: 2px solid #30476b;
    border-radius: 9px;

    overflow: hidden;
    cursor: pointer;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.ppr-gallery-thumb img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;
}

.ppr-gallery-thumb:hover {
    border-color: #8defff;
}

.ppr-gallery-thumb.is-active {
    border-color: #04d9f8;
    box-shadow: 0 0 0 1px #04d9f8;
}

/* Mobile */

@media (max-width: 600px) {

    .ppr-gallery-main {
        border-radius: 10px;
    }

    .ppr-gallery-prev,
    .ppr-gallery-next {
        width: 38px;
        height: 38px;

        font-size: 21px;
    }

    .ppr-gallery-prev {
        left: 8px;
    }

    .ppr-gallery-next {
        right: 8px;
    }

    .ppr-gallery-thumb {
        flex-basis: 68px;

        width: 68px;
        height: 68px;
    }

    .ppr-gallery-thumbnails {
        gap: 8px;
    }
}
