.wvmg-gallery {
	position: relative;
	margin-bottom: 2em;
}

.wvmg-main {
	position: relative;
}

.wvmg-stage {
	position: relative;
	overflow: hidden;
	background: #f6f6f6;
	border-radius: 4px;
	touch-action: pan-y;
}

.wvmg-gallery .wvmg-stage img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}

.wvmg-zoom {
	display: block;
	cursor: zoom-in;
}

.wvmg-stage video {
	display: block;
	width: 100%;
	max-height: 80vh;
	background: #000;
}

.wvmg-embed {
	position: relative;
	padding-top: 56.25%;
	background: #000;
}

.wvmg-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.wvmg-gallery .wvmg-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: #222;
	font-size: 28px;
	line-height: 38px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.wvmg-gallery .wvmg-nav:hover {
	background: #fff;
}

.wvmg-prev { left: 10px; }
.wvmg-next { right: 10px; }

.wvmg-gallery .wvmg-thumbs {
	display: grid;
	grid-template-columns: repeat(var(--wvmg-cols, 4), minmax(0, 1fr));
	gap: 8px;
	list-style: none;
	margin: 8px 0 0;
	padding: 0;
}

.wvmg-gallery .wvmg-thumbs li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wvmg-gallery .wvmg-thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	background: #eee;
	overflow: hidden;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.15s, border-color 0.15s;
}

.wvmg-gallery .wvmg-thumb:hover,
.wvmg-gallery .wvmg-thumb.is-active {
	opacity: 1;
}

.wvmg-gallery .wvmg-thumb.is-active {
	border-color: #333;
}

.wvmg-gallery .wvmg-thumb img,
.wvmg-gallery .wvmg-thumb video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	margin: 0;
}

.wvmg-thumb-empty {
	display: block;
	width: 100%;
	height: 100%;
	background: #222;
}

.wvmg-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	pointer-events: none;
}

.wvmg-play::after {
	content: "";
	position: absolute;
	left: 12px;
	top: 9px;
	border-style: solid;
	border-width: 7px 0 7px 11px;
	border-color: transparent transparent transparent #fff;
}

.wvmg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, 0.9);
	cursor: zoom-out;
}

.wvmg-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	cursor: default;
}

.wvmg-lightbox .wvmg-lightbox-close {
	position: absolute;
	top: 10px;
	right: 14px;
	padding: 0 8px;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
}
