/* Page 7 — Real estate listings archive */

.geocity-re-archive-page {
	background: var(--geocity-white, #fff);
}

.geocity-re-archive__header {
	padding: 3rem 0 2rem;
	text-align: center;
}

.geocity-re-archive__breadcrumb {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
}

.geocity-re-archive__breadcrumb a {
	color: var(--geocity-color-primary, #e30613);
	font-weight: 600;
	text-decoration: none;
}

.geocity-re-archive__breadcrumb a:hover {
	text-decoration: underline;
}

.geocity-re-archive__title {
	margin: 0 0 1.5rem;
	font-family: var(--wp--preset--font-family--playfair, Georgia, serif);
	font-size: clamp(2.5rem, 6vw, 4rem);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.geocity-re-archive__intro {
	max-width: 720px;
	margin: -0.75rem auto 1.5rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--geocity-color-text-muted, #6b6b6b);
}

.geocity-re-archive__intro p:last-child {
	margin-bottom: 0;
}

.geocity-re-archive__toolbar {
	display: flex;
	flex-direction: column;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
	align-items: center;
	max-width: 900px;
	margin: 0 auto 1.25rem;
}

.geocity-re-archive__search {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
	max-width: 640px;
}

.geocity-re-archive__search input[type="search"] {
	flex: 1;
	min-width: 300px;
	padding: 0.85rem 1.25rem;
	border: 1px solid var(--geocity-color-border, #d9d9d9);
	border-radius: 6px;
	font-size: 1rem;
}

.geocity-re-archive__filter-toggle {
	flex: 0 0 auto;
	padding: 0.75rem 1.25rem;
	border: none;
	border-radius: 4px;
	background: var(--geocity-color-primary, #e30613);
	color: var(--geocity-white, #fff);
	font-weight: 600;
	cursor: pointer;
}

.geocity-re-archive__view-toggle {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.geocity-re-archive__view-link {
	display: inline-block;
	padding: 0.5rem 1.5rem;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid var(--geocity-color-border, #d9d9d9);
	color: var(--geocity-color-text, #1a1a1a);
	background: var(--geocity-white, #fff);
}

.geocity-re-archive__view-link.is-active {
	background: var(--geocity-color-primary, #1a4d3e);
	border-color: var(--geocity-color-primary, #1a4d3e);
	color: var(--geocity-white, #fff);
}

.geocity-re-archive__layout {
	display: grid;
	grid-template-columns: minmax(200px, 260px) 1fr;
	gap: 1.5rem;
	align-items: start;
	padding-bottom: 3rem;
}

.geocity-re-archive__filters {
	position: sticky;
	top: 1.5rem;
	padding: 1.25rem;
	border: 1px solid var(--geocity-color-border, #d9d9d9);
	border-radius: 4px;
	background: #fafafa;
}

.geocity-re-archive__filter-field {
	margin-bottom: 1rem;
}

.geocity-re-archive__filter-field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.geocity-re-archive__filter-field select,
.geocity-re-archive__filter-field input {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid var(--geocity-color-border, #d9d9d9);
	border-radius: 4px;
}

.geocity-re-archive__filter-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin: 1rem 0 0;
}

.geocity-re-archive__filter-reset {
	font-size: 0.875rem;
}

.geocity-re-archive__main {
	min-width: 0;
}

.geocity-re-archive__main > .wp-block-query {
	margin: 0;
}

.geocity-real-estate-archive-page--map .geocity-re-archive__grid {
	display: none;
}

.geocity-real-estate-archive-page--map .geocity-re-archive__main .geocity-pagination {
	display: none;
}

/* Archive map view */

.geocity-re-archive-map {
	margin-bottom: 1.5rem;
}

.geocity-re-archive-map--empty {
	padding: 2.5rem;
	text-align: center;
	background: #f3f3f3;
	border-radius: 8px;
	color: var(--geocity-color-text-muted, #6b6b6b);
}

.geocity-re-archive-map__count {
	margin: 0 0 0.75rem;
	font-size: 0.875rem;
	color: var(--geocity-color-text-muted, #6b6b6b);
}

.geocity-re-archive-map__layout {
	display: grid;
	grid-template-columns: minmax(260px, 320px) 1fr;
	gap: 1.25rem;
	align-items: stretch;
	min-height: 480px;
}

.geocity-re-archive-map__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	max-height: 520px;
	overflow-y: auto;
}

.geocity-re-archive-map__list > li {
	margin: 0;
}

.geocity-re-archive-map__item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
	width: 100%;
	padding: 0.85rem 1rem;
	text-align: left;
	background: var(--geocity-color-surface-alt, #f7f7f7);
	border: 1px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.geocity-re-archive-map__item:hover,
.geocity-re-archive-map__item:focus-visible {
	border-color: var(--geocity-color-accent, #e30613);
	outline: none;
}

.geocity-re-archive-map__item.is-active {
	background: #fff;
	border-color: var(--geocity-color-accent, #e30613);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.geocity-re-archive-map__name {
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--geocity-color-text, #1a1a1a);
}

.geocity-re-archive-map__price {
	font-size: 0.875rem;
	font-weight: 700;
	color: #9a7b1a;
}

.geocity-re-archive-map__address {
	font-size: 0.8rem;
	line-height: 1.45;
	color: var(--geocity-color-text-muted, #6b6b6b);
}

/* Beat geocity-map.css height:100% / min-height:inherit (loads later). */
.geocity-re-archive-map__map.geocity-map__canvas {
	position: relative;
	z-index: 0;
	width: 100%;
	min-height: 480px;
	height: 480px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--geocity-color-surface-alt, #e8e8e8);
}

.geocity-re-archive-map__map.geocity-map__canvas.leaflet-container {
	min-height: 480px;
	height: 480px;
}

.geocity-re-archive__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.geocity-re-archive__grid > li {
	display: contents;
	margin: 0;
	padding: 0;
	list-style: none;
}

.geocity-re-archive__main .wp-block-post-template {
	margin: 0;
}

/* Listing card */

.geocity-re-listing-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0;
	min-width: 0;
}

.geocity-re-listing-card__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-height: 100%;
	text-decoration: none;
	color: inherit;
	background: var(--geocity-white, #fff);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.geocity-re-listing-card__media {
	position: relative;
	flex-shrink: 0;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.geocity-re-listing-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.geocity-re-listing-card__image--placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
}

.geocity-re-listing-card__partner-logo {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	z-index: 1;
	max-width: 72px;
	max-height: 36px;
	padding: 0.25rem 0.5rem;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 4px;
	object-fit: contain;
}

.geocity-re-listing-card__price {
	flex-shrink: 0;
	margin: 0;
	padding: 0.5rem;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	color: #c9a227;
	background: var(--geocity-white, #fff);
}

.geocity-re-listing-card__footer {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 0.5rem 3rem 0.5rem .5rem;
	background: #1a4d3e;
	color: var(--geocity-white, #fff);
}

.geocity-re-listing-card__address {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.3;
}

.geocity-re-listing-card__city {
	margin: 0.25rem 0 auto;
	font-size: 0.75rem;
	opacity: 0.9;
	text-transform: uppercase;
}

.geocity-re-listing-card__specs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.75rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.75rem;
}

.geocity-re-listing-card__arrow {
	position: absolute;
	right: 0.75rem;
	bottom: 0.75rem;
	width: 2rem;
	height: 2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--geocity-color-primary, #e30613);
	color: var(--geocity-white, #fff);
	font-size: 1rem;
	line-height: 1;
}

/* Partners strip */

.geocity-re-partners {
	padding: 2.5rem 0 3rem;
	background: #f3f3f3;
}

.geocity-re-partners__title {
	margin: 0 0 1.25rem;
	text-align: center;
	font-size: 1.25rem;
	font-weight: 700;
}

.geocity-re-partners__logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 2rem;
}

.geocity-re-partners__logo img {
	max-height: 48px;
	width: auto;
	object-fit: contain;
	filter: grayscale(20%);
}

.geocity-re-partners__placeholder {
	text-align: center;
	color: var(--geocity-color-muted, #6b6b6b);
	font-size: 0.9375rem;
}

@media (max-width: 1100px) {
	.geocity-re-archive__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.geocity-re-archive-map__layout {
		grid-template-columns: 1fr;
	}

	.geocity-re-archive-map__map.geocity-map__canvas,
	.geocity-re-archive-map__map.geocity-map__canvas.leaflet-container {
		min-height: 360px;
		height: 360px;
	}

	.geocity-re-archive__layout {
		grid-template-columns: 1fr;
	}

	.geocity-re-archive__filters {
		display: none;
		position: static;
	}

	.geocity-re-archive__filters.is-open {
		display: block;
	}

	.geocity-re-archive__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.geocity-re-archive__grid {
		grid-template-columns: 1fr;
	}
}
