/**
 * Product page: hero image + short video, thumbnails below.
 */

.pss-product-video-gallery {
	width: 100%;
}

.pss-product-video__top {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 12px;
	width: 100%;
	margin-bottom: 12px;
}

.pss-product-video__hero {
	flex: 1 1 50%;
	min-width: 0;
	background: #f6f6f6;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
}

.pss-product-video__hero-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.pss-product-video__hero-placeholder {
	width: 100%;
	height: 100%;
	min-height: 200px;
	background: repeating-linear-gradient(
		-45deg,
		#eee,
		#eee 10px,
		#f6f6f6 10px,
		#f6f6f6 20px
	);
}

.pss-product-video__aside {
	flex: 0 0 calc(50% - 6px);
	max-width: calc(50% - 6px);
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
	aspect-ratio: 9 / 16;
}

.pss-product-video__player-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pss-product-video__player {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	vertical-align: middle;
}

/* Media Library “Caption” (post_excerpt): subtitle-style bar, readable on any footage */
.pss-product-video__caption-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 0.45rem 0.65rem 2.5rem;
	pointer-events: none;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.78) 0%,
		rgba(0, 0, 0, 0.55) 45%,
		transparent 100%
	);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	text-align: center;
}

.pss-product-video__caption-text {
	color: #fff;
	font-size: clamp(0.7rem, 1.9vw, 0.875rem);
	line-height: 1.35;
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
	max-width: 100%;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pss-product-video__thumbnails {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	padding-top: 4px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	margin-top: 4px;
}

.pss-product-video__thumb {
	padding: 0;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	background: #fff;
	line-height: 0;
	opacity: 0.85;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}

.pss-product-video__thumb:hover,
.pss-product-video__thumb:focus {
	opacity: 1;
	outline: none;
	border-color: #999;
}

.pss-product-video__thumb.is-active {
	opacity: 1;
	border-color: #2271b1;
}

.pss-product-video__thumb img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
}

@media (max-width: 600px) {
	.pss-product-video__top {
		flex-direction: column;
	}

	.pss-product-video__hero,
	.pss-product-video__aside {
		flex: 1 1 auto;
		max-width: 100%;
		width: 100%;
	}

	.pss-product-video__aside {
		aspect-ratio: 9 / 16;
		max-height: 70vh;
	}
}
