/**
 * Product gallery + lightbox (layout + popup).
 * Scoped where needed so other site images are not affected.
 */
.elementor-widget-epg_product_gallery img {
	cursor: pointer;
	border-radius: 5px;
}

.product_gallery {
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.gllery_main {
	display: flex;
	flex-wrap: nowrap;
	gap: 36px;
}

.side_nav {
	display: flex;
	flex-direction: column;
	gap: 36px;
	flex: clamp(5rem, -1.1538rem + 9.6154vw, 7.5rem) 0 0;
}

.active_img_div {
	flex: 1 0 0;
	display: flex;
}

.active_img_div img {
	aspect-ratio: 1 !important;
	object-fit: cover;
}

.product_infos {
	display: none;
}

.hori_nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 36px;
}

.hori_nav_wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}

.hori_nav_arrow {
	cursor: pointer;
}

.hori_nav {
	overflow-x: auto;
	scroll-behavior: smooth;
	flex: 1;
}

.hori_nav img {
	flex: clamp(5rem, -1.1538rem + 9.6154vw, 7.5rem) 0 0 !important;
	max-width: clamp(5rem, -1.1538rem + 9.6154vw, 7.5rem) !important;
}

.hori_nav img:nth-child(1),
.hori_nav img:nth-child(2),
.hori_nav img:nth-child(3),
.hori_nav img:nth-child(4),
.hori_nav_wrapper button {
	display: none;
}

img.side_nav_img {
	object-fit: cover;
	aspect-ratio: 1 !important;
	opacity: 0.8;
}

.current-active-img {
	opacity: 1 !important;
}

@media screen and (max-width: 1024px) {
	.hori_nav img:nth-child(1),
	.hori_nav img:nth-child(2),
	.hori_nav img:nth-child(3),
	.hori_nav img:nth-child(4),
	.hori_nav_wrapper button {
		display: block;
	}

	button.hori_nav_arrow.hori_nav_next,
	button.hori_nav_arrow.hori_nav_prev {
		padding: 0;
		background: transparent;
		position: absolute;
		max-width: 30px;
		max-height: 30px;
		z-index: 3;
	}

	button.hori_nav_arrow.hori_nav_next {
		right: -10px;
	}

	button.hori_nav_arrow.hori_nav_prev {
		left: -10px;
	}

	.side_nav {
		display: none;
	}

	.active_img_div {
		display: flex;
		flex: 1 0 0;
	}

	img.active_img {
		aspect-ratio: 1 !important;
		min-width: 100%;
	}

	.hori_nav {
		flex-wrap: nowrap;
		max-width: 100%;
		overflow-x: scroll;
		overflow-y: hidden;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.hori_nav::-webkit-scrollbar {
		display: none;
	}

	.product_gallery,
	.hori_nav {
		gap: 13px;
	}

	div#epg_popup_nav {
		display: none;
	}
}

@media screen and (max-width: 767px) {
	.product_infos {
		display: flex;
		flex-direction: column;
		gap: 2px;
	}

	.product_infos p,
	h2.product_title {
		margin: 0;
		color: black !important;
	}

	span.product_price {
		font-size: 13px;
	}
}

/* —— Lightbox (same rules as former inline <style> in Elementor Product Gallery) —— */
.epg_popup {
	position: fixed;
	inset: 0;
	background: #ffffff;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 99999999;
}

.epg_popup_inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 25px;
	width: 100%;
	padding: 20px;
}

.epg_popup_img {
	max-width: 85%;
	max-height: 75vh;
	object-fit: contain;
	transition: opacity 0.2s ease;
}

.epg_popup_nav {
	display: flex;
	overflow-x: auto;
	gap: 14px;
	padding: 14px 20px;
	width: 100%;
	justify-content: center;
	scroll-behavior: smooth;
}

.epg_popup_nav img {
	width: 74px;
	height: 74px;
	object-fit: cover;
	border-radius: 6px;
	cursor: pointer;
	opacity: 0.7;
}

.epg_popup_nav img.epg_active_nav {
	opacity: 1;
	outline: 2px solid black;
}

.epg_close_btn {
	position: absolute;
	top: 18px;
	right: 25px;
	font-size: 45px;
	cursor: pointer;
	z-index: 999999999;
}

.epg_arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	font-size: 55px;
	cursor: pointer;
	z-index: 99999;
	padding: 10px;
	user-select: none;
}

.epg_arrow_left {
	left: 25px;
}

.epg_arrow_right {
	right: 25px;
}

.epg_arrow:hover {
	opacity: 0.6;
}

img#epg_big_img {
    min-height: calc(100vh - 200px) ! IMPORTANT;
    max-height: calc(100vh - 200px) ! IMPORTANT;
    border-radius: 5px;
    object-fit: contain;
}