/*
 * BeeTcommerce Core: video reels and product video.
 */

/* Reel tiles */
.btc-reel__item {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	background: #1a1a1a;
	aspect-ratio: 3 / 4;
}
.btc-reel__item video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Columns: tiles drift upward, each column at its own pace */
.btc-reel--columns {
	display: grid;
	grid-template-columns: repeat(var(--btc-reel-cols, 3), minmax(0, 1fr));
	gap: 14px;
	height: var(--btc-reel-h, 640px);
	overflow: hidden;
	-webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
	mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.btc-reel--columns .btc-reel__col {
	overflow: hidden;
}
.btc-reel--columns .btc-reel__track {
	display: flex;
	flex-direction: column;
	gap: 14px;
	animation: btc-reel-up 46s linear infinite;
}
.btc-reel--columns .btc-reel__col--2 .btc-reel__track {
	animation-duration: 58s;
	margin-top: -120px;
}
.btc-reel--columns .btc-reel__col--3 .btc-reel__track {
	animation-duration: 40s;
	margin-top: -60px;
}
@keyframes btc-reel-up {
	to {
		transform: translateY(calc(-50% - 7px));
	}
}

/* Strip: tiles slide right to left */
.btc-reel--strip {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.btc-reel--strip .btc-reel__track {
	display: flex;
	gap: 16px;
	width: max-content;
	animation: btc-reel-left 70s linear infinite;
}
.btc-reel--strip .btc-reel__item {
	flex: 0 0 auto;
	width: 260px;
}
@keyframes btc-reel-left {
	to {
		transform: translateX(calc(-50% - 8px));
	}
}

@media (max-width: 1024px) {
	.btc-reel--columns {
		--btc-reel-h: 520px;
	}
}
@media (max-width: 767px) {
	.btc-reel--columns {
		--btc-reel-h: 400px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	.btc-reel--columns .btc-reel__col--3 {
		display: none;
	}
	.btc-reel--columns .btc-reel__track {
		gap: 10px;
	}
	.btc-reel--strip .btc-reel__item {
		width: 180px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btc-reel__track {
		animation: none !important;
	}
}

/* Product page video */
.btc-pvideo {
	clear: both;
	margin: 40px 0 48px;
	padding-top: 8px;
}
.btc-pvideo__title {
	margin: 0 0 16px;
	font-family: var(--btc-font-head);
	font-size: 28px;
	font-weight: 400;
	line-height: 1.2;
}
.btc-pvideo__play,
.btc-pvideo video {
	position: relative;
	display: block;
	width: 100%;
	max-width: var(--btc-pvideo-w, 400px);
	aspect-ratio: var(--btc-pvideo-ratio, 4 / 5);
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 12px;
	background: #1a1a1a;
	cursor: pointer;
}
.btc-pvideo video {
	object-fit: contain;
	cursor: auto;
}
.btc-pvideo__play img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.85;
}
.btc-pvideo__btn {
	position: absolute;
	left: 50%;
	top: 50%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 22px;
	border-radius: 999px;
	background: var(--btc-accent);
	color: #000;
	font-family: var(--btc-font-body);
	font-size: 16px;
	font-weight: 600;
	transform: translate(-50%, -50%);
}
.btc-pvideo__play:hover .btc-pvideo__btn,
.btc-pvideo__play:focus-visible .btc-pvideo__btn {
	background: #000;
	color: #fff;
}
.btc-pvideo__play:focus-visible {
	outline: 2px solid var(--btc-accent);
	outline-offset: 3px;
}

/* Kit button styles reach every <button>; keep the video cover plain */
button.btc-pvideo__play.btc-pvideo__play,
button.btc-pvideo__play.btc-pvideo__play:hover,
button.btc-pvideo__play.btc-pvideo__play:focus {
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #1a1a1a;
	box-shadow: none;
}
