/* KG Апартаменти – фронтенд */
.kga-app, .kga-single, .kga-lb {
	--kga-accent: #0e6ba8;
	--kga-accent-2: #e0763a;
	--kga-ink: #1d2433;
	--kga-muted: #687083;
	--kga-line: #e4e7ec;
	--kga-bg: #f6f8fb;
	--kga-radius: 14px;
	--kga-shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.08);
	color: var(--kga-ink);
}
.kga-app *, .kga-single *, .kga-lb * { box-sizing: border-box; }
.kga-app { max-width: 1680px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.kga-archive .kga-app { padding-left: 0; padding-right: 0; }
.kga-ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }

.kga-btn {
	display: inline-flex; align-items: center; gap: 6px; justify-content: center;
	padding: 10px 16px; border-radius: 999px; border: 1px solid var(--kga-accent);
	background: var(--kga-accent); color: #fff !important; font-weight: 600; font-size: 15px;
	text-decoration: none !important; cursor: pointer; line-height: 1.2; transition: .15s;
}
.kga-btn:hover { filter: brightness(1.08); }
.kga-btn--ghost { background: #fff; color: var(--kga-ink) !important; border-color: var(--kga-line); }
.kga-btn--ghost:hover, .kga-btn--ghost.is-on { border-color: var(--kga-ink); filter: none; }

/* ---------- Филтри ---------- */
.kga-archive__inner { max-width: 1600px; margin: 0 auto; padding: 24px 20px; }
.kga-archive__title { margin: 0 0 16px; }
.kga-app__title { margin: 0 0 14px; }

.kga-filters {
	display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
	padding: 10px; background: #fff; border: 1px solid var(--kga-line);
	border-radius: 999px; box-shadow: var(--kga-shadow); position: relative; z-index: 500;
}
.kga-f { display: flex; align-items: center; gap: 6px; padding: 0 6px; border-right: 1px solid var(--kga-line); }
.kga-f:last-of-type { border-right: 0; }
.kga-f--q { flex: 1 1 240px; padding-left: 12px; color: var(--kga-muted); }
.kga-filters input, .kga-filters select, .kga-bar select, .kga-small {
	border: 0 !important; background: transparent !important; box-shadow: none !important;
	font-size: 15px; color: var(--kga-ink); padding: 8px 4px !important; min-height: 0; height: auto; margin: 0;
	outline: none; border-radius: 8px;
}
.kga-filters input:focus-visible, .kga-filters select:focus-visible { background: var(--kga-bg) !important; }
.kga-f--q input { width: 100%; }
/* Подсказки в търсачката */
.kga-f--q { position: relative; }
.kga-suggest { position: absolute; top: calc(100% + 12px); left: 0; width: min(440px, 92vw); margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--kga-line); border-radius: 14px; box-shadow: 0 14px 40px rgba(16,24,40,.2); z-index: 800; color: var(--kga-ink); }
.kga-suggest[hidden] { display: none; }
.kga-suggest li { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; margin: 0; }
.kga-suggest li:hover, .kga-suggest li.is-on { background: var(--kga-bg); }
.kga-suggest__ico { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--kga-bg); border-radius: 10px; font-size: 17px; }
.kga-suggest__txt { display: grid; line-height: 1.25; }
.kga-suggest__txt b { font-size: 15px; font-weight: 600; }
.kga-suggest__txt small { font-size: 12px; color: var(--kga-muted); }
.kga-suggest__empty { color: var(--kga-muted); font-size: 13px; cursor: default !important; }

.kga-f--price input { width: 92px; }
.kga-f--price span { color: var(--kga-muted); }
.kga-badge { background: var(--kga-accent-2); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; }

