.property-gallery-grid {
	position: relative;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(2, 1fr);
	gap: 8px;
	height: min(480px, 60vh);
	border-radius: 12px;
	overflow: hidden;
}
.gallery-grid-cell {
	display: block;
	overflow: hidden;
	background: #f2f2f2;
}
.gallery-grid-cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .25s ease;
}
.gallery-grid-cell:hover img {
	transform: scale(1.03);
}
.gallery-grid-hero {
	grid-column: 1 / 3;
	grid-row: 1 / 3;
}

/* Fewer than 5 photos: the hero still spans the left half; grid-auto-flow
   places whatever thumbnails exist into the remaining cells naturally. */
.property-gallery-grid.gallery-count-1 .gallery-grid-hero {
	grid-column: 1 / 5;
	grid-row: 1 / 3;
}

.gallery-view-all-btn {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fff;
	color: #222;
	border: 1px solid #222;
	border-radius: 8px;
	padding: 8px 14px;
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.gallery-view-all-btn:hover {
	background: #e2ba09;
	border-color: #e2ba09;
	color: #000;
}

@media (max-width: 782px) {
	.property-gallery-grid {
		grid-template-columns: 1fr;
		grid-template-rows: 1fr;
		height: min(320px, 45vh);
	}
	.gallery-grid-hero {
		grid-column: 1 / 2 !important;
		grid-row: 1 / 2 !important;
	}
	.gallery-grid-cell:not(.gallery-grid-hero) {
		display: none;
	}
}
