.ac-property-gallery {
	position: relative;
}

.ac-property-gallery__hero {
	position: relative;
	width: 100%;
	max-height: 680px;
	padding: 0;
	overflow: hidden;
	border: 0;
	background: #dcecf2;
	box-shadow: 0 22px 55px rgba(11, 51, 72, 0.1);
	cursor: zoom-in;
}

.ac-property-gallery__hero .ac-property-detail__media {
	display: block;
	width: 100%;
	height: min(62vw, 680px);
	min-height: 430px;
	object-fit: cover;
	transition: transform 0.45s ease, filter 0.45s ease;
}

.ac-property-gallery__hero::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 62%, rgba(4, 20, 28, 0.42));
	content: "";
	pointer-events: none;
}

.ac-property-gallery__hero:hover .ac-property-detail__media {
	filter: saturate(1.03);
	transform: scale(1.012);
}

.ac-property-gallery__hero:focus-visible {
	outline: 3px solid #53cbff;
	outline-offset: 4px;
}

.ac-property-gallery__badge {
	position: absolute;
	right: 24px;
	bottom: 22px;
	z-index: 2;
	min-height: 46px;
	padding: 0 18px;
	border: 1px solid rgba(255, 255, 255, 0.72);
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	background: rgba(255, 255, 255, 0.93);
	box-shadow: 0 12px 32px rgba(4, 20, 28, 0.2);
	color: #0b3348;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	backdrop-filter: blur(12px);
}

body.ac-gallery-open {
	overflow: hidden;
}

.ac-property-lightbox[hidden] {
	display: none;
}

.ac-property-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	padding: 18px 26px 22px;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: 15px;
	background: rgba(3, 15, 21, 0.975);
	color: #fff;
}

.ac-property-lightbox__bar {
	min-height: 42px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ac-property-lightbox__bar p {
	margin: 0;
	overflow: hidden;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-size: clamp(21px, 2.2vw, 30px);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ac-property-lightbox__close,
.ac-property-lightbox__nav {
	border: 1px solid rgba(255, 255, 255, 0.26);
	display: inline-grid;
	place-items: center;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.ac-property-lightbox__close:hover,
.ac-property-lightbox__nav:hover,
.ac-property-lightbox__close:focus-visible,
.ac-property-lightbox__nav:focus-visible {
	border-color: rgba(255, 255, 255, 0.82);
	background: rgba(255, 255, 255, 0.18);
	outline: 0;
}

.ac-property-lightbox__close {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	font-family: Arial, sans-serif;
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
}

.ac-property-lightbox__stage {
	min-height: 0;
	display: grid;
	grid-template-columns: 50px minmax(0, 1fr) 50px;
	align-items: center;
	gap: 18px;
}

.ac-property-lightbox__stage figure {
	min-width: 0;
	height: 100%;
	margin: 0;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	place-items: center;
	gap: 10px;
}

.ac-property-lightbox__stage img[data-gallery-image] {
	max-width: 100%;
	max-height: calc(100vh - 196px);
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.34);
}

.ac-property-lightbox__stage figcaption {
	width: 100%;
	display: flex;
	justify-content: center;
	gap: 14px;
	color: rgba(255, 255, 255, 0.72);
	font-size: 11px;
	letter-spacing: 0.06em;
}

.ac-property-lightbox__stage figcaption span:first-child {
	color: #53cbff;
	font-weight: 700;
}

.ac-property-lightbox__nav {
	width: 48px;
	height: 64px;
	font-family: Georgia, serif;
	font-size: 48px;
	font-weight: 300;
	line-height: 1;
}

.ac-property-lightbox__thumbnails {
	min-height: 70px;
	padding: 4px 0 2px;
	overflow-x: auto;
	display: flex;
	justify-content: flex-start;
	gap: 9px;
	scrollbar-color: rgba(255, 255, 255, 0.38) transparent;
}

.ac-property-lightbox__thumbnails button {
	flex: 0 0 92px;
	height: 62px;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	background: #102b38;
	opacity: 0.58;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.ac-property-lightbox__thumbnails button:hover,
.ac-property-lightbox__thumbnails button:focus-visible,
.ac-property-lightbox__thumbnails button[aria-current="true"] {
	border-color: #53cbff;
	opacity: 1;
	outline: 0;
}

.ac-property-lightbox__thumbnails img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 760px) {
	.ac-property-gallery__hero .ac-property-detail__media {
		height: 68vw;
		min-height: 270px;
	}

	.ac-property-gallery__badge {
		right: 14px;
		bottom: 14px;
		min-height: 40px;
		padding-inline: 14px;
		font-size: 9px;
	}

	.ac-property-lightbox {
		padding: 12px 10px 14px;
		gap: 9px;
	}

	.ac-property-lightbox__stage {
		grid-template-columns: 38px minmax(0, 1fr) 38px;
		gap: 5px;
	}

	.ac-property-lightbox__nav {
		width: 36px;
		height: 56px;
		font-size: 42px;
	}

	.ac-property-lightbox__stage img[data-gallery-image] {
		max-height: calc(100vh - 182px);
	}

	.ac-property-lightbox__stage figcaption span:last-child {
		display: none;
	}

	.ac-property-lightbox__thumbnails {
		min-height: 58px;
		gap: 6px;
	}

	.ac-property-lightbox__thumbnails button {
		flex-basis: 72px;
		height: 50px;
	}
}

@media (max-width: 420px) {
	.ac-property-lightbox__bar p {
		font-size: 19px;
	}

	.ac-property-lightbox__stage {
		grid-template-columns: 32px minmax(0, 1fr) 32px;
	}

	.ac-property-lightbox__nav {
		width: 30px;
		border-color: transparent;
		background: transparent;
	}
}
