/* plenki.kz — ролики из Instagram и TikTok на сайте (главная «Студия», ролик в карточке, лента под описанием).
   Все классы с префиксом pv-: в теме madeira таких нет, существующие элементы эти стили не задевают.
   Отключить: убрать подключение этого файла и pv-reels.js в footer.twig или выключить модуль «Ролики» в админке. */
.pv, .pv *, .pv-lb, .pv-lb *, .pv-cv, .pv-cv * { box-sizing: border-box; }
.pv { --pv-teal: #0097af; --pv-teal2: #18c2c9; --pv-ink: #1d2327; --pv-mute: #7b8389; font-family: "Roboto", sans-serif; color: var(--pv-ink); }
.pv a, .pv-lb a, .pv-cv a { text-decoration: none; }
.pv-mount { flex: 0 0 100%; width: 100%; max-width: 100%; min-width: 0; }
.row-flex > div:has(.pv-mount) { flex: 0 0 100%; width: 100%; max-width: 100%; min-width: 0; }

/* ---------- карточка ролика ---------- */
.pv-card { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit;
           text-align: left; cursor: pointer; outline: none; -webkit-tap-highlight-color: transparent; }
.pv-media { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #0b1514; }
@supports not (aspect-ratio: 9 / 16) { .pv-media { height: 0; padding-top: 177.78%; } }
.pv-media img, .pv-media video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-media video { opacity: 0; transition: opacity .35s ease; }
.pv-media video.pv-on { opacity: 1; }
.pv-card:focus-visible .pv-media { box-shadow: 0 0 0 3px var(--pv-teal2); }
.pv-dur { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px 4px 7px;
          border-radius: 20px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; font-weight: 500; line-height: 1; letter-spacing: .2px; }
.pv-dur svg { width: 9px; height: 9px; fill: #fff; }

/* ---------- кнопки ---------- */
.pv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 4px;
          font-size: 14px; font-weight: 500; letter-spacing: .2px; white-space: nowrap; line-height: 1; transition: background .2s, border-color .2s, color .2s; }
.pv-btn svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.pv-btn-wa, .pv-btn-wa:hover, .pv-btn-wa:focus { background: #25d366; color: #fff; }
.pv-btn-wa:hover { background: #1fb457; }
.pv-btn-ghost, .pv-btn-ghost:hover, .pv-btn-ghost:focus { border: 1px solid rgba(255,255,255,.32); color: #fff; }
.pv-btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ===================== Главная — «Студия» ===================== */
.pv-studio { margin: 6px 0 40px; }
.pv-b-panel { position: relative; overflow: hidden; border-radius: 6px; color: #fff; display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
              align-items: center; gap: 24px; padding: 46px 0 46px 52px; min-height: 540px;
              background: radial-gradient(60% 80% at 78% 40%, rgba(24,194,201,.22), transparent 70%),
                          radial-gradient(40% 60% at 15% 110%, rgba(0,151,175,.25), transparent 70%),
                          linear-gradient(160deg, #0a1f1e 0%, #050d0d 55%, #030807 100%); }
.pv-b-panel:before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 30%, #000 70%, transparent); }
.pv-b-panel:after { content: ""; position: absolute; top: -20%; right: 34%; width: 2px; height: 140%; transform: rotate(18deg);
  background: linear-gradient(180deg, transparent, rgba(24,194,201,.55), transparent); pointer-events: none; }
.pv-b-text { position: relative; z-index: 2; }
.pv-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--pv-teal2); font-weight: 500; }
.pv-eyebrow svg { width: 14px; height: 14px; fill: currentColor; }
.pv-b-text .pv-h2 { margin: 14px 0; padding: 0; font-family: "Roboto", sans-serif; font-weight: 700; font-size: 38px; line-height: 42px; color: #fff; letter-spacing: -.3px; text-transform: none; }
.pv-b-text p { margin: 0 0 24px; color: rgba(255,255,255,.72); font-size: 15px; line-height: 23px; }
.pv-b-btns { display: flex; flex-wrap: wrap; gap: 10px; max-width: 380px; }
.pv-b-btns .pv-btn-wa { flex: 1 1 100%; }
.pv-b-btns .pv-btn-ghost { flex: 1 1 0; }
.pv-b-now { margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); min-height: 70px; }
.pv-b-now small { display: block; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,.45); }
.pv-b-now b { display: block; margin-top: 6px; font-size: 17px; font-weight: 500; color: #fff; }
.pv-b-now span { display: block; margin-top: 2px; font-size: 13px; line-height: 18px; color: rgba(255,255,255,.6); }
.pv-b-dots { display: flex; gap: 6px; margin-top: 16px; }
.pv-b-dots i { width: 14px; height: 3px; border-radius: 2px; background: rgba(255,255,255,.2); transition: background .3s, width .3s; }
.pv-b-dots i.pv-on { width: 30px; background: var(--pv-teal2); }
.pv-b-stage { position: relative; z-index: 1; height: 490px; overflow: hidden; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%); }
.pv-b-stage .pv-card { position: absolute; left: 50%; top: 50%; width: 200px; will-change: transform, opacity;
  transition: transform .7s cubic-bezier(.2,.7,.1,1), opacity .7s; }
.pv-b-stage .pv-media { border-radius: 16px; box-shadow: 0 24px 50px -20px rgba(0,0,0,.9); }
.pv-b-stage .pv-card.pv-active .pv-media { box-shadow: 0 0 0 1px rgba(24,194,201,.5), 0 30px 60px -22px rgba(0,0,0,.95), 0 0 50px -10px rgba(24,194,201,.35); }
.pv-b-nav { position: absolute; right: 36px; bottom: 26px; z-index: 3; display: flex; gap: 10px; }
.pv-b-nav button { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.04);
                   color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, border-color .2s; }
.pv-b-nav button:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.pv-b-nav svg, .pv-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }

/* ===================== Лента роликов под описанием товара ===================== */
.pv-strip { margin: 34px 0 10px; }
.pv-strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.pv-strip-head h3 { margin: 0; }
.pv-links { display: inline-flex; gap: 16px; }
.pv-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--pv-teal); white-space: nowrap; }
.pv-link:hover, .pv-link:focus { color: #00788b; }
.pv-link svg { width: 16px; height: 16px; fill: currentColor; }
.pv-rail-wrap { position: relative; }
.pv-rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 16px) / 5); gap: 16px; overflow-x: auto;
           scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 14px; scrollbar-width: none; overscroll-behavior-x: contain; }
