/* ApexBuild – Гаражи и Магазини :: фронтенд стилове
   Палитра, съобразена с invest.apexbuildbg.com (Elementor / Montserrat). */

.apx-garages-section {
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.apx-garages__title {
	text-align: center;
	color: #0A172D;
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	margin: 0 0 28px;
}

.apx-garages {
	--apx-navy: #0A172D;
	--apx-blue: #132F60;
	--apx-btn: #22488A;
	--apx-btn-hover: #132F60;
	--apx-accent: #4673B6;
	--apx-light: #F4F7FB;
	--apx-border: #D5DBE6;
	--apx-text: #1b2433;
	--apx-radius: 8px;

	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 28px;
	align-items: center;
	justify-items: center;
	font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--apx-text);
	margin: 0 0 28px;
}

/* ---------- Изображение на етажа (ляво) ---------- */
.apx-garages__media {
	position: relative;
	width: 100%;
	text-align: center;
}

.apx-garages__img-wrap {
	display: none;
}

.apx-garages__img-wrap.is-active {
	display: block;
}

.apx-garages__img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
	border-radius: var(--apx-radius);
	cursor: zoom-in;
}

.apx-garages__img-wrap--empty {
	min-height: 320px;
	border: 1px dashed var(--apx-border);
	border-radius: var(--apx-radius);
	background: var(--apx-light);
	display: none;
	align-items: center;
	justify-content: center;
	color: #7c879b;
	font-size: 15px;
}

.apx-garages__img-wrap--empty.is-active {
	display: flex;
}

/* ---------- Десен панел ---------- */
.apx-garages__panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	width: 100%;
}

.apx-garages__tables {
	width: 100%;
}

/* Бутони за смяна на етажите */
.apx-garages__floors {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
}

.apx-garages__floor {
	appearance: none;
	box-sizing: border-box;
	cursor: pointer;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--apx-blue);
	background: #fff;
	border: 1.5px solid var(--apx-border);
	border-radius: var(--apx-radius);
	padding: 11px 20px;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.apx-garages__floor:hover,
.apx-garages__floor:focus-visible {
	border-color: var(--apx-accent);
	color: var(--apx-btn);
	outline: none;
}

.apx-garages__floor.is-active {
	background: var(--apx-btn);
	border-color: var(--apx-btn);
	color: #fff;
	box-shadow: 0 6px 16px rgba(19, 47, 96, .22);
}

/* Таблица с гаражите */
.apx-garages__table-wrap {
	display: none;
}

.apx-garages__table-wrap.is-active {
	display: block;
}

.apx-garages__table {
	width: 100%;
	border-collapse: collapse;
	border-radius: var(--apx-radius);
	overflow: hidden;
	border: 1px solid var(--apx-border);
	font-size: 15px;
}

.apx-garages__table thead th {
	background: var(--apx-navy);
	color: #fff;
	text-align: left;
	font-weight: 600;
	letter-spacing: .2px;
	padding: 13px 14px;
}

.apx-garages__table thead th:last-child {
	text-align: right;
}

.apx-garages__table tbody td {
	padding: 12px 14px;
	border-top: 1px solid var(--apx-border);
}

.apx-garages__table tbody tr:nth-child(odd) td {
	background: var(--apx-light);
}

.apx-garages__table tbody tr:hover td {
	background: #e9eff7;
}

.apx-garages__price {
	text-align: right;
	font-weight: 700;
	color: var(--apx-blue);
	white-space: nowrap;
}

/* Колона „Площ“ */
.apx-garages__table thead th.apx-garages__area {
	text-align: right;
}

.apx-garages__table tbody td.apx-garages__area {
	text-align: right;
	white-space: nowrap;
	color: #4a5567;
}

.apx-garages__empty {
	margin: 0;
	padding: 16px 18px;
	background: var(--apx-light);
	border: 1px dashed var(--apx-border);
	border-radius: var(--apx-radius);
	color: #7c879b;
	font-size: 15px;
}

/* ---------- Лайтбокс ---------- */
.apx-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(10, 23, 45, .88);
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s ease, visibility .2s ease;
}

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

.apx-lightbox__img {
	max-width: 95vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	border-radius: var(--apx-radius, 8px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
	transform: scale(.96);
	transition: transform .2s ease;
}

.apx-lightbox.is-open .apx-lightbox__img {
	transform: scale(1);
}

.apx-lightbox__close {
	position: absolute;
	top: 18px;
	right: 22px;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease;
}

.apx-lightbox__close:hover,
.apx-lightbox__close:focus-visible {
	background: rgba(255, 255, 255, .28);
	outline: none;
}

/* ---------- Адаптивност ---------- */
@media (max-width: 880px) {
	.apx-garages {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

@media (max-width: 480px) {
	.apx-garages__table {
		font-size: 13.5px;
	}

	.apx-garages__table thead th,
	.apx-garages__table tbody td {
		padding: 10px 10px;
	}
}
