/* Витрина 3D в карточке товара (RAWMID спека 005): плашка 3D-студии и 4 шаблона «Описания блоками».
   Подключается только у карточек, где есть эти блоки или GLB (ControllerProductProduct::index).
   Тёмная тема — в конце файла по html[data-theme="dark"], dark-auto.css не трогается.
   Анимируются только transform и opacity; prefers-reduced-motion — статика. */

/* Обёртка описания: overflow: hidden делает её контейнером прокрутки и ломает position: sticky */
.alldescription .product-description.has-scroll-blocks.is-collapsed {
    overflow: clip;
}

/* Плашка 3D-студии */
.studio3d-plate {
    margin: 10px auto 0;
    display: flex;
    justify-content: center;
}
.studio3d-plate__button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid rgba(29, 29, 31, 0.16);
    border-radius: 12px;
    background: #ffffff;
    color: #1d1d1f;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 160ms ease-out, border-color 200ms ease-out;
}
.studio3d-plate__button:active {
    transform: scale(0.97);
}
.studio3d-plate__button:focus-visible {
    outline: 2px solid #00a4e2;
    outline-offset: 2px;
}
.studio3d-plate__icon {
    flex: none;
    color: #0077b6;
}
.studio3d-plate__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.studio3d-plate__title {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.studio3d-plate__hint {
    font-size: 13px;
    line-height: 1.35;
    color: #55575c;
}
.studio3d-plate__error {
    margin: 8px 0 0;
    font-size: 13px;
    color: #b3261e;
}

/* Сцены с кадрами: scroll_360_showcase и exploded_scroll */
.showcase-scene {
    margin: 0 0 40px;
}
.showcase-scene__track {
    position: relative;
}
.showcase-scene.is-scroll .showcase-scene__sticky {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 16px 0;
    box-sizing: border-box;
}
.showcase-scene__head {
    max-width: 72ch;
    margin: 0 auto 20px;
    text-align: center;
}
.showcase-scene__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.6vw, 32px);
    line-height: 1.2;
}
.showcase-scene__subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    color: #4a4c52;
}
.showcase-scene__body {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}
.showcase-scene__stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #eef0f2;
}
.showcase-scene.is-scroll .showcase-scene__stage {
    max-height: 64vh;
    max-height: 64svh;
}
.showcase-scene__frame {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Тезисы 360° */
.showcase-points {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.showcase-point {
    transition: opacity 280ms ease-out, transform 280ms ease-out;
}
.showcase-scene.is-scroll .showcase-point:not(.is-visible) {
    opacity: 0;
    transform: translateY(8px);
}
.showcase-point__metric,
.showcase-reason__metric {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}
.showcase-point__title {
    margin: 4px 0;
    font-size: 17px;
    line-height: 1.3;
}
.showcase-point__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #3c3f44;
}

/* Выноски взрыв-схемы */
.showcase-scene--exploded .showcase-scene__stage {
    max-width: 1100px;
    margin: 0 auto;
}
.showcase-callout {
    position: absolute;
    max-width: 240px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
    font-size: 13px;
    line-height: 1.35;
    transform-origin: center;
    transition: opacity 280ms ease-out, transform 280ms ease-out;
}
.showcase-scene.is-scroll .showcase-callout:not(.is-visible) {
    opacity: 0;
    transform: scale(0.95);
}
.showcase-callout__title {
    display: block;
    font-weight: 600;
}
.showcase-callout__text {
    display: block;
    margin-top: 2px;
    color: #3c3f44;
    font-variant-numeric: tabular-nums;
}

/* Лента причин: на десктопе едет горизонтально при прокрутке, до 820px — нативный свайп */
.showcase-reasons {
    margin: 0 0 40px;
}
.showcase-reasons__track {
    position: relative;
}
.showcase-reasons.is-scroll .showcase-reasons__sticky {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
}
.showcase-reasons__head {
    max-width: 72ch;
    margin: 0 0 20px;
}
.showcase-reasons__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 2.6vw, 32px);
    line-height: 1.2;
}
.showcase-reasons__subtitle {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    color: #4a4c52;
}
.showcase-reasons__viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.showcase-reasons.is-scroll .showcase-reasons__viewport {
    overflow: hidden;
}
.showcase-reasons__list {
    display: flex;
    gap: 16px;
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
}
.showcase-reason {
    flex: 0 0 min(340px, 80vw);
    box-sizing: border-box;
    padding: 20px;
    border: 1px solid rgba(29, 29, 31, 0.12);
    border-radius: 16px;
    background: #ffffff;
    scroll-snap-align: start;
}
.showcase-reason__title {
    margin: 8px 0 6px;
    font-size: 18px;
    line-height: 1.3;
}
.showcase-reason__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #3c3f44;
}

