/* Ledmax – hover-video i produktbilden */

.lmhv {
	position: relative;
	overflow: hidden;
}

.lmhv-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: var(--lm-video-fit, cover);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
	background: #000;
	z-index: 1;
	display: block;
}

.lmhv.is-playing .lmhv-video { opacity: 1; }

/* Bilden tonas ut när videon tar över */
.lmhv.is-playing img { opacity: 0; }

.lmhv img { transition: opacity .3s ease; }

/* Liten markering på kort som har video */
.lmhv-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(11, 15, 20, .58);
	border: 1px solid rgba(255, 255, 255, .25);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #fff;
	transition: opacity .25s ease, transform .25s ease, background .25s ease;
	pointer-events: none;
}

.lmhv-badge svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
	margin-left: 1px;
}

.lmhv:hover .lmhv-badge {
	background: var(--lm-accent);
	transform: scale(1.06);
}

.lmhv.is-playing .lmhv-badge { opacity: 0; }

/* Laddningsindikator medan filen hämtas första gången */
.lmhv.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 26px;
	margin: -13px 0 0 -13px;
	border: 2px solid rgba(0, 0, 0, .15);
	border-top-color: var(--lm-accent);
	border-radius: 50%;
	animation: lmhv-spin .8s linear infinite;
	z-index: 3;
}

@keyframes lmhv-spin {
	to { transform: rotate(360deg); }
}

/* Woo-loopens omslag ska inte bryta temats layout */
.lmhv-loop {
	display: block;
	line-height: 0;
}

@media (prefers-reduced-motion: reduce) {
	.lmhv-video,
	.lmhv img,
	.lmhv-badge {
		transition: none;
	}

	.lmhv.is-loading::after { animation: none; }
}
