/* MISS CITY OFFICIAL – wideo produktu */

/* ---------- Lista produktów ---------- */
li.product.mco-loop-video .thumbnail-wrapper > a,
section.product.mco-loop-video .thumbnail-wrapper > a {
	position: relative;
	display: block;
}

.mco-video--loop {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: block;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity .4s ease;
}

.mco-video--loop.is-playing {
	opacity: 1;
}

.mco-video--loop video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.product.mco-loop-video .product-label,
.product.mco-loop-video .wc-preorder-badge {
	z-index: 5;
}

/* ---------- Karta produktu: slajd z wideo ---------- */
.woocommerce-product-gallery .mco-video-slide .mco-video--single {
	position: relative;
	display: block;
	aspect-ratio: 2 / 3;
	overflow: hidden;
	background: #f4f2ef;
	cursor: zoom-in;
}

.woocommerce-product-gallery .mco-video-slide video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

.mco-video-icon {
	position: absolute;
	left: 14px;
	bottom: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .85);
	color: #111;
	pointer-events: none;
	transition: opacity .3s ease;
}

.mco-video--single.is-playing .mco-video-icon {
	opacity: 0;
}

.mco-video--single.is-playing:hover .mco-video-icon,
.mco-video--single.is-paused .mco-video-icon {
	opacity: 1;
}

/* Znacznik "play" na pierwszej miniaturce */
.woocommerce-product-gallery.mco-has-video .flex-control-thumbs li:first-child {
	position: relative;
}

.woocommerce-product-gallery.mco-has-video .flex-control-thumbs li:first-child::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	margin: -7px 0 0 -4px;
	border-style: solid;
	border-width: 7px 0 7px 11px;
	border-color: transparent transparent transparent #fff;
	filter: drop-shadow(0 0 3px rgba(0, 0, 0, .55));
	pointer-events: none;
}

/* ---------- Lightbox ---------- */
html.mco-lb-lock,
html.mco-lb-lock body {
	overflow: hidden;
}

.mco-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 17, 17, .96);
	opacity: 0;
	transition: opacity .2s ease;
	user-select: none;
	touch-action: pan-y;
}

.mco-lb[hidden] {
	display: none;
}

.mco-lb.is-open {
	opacity: 1;
}

.mco-lb__stage {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: 56px 64px;
	box-sizing: border-box;
}

.mco-lb__stage img,
.mco-lb__stage video {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	background: transparent;
}

.mco-lb button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.mco-lb button:hover,
.mco-lb button:focus-visible {
	background: rgba(255, 255, 255, .3);
	color: #fff;
	outline: none;
}

.mco-lb__close {
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
}

.mco-lb__prev,
.mco-lb__next {
	top: 50%;
	width: 42px;
	height: 42px;
	transform: translateY(-50%);
}

.mco-lb__prev { left: 14px; }
.mco-lb__next { right: 14px; }

.mco-lb.is-single .mco-lb__prev,
.mco-lb.is-single .mco-lb__next,
.mco-lb.is-single .mco-lb__count {
	display: none;
}

.mco-lb__count {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .75);
	font-size: 13px;
	letter-spacing: .08em;
}

@media (max-width: 768px) {
	.mco-lb__stage {
		padding: 56px 0 24px;
	}

	.mco-lb__prev,
	.mco-lb__next {
		width: 34px;
		height: 34px;
		background: rgba(255, 255, 255, .1);
	}

	.mco-lb__prev { left: 6px; }
	.mco-lb__next { right: 6px; }
}
