/* Просмотр фото товара на весь экран и анимация карточки (05.12, zoom-0412). Скрипт - js/prosmotr.js, подключает tools/prosmotr.py. */

/* ---------- фото на карточке: лупа, стрелки ---------- */
.apv-box{position:relative;cursor:zoom-in;-webkit-tap-highlight-color:transparent;transition:box-shadow .25s,border-color .25s}
.apv-box:hover{border-color:#cfe3ec;box-shadow:0 10px 30px rgba(28,60,80,.10)}
.apv-box img{transition:transform .45s cubic-bezier(.2,.8,.2,1)}
@media(hover:hover){.apv-box:hover img{transform:scale(1.03)}}
.apv-zb,.apv-pp{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;width:42px;height:42px;padding:0;border:0;border-radius:50%;
  background:rgba(255,255,255,.94);box-shadow:0 3px 12px rgba(28,60,80,.16);color:#2680A0;cursor:pointer;transition:background .2s,color .2s,opacity .2s,transform .2s}
.apv-zb{right:12px;bottom:12px}
.apv-pp{left:10px;top:50%;margin-top:-21px}
.apv-pn{left:auto;right:10px}
.apv-zb svg,.apv-pp svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.apv-zb:hover,.apv-pp:hover,.apv-zb:focus-visible,.apv-pp:focus-visible{background:#2680A0;color:#fff;outline:none}
@media(hover:hover){.apv-pp{opacity:0}.apv-box:hover .apv-pp,.apv-pp:focus-visible{opacity:1}}
.th{transition:border-color .2s,transform .2s}
.th:hover{border-color:#9cc9da}

/* ---------- окно просмотра ---------- */
.apv-lock,.apv-lock body{overflow:hidden!important}
.apv-lock body{padding-right:var(--apv-sb,0)}
.apv{position:fixed;inset:0;z-index:10000;color:#fff;font:500 15px/1 Roboto,Arial,sans-serif;-webkit-user-select:none;user-select:none;overscroll-behavior:contain}
.apv[hidden]{display:none}
.apv::before{content:"";position:absolute;inset:0;background:rgba(14,22,27,.94);opacity:0;transition:opacity .28s ease}
.apv.apv-in::before{opacity:var(--apv-bg,1)}
.apv-st{position:absolute;left:0;right:0;top:60px;bottom:18px;overflow:hidden;touch-action:none;cursor:default}
.apv-many .apv-st{bottom:96px}
.apv-im{position:absolute;left:50%;top:50%;max-width:none;max-height:none;transform-origin:50% 50%;will-change:transform;background:#fff;border-radius:6px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);cursor:zoom-in;-webkit-user-drag:none;transition:opacity .2s}
.apv-zoomed .apv-im{cursor:grab}
.apv-zoomed .apv-st:active .apv-im{cursor:grabbing}
.apv-im.apv-ld{opacity:.25}
.apv-top,.apv-ar,.apv-th{opacity:0;transition:opacity .28s ease}
.apv.apv-in .apv-top,.apv.apv-in .apv-ar,.apv.apv-in .apv-th{opacity:1}
.apv-top{position:absolute;left:0;right:0;top:0;height:60px;display:flex;align-items:center;justify-content:space-between;padding:0 10px 0 20px;z-index:2}
.apv-cnt{font-size:16px;letter-spacing:.04em;opacity:.9}
.apv-tools{display:flex;gap:6px}
.apv-b,.apv-ar{display:flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:50%;color:#fff;cursor:pointer;background:rgba(255,255,255,.12);transition:background .2s,box-shadow .2s,opacity .2s}
.apv-b{width:44px;height:44px}
.apv-b svg,.apv-ar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.apv-b:hover,.apv-ar:hover,.apv-b:focus-visible,.apv-ar:focus-visible{background:#2680A0;box-shadow:0 0 0 4px rgba(38,128,160,.30),0 6px 20px rgba(38,128,160,.45);outline:none}
.apv-b:disabled{opacity:.35;cursor:default;background:rgba(255,255,255,.12);box-shadow:none}
.apv-ar{position:absolute;z-index:2;top:50%;width:56px;height:56px;margin-top:-28px}
.apv-prev{left:16px}.apv-next{right:16px}
.apv-ar svg{width:30px;height:30px}
.apv-th{position:absolute;z-index:2;left:0;right:0;bottom:12px;height:72px;display:flex;justify-content:center;gap:8px;padding:0 12px;overflow-x:auto;scrollbar-width:none}
.apv-th::-webkit-scrollbar{display:none}
.apv-t{flex:0 0 auto;width:84px;height:64px;padding:4px;border:2px solid transparent;border-radius:10px;background:#fff;cursor:pointer;opacity:.55;transition:opacity .2s,border-color .2s,transform .2s}
.apv-t img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.apv-t:hover{opacity:.85}
.apv-t.is-on{opacity:1;border-color:#2680A0;transform:translateY(-2px)}
.apv-t:focus-visible{outline:2px solid #a8daf5;outline-offset:2px}
@media(max-width:700px){
  .apv-st{top:56px}
  .apv-top{height:56px;padding:0 6px 0 14px}
  .apv-many .apv-st{bottom:84px}
  .apv-ar{width:42px;height:42px;margin-top:-21px;background:rgba(14,22,27,.45)}
  .apv-prev{left:6px}.apv-next{right:6px}
  .apv-ar svg{width:24px;height:24px}
  .apv-th{height:60px;bottom:12px;justify-content:flex-start}
  .apv-t{width:70px;height:56px}
  .apv-im{border-radius:0;box-shadow:none}
}
@media(max-width:700px) and (min-width:1px){.apv-th{justify-content:safe center}}

/* ---------- плавное появление карточки товара ---------- */
@media(prefers-reduced-motion:no-preference){
  .p-prod .prod-pic{animation:apvUp .6s cubic-bezier(.2,.8,.2,1) both}
  .p-prod .prod-txt>*{animation:apvUp .55s cubic-bezier(.2,.8,.2,1) both}
  .p-prod .prod-txt>:nth-child(2){animation-delay:.12s}.p-prod .prod-txt>:nth-child(3){animation-delay:.16s}
  .p-prod .prod-txt>:nth-child(4){animation-delay:.2s}.p-prod .prod-txt>:nth-child(n+5){animation-delay:.24s}
}
@keyframes apvUp{from{opacity:0;transform:translateY(16px)}}
@media(prefers-reduced-motion:reduce){.apv::before,.apv-top,.apv-ar,.apv-th,.apv-im,.apv-box,.apv-box img,.apv-zb,.apv-pp,.th{transition:none!important}}

/* ---------- название товара не обрезается ни на какой ширине ---------- */
.prod-txt{min-width:0;max-width:100%}
.prod-txt h1{max-width:100%;overflow-wrap:anywhere;word-break:normal;hyphens:auto;text-wrap:balance}
@media(max-width:1200px) and (min-width:861px){.prod-txt h1{font-size:28px}}
@media(max-width:420px){.prod-txt h1{font-size:23px}}