.kga-more {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px);
	background: #fff; border: 1px solid var(--kga-line); border-radius: var(--kga-radius);
	box-shadow: 0 12px 40px rgba(16,24,40,.18); padding: 18px 20px; display: grid; gap: 14px;
}
.kga-more[hidden] { display: none; }
.kga-more__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kga-more__label { width: 90px; font-weight: 600; font-size: 14px; }
.kga-small { border: 1px solid var(--kga-line) !important; width: 110px; padding: 8px 10px !important; }
.kga-seg { display: inline-flex; border: 1px solid var(--kga-line); border-radius: 999px; padding: 3px; background: var(--kga-bg); flex-wrap: wrap; }
.kga-seg button, .kga-chip {
	border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer;
	font-size: 14px; color: var(--kga-ink); transition: .15s;
}
.kga-seg button.is-on { background: #fff; box-shadow: var(--kga-shadow); font-weight: 600; }
.kga-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.kga-chip { border: 1px solid var(--kga-line); background: #fff; }
.kga-chip.is-on { background: var(--kga-ink); color: #fff; border-color: var(--kga-ink); }

.kga-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 12px; }
.kga-count { font-size: 15px; color: var(--kga-muted); }
.kga-count b { color: var(--kga-ink); font-size: 18px; }
.kga-bar__right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.kga-bar select { border: 1px solid var(--kga-line) !important; padding: 7px 10px !important; background: #fff !important; }
.kga-switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; margin: 0; }
.kga-switch input { accent-color: var(--kga-accent); width: 16px; height: 16px; margin: 0; }
.kga-bar .kga-btn { padding: 7px 14px; font-size: 14px; }

/* ---------- Списък + карта ---------- */
.kga-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kga-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.kga-mapwrap { position: sticky; top: 20px; height: calc(100vh - 40px); max-height: 900px; min-height: 420px; border-radius: var(--kga-radius); overflow: hidden; box-shadow: var(--kga-shadow); }
.admin-bar .kga-mapwrap { top: 52px; height: calc(100vh - 72px); }
.kga-map { width: 100%; height: 100%; z-index: 1; }
.kga-mapwrap { position: sticky; }
.kga-map-toggle { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 600; display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 8px 14px; box-shadow: 0 3px 12px rgba(0,0,0,.22); font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; white-space: nowrap; margin: 0; max-width: calc(100% - 100px); }
.kga-map-toggle span { overflow: hidden; text-overflow: ellipsis; }
.kga-map-toggle input { accent-color: var(--kga-accent); width: 16px; height: 16px; margin: 0; flex: none; }

.kga-card { background: #fff; border-radius: var(--kga-radius); overflow: hidden; box-shadow: var(--kga-shadow); transition: transform .2s, box-shadow .2s; outline: 2px solid transparent; }
.kga-card:hover, .kga-card.is-active { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(16,24,40,.16); }
.kga-card.is-active { outline-color: var(--kga-accent); }
.kga-card__media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #dfe9f3, #f6f8fb); }
.kga-card__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .35s; }
.kga-card__slide.is-on { opacity: 1; }
.kga-card__nav {
	position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
	border: 0; background: rgba(255,255,255,.92); color: var(--kga-ink); font-size: 22px; line-height: 28px;
	cursor: pointer; opacity: 0; transition: .2s; padding: 0; box-shadow: var(--kga-shadow);
}
.kga-card__nav--prev { left: 10px; } .kga-card__nav--next { right: 10px; }
.kga-card:hover .kga-card__nav { opacity: 1; }
.kga-card__dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.kga-card__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); }
.kga-card__dots i.is-on { background: #fff; transform: scale(1.25); }
.kga-fav, .kga-card__locate {
	position: absolute; top: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(255,255,255,.92); font-size: 18px; line-height: 36px; padding: 0; box-shadow: var(--kga-shadow); transition: .15s;
}
.kga-fav { right: 10px; color: #b7bcc8; }
.kga-fav.is-on { color: #e5484d; transform: scale(1.08); }
.kga-card__locate { right: 52px; color: var(--kga-accent); font-size: 20px; }
.kga-card__body { display: block; padding: 14px 16px 16px; color: inherit !important; text-decoration: none !important; }
.kga-card__loc { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--kga-accent); font-weight: 700; margin-bottom: 4px; }
.kga-card__title { font-size: 17px; line-height: 1.3; margin: 0 0 8px; font-weight: 700; color: var(--kga-ink); }
.kga-card__facts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kga-card__facts span { font-size: 13px; background: var(--kga-bg); border-radius: 6px; padding: 3px 8px; color: var(--kga-muted); }
.kga-card__price { display: block; font-size: 14px; color: var(--kga-muted); }
.kga-card__price b { font-size: 20px; color: var(--kga-ink); }
.kga-card__price--ask { font-style: italic; }

.kga-empty { grid-column: 1 / -1; text-align: center; padding: 50px 20px; background: var(--kga-bg); border-radius: var(--kga-radius); display: grid; gap: 10px; justify-items: center; }
.kga-empty span { color: var(--kga-muted); }
.kga-more-wrap { grid-column: 1 / -1; text-align: center; }

/* Маркери-цени */
.kga-pin { background: none; border: 0; }
.kga-pin span {
	display: inline-block; transform: translate(-50%, -100%); white-space: nowrap;
	background: #fff; color: var(--kga-ink, #1d2433); font: 700 13px/1 system-ui, sans-serif; padding: 7px 10px;
	border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: transform .15s, background .15s;
	position: relative;
}
.kga-pin span::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: #fff; }
.kga-pin:hover, .kga-pin.is-active { z-index: 10000 !important; }
.kga-pin:hover span, .kga-pin.is-active span { background: #1d2433; color: #fff; transform: translate(-50%, -100%) scale(1.12); }
.kga-pin:hover span::after, .kga-pin.is-active span::after { border-top-color: #1d2433; }
.kga-pin--home span { background: #0e6ba8; color: #fff; font-size: 18px; padding: 8px 11px; }
.kga-pin--home span::after { border-top-color: #0e6ba8; }

.kga-cluster { background: none; border: 0; }
.kga-cluster span {
	display: flex; flex-direction: column; align-items: center; justify-content: center; transform: translate(-50%, -50%);
	min-width: 54px; height: 54px; padding: 0 8px; border-radius: 999px; background: #0e6ba8; color: #fff;
	box-shadow: 0 0 0 6px rgba(14,107,168,.25), 0 3px 10px rgba(0,0,0,.25); font: 700 15px/1.1 system-ui, sans-serif;
}
.kga-cluster small { font-size: 10px; font-weight: 500; opacity: .9; white-space: nowrap; }

.kga-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; overflow: hidden; }
.kga-popup .leaflet-popup-content { margin: 0; width: 260px !important; }
.kga-pop { display: block; color: #1d2433 !important; text-decoration: none !important; }
.kga-pop__img { display: block; height: 140px; background-size: cover; background-position: center; }
.kga-pop__body { display: grid; gap: 3px; padding: 10px 12px 12px; font-size: 13px; }
.kga-pop__body strong { font-size: 15px; }
.kga-pop__body span { color: #687083; }
.kga-pop__body em { font-style: normal; font-weight: 700; font-size: 16px; }

.kga-viewtoggle {
	display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000;
	background: #1d2433; color: #fff; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 600;
	box-shadow: 0 6px 20px rgba(0,0,0,.3); gap: 6px; align-items: center; cursor: pointer;
}

/* ---------- Горна лента ---------- */
.home .site-header .site-branding { visibility: hidden; }

/* ---------- Страница на имот ---------- */
.kga-back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; font-weight: 600; font-size: 15px; color: var(--kga-accent) !important; text-decoration: none !important; }
.kga-back:hover { text-decoration: underline !important; }
.kga-single { margin-top: 8px; }
.kga-mosaic { position: relative; display: grid; gap: 8px; border-radius: 18px; overflow: hidden; height: min(62vh, 520px); margin-bottom: 26px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.kga-mosaic__item { padding: 0; border: 0; cursor: zoom-in; overflow: hidden; background: #eef2f6; }
.kga-mosaic__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; margin: 0; }
.kga-mosaic__item:hover img { transform: scale(1.04); }
.kga-mosaic__item:first-child { grid-row: 1 / 3; }
.kga-mosaic--1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.kga-mosaic--2 { grid-template-columns: 2fr 1fr; }
.kga-mosaic--2 .kga-mosaic__item:nth-child(2) { grid-row: 1 / 3; }
.kga-mosaic--3 { grid-template-columns: 2fr 1fr; }
.kga-mosaic--4 { grid-template-columns: 2fr 1fr 1fr; }
.kga-mosaic--4 .kga-mosaic__item:nth-child(4) { grid-column: 2 / 4; }
.kga-mosaic__all { position: absolute; right: 16px; bottom: 16px; background: #fff; color: #1d2433; border: 1px solid #1d2433; border-radius: 10px; padding: 8px 14px; font-weight: 600; cursor: pointer; display: flex; gap: 6px; align-items: center; }

.kga-single__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.kga-single__meta { color: var(--kga-muted); display: flex; gap: 6px; align-items: center; margin: 0 0 16px; }
.kga-single .kga-facts, .kga-single .kga-feats ul { padding-left: 0 !important; margin-left: 0 !important; }
.kga-single .kga-owner p { margin-top: 0; }
.kga-facts { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.kga-facts li { background: var(--kga-bg); border-radius: 12px; padding: 12px; display: grid; gap: 2px; margin: 0; }
.kga-facts .kga-ico { color: var(--kga-accent); width: 22px; height: 22px; margin-bottom: 4px; }
.kga-facts strong { font-size: 18px; }
.kga-facts span { font-size: 13px; color: var(--kga-muted); }
.kga-desc p { margin: 0 0 .5em !important; }
.kga-desc ul, .kga-desc ol { margin: 0 0 .8em 1.3em !important; }
.kga-desc, .kga-feats, .kga-where { padding: 24px 0; border-top: 1px solid var(--kga-line); }
.kga-single h2 { font-size: 22px; margin: 0 0 14px; }
.kga-feats ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.kga-feats li { display: flex; gap: 8px; align-items: center; margin: 0; }
.kga-feats .kga-ico { color: #1a7f37; }
.kga-single-map { height: 360px; border-radius: var(--kga-radius); margin: 12px 0 14px; z-index: 1; }

.kga-single__side { position: sticky; top: 30px; }
.admin-bar .kga-single__side { top: 62px; }
.kga-owner { background: #fff; border: 1px solid var(--kga-line); border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(16,24,40,.10); }
.kga-owner__price { font-size: 28px; font-weight: 800; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--kga-line); }
.kga-owner__price small { font-size: 15px; font-weight: 500; color: var(--kga-muted); }
.kga-owner .kga-owner__pricenote { font-size: 13px; line-height: 1.45; color: var(--kga-muted); background: var(--kga-bg); border-radius: 10px; padding: 10px 12px; margin: -4px 0 16px; }
.kga-owner h3 { font-size: 16px; margin: 0 0 12px; }
.kga-owner__row { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; font-size: 16px; word-break: break-word; }
.kga-owner__row .kga-ico { color: var(--kga-accent); }
.kga-owner__row a { color: var(--kga-ink); font-weight: 600; text-decoration: none; }
.kga-owner__row a:hover { color: var(--kga-accent); }
.kga-owner__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.kga-owner__actions .kga-btn:first-child { grid-column: 1 / -1; }
.kga-btn--wa { background: #25d366; border-color: #25d366; }
.kga-btn--viber { background: #7360f2; border-color: #7360f2; }
.kga-owner__note { font-size: 13px; color: var(--kga-muted); margin: 14px 0 0; }

.kga-nearby { padding-top: 26px; border-top: 1px solid var(--kga-line); margin-top: 10px; }
.kga-nearby__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.kga-mini { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--kga-line); border-radius: 14px; color: inherit !important; text-decoration: none !important; transition: .15s; }
.kga-mini:hover { box-shadow: var(--kga-shadow); }
.kga-mini__img { width: 84px; height: 84px; flex: none; border-radius: 10px; background: #eef2f6 center / cover; }
.kga-mini__body { display: grid; gap: 3px; font-size: 13px; color: var(--kga-muted); }
.kga-mini__body strong { color: var(--kga-ink); font-size: 15px; }
.kga-mini__body em { font-style: normal; font-weight: 700; color: var(--kga-ink); }

/* Lightbox */
.kga-noscroll { overflow: hidden; }
.kga-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(10,14,22,.96); display: none; align-items: center; justify-content: center; }
.kga-lb.is-open { display: flex; }
.kga-lb__fig { margin: 0; max-width: 92vw; max-height: calc(100vh - 160px); display: flex; }
.kga-lb__fig img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 6px; margin: auto; }
.kga-lb__close, .kga-lb__nav { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 30px; line-height: 46px; cursor: pointer; padding: 0; }
.kga-lb__close:hover, .kga-lb__nav:hover { background: rgba(255,255,255,.25); }
.kga-lb__close { top: 16px; right: 16px; }
.kga-lb__prev { left: 16px; } .kga-lb__next { right: 16px; }
.kga-lb__count { position: absolute; top: 26px; left: 0; right: 0; text-align: center; color: #cfd5df; font-size: 14px; pointer-events: none; }
.kga-lb__thumbs { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; overflow-x: auto; padding: 0 16px; }
.kga-lb__thumbs button { width: 64px; height: 48px; flex: none; border: 2px solid transparent; border-radius: 6px; background: center / cover; opacity: .55; cursor: pointer; padding: 0; }
.kga-lb__thumbs button.is-on { opacity: 1; border-color: #fff; }

/* ---------- Мобилни ---------- */
@media (max-width: 900px) {
	.kga-filters { border-radius: var(--kga-radius); }
	.kga-f { border-right: 0; flex: 1 1 45%; background: var(--kga-bg); border-radius: 10px; }
	.kga-f--q { flex-basis: 100%; }
	.kga-f select, .kga-f input { width: 100%; }
	.kga-more-toggle { flex: 1 1 100%; }
	.kga-more { position: static; box-shadow: none; flex-basis: 100%; padding: 12px 4px 4px; border: 0; }
	.kga-split { grid-template-columns: 1fr; }
	.kga-mapwrap { display: none; position: relative; top: 0; height: calc(100vh - 140px); }
	.kga-app.is-map .kga-mapwrap { display: block; }
	.kga-app.is-map .kga-list { display: none; }
	.kga-viewtoggle { display: inline-flex; font-size: 16px; padding: 14px 24px; }
	.kga-map-toggle { font-size: 12px; padding: 7px 12px; }
	.kga-card__nav { opacity: 1; }
	.kga-mosaic { height: 300px; grid-template-columns: 1fr !important; grid-template-rows: 1fr !important; }
	.kga-mosaic__item:not(:first-child) { display: none; }
	.kga-mosaic__item:first-child { grid-row: auto; }
	.kga-single__grid { grid-template-columns: 1fr; gap: 10px; }
	.kga-single__side { position: static; order: -1; }
	.kga-lb__nav { display: none; }
}

/* ---------- Hero (корица на началната страница) ---------- */
.kga-hero { padding-bottom: 90px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.kga-hero .wp-block-cover__inner-container { max-width: 900px; color: #fff; }
.kga-hero h1 { color: #fff !important; font-size: clamp(30px, 5vw, 58px); line-height: 1.1; margin: 0 0 14px; text-shadow: 0 2px 18px rgba(0,0,0,.35); letter-spacing: -.01em; }
.kga-hero p { color: rgba(255,255,255,.92) !important; font-size: clamp(15px, 1.6vw, 19px); margin: 0; text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.kga-hero + .kga-app { position: relative; z-index: 5; margin-top: -40px; }
.kga-hero + .kga-app .kga-filters { box-shadow: 0 14px 40px rgba(16,24,40,.22); }
@media (max-width: 900px) {
	.kga-hero { min-height: 380px !important; padding: 84px 16px 70px !important; }
	.kga-hero + .kga-app { margin-top: -30px; }
}