.product-gallery {
    min-width: 0;
    color: #272822;
    font: 14px/1.45 Arial, Helvetica, sans-serif;
}
.product-gallery [hidden], .product-lightbox [hidden] { display: none !important; }
.product-gallery a:focus-visible, .product-gallery button:focus-visible, .product-lightbox button:focus-visible, .product-lightbox [tabindex]:focus-visible { outline: 3px solid #b43c26; outline-offset: 4px; }
.product-gallery__frame {
    position: relative;
    overflow: hidden;
    border: 1px solid #dedfd6;
    background: #fff;
    touch-action: pan-y;
}
.product-gallery__open {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 260px;
    aspect-ratio: 4 / 3;
    align-items: center;
    justify-content: center;
    padding: 22px 22px 48px;
    color: #272822;
    text-decoration: none;
    cursor: zoom-in;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.product-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    pointer-events: none;
}
.product-gallery__image-error { max-width: 280px; color: #686a62; text-align: center; }
.product-gallery__open-label {
    position: absolute;
    right: 14px;
    bottom: 12px;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    background: rgb(255 255 255 / 92%);
    color: #272822;
    font-size: 14px;
}
.product-gallery__open:hover .product-gallery__open-label { color: #b43c26; }
.product-gallery__arrow {
    position: absolute;
    top: calc(50% - 22px);
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid #dedfd6;
    background: rgb(255 255 255 / 94%);
    color: #272822;
    cursor: pointer;
}
.product-gallery__arrow--previous { left: 10px; }
.product-gallery__arrow--next { right: 10px; }
.product-gallery__arrow:hover { border-color: #b43c26; color: #b43c26; }
.product-gallery__caption { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; color: #65665d; font-size: 14px; }
.product-gallery__caption [data-gallery-count] { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.product-gallery__thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 4px 3px 12px; scrollbar-width: thin; scrollbar-color: #bbbdb0 transparent; }
.product-gallery__thumbnail { position: relative; display: block; flex: 0 0 92px; height: 72px; padding: 5px; overflow: hidden; border: 1px solid #dedfd6; background: #fff; color: #272822; text-decoration: none; }
.product-gallery__thumbnail[aria-current="true"] { border: 2px solid #b43c26; padding: 4px; }
.product-gallery__thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-gallery__thumbnail-number { position: absolute; right: 3px; bottom: 2px; min-width: 17px; background: rgb(255 255 255 / 90%); color: #65665d; font-size: 12px; text-align: center; }
.product-gallery__thumbnail.is-unavailable::before { position: absolute; inset: 0; display: grid; place-items: center; content: 'Фото'; color: #65665d; font-size: 14px; }
.product-gallery__empty { display: flex; min-height: 260px; aspect-ratio: 4 / 3; gap: 16px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #dedfd6; background: #f1f2ec; color: #686a62; }
.product-lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: #171915;
    color: #fff;
    font: 14px/1.4 Arial, Helvetica, sans-serif;
}
.product-lightbox[open] { display: flex; flex-direction: column; }
.product-lightbox::backdrop { background: #171915; }
.product-lightbox__header { z-index: 1; display: flex; flex: 0 0 auto; gap: 20px; align-items: center; padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 14px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid #42453e; background: #22251f; }
.product-lightbox__heading { flex: 1; min-width: 0; }
.product-lightbox .product-lightbox__heading h2 { display: -webkit-box; margin: 0 0 3px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #fff; font: 500 16px/1.3 Arial, Helvetica, sans-serif; }
.product-lightbox__heading span { color: #c3c7bc; font-size: 14px; }
.product-lightbox__tools { display: flex; gap: 4px; flex-shrink: 0; align-items: center; }
.product-lightbox button { display: inline-flex; min-width: 44px; min-height: 44px; gap: 7px; justify-content: center; align-items: center; padding: 8px; border: 1px solid #62665c; border-radius: 0; background: #22251f; color: #fff; font: 500 16px/1.2 Arial, Helvetica, sans-serif; cursor: pointer; touch-action: manipulation; }
.product-lightbox button:hover { border-color: #fff; background: #363a31; }
.product-lightbox button:disabled { opacity: .35; cursor: default; }
.product-lightbox button[data-gallery-zoom-in], .product-lightbox button[data-gallery-zoom-out] { font-size: 24px; }
.product-lightbox [data-gallery-scale] { width: 54px; padding: 0; color: #fff; font: 14px/1 Arial, Helvetica, sans-serif; font-variant-numeric: tabular-nums; text-align: center; }
.product-lightbox .product-lightbox__reset { padding-inline: 12px; margin-left: 6px; font-size: 14px; }
.product-lightbox .product-lightbox__close { flex-shrink: 0; margin-left: 0; }
.product-lightbox__stage { position: relative; flex: 1 1 0; min-height: 0; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; cursor: grab; }
.product-lightbox__stage.is-zoomed { cursor: grab; }
.product-lightbox__stage.is-dragging { cursor: grabbing; }
.product-lightbox__stage img { position: absolute; display: block; width: auto; height: auto; max-width: none; max-height: none; margin: 0; object-fit: contain; transform-origin: center; will-change: transform; pointer-events: none; }
.product-lightbox__loading, .product-lightbox__error { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; max-width: 340px; margin: auto; padding: 24px; color: #e3e5df; text-align: center; pointer-events: none; }
.product-lightbox__footer { display: flex; flex: 0 0 auto; gap: 16px; align-items: center; justify-content: space-between; padding: 12px max(20px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); border-top: 1px solid #42453e; background: #22251f; }
.product-lightbox__footer p { max-width: 700px; margin: 0; color: #c3c7bc; font-size: 14px; text-align: center; }
.product-lightbox__footer button { flex-shrink: 0; padding-inline: 14px; font-size: 14px; }
.product-lightbox__touch-help { display: none; }
@media (pointer: coarse) { .product-lightbox__desktop-help { display: none; } .product-lightbox__touch-help { display: inline; } }
@media (max-width: 600px) {
    .product-gallery__open { min-height: 230px; padding: 14px 14px 42px; }
    .product-gallery__arrow { width: 40px; height: 44px; }
    .product-gallery__arrow--previous { left: 6px; }
    .product-gallery__arrow--next { right: 6px; }
    .product-gallery__thumbnail { flex-basis: 78px; height: 64px; }
    .product-gallery__caption { gap: 8px; }
    .product-lightbox__header { flex-wrap: wrap; gap: 8px 12px; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left)); }
    .product-lightbox__heading { flex-basis: calc(100% - 60px); }
    .product-lightbox .product-lightbox__heading h2 { font-size: 16px; }
    .product-lightbox__tools { order: 3; justify-content: center; width: 100%; }
    .product-lightbox__footer { gap: 8px; padding: 10px max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
    .product-lightbox__footer button { min-width: 44px; padding: 8px; }
    .product-lightbox__footer button span { display: none; }
}
@media (max-height: 500px) and (orientation: landscape) {
    .product-lightbox__header { flex-wrap: nowrap; gap: 10px; padding-block: 6px; }
    .product-lightbox__heading { flex-basis: auto; }
    .product-lightbox__tools { order: initial; width: auto; }
    .product-lightbox .product-lightbox__heading h2 { -webkit-line-clamp: 1; font-size: 16px; }
    .product-lightbox__footer { padding-block: 4px; }
}
@media (prefers-reduced-motion: reduce) { .product-gallery *, .product-lightbox * { scroll-behavior: auto !important; transition: none !important; } }
