/* Léo Elementor Product Gallery */
.lepg-gallery {
	--lepg-main-height: 600px;
	--lepg-column-gap: 18px;
	--lepg-active-border: #111;
	width: 100%;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--lepg-column-gap);
	align-items: stretch;
}

.lepg-gallery.lepg-layout-horizontal {
	grid-template-columns: 1fr;
	grid-template-rows: minmax(0, 1fr) auto;
}

.lepg-thumbs-wrap {
	min-width: 0;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.lepg-layout-horizontal .lepg-thumbs-wrap {
	grid-row: 2;
	flex-direction: row;
	justify-content: flex-start;
	width: 100%;
}

.lepg-thumbs {
	display: flex;
	flex-direction: column;
	gap: 12px;
	overflow: hidden;
	max-height: calc(var(--lepg-thumb-size, 92px) * 5 + 12px * 4);
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.lepg-thumbs::-webkit-scrollbar {
	display: none;
}

.lepg-layout-horizontal .lepg-thumbs {
	flex-direction: row;
	max-width: 100%;
	max-height: none;
	overflow-x: auto;
	overflow-y: hidden;
}

.lepg-thumb {
	display: block;
	flex: 0 0 auto;
	width: 92px;
	height: 92px;
	padding: 0;
	border: 1px solid #e5e5e5;
	background: #fff;
	border-radius: 2px;
	overflow: hidden;
	cursor: pointer;
	opacity: .82;
	transition: opacity .18s ease, border-color .18s ease, transform .18s ease;
}

.lepg-thumb:hover {
	opacity: 1;
}

.lepg-thumb.is-active {
	border-color: #111;
	opacity: 1;
}

.lepg-thumb img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
}

.lepg-gallery[data-thumb-fit="contain"] .lepg-thumb img {
	object-fit: contain;
}

.lepg-arrow {
	border: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	color: #111;
	box-shadow: 0 2px 12px rgba(0,0,0,.10);
	cursor: pointer;
	z-index: 4;
	font-family: Arial, sans-serif;
	font-size: 24px;
	line-height: 1;
	transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.lepg-arrow:hover {
	transform: scale(1.04);
	box-shadow: 0 3px 16px rgba(0,0,0,.15);
}

.lepg-thumb-prev,
.lepg-thumb-next {
	flex: 0 0 auto;
}

.lepg-layout-horizontal .lepg-thumb-prev,
.lepg-layout-horizontal .lepg-thumb-next {
	display: none;
}

.lepg-stage {
	min-width: 0;
}

.lepg-main {
	position: relative;
	width: 100%;
	height: var(--lepg-main-height);
	min-height: 200px;
	overflow: hidden;
	background: #f7f7f7;
	display: flex;
	align-items: center;
	justify-content: center;
	outline: none;
}

.lepg-main-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease;
	user-select: none;
	-webkit-user-drag: none;
}

.lepg-main-image.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.lepg-gallery[data-main-fit="cover"] .lepg-main-image {
	object-fit: cover;
}

.lepg-main-prev,
.lepg-main-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
}

.lepg-main-prev:hover,
.lepg-main-next:hover {
	transform: translateY(-50%) scale(1.04);
}

.lepg-main-prev {
	left: 14px;
}

.lepg-main-next {
	right: 14px;
}

.lepg-zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	z-index: 3;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	color: #111;
	cursor: pointer;
	font-size: 21px;
	line-height: 1;
	box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

.lepg-empty {
	padding: 28px;
	border: 1px dashed #cfcfcf;
	background: #fafafa;
	color: #555;
	font-size: 14px;
}

.lepg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px;
	background: rgba(0,0,0,.88);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}

.lepg-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lepg-lightbox img {
	max-width: 94vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
}

.lepg-lightbox-close,
.lepg-lightbox-prev,
.lepg-lightbox-next {
	position: absolute;
	z-index: 2;
	border: 0;
	color: #111;
	background: rgba(255,255,255,.94);
	width: 42px;
	height: 42px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 25px;
	line-height: 1;
}

.lepg-lightbox-close {
	top: 18px;
	right: 18px;
}

.lepg-lightbox-prev {
	left: 22px;
	top: 50%;
	transform: translateY(-50%);
}

.lepg-lightbox-next {
	right: 22px;
	top: 50%;
	transform: translateY(-50%);
}

body.lepg-no-scroll {
	overflow: hidden;
}

@media (max-width: 767px) {
	.lepg-gallery {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(0, 1fr) auto;
		gap: 12px;
	}

	.lepg-gallery[data-mobile-thumbs="disable"] .lepg-thumbs-wrap {
		display: none;
	}

	.lepg-gallery[data-mobile-thumbs="bottom"] .lepg-thumbs-wrap {
		grid-row: 2;
		flex-direction: row;
		width: 100%;
	}

	.lepg-gallery[data-mobile-thumbs="bottom"] .lepg-thumbs {
		flex-direction: row;
		max-width: 100%;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.lepg-gallery[data-mobile-thumbs="left"] {
		grid-template-columns: auto minmax(0, 1fr);
		grid-template-rows: 1fr;
	}

	.lepg-gallery[data-mobile-thumbs="left"] .lepg-thumbs-wrap {
		grid-row: 1;
		grid-column: 1;
	}

	.lepg-gallery[data-mobile-thumbs="left"] .lepg-thumbs {
		max-height: 260px;
	}

	.lepg-gallery[data-mobile-thumbs="left"] .lepg-stage {
		grid-column: 2;
	}

	.lepg-main {
		min-height: 280px;
	}

	.lepg-arrow {
		width: 34px;
		height: 34px;
		font-size: 21px;
	}

	.lepg-main-prev {
		left: 8px;
	}

	.lepg-main-next {
		right: 8px;
	}

	.lepg-zoom {
		right: 8px;
		bottom: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lepg-main-image,
	.lepg-thumb,
	.lepg-lightbox {
		transition: none;
	}
}
