.as-product-gallery {
    max-width: 600px;
    margin: 0 auto 30px;
}

.as-product-gallery__main {
    position: relative;
}

.as-product-gallery__slide {
    display: none;
}

.as-product-gallery__slide.is-active {
    display: block;
}

.as-product-gallery__image,
.as-product-gallery__video iframe,
.as-product-gallery__video video,
.as-product-gallery__video-element {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.as-product-gallery__video iframe,
.as-product-gallery__video video,
.as-product-gallery__video-element {
    aspect-ratio: 16 / 9;
    background: #111;
}

.as-product-gallery__thumb-wrap {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.as-product-gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.as-product-gallery--thumbs-slider .as-product-gallery__thumbs {
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    margin-top: 0;
    padding-bottom: 4px;
    flex-wrap: nowrap;
}

.as-product-gallery--thumbs-grid .as-product-gallery__thumbs {
    flex-wrap: wrap;
}

.as-product-gallery__thumb {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: transparent;
    opacity: 0.55;
    cursor: pointer;
    overflow: hidden;
    scroll-snap-align: start;
}

.as-product-gallery__thumb.is-active,
.as-product-gallery__thumb:hover,
.as-product-gallery__thumb:focus-visible {
    opacity: 1;
    border-color: currentColor;
}

.as-product-gallery__thumb-image,
.as-product-gallery__video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.as-product-gallery__video-thumb {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    background: #111;
}

.as-product-gallery__video-thumb--placeholder {
    background: linear-gradient(135deg, #111, #444);
}

.as-product-gallery__play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 14px;
    line-height: 1;
}

.as-product-gallery__nav {
    width: 36px;
    height: 36px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.as-product-gallery__nav:hover,
.as-product-gallery__nav:focus-visible {
    background: rgba(0, 0, 0, 0.06);
}
