/* باکس ویدیوهای محصول */

.wbkb-pvb {
	--wbkb-pvb-accent: var(--wbkb-color-primary, #093c75);
	margin: 32px 0;
	direction: rtl;
	text-align: right;
}

.wbkb-pvb *,
.wbkb-pvb-lb * {
	box-sizing: border-box;
}

.wbkb-pvb-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.wbkb-pvb-head-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: #eef2f7;
	background: color-mix(in srgb, var(--wbkb-pvb-accent) 12%, #fff);
	color: var(--wbkb-pvb-accent);
}

.wbkb-pvb-head-icon svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.wbkb-pvb-title {
	margin: 0 !important;
	font-size: 18px !important;
	font-weight: 700;
	line-height: 1.6;
}

.wbkb-pvb-count {
	margin-right: auto;
	padding: 3px 12px;
	border-radius: 999px;
	background: #f3f4f6;
	color: #6b7280;
	font-size: 12px;
	line-height: 1.8;
}

.wbkb-pvb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.wbkb-pvb-grid.is-single {
	grid-template-columns: minmax(0, 560px);
}

.wbkb-pvb-card {
	display: flex !important;
	flex-direction: column;
	width: 100%;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
	border: 1px solid #eceef1 !important;
	border-radius: 16px !important;
	background: #fff !important;
	color: inherit !important;
	font: inherit !important;
	text-align: right;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.wbkb-pvb-card:hover,
.wbkb-pvb-card:focus-visible {
	transform: translateY(-3px);
	border-color: #dfe3ea !important;
	box-shadow: 0 14px 30px rgba(15, 23, 42, .10) !important;
	outline: none;
}

.wbkb-pvb-card:focus-visible {
	box-shadow: 0 0 0 3px rgba(9, 60, 117, .35) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wbkb-pvb-accent) 35%, transparent) !important;
}

.wbkb-pvb-cover {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	background-color: #0f172a;
	background-position: center;
	background-size: cover;
	transition: transform .4s ease;
}

.wbkb-pvb-cover.is-empty {
	background-image: linear-gradient(135deg, #0f172a, #334155);
}

.wbkb-pvb-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(15, 23, 42, .45), rgba(15, 23, 42, .05) 55%);
	transition: background .25s ease;
}

.wbkb-pvb-card:hover .wbkb-pvb-cover::after {
	background: linear-gradient(to top, rgba(15, 23, 42, .55), rgba(15, 23, 42, .15) 55%);
}

.wbkb-pvb-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .45);
	background: rgba(255, 255, 255, .2);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	transform: translate(-50%, -50%);
	transition: transform .25s ease, background .25s ease;
}

.wbkb-pvb-play svg {
	width: 24px;
	height: 24px;
	margin-left: 3px;
	fill: currentColor;
}

.wbkb-pvb-card:hover .wbkb-pvb-play,
.wbkb-pvb-card:focus-visible .wbkb-pvb-play {
	background: var(--wbkb-pvb-accent);
	transform: translate(-50%, -50%) scale(1.08);
}

.wbkb-pvb-duration,
.wbkb-pvb-platform {
	position: absolute;
	z-index: 2;
	padding: 2px 9px;
	border-radius: 999px;
	color: #fff;
	font-size: 11.5px;
	line-height: 1.8;
}

.wbkb-pvb-duration {
	bottom: 10px;
	left: 10px;
	background: rgba(15, 23, 42, .75);
	direction: ltr;
}

.wbkb-pvb-platform {
	top: 10px;
	right: 10px;
	background: rgba(15, 23, 42, .55);
}

.wbkb-pvb-card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px 14px;
}

.wbkb-pvb-card-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.8;
	color: #111827;
}

.wbkb-pvb-card-desc {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	font-size: 12.5px;
	line-height: 1.9;
	color: #6b7280;
}

