/* ДС-1 в 3D (assets/turn.js): поворот при прокрутке на главной (.turn) и перетаскивание на странице товара (.pd-spin).
   Фон блока = фон кадров рендера (#f1f4f6 после webp читается как #f2f4f5); точный цвет turn.js берет из кадра, иначе виден край. */

/* ---- главная: статичный вид (без JS и при reduced-motion) - один кадр и факты списком ---- */
.turn { --turn-bg: #f2f4f5; --fact-w: 330px; background: var(--turn-bg); padding-top: var(--s10); }
.turn-intro { text-align: center; }
.turn-intro .kicker { margin-bottom: var(--s3); }
.turn-intro p { margin: var(--s4) auto 0; max-width: 34em; color: var(--muted); }
.turn-stage { width: min(100% - 48px, 1080px); margin-inline: auto; padding-block: var(--s7) var(--s10); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: start; }
.turn-fig { position: sticky; top: 100px; margin: 0; aspect-ratio: 4 / 5; grid-row: span 2; }
.turn-fig img, .turn-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.turn-canvas, .turn-lines, .turn-progress { display: none; }
.turn-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); }
.tf { max-width: 38ch; padding-top: var(--s4); border-top: 1px solid #dde1e8; }
.tf-k { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #07707f; }
.tf-v { margin-top: var(--s2); font-family: var(--font-head); font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }
.tf-note { margin-top: var(--s2); font-size: 15px; line-height: 1.5; color: var(--muted); }
.tf-src { margin-top: var(--s2); font-size: 13px; line-height: 1.45; color: var(--muted); font-style: italic; opacity: .85; }
.turn-cta { grid-column: 2; display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; }
.turn-cta .price { font-family: var(--font-head); font-size: 24px; font-weight: 600; color: var(--ink); letter-spacing: -.02em; margin-right: var(--s2); }
.turn-btns { display: flex; gap: var(--s3); flex-wrap: wrap; }

/* ---- живой вид: сцена закреплена на время прокрутки трека, флакон по центру, факты по одному с выносками ---- */
.turn--live .turn-track { height: 280vh; }
.turn--live .turn-stage { position: sticky; top: 0; height: 100vh; height: 100svh; width: auto; max-width: none; padding: 0; display: block; overflow: hidden; }
.turn--live .turn-fig { position: absolute; left: 50%; top: 88px; height: calc(100svh - 88px); width: auto; transform: translateX(-50%); }
.turn--live .turn-canvas { display: block; }
/* пока блок далеко, первый кадр не показываем: ленивую картинку Chrome грузит за 2-3 экрана, раньше чем выполнится turn.js;
   скрытую - не грузит, и она приходит вместе с кадрами. Без JS и при reduced-motion картинка видна всегда */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) { .turn:not(.is-near) .turn-fig img { display: none; } }
.turn--live .turn-lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.turn-lines path { fill: none; stroke: var(--ink); stroke-opacity: .35; stroke-width: 1; vector-effect: non-scaling-stroke; }
.turn-lines circle { fill: var(--turn-bg); stroke: var(--ink); stroke-width: 1.25; }
.turn-lines circle.core { fill: var(--ink); stroke: none; }
.turn-lines g > g { transition: opacity .42s var(--ease); }
.turn--live .turn-facts { display: block; position: absolute; inset: 0; pointer-events: none; }
.turn--live .tf { position: absolute; top: 34%; width: var(--fact-w); border-top: 0; padding-top: 0; opacity: 0; transform: translateY(12px); transition: opacity .52s var(--ease), transform .72s var(--ez); }
.turn--live .tf.is-on { opacity: 1; transform: none; }
.turn--live .tf-l { left: max(var(--s6), calc(50% - 600px)); }
.turn--live .tf-r { right: max(var(--s6), calc(50% - 600px)); }
.turn--live .tf-v { font-size: 26px; }
.turn--live .tf[data-anchor="purpose"] .tf-v { font-size: 22px; }
.turn--live .turn-cta { position: absolute; left: 50%; bottom: var(--s6); transform: translateX(-50%); z-index: 2; flex-wrap: nowrap; background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 999px; padding: 6px 6px 6px var(--s5); box-shadow: var(--shadow); }
.turn--live .turn-cta .price { font-size: 20px; white-space: nowrap; }
.turn--live .turn-btns { flex-wrap: nowrap; }
.turn--live .turn-progress { display: block; position: absolute; left: 50%; bottom: 14px; width: 120px; height: 2px; margin-left: -60px; border-radius: 2px; background: #dde1e8; }
.turn-progress span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transform-origin: left; transform: scaleX(0); }

@media (min-width: 768px) and (max-width: 1180px) {
  .turn { --fact-w: 240px; }
  .turn--live .tf[data-anchor] .tf-v { font-size: 20px; }
  .turn--live .tf-src { display: none; }
}

/* ---- до 768: флакон сверху, факт под ним, покупка внизу сцены; кадры m/ ---- */
@media (max-width: 767.98px) {
  .turn { padding-top: var(--s8); }
  .turn-stage { width: min(100% - 32px, var(--container)); grid-template-columns: 1fr; gap: var(--s6); padding-block: var(--s5) var(--s8); }
  .turn-fig { position: relative; top: 0; max-width: 360px; width: 100%; margin-inline: auto; grid-row: auto; }
  .turn-cta { grid-column: auto; }
  .turn { --fig-h: min(50svh, 105vw); }
  .turn--live .turn-track { height: 260vh; }
  .turn--live .turn-fig { top: 72px; height: var(--fig-h); max-width: none; }
  .turn--live .tf, .turn--live .tf[data-anchor] { top: calc(72px + var(--fig-h) * .86); left: var(--s4); right: var(--s4); width: auto; max-width: none; }
  .turn--live .tf[data-anchor] .tf-v { font-size: 19px; }
  .turn--live .tf-note { font-size: 13px; }
  .turn--live .tf-src { font-size: 12px; }
  /* на 360 цена и две кнопки в строку не влезают: цена строкой выше, кнопки поровну */
  .turn--live .turn-cta { left: var(--s4); right: var(--s4); bottom: 22px; transform: none; flex-wrap: wrap; gap: var(--s2); padding: var(--s3); border-radius: var(--radius-md); }
  .turn--live .turn-cta .price { flex: 1 0 100%; font-size: 18px; margin: 0 0 0 var(--s2); }
  .turn--live .turn-btns { flex: 1; }
  .turn--live .turn-btns > * { flex: 1; }
  .turn--live .turn-cta .btn { min-height: 44px; padding: 0 12px; font-size: 15px; }
  .turn--live .turn-cta .qty { min-height: 44px; }
  .turn--live .turn-cta .qty button { width: 36px; height: 36px; }
  .turn--live .turn-progress { bottom: 10px; }
}

/* ---- страница товара: флакон крутят перетаскиванием (кадры 1-72: поворот без подъезда камеры) ---- */
.pd-spin img { top: 50%; height: 118%; max-width: none; translate: -50% -50%; filter: none; -webkit-user-drag: none; user-select: none; }
.spin-hint { display: none; }
.spin-live { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.spin-live.is-drag { cursor: grabbing; }
.spin-live .spin-hint { position: absolute; left: 50%; bottom: var(--s5); z-index: 3; translate: -50% 0; display: inline-flex; align-items: center; gap: var(--s2); padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--ink); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); pointer-events: none; transition: opacity .4s var(--ease); }
.spin-live.is-used .spin-hint { opacity: 0; }
.spin-hint svg { animation: spin-nudge 2.4s var(--ease) infinite; }
@keyframes spin-nudge { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
/* на телефоне блок ниже: флакон во всю высоту, подсказка в углу; блок выше, чем у других товаров (16:9), чтобы было за что взяться */
@media (max-width: 720px) {
  .pd-spin { aspect-ratio: 4 / 3; }
  .spin-live .spin-hint { left: auto; right: var(--s3); top: var(--s3); bottom: auto; translate: none; font-size: 13px; padding: 6px 12px 6px 10px; }
}

/* факты с этикетки рядом с описанием товара - статично */
.lf { margin-top: var(--s6); }
.lf h2 { font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.lf ul { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5) var(--s6); }
.lf .tf { max-width: none; }
.lf .tf-v { font-size: 20px; }
@media (max-width: 720px) { .lf ul { grid-template-columns: 1fr; gap: var(--s4); } }