/* Акценты цифр */
.showcase-accent--warm .showcase-point__metric,
.showcase-accent--warm .showcase-reason__metric,
.showcase-accent--warm.showcase-callout .showcase-callout__title {
    color: #c2410c;
}
.showcase-accent--cool .showcase-point__metric,
.showcase-accent--cool .showcase-reason__metric,
.showcase-accent--cool.showcase-callout .showcase-callout__title {
    color: #0369a1;
}

/* Кнопки 3D-студии и AR */
.showcase-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
    margin: 0 0 40px;
    padding: 24px;
    border-radius: 16px;
    background: #eef0f2;
}
.showcase-cta__body {
    flex: 1 1 360px;
    min-width: 0;
}
.showcase-cta__title {
    margin: 0 0 6px;
    font-size: clamp(20px, 2.2vw, 28px);
    line-height: 1.25;
}
.showcase-cta__text {
    max-width: 62ch;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #3c3f44;
}
.showcase-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.showcase-cta__button {
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid #1d1d1f;
    border-radius: 10px;
    background: transparent;
    color: #1d1d1f;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease-out, background-color 200ms ease-out;
}
.showcase-cta__button--primary {
    background: #1d1d1f;
    color: #ffffff;
}
.showcase-cta__button:active {
    transform: scale(0.97);
}
.showcase-cta__button:focus-visible {
    outline: 2px solid #00a4e2;
    outline-offset: 2px;
}

/* Наведение — только там, где есть мышь */
@media (hover: hover) {
    .studio3d-plate__button:hover {
        border-color: #00a4e2;
    }
    .showcase-cta__button:hover {
        background: #1d1d1f;
        color: #ffffff;
    }
    .showcase-cta__button--primary:hover {
        background: #000000;
    }
}

