.product-gallery {
    font-size: 14px;
    margin-bottom: 25px;
}
.product-gallery-main {
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1;
    margin-bottom: 16px;
}
.product-gallery-main .swiper-slide,
.product-gallery-main [data-gallery-photo] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.product-gallery-main [data-gallery-photo] {
    cursor: zoom-in;
}
.product-gallery-main img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-gallery-video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.product-gallery-main:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}
.product-gallery-thumbs-row {
    display: none;
    align-items: center;
    gap: 4px;
}
.product-gallery.is-ready .product-gallery-thumbs-row {
    display: flex;
}
.product-gallery-thumbs {
    flex: 1;
    min-width: 0;
}
.product-gallery .product-gallery-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80px;
    padding: 4px;
    border: 2px solid #e8e9ec;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .2s;
}
.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-gallery .product-gallery-thumb:hover,
.product-gallery .product-gallery-thumb[aria-pressed="true"] {
    border-color: #d60001;
}
.card-left.out-of-stock .product-gallery img {
    opacity: .5;
    filter: grayscale(50%);
}
.card-left.out-of-stock .product-gallery img:hover {
    opacity: .7;
    filter: grayscale(30%);
}
.gallery-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    color: #d60001;
    background: #fff;
    border: 1px solid #e4e5e9;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
    cursor: pointer;
    box-sizing: border-box;
}
.gallery-arrow::after {
    content: '';
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    margin-right: 4px;
}
.photo-gallery-prev::after,
.product-gallery-thumbs-prev::after {
    transform: rotate(-135deg);
    margin-right: 0;
    margin-left: 4px;
}
.gallery-arrow:hover {
    background: #fff3f3;
    border-color: #d60001;
}
.gallery-arrow.swiper-button-disabled {
    opacity: .35;
    cursor: default;
}
.gallery-arrow.swiper-button-lock,
.photo-gallery-dialog [hidden] {
    display: none !important;
}
.product-gallery button:focus-visible,
.product-gallery a:focus-visible,
.photo-gallery-dialog button:focus-visible {
    outline: 3px solid #d60001;
    outline-offset: 3px;
}
.photo-gallery-dialog {
    width: min(1120px, 94vw);
    height: min(860px, 90vh);
    height: min(860px, 90dvh);
    max-width: 94vw;
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
    background: #fff;
    color: #2c2f36;
    overflow: hidden;
    font: 14px/1.4 Arial, sans-serif;
    box-sizing: border-box;
}
.photo-gallery-dialog::backdrop {
    background: rgba(15, 20, 30, .7);
}
.photo-gallery-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 8px 16px 8px 24px;
    box-sizing: border-box;
}
.photo-gallery-counter {
    color: #666b75;
    font-variant-numeric: tabular-nums;
}
.photo-gallery-close {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font: 32px/44px Arial, sans-serif;
    color: #666b75;
    background: #f3f4f6;
    cursor: pointer;
}
.photo-gallery-close:hover {
    color: #d60001;
    background: #fff3f3;
}
.photo-gallery-dialog-stage {
    position: relative;
    height: calc(100% - 60px);
    padding: 0 76px 24px;
    box-sizing: border-box;
}
.photo-gallery-viewer {
    width: 100%;
    height: 100%;
}
.photo-gallery-viewer-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.photo-gallery-viewer-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.photo-gallery-prev,
.photo-gallery-next {
    position: absolute;
    top: calc(50% - 34px);
    z-index: 2;
}
.photo-gallery-prev { left: 16px; }
.photo-gallery-next { right: 16px; }
.photo-gallery-image-status {
    position: absolute;
    text-align: center;
    padding: 16px;
    color: #666b75;
    background: rgba(255, 255, 255, .95);
    border-radius: 12px;
}
.is-loading .photo-gallery-image-status::before {
    content: '';
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid #eee;
    border-top-color: #d60001;
    border-radius: 50%;
    animation: photo-gallery-spin .7s linear infinite;
}
@keyframes photo-gallery-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) {
    .photo-gallery-dialog {
        width: 96vw;
        max-width: 96vw;
        border-radius: 12px;
    }
    .photo-gallery-dialog-stage { padding: 0 8px 68px; }
    .photo-gallery-prev, .photo-gallery-next { top: auto; bottom: 12px; }
    .photo-gallery-prev { left: calc(50% - 52px); }
    .photo-gallery-next { right: calc(50% - 52px); }
    .photo-gallery-dialog-header { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .is-loading .photo-gallery-image-status::before { animation: none; }
    .product-gallery .product-gallery-thumb { transition: none; }
}
