/* SABKO 360 — scoped to this module. No global theme overrides. */
.sabko-product360 { margin: 12px 0 16px; clear: both; }
/* The theme lays .product.media out as a single flex row: put the button on its own row under the gallery. */
.product.media:has(> .sabko-product360) { flex-wrap: wrap; }
.product.media:has(> .sabko-product360) > .gallery-placeholder { flex: 1 1 100%; min-width: 0; }
.product.media > .sabko-product360 { flex: 0 0 100%; order: 99; }
.sabko-product360__trigger {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; min-height: 56px; padding: 8px 16px; box-sizing: border-box;
    border: 2px solid #f20f09; border-radius: 8px; background: #fff;
    color: #f20f09; font-family: inherit; font-size: 18px; font-weight: 700; line-height: 1.25;
    text-decoration: none; transition: background-color .15s, box-shadow .15s;
}
.sabko-product360__trigger:visited, .sabko-product360__trigger:hover,
.sabko-product360__trigger:active { color: #f20f09; text-decoration: none; }
.sabko-product360__trigger:hover { background: #fff5f5; box-shadow: 0 2px 10px rgba(242, 15, 9, .12); }
.sabko-product360__trigger-icon { flex: 0 0 auto; width: 46px; height: 35px; overflow: visible; }
.sabko-product360__trigger-icon text { fill: currentColor; font: 700 14.5px Roboto, Arial, sans-serif; letter-spacing: -.02em; }
.sabko-product360__trigger-orbit {
    fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.sabko-product360__trigger:focus-visible { outline: 3px solid #24272b; outline-offset: 2px; }
.sabko-product360__tool:focus-visible,
.sabko-product360-modal .action-close:focus-visible,
.sabko-product360__status a:focus-visible { outline: 3px solid #e26324; outline-offset: 2px; }
.sabko-product360__dialog[hidden], .sabko-product360__status[hidden],
.sabko-product360__status [hidden] { display: none !important; }

/*
 * Modal. The theme also ships Bootstrap .modal-header/.modal-content rules (flex, borders), so the
 * layout uses explicit heights: fixed header, viewer area takes the rest, iframe absolutely filled.
 */
.sabko-product360-modal.modal-popup {
    --sabko360-wrap-h: min(900px, calc(100vh - 40px));
    --sabko360-header-h: 80px;
    --sabko360-gutter: 16px;
    font-family: Arial, sans-serif; color: #24272b;
}
@supports (height: 100dvh) {
    .sabko-product360-modal.modal-popup { --sabko360-wrap-h: min(900px, calc(100dvh - 40px)); }
}
.sabko-product360-modal.modal-popup .modal-inner-wrap {
    display: block; box-sizing: border-box;
    width: min(1040px, calc(100% - 40px)); max-width: none;
    height: var(--sabko360-wrap-h); max-height: none;
    margin: 20px auto; top: max(0px, calc((100vh - 940px) / 2));
    border-radius: 12px; background: #fff; overflow: hidden;
    box-shadow: 0 22px 80px rgba(0, 0, 0, .25);
}
.sabko-product360-modal.modal-popup .modal-header {
    display: block; position: relative; box-sizing: border-box;
    height: var(--sabko360-header-h); margin: 0;
    padding: 18px 150px 0 24px; border: 0; border-radius: 0;
}
.sabko-product360-modal.modal-popup .modal-title {
    display: block; margin: 0; padding: 0; border: 0; min-height: 0;
    color: #24272b; font: 700 18px/1.3 Arial, sans-serif;
    text-transform: uppercase; letter-spacing: .02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sabko-product360__subtitle {
    margin: 4px 0 0; color: #616870; font: 400 14px/1.4 Arial, sans-serif;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sabko-product360-modal.modal-popup .modal-content {
    display: block; position: static; box-sizing: border-box;
    height: calc(var(--sabko360-wrap-h) - var(--sabko360-header-h)); width: auto;
    margin: 0; padding: 0 var(--sabko360-gutter) var(--sabko360-gutter);
    border: 0; border-radius: 0; background: transparent; overflow: hidden;
}
.sabko-product360-modal.modal-popup .modal-footer { display: none; }
.sabko-product360-modal.modal-popup .action-close {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    width: 40px; height: 40px; margin: 0; padding: 0; border: 0;
    border-radius: 8px; background: transparent; box-shadow: none;
}
.sabko-product360-modal.modal-popup .action-close > span { display: none; }
.sabko-product360-modal.modal-popup .action-close::before,
.sabko-product360-modal.modal-popup .action-close::after {
    content: ''; position: absolute; left: 19px; top: 10px; margin: 0;
    width: 2px; height: 20px; background: #24272b; transform: rotate(45deg);
}
.sabko-product360-modal.modal-popup .action-close::after { transform: rotate(-45deg); }
.sabko-product360-modal.modal-popup .action-close:hover { background: #f0f2f3; }
.sabko-product360__tools { position: absolute; top: 16px; right: 60px; display: flex; gap: 4px; }
.sabko-product360__tool, .sabko-product360__tool:visited {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 0; padding: 9px; border: 0;
    border-radius: 8px; box-shadow: none; background: transparent;
    color: #24272b; cursor: pointer; box-sizing: border-box;
}
.sabko-product360__tool:hover { background: #f0f2f3; color: #24272b; }
.sabko-product360__tool svg {
    width: 22px; height: 22px; fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sabko-product360__dialog, .sabko-product360__stage { position: relative; height: 100%; }
.sabko-product360__stage { border-radius: 10px; overflow: hidden; background: #f4f5f6; }
.sabko-product360__frame-host, .sabko-product360__frame {
    position: absolute; inset: 0; display: block; width: 100%; height: 100%; margin: 0; border: 0;
}
.sabko-product360__frame { background: transparent; }
.sabko-product360__status {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 14px; padding: 24px;
    color: #616870; text-align: center; background: #f4f5f6; z-index: 1;
}
.sabko-product360__status p { margin: 0; font-size: 14px; }
.sabko-product360__status a { color: #a94210; font-size: 14px; text-decoration: underline; }
.sabko-product360__spinner {
    display: block; width: 26px; height: 26px; border: 2px solid #d4d8dc;
    border-top-color: #e26324; border-radius: 50%; animation: sabko-product360-spin .85s linear infinite;
}
.sabko-product360__status--help .sabko-product360__spinner { display: none; }

/* Fullscreen API or the CSS fallback (iPhone). */
.sabko-product360--expanded.modal-popup,
.sabko-product360-modal.modal-popup:has(.modal-inner-wrap:fullscreen) { --sabko360-wrap-h: 100vh; }
.sabko-product360--expanded.modal-popup .modal-inner-wrap,
.sabko-product360-modal .modal-inner-wrap:fullscreen {
    position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0;
}
.sabko-product360-modal .modal-inner-wrap:fullscreen .modal-content {
    height: calc(100vh - var(--sabko360-header-h));
}
@keyframes sabko-product360-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .sabko-product360__spinner { animation: none; }
    .sabko-product360__trigger { transition: none; }
}
@media (min-width: 768px) and (max-height: 760px) {
    .sabko-product360-modal.modal-popup { --sabko360-header-h: 64px; --sabko360-gutter: 10px; }
    .sabko-product360-modal.modal-popup .modal-header { padding-top: 12px; }
    .sabko-product360-modal.modal-popup .action-close, .sabko-product360__tools { top: 10px; }
}
@media (max-width: 767px) {
    .sabko-product360__trigger { min-height: 52px; font-size: 17px; }
    .sabko-product360-modal.modal-popup {
        --sabko360-wrap-h: calc(100vh - 16px); --sabko360-header-h: 64px; --sabko360-gutter: 8px;
    }
    @supports (height: 100dvh) {
        .sabko-product360-modal.modal-popup { --sabko360-wrap-h: calc(100dvh - 16px); }
    }
    .sabko-product360--expanded.modal-popup { --sabko360-wrap-h: 100vh; }
    .sabko-product360-modal.modal-popup .modal-inner-wrap {
        width: calc(100% - 16px); margin: 8px auto; top: 0; border-radius: 10px;
    }
    .sabko-product360-modal.modal-popup .modal-header { padding: 12px 104px 0 14px; }
    .sabko-product360-modal.modal-popup .modal-title { font-size: 15px; }
    .sabko-product360__subtitle { font-size: 12px; margin-top: 3px; }
    .sabko-product360-modal.modal-popup .action-close { top: 8px; right: 6px; }
    .sabko-product360__tools { top: 8px; right: 46px; gap: 0; }
}