@media (max-width: 820px) {
    .showcase-scene__body {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .showcase-scene.is-scroll .showcase-scene__stage {
        max-height: 46vh;
        max-height: 46svh;
    }
    .showcase-points {
        gap: 10px;
    }
    .showcase-point__metric {
        font-size: 17px;
    }
    .showcase-point__title {
        font-size: 15px;
    }
    .showcase-point__text {
        font-size: 14px;
    }
    .showcase-callout {
        max-width: 46%;
        padding: 6px 8px;
        font-size: 12px;
    }
    .showcase-callout--desktop {
        display: none;
    }
}

/* Телефон: сцена ~200 px высотой, выноски с текстом накладываются — оставляем только заголовок */
@media (max-width: 640px) {
    .showcase-callout {
        max-width: 40%;
        padding: 5px 8px;
        font-size: 11px;
        line-height: 1.3;
    }
    .showcase-callout__text {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .studio3d-plate__button,
    .showcase-point,
    .showcase-callout,
    .showcase-cta__button {
        transition: none;
    }
}

/* Тёмная тема: сцена остаётся тёмной, чёрная техника не высвечивается */
html[data-theme="dark"] .studio3d-plate__button {
    border-color: rgba(242, 242, 244, 0.16);
    background: #1d1e21;
    color: #f2f2f4;
}
html[data-theme="dark"] .studio3d-plate__icon {
    color: #5cc8f2;
}
html[data-theme="dark"] .studio3d-plate__hint,
html[data-theme="dark"] .showcase-scene__subtitle,
html[data-theme="dark"] .showcase-reasons__subtitle {
    color: #b6b8bd;
}
html[data-theme="dark"] .studio3d-plate__error {
    color: #f2b8b5;
}
html[data-theme="dark"] .showcase-scene__stage {
    background: #0f1012;
}
html[data-theme="dark"] .showcase-point__text,
html[data-theme="dark"] .showcase-reason__text,
html[data-theme="dark"] .showcase-cta__text,
html[data-theme="dark"] .showcase-callout__text {
    color: #c9cbcf;
}
html[data-theme="dark"] .showcase-callout {
    background: #1d1e21;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    color: #f2f2f4;
}
html[data-theme="dark"] .showcase-reason {
    border-color: rgba(242, 242, 244, 0.14);
    background: #1d1e21;
}
html[data-theme="dark"] .showcase-cta {
    background: #1d1e21;
}
html[data-theme="dark"] .showcase-cta__button {
    border-color: #f2f2f4;
    color: #f2f2f4;
}
html[data-theme="dark"] .showcase-cta__button--primary {
    background: #f2f2f4;
    color: #111214;
}
html[data-theme="dark"] .showcase-accent--warm .showcase-point__metric,
html[data-theme="dark"] .showcase-accent--warm .showcase-reason__metric,
html[data-theme="dark"] .showcase-accent--warm.showcase-callout .showcase-callout__title {
    color: #fb923c;
}
html[data-theme="dark"] .showcase-accent--cool .showcase-point__metric,
html[data-theme="dark"] .showcase-accent--cool .showcase-reason__metric,
html[data-theme="dark"] .showcase-accent--cool.showcase-callout .showcase-callout__title {
    color: #5cc8f2;
}
@media (hover: hover) {
    html[data-theme="dark"] .showcase-cta__button:hover {
        background: #f2f2f4;
        color: #111214;
    }
    html[data-theme="dark"] .showcase-cta__button--primary:hover {
        background: #ffffff;
    }
}

/* Product gallery and variant actions */
.product-images .studio3d-plate, .product-images .studio3d-plate__button { width: 100%; }
.product-images .studio3d-plate__button { justify-content: center; padding: 12px 16px; gap: 12px; }
.product-images .studio3d-plate__title { font-size: 16px; }
.product-images .studio3d-plate__icon { width: 26px; height: 26px; }
.studio3d-option { display: none; }
@media (max-width:820px) {
    .studio3d-option:not([hidden]) { display: inline-flex; padding: 8px 12px; margin-top: 8px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 8px; }
    html .product-sticky-buy.is-active { background: #fff; backdrop-filter: none; }
    html[data-theme="dark"] .product-sticky-buy.is-active { background: #191c20; }
}
#productDescriptionCollapse { --desc-ink:#24282c; --desc-surface:#fff; --desc-edge:#d8dce0; }
html[data-theme="dark"] #productDescriptionCollapse { --desc-ink:#eceff2; --desc-surface:#202327; --desc-edge:#393e44; }
#productDescriptionCollapse.is-collapsed .description-contents { display: none; }
.description-contents { display:flex; flex-wrap:wrap; gap:8px 16px; padding:16px 0; }
#description_blocks [id] { scroll-margin-top: 80px; }
#productDescriptionCollapse #description_blocks > .row { box-sizing:border-box; margin-inline:0; width:100%; max-width:100%; }
#productDescriptionCollapse #description_blocks > .row:not([class*="background_grid"]) { color:var(--desc-ink); background-color:var(--desc-surface); border-color:var(--desc-edge); }
#productDescriptionCollapse #description_blocks > .row:not([class*="background_grid"]) :is(h2,h3,h4,.title,.text) { color:var(--desc-ink); border-color:var(--desc-edge); }
#productDescriptionCollapse #description_blocks > .row:not([class*="background_grid"]) :is(.text,.item,.grid,.grid-item) { background-color:var(--desc-surface); border-color:var(--desc-edge); }

#description-obexpand.collapse-line-full { background:transparent; padding:8px 0; text-align:center; }
#description-obexpand::before { display:none; }
#description-expand { background:#006c94; color:#fff; border:0; border-radius:8px; padding:10px 18px; font:inherit; cursor:pointer; }
