.elza-gallery .woocommerce-product-gallery.elza-legacy-gallery {
    display: block;
    position: relative;
}

.elza-gallery .elza-legacy-gallery > .woocommerce-product-gallery__wrapper {
    display: flex;
    gap: 25px;
    grid-column: auto;
    aspect-ratio: auto;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.elza-legacy-gallery > .woocommerce-product-gallery__wrapper::-webkit-scrollbar {
    display: none;
}

.elza-gallery .elza-legacy-gallery > .woocommerce-product-gallery__wrapper > * {
    flex: 0 0 calc((100% - 25px) / 2);
    min-width: 0;
    aspect-ratio: 2 / 3;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.elza-gallery .elza-legacy-gallery > .woocommerce-product-gallery__wrapper > :only-child {
    flex-basis: 100%;
}

.elza-gallery .elza-legacy-gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.elza-gallery .elza-legacy-gallery .woocommerce-product-gallery__image > a {
    cursor: zoom-in;
}

.elza-legacy-gallery-arrow {
    position: absolute;
    top: calc((100% - 28px) / 2);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 60px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #252525;
    font: 50px/1 Arial, sans-serif;
    cursor: pointer;
    transform: translateY(-50%);
}

.elza-legacy-gallery-prev {
    left: 10px;
}

.elza-legacy-gallery-next {
    right: 10px;
}

.elza-legacy-gallery-arrow:hover,
.elza-legacy-gallery-arrow:focus-visible {
    color: #ed2029;
}

.elza-legacy-gallery-arrow:disabled {
    color: #78736d;
    opacity: 0.35;
    cursor: default;
}

.elza-legacy-gallery-progress {
    height: 3px;
    margin-top: 25px;
    overflow: hidden;
    background: #dedbd7;
}

.elza-legacy-gallery-progress > span {
    display: block;
    height: 100%;
    background: #ed2029;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.elza-legacy-gallery [hidden] {
    display: none;
}

.elza-gallery [data-gallery-position] {
    display: none;
}

@media (min-width: 991px) {
    .product-view .product-detail {
        grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
        gap: 40px;
        align-items: start;
    }
}

@media (max-width: 990px) {
    .elza-gallery .elza-legacy-gallery > .woocommerce-product-gallery__wrapper > * {
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .elza-legacy-gallery-progress > span {
        transition: none;
    }
}
