.epg-widget,
.epg-widget * {
	box-sizing: border-box;
}

.epg-widget {
	--epg-main-ratio: 80 / 100;
	--epg-thumb-width: 107px;
	--epg-thumb-ratio: 80 / 100;
	--epg-thumb-gap: 14px;
	--epg-gallery-gap: 15px;
	--epg-arrow-offset: 20px;
	--epg-sticky-offset: 96px;
	--epg-lightbox-bg: rgba(10, 10, 10, .94);
	--epg-lightbox-color: #fff;
	position: relative;
	width: 100%;
	min-width: 0;
	direction: ltr !important;
}

.epg-widget.epg-is-sticky {
	position: sticky;
	top: var(--epg-sticky-offset);
	z-index: 2;
}

.elementor-editor-active .epg-widget.epg-is-sticky,
.elementor-editor-preview .epg-widget.epg-is-sticky {
	position: relative;
	top: auto;
}

.epg-gallery-shell {
	display: flex;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
	gap: var(--epg-gallery-gap);
}

.epg-thumbs-left .epg-gallery-shell {
	flex-direction: row-reverse;
}

.epg-thumbs-right .epg-gallery-shell {
	flex-direction: row;
}

.epg-stage-shell {
	position: relative;
	flex: 1 1 auto;
	width: calc(100% - var(--epg-thumb-width) - var(--epg-gallery-gap));
	min-width: 0;
	overflow: hidden;
}

.epg-stage-viewport {
	position: relative;
	width: 100%;
	aspect-ratio: var(--epg-main-ratio);
	overflow: hidden !important;
	background: #f5f5f5;
	isolation: isolate;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
}

.epg-stage-track {
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 100%;
	will-change: transform;
	transform: translate3d(0, 0, 0);
	touch-action: pan-y pinch-zoom;
	user-select: none;
	-webkit-user-select: none;
	cursor: grab;
}

.epg-stage-track.is-dragging {
	cursor: grabbing;
}

.epg-stage-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.epg-image-link {
	position: relative;
	display: block !important;
	width: 100%;
	height: 100%;
	overflow: hidden !important;
	text-decoration: none !important;
	outline: none !important;
	cursor: zoom-in;
}

.epg-main-image,
.epg-zoom-image {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: cover !important;
	object-position: center center;
}

.epg-zoom-image {
	position: absolute !important;
	inset: 0 !important;
	z-index: 2;
	opacity: 0;
	pointer-events: none;
	will-change: transform, transform-origin, opacity;
	transition: opacity .18s ease;
}

.epg-image-link.is-zooming .epg-zoom-image {
	opacity: 1;
}

.epg-main-arrow,
.epg-thumb-arrow {
	appearance: none !important;
	-webkit-appearance: none !important;
	font: inherit !important;
	line-height: 1 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none;
	cursor: pointer;
}

.epg-main-arrow {
	--epg-arrow-size: 48px;
	position: absolute !important;
	top: 50% !important;
	z-index: 5;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: var(--epg-arrow-size) !important;
	height: var(--epg-arrow-size) !important;
	min-width: var(--epg-arrow-size) !important;
	min-height: var(--epg-arrow-size) !important;
	color: #111 !important;
	background: #fff !important;
	transform: translateY(-50%);
	transition: opacity .25s ease, visibility .25s ease, transform .25s ease, color .25s ease, background-color .25s ease !important;
}

.epg-main-arrow:hover,
.epg-main-arrow:focus-visible {
	color: #fff !important;
	background: #111 !important;
}

.epg-main-arrow svg {
	display: block;
	width: 18px;
	height: 18px;
	pointer-events: none;
}

.epg-main-prev {
	left: var(--epg-arrow-offset) !important;
}

.epg-main-next {
	right: var(--epg-arrow-offset) !important;
}

.epg-arrows-hover .epg-main-arrow {
	opacity: 0;
	visibility: hidden;
}

.epg-arrows-hover .epg-main-prev {
	transform: translate(-10px, -50%);
}

.epg-arrows-hover .epg-main-next {
	transform: translate(10px, -50%);
}

.epg-arrows-hover .epg-stage-shell:hover .epg-main-arrow,
.epg-arrows-hover .epg-stage-shell:focus-within .epg-main-arrow {
	opacity: 1;
	visibility: visible;
	transform: translate(0, -50%);
}

.epg-arrows-hide .epg-main-arrow {
	display: none !important;
}

.epg-thumbs-shell {
	position: relative;
	flex: 0 0 var(--epg-thumb-width);
	width: var(--epg-thumb-width);
	min-width: 0;
}

.epg-thumbs-viewport {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior: contain;
	scroll-behavior: smooth;
	touch-action: pan-y;
	cursor: grab;
}

.epg-thumbs-viewport::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
}

.epg-thumbs-viewport.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
}

.epg-thumbs-track {
	display: flex;
	flex-direction: column;
	gap: var(--epg-thumb-gap);
	width: 100%;
}

.epg-thumb {
	position: relative;
	display: block !important;
	flex: 0 0 auto;
	width: 100% !important;
	aspect-ratio: var(--epg-thumb-ratio);
	padding: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
	border: 1px solid #e5e7eb !important;
	background: transparent !important;
	outline: 0 !important;
	cursor: pointer;
	transition: opacity .25s ease, border-color .25s ease, transform .25s ease !important;
}

