/* Product gallery: keep image transitions inside the frame and anchor controls to the image. */
@media (min-width: 768px) {
    .product-content .fotorama__stage__shaft,
    .product-content .fotorama__stage__frame {
        overflow: hidden !important;
        contain: paint;
    }

    .product-content .fotorama__stage__shaft {
        clip-path: inset(0);
    }

    .product-content .fotorama__arr {
        width: 42px !important;
        height: 58px !important;
        margin-top: -29px !important;
        background: none !important;
        opacity: 1 !important;
        z-index: 12 !important;
    }

    .product-content .fotorama__arr--next {
        right: auto !important;
    }

    .product-content .fotorama__nav-wrap {
        height: 224px !important;
        overflow-y: auto !important;
        scroll-behavior: smooth;
    }

    .product-content .fotorama-thumb-control {
        position: absolute;
        left: -105px;
        z-index: 13;
        display: none;
        width: 54px;
        height: 26px;
        padding: 0;
        border: 0;
        background: rgba(255, 255, 255, .94);
        color: #8c8c8c;
        cursor: pointer;
    }

    .product-content .fotorama__wrap.has-thumb-controls .fotorama-thumb-control {
        display: block;
    }

    .product-content .fotorama-thumb-control--prev {
        top: calc(50% - 140px);
    }

    .product-content .fotorama-thumb-control--next {
        top: calc(50% + 114px);
    }

    .product-content .fotorama-thumb-control::before {
        content: '';
        position: absolute;
        top: 9px;
        left: 20px;
        width: 11px;
        height: 11px;
        border-top: 2px solid currentColor;
        border-left: 2px solid currentColor;
        transition: border-color .2s ease, transform .2s ease;
    }

    .product-content .fotorama-thumb-control--prev::before {
        transform: rotate(45deg);
    }

    .product-content .fotorama-thumb-control--next::before {
        top: 5px;
        transform: rotate(-135deg);
    }

    .product-content .fotorama-thumb-control:hover,
    .product-content .fotorama-thumb-control:focus-visible {
        color: #599823;
        outline: none;
    }
}
