/* 360 Просмотр Premium — изолированные стили, без изменения темы. */
.gs360 {
    --gs360-primary: #f6d200;
    --gs360-dark: #262626;
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    isolation: isolate;
    font-family: inherit;
    background: #fff;
    border-radius: inherit;
}
.gs360 [hidden] { display: none !important; }
.product-main-image > .gs360--single { position: relative; display: block; width: 100%; min-width: 0; }
.product-main-image > .gs360--single > .gs360__poster { width: 100%; min-width: 0; }
.product-main-image > .gs360--single > .gs360__poster:empty { aspect-ratio: var(--gs360-ratio, 3/2); }
.gs360 .gs360__empty-poster { display: block; width: 100%; aspect-ratio: 3/2; border-radius: inherit; background: #f5f5f5; }
.gs360 svg { display: block; width: 25px; height: 25px; flex: 0 0 auto; }
.gs360 .gs360__image {
    display: block;
    width: 100% !important;
    max-width: 100%;
    object-fit: contain !important;
    object-position: center;
    transform: none !important;
    transition: none !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.gs360[data-gs360-mode="card"] { overflow: hidden; aspect-ratio: var(--gs360-ratio, 3/2); }
.gs360[data-gs360-mode="card"] .gs360__image { height: 100% !important; }
.gs360--ready[data-gs360-mode="card"] { cursor: ew-resize; touch-action: pan-y; }
.gs360[data-gs360-mode="single"] .gs360__viewport {
    position: absolute;
    z-index: 2;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    background: #fff;
    touch-action: pan-y;
    cursor: grab;
}
.gs360[data-gs360-mode="single"] .gs360__viewport .gs360__image { height: 100% !important; }
.gs360--active.gs360--has-frame .gs360__poster { visibility: hidden; }
.gs360--active:not(.gs360--has-frame) .gs360__viewport { background: transparent; }
.gs360--active:not(.gs360--has-frame) .gs360__viewport .gs360__image { visibility: hidden; }
.gs360--dragging .gs360__viewport { cursor: grabbing; }
.gs360__poster { display: block; }
.gs360__poster img { display: block; width: 100%; max-width: 100%; height: auto; }
.gs360 .gs360__toggle,
.gs360 .gs360__badge {
    position: absolute;
    z-index: 5;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 39px;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 12px;
    background: var(--gs360-dark);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.16);
    font-weight: 700;
    font-size: 12px;
    line-height: 1.1;
    font-family: inherit;
    letter-spacing: .02em;
    text-decoration: none;
}
.gs360 .gs360__toggle { cursor: pointer; transition: background .18s, color .18s, box-shadow .18s; }
.gs360 .gs360__notice { position: absolute; right: 12px; bottom: 12px; left: 12px; z-index: 6; text-align: right; pointer-events: none; }
.gs360 .gs360__notice > summary.gs360__toggle {
    position: relative;
    right: auto;
    bottom: auto;
    list-style: none;
    user-select: none;
    pointer-events: auto;
}
.gs360 .gs360__notice > summary.gs360__toggle::-webkit-details-marker { display: none; }
.gs360 .gs360__notice[open] > summary.gs360__toggle { background: var(--gs360-primary); color: var(--gs360-dark); border-color: var(--gs360-primary); }
.gs360 .gs360__notice[open] > summary.gs360__toggle svg { color: var(--gs360-dark); }
.gs360 .gs360__notice-body {
    position: absolute;
    right: 0;
    bottom: calc(100% + 9px);
    width: 290px;
    max-width: 100%;
    padding: 12px 14px;
    border: 1px solid #eceef1;
    border-radius: 12px;
    background: #fff;
    color: var(--gs360-dark);
    box-shadow: 0 6px 24px rgba(0,0,0,.14);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    text-align: left;
    pointer-events: auto;
}
.gs360 .gs360__toggle:focus-visible { outline: 3px solid var(--gs360-primary); outline-offset: 3px; }
.gs360[data-gs360-mode="single"]:not(.gs360--preloaded):not(.gs360--unavailable) .gs360__toggle { display: inline-flex !important; }
.gs360[data-gs360-mode="single"] .gs360__toggle:disabled { opacity: .74; cursor: progress; }
.gs360 .gs360__toggle svg,
.gs360 .gs360__badge svg { color: var(--gs360-primary); }
.gs360 .gs360__toggle:hover,
.gs360 .gs360__toggle[aria-expanded="true"] { background: var(--gs360-primary); color: var(--gs360-dark); border-color: var(--gs360-primary); }
.gs360 .gs360__toggle:hover svg,
.gs360 .gs360__toggle[aria-expanded="true"] svg { color: var(--gs360-dark); }
.gs360 .gs360__badge { pointer-events: none; min-height: 33px; padding: 6px 9px; right: 10px; bottom: 10px; border-radius: 10px; }
.gs360 .gs360__badge svg { width: 20px; height: 20px; }
.gs360 .gs360__prev,
.gs360 .gs360__next,
.gs360 .gs360__close {
    position: absolute;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 8px;
    border: 1px solid #e7e7e7;
    border-radius: 11px;
    background: rgba(255,255,255,.96);
    color: var(--gs360-dark);
    box-shadow: 0 3px 14px rgba(0,0,0,.09);
    font-family: inherit;
    cursor: pointer;
}
.gs360 .gs360__prev { left: 10px; top: calc(50% - 19px); }
.gs360 .gs360__next { right: 10px; top: calc(50% - 19px); }
.gs360 .gs360__close { top: 10px; right: 10px; }
.gs360 .gs360__prev:hover,
.gs360 .gs360__next:hover,
.gs360 .gs360__close:hover { background: var(--gs360-primary); border-color: var(--gs360-primary); }
.gs360 .gs360__prev svg,
.gs360 .gs360__next svg,
.gs360 .gs360__close svg { width: 19px; height: 19px; }
.gs360 .gs360__hint {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    max-width: calc(100% - 130px);
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(38,38,38,.86);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .18s;
}
.gs360--interacting .gs360__hint,
.gs360--active .gs360__hint { opacity: 1; }
.gs360--dragging .gs360__hint { opacity: 0; }
.gs360 .gs360__counter {
    position: absolute;
    z-index: 4;
    top: 12px;
    left: 12px;
    padding: 5px 8px;
    border-radius: 8px;
    background: rgba(38,38,38,.82);
    color: #fff;
    font-size: 10px;
    line-height: 1.4;
    pointer-events: none;
}
.gs360[data-gs360-mode="single"]:not(.gs360--active) .gs360__counter { display: none; }
.gs360 .gs360__status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.gs360 .gs360__canvas {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.gs360--canvas-viewer .gs360__viewport .gs360__image { visibility: hidden; }
.gs360--canvas-viewer[data-gs360-mode="card"].gs360--has-frame > .gs360__image { visibility: hidden; }
.gs360 .gs360__progress {
    position: absolute;
    z-index: 7;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    width: max-content;
    max-width: calc(100% - 32px);
    min-width: min(200px, calc(100% - 32px));
    padding: 13px 16px;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 13px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 25px rgba(0,0,0,.13);
    color: var(--gs360-dark);
    font: inherit;
    text-align: center;
    cursor: default;
}
.gs360 .gs360__progress-label { font-size: 12px; font-weight: 600; line-height: 1.5; }
.gs360[data-gs360-mode="single"] .gs360__progress {
    top: auto;
    right: 112px;
    bottom: 12px;
    left: auto;
    transform: none;
    gap: 6px;
    min-width: 0;
    max-width: calc(100% - 136px);
    padding: 9px 12px;
    pointer-events: none;
}
.gs360[data-gs360-mode="single"] .gs360__progress-label { font-size: 11px; }
.gs360[data-gs360-mode="card"] .gs360__progress,
.gs360[data-gs360-mode="card"] .gs360__retry,
.gs360[data-gs360-mode="card"] .gs360__status { display: none !important; }
.gs360[data-gs360-mode="card"]::after { content: none !important; }
.gs360 .gs360__progress-bar {
    display: block;
    appearance: none;
    width: 100%;
    height: 5px;
    overflow: hidden;
    border: 0;
    border-radius: 5px;
    background: #e8e8e8;
    accent-color: var(--gs360-primary);
}
.gs360 .gs360__progress-bar::-webkit-progress-bar { border-radius: 5px; background: #e8e8e8; }
.gs360 .gs360__progress-bar::-webkit-progress-value { border-radius: 5px; background: var(--gs360-primary); }
.gs360 .gs360__progress-bar::-moz-progress-bar { border-radius: 5px; background: var(--gs360-primary); }
.gs360 .gs360__prev:disabled,
.gs360 .gs360__next:disabled { opacity: .4; cursor: default; background: #fff; border-color: #e7e7e7; }
.gs360--batch-loading .gs360__hint { opacity: 0; }
.gs360--batch-loading::after { display: none; }
.gs360--unavailable[data-gs360-mode="card"] { cursor: auto; }
.gs360--unavailable .gs360__badge,
.gs360--unavailable .gs360__hint { display: none; }
.gs360--loading::after {
    content: "";
    position: absolute;
    z-index: 6;
    width: 16px;
    height: 16px;
    left: 12px;
    top: 12px;
    border: 2px solid rgba(38,38,38,.18);
    border-top-color: var(--gs360-primary);
    border-radius: 50%;
    animation: gs360-spin .65s linear infinite;
    pointer-events: none;
}
.gs360--loading .gs360__counter { opacity: 0; }
.gs360--ready:focus-visible,
.gs360 button:focus-visible { outline: 3px solid var(--gs360-primary); outline-offset: 3px; }
@keyframes gs360-spin { to { transform: rotate(360deg); } }
@media (max-width: 480px) {
    .gs360 .gs360__toggle { right: 10px; bottom: 10px; min-height: 37px; padding: 7px 10px; }
    .gs360 .gs360__hint { font-size: 9px; padding: 5px 7px; max-width: calc(100% - 120px); bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .gs360 .gs360__toggle,
    .gs360 .gs360__hint { transition: none; }
    .gs360--loading::after { animation: none; }
}