.epg-thumb:hover,
.epg-thumb:focus-visible {
	transform: translateY(-1px);
}

.epg-thumb.is-active {
	border-color: #111 !important;
}

.epg-thumb img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	object-fit: cover;
}

.epg-thumb-arrow {
	position: absolute !important;
	left: 50% !important;
	z-index: 4;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 30px !important;
	height: 30px !important;
	min-width: 30px !important;
	min-height: 30px !important;
	color: #111 !important;
	background: rgba(255,255,255,.92) !important;
	border-radius: 50% !important;
	box-shadow: 0 3px 12px rgba(0,0,0,.12) !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease !important;
}

.epg-thumbs-shell:hover .epg-thumb-arrow,
.epg-thumbs-shell:focus-within .epg-thumb-arrow {
	opacity: 1;
	visibility: visible;
}

.epg-thumb-arrow svg {
	width: 14px;
	height: 14px;
}

.epg-thumb-prev {
	top: 6px !important;
	transform: translateX(-50%) rotate(90deg);
}

.epg-thumb-next {
	bottom: 6px !important;
	transform: translateX(-50%) rotate(90deg);
}

.epg-thumb-arrow[disabled] {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none;
}

.epg-empty-state {
	padding: 28px;
	border: 1px dashed #cbd5e1;
	border-radius: 10px;
	background: #f8fafc;
	color: #475569;
	font-size: 14px;
	line-height: 1.8;
	text-align: center;
	direction: rtl;
}

body.epg-lightbox-open {
	overflow: hidden !important;
}

.epg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 70px;
	background: var(--epg-lightbox-bg, rgba(10, 10, 10, .94));
	color: var(--epg-lightbox-color, #fff);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}

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

.epg-lightbox-stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	touch-action: none;
}

.epg-lightbox-image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	user-select: none;
	-webkit-user-select: none;
	box-shadow: 0 18px 70px rgba(0,0,0,.32);
}

.epg-lightbox-button {
	appearance: none !important;
	position: absolute !important;
	z-index: 3;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 48px !important;
	height: 48px !important;
	min-width: 48px !important;
	min-height: 48px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	color: currentColor !important;
	background: rgba(255,255,255,.12) !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s ease !important;
}

.epg-lightbox-button:hover,
.epg-lightbox-button:focus-visible {
	background: rgba(255,255,255,.24) !important;
	transform: scale(1.04);
}

.epg-lightbox-button svg {
	width: 22px;
	height: 22px;
}

.epg-lightbox-close {
	top: 18px !important;
	right: 18px !important;
}

.epg-lightbox-prev {
	left: 18px !important;
	top: 50% !important;
	transform: translateY(-50%);
}

.epg-lightbox-next {
	right: 18px !important;
	top: 50% !important;
	transform: translateY(-50%);
}

.epg-lightbox-prev:hover,
.epg-lightbox-prev:focus-visible,
.epg-lightbox-next:hover,
.epg-lightbox-next:focus-visible {
	transform: translateY(-50%) scale(1.04);
}

.epg-lightbox-counter {
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 3;
	padding: 7px 12px;
	border-radius: 999px;
	background: rgba(0,0,0,.32);
	font-size: 13px;
	line-height: 1;
	transform: translateX(-50%);
}

.epg-widget.epg-layout-horizontal.epg-is-sticky {
	position: relative;
	top: auto;
}

.epg-layout-horizontal .epg-gallery-shell,
.epg-layout-horizontal.epg-thumbs-left .epg-gallery-shell,
.epg-layout-horizontal.epg-thumbs-right .epg-gallery-shell {
	flex-direction: column;
}

.epg-layout-horizontal .epg-stage-shell {
	width: 100%;
}

.epg-layout-horizontal .epg-thumbs-shell {
	width: 100%;
	flex-basis: auto;
}

.epg-layout-horizontal .epg-thumbs-viewport {
	touch-action: pan-x;
}

.epg-layout-horizontal .epg-thumbs-track {
	flex-direction: row;
	align-items: stretch;
	width: 100%;
}

.epg-layout-horizontal .epg-thumb {
	width: auto !important;
	min-width: 0 !important;
}

.epg-layout-horizontal .epg-thumb-prev,
.epg-layout-horizontal .epg-thumb-next {
	top: 50% !important;
	bottom: auto !important;
	transform: translateY(-50%);
}

.epg-layout-horizontal .epg-thumb-prev {
	left: 6px !important;
}

.epg-layout-horizontal .epg-thumb-next {
	left: auto !important;
	right: 6px !important;
}

@media (max-width: 767px) {
	.epg-main-arrow {
		--epg-arrow-size: 40px;
	}

	.epg-arrows-hover .epg-main-arrow {
		opacity: 1;
		visibility: visible;
	}

	.epg-arrows-hover .epg-main-prev,
	.epg-arrows-hover .epg-main-next {
		transform: translate(0, -50%);
	}

	.epg-lightbox {
		padding: 55px 12px 45px;
	}

	.epg-lightbox-button {
		width: 42px !important;
		height: 42px !important;
		min-width: 42px !important;
		min-height: 42px !important;
	}

	.epg-lightbox-prev {
		left: 8px !important;
	}

	.epg-lightbox-next {
		right: 8px !important;
	}

	.epg-lightbox-close {
		top: 8px !important;
		right: 8px !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.epg-widget *,
	.epg-lightbox * {
		scroll-behavior: auto !important;
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