.pv-rail::-webkit-scrollbar { display: none; }
.pv-rail > .pv-card { scroll-snap-align: start; }
.pv-rail .pv-media { box-shadow: 0 10px 28px -14px rgba(6,20,19,.55); transition: transform .35s ease, box-shadow .35s ease; }
.pv-rail .pv-card:hover .pv-media { transform: translateY(-3px); box-shadow: 0 18px 34px -16px rgba(6,20,19,.65); }
.pv-cap { display: block; padding: 10px 2px 0; }
.pv-cap b { display: block; font-size: 14px; font-weight: 500; line-height: 18px; color: var(--pv-ink); }
.pv-cap span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 17px; color: var(--pv-mute); overflow: hidden;
               display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pv-arrow { position: absolute; top: calc(50% - 46px); z-index: 3; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 0; background: #fff;
            color: var(--pv-ink); box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity .2s; }
.pv-arrow[disabled] { opacity: 0; pointer-events: none; }
.pv-prev { left: -14px; } .pv-next { right: -14px; }

/* ===================== Карточка товара: ролик в галерее ===================== */
.pv-thumb { position: relative; display: block; width: 100%; padding: 0; margin: 0 0 20px; border: 1px solid #ddd; border-radius: 4px; background: #fff;
            cursor: pointer; overflow: hidden; line-height: 0; }
