/* EPPI Галерия за имоти – стил в духа на imot.bg, с цветовете на EPPI */
.eppi-gal {
	--eppi-primary: #f9a11b;
	--eppi-dark: #2a2e39;
	--eppi-text: #515666;
	--eppi-border: #e5e5f8;
	--eppi-stage-bg: #10131a;
	--eppi-heading-font: "Exo 2", "Poppins", sans-serif;
	margin: 0 0 30px;
	color: var(--eppi-text);
}
.eppi-gal *,
.eppi-gal *::before,
.eppi-gal *::after { box-sizing: border-box; }
.eppi-gal-inner { max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.eppi-gal-fullwidth .eppi-gal-inner { max-width: none; padding: 0; }
.eppi-gal-fullwidth .eppi-gal-head { max-width: 1170px; margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; }

/* Заглавна лента */
.eppi-gal-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px 30px;
	padding: 22px 0 16px;
}
.eppi-gal-status {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 12px;
	background: var(--eppi-primary);
	color: #fff;
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .4px;
}
.eppi-gal .eppi-gal-title {
	margin: 0 0 6px;
	font-family: var(--eppi-heading-font);
	font-size: 26px;
	line-height: 1.25;
	font-weight: 600;
	color: var(--eppi-dark);
}
.eppi-gal-address { margin: 0; font-size: 14px; color: #8a90a2; }
.eppi-gal-head-side { text-align: right; margin-left: auto; }
.eppi-gal-price {
	font-family: var(--eppi-heading-font);
	font-size: 28px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--eppi-primary);
	white-space: nowrap;
}
.eppi-gal-price .amount { color: inherit; }
.eppi-gal-summary { margin: 4px 0 0; font-size: 14px; }

/* Табове снимки / карта */
.eppi-gal-tabs { display: flex; gap: 2px; margin-bottom: 10px; }
.eppi-gal-tab {
	border: 1px solid var(--eppi-border);
	border-bottom: 0;
	background: #f7f8fc;
	color: var(--eppi-text);
	font: inherit;
	font-size: 14px;
	padding: 9px 18px;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.eppi-gal-tab:hover { color: var(--eppi-primary); }
.eppi-gal-tab.is-active { background: var(--eppi-dark); border-color: var(--eppi-dark); color: #fff; }
.eppi-gal-panel:not(.is-active) { display: none; }
.eppi-gal-map { min-height: 380px; }

/* Голямата снимка */
.eppi-gal-stage {
	position: relative;
	overflow: hidden;
	background: var(--eppi-stage-bg);
	width: 100%;
	aspect-ratio: 3 / 2;
	max-height: min(72vh, 680px);
}
.eppi-ratio-16-9 .eppi-gal-stage { aspect-ratio: 16 / 9; }
.eppi-ratio-4-3 .eppi-gal-stage { aspect-ratio: 4 / 3; }
.eppi-gal-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease;
}
.eppi-gal-slide.is-active { opacity: 1; visibility: visible; }
.eppi-gal-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: zoom-in;
}
.eppi-fit-contain .eppi-gal-slide img { object-fit: contain; }

