/* Модуль «Видео товара» — витрина */

/* ---------- значок ▶ (миниатюра в галерее, обложки) ---------- */
.pv-thumb > a { position: relative; display: block; }
.pv-thumb img { object-fit: cover; background: #222; }
.pv-thumb-blank { display: block; background: #222; }
.pv-thumb-play,
.pv-play {
	position: absolute; left: 50%; top: 50%;
	width: 28px; height: 28px; margin: -14px 0 0 -14px;
	border-radius: 50%; background: rgba(0, 0, 0, .6);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
	pointer-events: none;
}
.pv-thumb-play:after,
.pv-play:after {
	content: ''; position: absolute; left: 11px; top: 8px;
	border-style: solid; border-width: 6px 0 6px 9px;
	border-color: transparent transparent transparent #fff;
}
.pv-play { width: 64px; height: 64px; margin: -32px 0 0 -32px; box-shadow: 0 0 0 3px rgba(255, 255, 255, .9); }
.pv-play:after { left: 25px; top: 19px; border-width: 13px 0 13px 20px; }

/* ---------- галерея, обычный режим: видео поверх большого фото ---------- */
.pv-host { position: relative; }
.pv-overlay { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 3; background: #000; cursor: default; }
.pv-overlay video,
.pv-overlay iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; background: #000; }

/* ---------- описание ---------- */
.pv-desc-list { margin: 15px 0; clear: both; }
.pv-desc { margin: 0 0 20px; }
.pv-desc-title { font-weight: bold; margin: 0 0 8px; }
.pv-frame { width: 100%; }
.pv-ratio { position: relative; height: 0; overflow: hidden; background: #000; border-radius: 4px; }
.pv-ratio > video,
.pv-ratio > iframe,
.pv-ratio > .pv-yt { position: absolute; left: 0; top: 0; width: 100%; height: 100%; border: 0; }
.pv-ratio > video { object-fit: contain; background: #000; }
.pv-yt { display: block; padding: 0; margin: 0; background: #000; cursor: pointer; }
.pv-yt img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pv-yt:hover .pv-play,
.pv-yt:focus .pv-play { background: #f00; }
.pv-tg { max-width: 560px; }
.pv-tg iframe { max-width: 100%; }

/* ---------- галерея, улучшенный режим ---------- */
.pv-stage { position: relative; z-index: 1; margin: 0 auto; }
.pv-ratio-box { position: relative; height: 0; overflow: hidden; }
.pv-track {
	position: absolute; left: 0; top: 0; right: 0; bottom: 0;
	display: flex; overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
	scrollbar-width: none; overscroll-behavior-x: contain; outline: none;
}
.pv-track::-webkit-scrollbar { display: none; }
.pv-slide {
	position: relative; flex: 0 0 100%; width: 100%; height: 100%;
	scroll-snap-align: start; scroll-snap-stop: always;
	display: flex; align-items: center; justify-content: center;
	overflow: hidden; cursor: zoom-in;
}
.pv-slide .pv-img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; margin: 0; }
.pv-slide-video { background: #000; cursor: pointer; }
.pv-slide-video .pv-poster { display: block; width: 100%; height: 100%; object-fit: contain; }
.pv-play-btn { position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.pv-slide-player { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: none; background: #000; }
.pv-slide-player video,
.pv-slide-player iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.pv-playing { cursor: default; }
.pv-playing .pv-slide-player { display: block; }
.pv-playing .pv-play-btn,
.pv-playing .pv-poster { display: none; }

.pv-count {
	position: absolute; right: 8px; bottom: 8px; z-index: 2;
	padding: 5px 9px; border-radius: 12px;
	background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; line-height: 1;
	pointer-events: none;
}
.pv-arrow {
	position: absolute; top: 50%; z-index: 2; width: 40px; height: 40px; margin-top: -20px;
	padding: 0; border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .9); box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
	opacity: 0; transition: opacity .2s; cursor: pointer;
}
.pv-arrow:before {
	content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px;
	border-top: 2px solid #333; border-right: 2px solid #333;
}
.pv-prev { left: 8px; }
.pv-prev:before { transform: translate(-30%, -50%) rotate(-135deg); }
.pv-next { right: 8px; }
.pv-next:before { transform: translate(-70%, -50%) rotate(45deg); }
.pv-stage:hover .pv-arrow,
.pv-arrow:focus { opacity: 1; }
.pv-stage .pv-arrow[disabled] { opacity: 0; pointer-events: none; }

/* подсказка «можно увеличить» — лупа в углу фото */
.pv-zoom-hint {
	position: absolute; left: 8px; bottom: 8px; z-index: 2; width: 28px; height: 28px;
	border-radius: 50%; background: rgba(0, 0, 0, .45); pointer-events: none;
}
.pv-zoom-hint:before {
	content: ''; position: absolute; left: 7px; top: 7px; width: 10px; height: 10px;
	border: 2px solid #fff; border-radius: 50%;
}
.pv-zoom-hint:after {
	content: ''; position: absolute; left: 17px; top: 18px; width: 6px; height: 2px;
	background: #fff; transform: rotate(45deg);
}
.pv-on-video .pv-zoom-hint { display: none; }

.pv-stage.pv-loading .pv-slide { cursor: progress; }
.pv-stage.pv-loading:after {
	content: ''; position: absolute; left: 50%; top: 50%; z-index: 3;
	width: 36px; height: 36px; margin: -18px 0 0 -18px;
	border: 3px solid rgba(0, 0, 0, .15); border-top-color: #950051; border-radius: 50%;
	animation: pv-spin .8s linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* активная миниатюра */
.pv-plus #image-additional-carousel .item > div > a { border: 2px solid transparent; border-radius: 3px; }
.pv-plus #image-additional-carousel .item > div.active > a { border-color: #950051; }

/* на сенсорных экранах листают пальцем — стрелки не нужны */
@media (hover: none) {
	.pv-arrow { display: none; }
}

/* телефон: миниатюры одной полосой, прокручиваются пальцем */
@media (max-width: 767px) {
	.pv-plus #image-additional .carousel-control { display: none !important; }
	.pv-plus .thumbnails .image-additional { padding: 8px 0; margin-bottom: 12px; }
	.pv-plus #image-additional-carousel {
		display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
		-webkit-overflow-scrolling: touch; scrollbar-width: none;
		text-align: left; padding: 0 6px;
	}
	.pv-plus #image-additional-carousel::-webkit-scrollbar { display: none; }
	.pv-plus #image-additional-carousel > .item {
		display: flex !important; flex: 0 0 auto; float: none;
		position: static !important; left: auto !important;
		transform: none !important; transition: none !important;
	}
	.pv-plus #image-additional-carousel .item > div { flex: 0 0 auto; margin: 0 2px; }
	.pv-plus #image-additional-carousel .item > div img,
	.pv-plus #image-additional-carousel .pv-thumb-blank { width: 60px !important; height: 60px !important; object-fit: cover; }
}

/* ---------- просмотр на весь экран: видео-слайд ---------- */
.pv-ps-video { display: flex; align-items: center; justify-content: center; }
.pv-ps-frame { background: #000; }
.pv-ps-frame video,
.pv-ps-frame iframe { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
