.product-image-gallery {
    height: auto;
}

.product-image-gallery .product-image-gallery-stage {
    position: relative;
    aspect-ratio: 1;
    max-height: 400px;
    margin: 0 auto;
}

.product-image-gallery .carousel-inner {
    height: 100%;
}

.product-image-gallery .carousel-item {
    height: 100%;
}

.product-image-gallery .product-image-gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-gallery .carousel-control-prev,
.product-image-gallery .carousel-control-next {
    width: 12%;
    color: #333;
    font-size: 1.5rem;
    opacity: 1;
}

.product-image-gallery .carousel-control-prev:hover,
.product-image-gallery .carousel-control-next:hover,
.product-image-gallery .carousel-control-prev:focus,
.product-image-gallery .carousel-control-next:focus {
    color: #000;
}

.product-image-gallery .product-image-gallery-thumbnail-strip {
    display: flex;
    align-items: center;
    gap: .375rem;
    margin: .75rem 0 0;
}

.product-image-gallery .product-image-gallery-thumbnails-viewport {
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
}

.product-image-gallery .product-image-gallery-thumbnails-viewport::-webkit-scrollbar {
    display: none;
}

.product-image-gallery .product-image-gallery-thumbnails {
    position: static;
    display: flex;
    width: max-content;
    justify-content: flex-start;
    gap: .5rem;
    margin: 0;
    padding: 0;
}

.product-image-gallery .product-image-gallery-thumbnail-control {
    flex: 0 0 2rem;
    width: 2rem;
    height: 4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #025196;
    font-size: 1.25rem;
}

.product-image-gallery .product-image-gallery-thumbnail-control:disabled {
    cursor: default;
    opacity: .35;
}

.product-image-gallery .product-image-gallery-thumbnail-control:focus-visible {
    outline: 2px solid #025196;
    outline-offset: 2px;
}

.product-image-gallery .product-image-gallery-thumbnail-control[hidden] {
    display: none;
}

.product-image-gallery .product-image-gallery-thumbnails button {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    box-sizing: border-box;
    margin: 0;
    padding: 2px;
    border: 2px solid #ccc;
    background: #fff;
    opacity: .7;
    text-indent: 0;
    scroll-snap-align: start;
}

.product-image-gallery .product-image-gallery-thumbnails button.active,
.product-image-gallery .product-image-gallery-thumbnails button:focus-visible {
    border-color: #025196;
    opacity: 1;
}

.product-image-gallery .product-image-gallery-thumbnails img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}

@media (max-width: 767.98px) {
    .product-image-gallery {
        width: 100%;
        max-width: 520px;
        margin-right: auto;
        margin-left: auto;
        padding-bottom: 1rem;
    }
}