.pv-thumb img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; display: block; }
.pv-thumb-play { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; }
.pv-thumb-play i { width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.pv-thumb-play svg { width: 11px; height: 11px; fill: #fff; margin-left: 2px; }
.pv-thumb-dur { position: absolute; left: 4px; right: 4px; bottom: 4px; text-align: center; font: 500 10px/14px "Roboto", sans-serif; color: #fff; background: rgba(0,0,0,.55); border-radius: 3px; }
.pv-thumb.pv-sel { border-color: #0097af; box-shadow: 0 0 0 1px #0097af; }
.pv-cv { position: relative; margin: 0 auto 20px; max-width: 380px; font-family: "Roboto", sans-serif; }
.pv-cv .pv-media { border-radius: 16px; }
.pv-cv-badge { position: absolute; left: 12px; top: 12px; z-index: 3; padding: 5px 10px; border-radius: 16px; background: rgba(0,0,0,.55); color: #fff; font: 500 11.5px/1 "Roboto", sans-serif; }
.pv-cv-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 3; display: flex; justify-content: space-between; gap: 8px; }
.pv-cv-bar button { height: 34px; padding: 0 12px 0 10px; border-radius: 18px; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer;
                    font: 500 12.5px/34px "Roboto", sans-serif; display: inline-flex; align-items: center; gap: 6px; }
.pv-cv-bar svg { width: 15px; height: 15px; fill: #fff; }
.pv-cv-sound { margin-left: auto; }
.pv-hide { display: none !important; }

/* ===================== Окно просмотра ===================== */
.pv-lb { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 100000; display: none; align-items: center; justify-content: center; padding: 24px;
         background: rgba(3,8,8,.88); font-family: "Roboto", sans-serif; }
.pv-lb.pv-open { display: flex; }
.pv-lb-box { display: grid; grid-template-columns: auto 320px; gap: 28px; align-items: center; max-height: 100%; }
.pv-lb-video { position: relative; height: min(82vh, 760px); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #000; }
.pv-lb-video video { width: 100%; height: 100%; display: block; background: #000; }
.pv-lb-info { color: #fff; }
.pv-lb-info small { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: #18c2c9; }
.pv-lb-info h4 { margin: 10px 0; font-size: 26px; line-height: 31px; font-weight: 700; color: #fff; font-family: "Roboto", sans-serif; text-transform: none; }
.pv-lb-info p { margin: 0 0 22px; font-size: 14.5px; line-height: 22px; color: rgba(255,255,255,.72); }
.pv-lb-info .pv-btn { width: 100%; margin-bottom: 10px; }
.pv-lb-social { display: flex; gap: 10px; }
.pv-lb-social .pv-btn { flex: 1 1 0; }
.pv-lb-close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
               background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.pv-lb-close:hover { background: rgba(255,255,255,.1); }
.pv-lb-nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
             background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pv-lb-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.pv-lb-prev { left: 18px; } .pv-lb-next { right: 18px; }
html.pv-noscroll, html.pv-noscroll body { overflow: hidden; }

/* ---------- иконки соцсетей в шапке и подвале ---------- */
.soc .pv-tt { width: 1em; height: 1em; fill: currentColor; vertical-align: -.125em; }

/* ---------- адаптив ---------- */
@media (max-width: 1199px) {
  .pv-b-panel { grid-template-columns: 320px minmax(0, 1fr); padding-left: 36px; }
  .pv-b-text .pv-h2 { font-size: 32px; line-height: 36px; }
  .pv-rail { grid-auto-columns: calc((100% - 3 * 16px) / 4.3); }
}
@media (max-width: 991px) {
  .pv-b-panel { grid-template-columns: minmax(0, 1fr); padding: 34px 0 30px; min-height: 0; gap: 8px; }
  .pv-b-text { padding: 0 28px; }
  .pv-b-stage { height: 440px; }
  .pv-b-nav { display: none; }
  .pv-lb-box { grid-template-columns: auto 260px; gap: 20px; }
}
@media (max-width: 767px) {
  .pv-studio { margin: 0 0 30px; }
  .pv-b-panel { border-radius: 0; margin: 0 -10px; padding: 28px 0 24px; }
  .pv-b-text { padding: 0 22px; }
  .pv-b-text .pv-h2 { font-size: 27px; line-height: 31px; margin: 10px 0; }
  .pv-b-text p { font-size: 14px; line-height: 21px; margin-bottom: 18px; }
  .pv-b-btns { max-width: none; }
  .pv-b-btns .pv-btn { padding: 0 12px; }
  .pv-b-now { display: none; }
  .pv-b-stage { height: 400px; margin-top: 8px; }
  .pv-b-stage .pv-card { width: 168px; }
  .pv-b-dots { justify-content: center; margin-top: 4px; }
  .pv-strip-head { flex-direction: column; gap: 6px; align-items: flex-start; }
  .pv-rail { grid-auto-columns: 46%; gap: 12px; margin: 0 -15px; padding: 4px 15px 12px; scroll-padding: 0 15px; }
  .pv-arrow { display: none; }
  .pv-cv { max-width: 100%; }
  .pv-lb { padding: 0; align-items: stretch; }
  .pv-lb-box { grid-template-columns: minmax(0, 1fr); gap: 0; width: 100%; align-content: center; }
  .pv-lb-video { height: auto; width: 100%; max-height: 70vh; border-radius: 0; margin: 0 auto; }
  .pv-lb-info { padding: 14px 16px 18px; }
  .pv-lb-info h4 { font-size: 19px; line-height: 24px; margin: 4px 0 10px; }
  .pv-lb-info p { display: none; }
  .pv-lb-info .pv-btn { height: 42px; margin-bottom: 8px; }
  .pv-lb-nav { display: none; }
  .pv-lb-close { top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,.4); }
}
@media (prefers-reduced-motion: reduce) { .pv *, .pv-cv * { transition: none !important; } }