/* Стрелки */
.eppi-gal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	padding: 0;
	background: rgba(16, 19, 26, .45);
	color: #fff;
	font-size: 34px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s;
	z-index: 3;
}
.eppi-gal-nav:hover,
.eppi-gal-nav:focus-visible { background: var(--eppi-primary); color: #fff; }
.eppi-gal-prev { left: 0; }
.eppi-gal-next { right: 0; }

/* Бутон „Увеличи“ и брояч */
.eppi-gal-zoom {
	position: absolute;
	top: 14px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 7px 14px;
	border: 0;
	background: rgba(16, 19, 26, .6);
	color: #fff;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
	transition: background .2s;
	z-index: 3;
}
.eppi-gal-zoom:hover,
.eppi-gal-zoom:focus-visible { background: var(--eppi-primary); }
.eppi-gal-counter {
	position: absolute;
	right: 14px;
	bottom: 14px;
	padding: 5px 12px;
	background: rgba(16, 19, 26, .6);
	color: #fff;
	font-size: 13px;
	z-index: 3;
}
.eppi-gal-counter strong { font-weight: 600; }

/* Лента с миниатюри */
.eppi-gal-thumbs-wrap {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}
.eppi-gal-thumbs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: thin;
	flex: 1 1 auto;
	padding-bottom: 2px;
}
.eppi-gal-thumbs::-webkit-scrollbar { height: 6px; }
.eppi-gal-thumbs::-webkit-scrollbar-thumb { background: #c9cddb; border-radius: 3px; }
.eppi-gal-thumb {
	flex: 0 0 auto;
	width: 112px;
	height: 80px;
	padding: 0;
	border: 2px solid transparent;
	background: #10131a;
	cursor: pointer;
	opacity: .7;
	transition: opacity .2s, border-color .2s;
}
.eppi-gal-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.eppi-gal-thumb:hover { opacity: 1; }
.eppi-gal-thumb.is-active { opacity: 1; border-color: var(--eppi-primary); }
.eppi-gal-tnav {
	flex: 0 0 auto;
	width: 28px;
	height: 80px;
	border: 1px solid var(--eppi-border);
	background: #fff;
	color: var(--eppi-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.eppi-gal-tnav:hover { border-color: var(--eppi-primary); color: var(--eppi-primary); }

/* Цял екран */
.eppi-gal-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: rgba(8, 10, 14, .97);
	opacity: 0;
	transition: opacity .2s ease;
}
.eppi-gal-lightbox.is-open { opacity: 1; }
body.eppi-gal-lock { overflow: hidden; }
.eppi-lb-stage {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 48px 60px 10px;
}
.eppi-lb-stage img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}
.eppi-lb-close,
.eppi-lb-nav {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	transition: background .2s;
	line-height: 1;
}
.eppi-lb-close:hover,
.eppi-lb-nav:hover,
.eppi-lb-close:focus-visible,
.eppi-lb-nav:focus-visible { background: var(--eppi-primary); }
.eppi-lb-close { top: 10px; right: 14px; width: 42px; height: 42px; font-size: 24px; }
.eppi-lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 86px; font-size: 40px; }
.eppi-lb-prev { left: 8px; }
.eppi-lb-next { right: 8px; }
.eppi-lb-counter {
	position: absolute;
	top: 18px;
	left: 20px;
	color: #fff;
	font-size: 15px;
	opacity: .85;
}
.eppi-lb-info {
	padding: 10px 20px;
	color: #fff;
	text-align: center;
}
.eppi-lb-info b { font-family: var(--eppi-heading-font); font-size: 16px; font-weight: 600; }
.eppi-lb-info span { display: block; font-size: 13px; opacity: .75; margin-top: 2px; }
.eppi-lb-thumbs {
	display: flex;
	gap: 6px;
	overflow-x: auto;
	padding: 8px 14px 14px;
	scroll-behavior: smooth;
}
.eppi-lb-thumbs button {
	flex: 0 0 auto;
	width: 96px;
	height: 66px;
	padding: 0;
	border: 2px solid transparent;
	background: none;
	cursor: pointer;
	opacity: .55;
	transition: opacity .2s, border-color .2s;
}
.eppi-lb-thumbs button.is-active,
.eppi-lb-thumbs button:hover { opacity: 1; }
.eppi-lb-thumbs button.is-active { border-color: var(--eppi-primary); }
.eppi-lb-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Адаптивност */
@media (max-width: 991px) {
	.eppi-gal .eppi-gal-title { font-size: 22px; }
	.eppi-gal-price { font-size: 24px; }
	.eppi-gal-thumb { width: 96px; height: 70px; }
}
@media (max-width: 767px) {
	.eppi-gal-head { flex-direction: column; align-items: flex-start; padding: 16px 0 12px; }
	.eppi-gal-head-side { text-align: left; margin-left: 0; }
	.eppi-gal-stage { aspect-ratio: 4 / 3; }
	.eppi-gal-nav { width: 38px; height: 58px; font-size: 26px; }
	.eppi-gal-zoom { top: 10px; right: 10px; padding: 6px 10px; font-size: 12px; }
	.eppi-gal-counter { right: 10px; bottom: 10px; }
	.eppi-gal-thumb { width: 78px; height: 58px; }
	.eppi-gal-tnav { display: none; }
	.eppi-lb-stage { padding: 44px 8px 6px; }
	.eppi-lb-nav { width: 40px; height: 64px; font-size: 30px; background: rgba(255,255,255,.08); }
	.eppi-lb-thumbs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.eppi-gal *, .eppi-gal-lightbox * { transition: none !important; }
}