/* موبایل: ردیف افقی قابل کشیدن (اسکرول با snap) به‌جای ستون بلند */
@media (max-width: 640px) {

	.wbkb-pvb-grid:not(.is-single) {
		display: flex;
		gap: 12px;
		margin: 0 -16px;
		padding: 2px 16px 10px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.wbkb-pvb-grid:not(.is-single)::-webkit-scrollbar {
		display: none;
	}

	.wbkb-pvb-grid:not(.is-single) .wbkb-pvb-card {
		flex: 0 0 78%;
		scroll-snap-align: start;
	}

	.wbkb-pvb-grid.is-single {
		grid-template-columns: 1fr;
	}
}

/* ===== پاپ‌آپ پخش ===== */

html.wbkb-pvb-lock {
	overflow: hidden;
}

.wbkb-pvb-lb[hidden] {
	display: none !important;
}

.wbkb-pvb-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	direction: rtl;
}

.wbkb-pvb-lb-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(2, 6, 23, .82);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity .25s ease;
}

.wbkb-pvb-lb-dialog {
	position: relative;
	width: 100%;
	max-width: 980px;
	opacity: 0;
	transform: translateY(16px) scale(.98);
	transition: opacity .25s ease, transform .25s ease;
}

.wbkb-pvb-lb.is-open .wbkb-pvb-lb-backdrop {
	opacity: 1;
}

.wbkb-pvb-lb.is-open .wbkb-pvb-lb-dialog {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.wbkb-pvb-lb-backdrop,
	.wbkb-pvb-lb-dialog,
	.wbkb-pvb-card,
	.wbkb-pvb-play {
		transition: none;
	}
}

.wbkb-pvb-lb-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	max-height: 72vh;
	margin: 0 auto;
	overflow: hidden;
	border-radius: 16px;
	background: #000;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}

.wbkb-pvb-lb-frame iframe,
.wbkb-pvb-lb-frame video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: contain;
}

.wbkb-pvb-lb-close {
	position: absolute !important;
	top: -48px;
	left: 0;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, .12) !important;
	color: #fff !important;
	cursor: pointer;
	transition: background .2s ease;
}

.wbkb-pvb-lb-close:hover,
.wbkb-pvb-lb-close:focus-visible {
	background: rgba(255, 255, 255, .25) !important;
	outline: none;
}

.wbkb-pvb-lb-close svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.wbkb-pvb-lb-info {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-top: 14px;
	color: #fff;
}

.wbkb-pvb-lb-title {
	margin: 0 0 4px !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 600;
	line-height: 1.8;
}

.wbkb-pvb-lb-desc {
	margin: 0 !important;
	color: rgba(255, 255, 255, .72) !important;
	font-size: 13px;
	line-height: 1.9;
}

.wbkb-pvb-lb-desc[hidden],
.wbkb-pvb-lb-nav[hidden] {
	display: none !important;
}

.wbkb-pvb-lb-nav {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.wbkb-pvb-lb-prev,
.wbkb-pvb-lb-next {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	padding: 0 !important;
	border: 1px solid rgba(255, 255, 255, .25) !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #fff !important;
	cursor: pointer;
	transition: background .2s ease;
}

.wbkb-pvb-lb-prev:hover,
.wbkb-pvb-lb-next:hover,
.wbkb-pvb-lb-prev:focus-visible,
.wbkb-pvb-lb-next:focus-visible {
	background: rgba(255, 255, 255, .15) !important;
	outline: none;
}

.wbkb-pvb-lb-prev svg,
.wbkb-pvb-lb-next svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.wbkb-pvb-lb-counter {
	min-width: 44px;
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	text-align: center;
}

@media (max-width: 640px) {

	.wbkb-pvb-lb {
		padding: 56px 12px 16px;
		align-items: flex-start;
	}

	.wbkb-pvb-lb-frame {
		border-radius: 12px;
	}

	.wbkb-pvb-lb-close {
		top: -46px;
	}

	.wbkb-pvb-lb-info {
		flex-direction: column;
	}

	.wbkb-pvb-lb-nav {
		align-self: center;
	}
}
