/* Realtor Listings — inherits site fonts (set on body/headings by the active theme) and pulls colors from the theme's global color palette where available, with sane fallbacks. */
.rl-wrap,
.rl-single-wrap,
.rl-archive-wrap,
.rl-modal {
	--rl-accent: var(--ast-global-color-0, #f08c1a);
	--rl-navy: var(--ast-global-color-1, #033d62);
	--rl-ink: var(--ast-global-color-2, #0c2338);
	--rl-text: var(--ast-global-color-3, #4b4f58);
	--rl-bg-light: var(--ast-global-color-4, #f5f5f5);
	--rl-white: var(--ast-global-color-5, #ffffff);
	--rl-bg-soft: var(--ast-global-color-6, #f2f5f7);
	--rl-radius: 10px;
	--rl-border: rgba(20, 22, 26, 0.10);
	--rl-border-hover: rgba(20, 22, 26, 0.22);
	--rl-shadow: 0 0 0 1px rgba(20, 22, 26, 0.07), 0 2px 8px rgba(20, 22, 26, 0.08);
	--rl-shadow-hover: 0 0 0 1px rgba(20, 22, 26, 0.08), 0 14px 28px rgba(20, 22, 26, 0.16);
	box-sizing: border-box;
}

.rl-wrap *,
.rl-single-wrap *,
.rl-archive-wrap *,
.rl-modal * {
	box-sizing: border-box;
}

.rl-wrap {
	padding: 24px 4px 60px;
	max-width: 100%;
	overflow-x: hidden;
}

/* ---------- Filter bar ---------- */
.rl-filters {
	background: var(--rl-bg-soft);
	border-radius: var(--rl-radius);
	padding: 18px 20px;
	margin-bottom: 28px;
}

.rl-filters-toggle {
	display: none;
	align-items: center;
	gap: 8px;
	width: 100%;
	background: var(--rl-navy);
	border: 1px solid var(--rl-navy);
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #fff;
	cursor: pointer;
}

.rl-filters-toggle .rl-chevron {
	margin-left: auto;
	transition: transform 0.2s ease;
}

.rl-filters.is-open .rl-filters-toggle .rl-chevron {
	transform: rotate(180deg);
}

.rl-filters-panel {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 20px;
	align-items: end;
}

.rl-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 170px;
	min-width: 150px;
}

.rl-field label {
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rl-text);
}

.rl-field input,
.rl-field select {
	width: 100%;
	padding: 10px 12px;
	border-radius: 6px;
	background: var(--rl-white);
	color: var(--rl-ink);
	font-size: 14.5px;
	line-height: 1.3;
}

.rl-field select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%234b4f58' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

.rl-field input:focus,
.rl-field select:focus {
	outline: none;
	border-color: var(--rl-accent);
	box-shadow: 0 0 0 3px rgba(240, 140, 26, 0.18);
}

.rl-field-actions {
	flex: 0 1 auto;
	flex-direction: row;
	gap: 10px;
}

/* ---------- Buttons ---------- */
.rl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 7px;
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.rl-btn-primary,
.rl-btn-primary:hover,
.rl-btn-primary:focus,
.rl-btn-primary:visited {
	background: var(--rl-accent);
	color: #fff;
}

.rl-btn-primary:hover {
	filter: brightness(0.93);
}

.rl-btn-ghost,
.rl-btn-ghost:hover,
.rl-btn-ghost:focus,
.rl-btn-ghost:visited {
	background: transparent;
	color: var(--rl-navy);
}

.rl-btn-ghost {
	border-color: var(--rl-navy);
}

.rl-btn-ghost:hover {
	background: var(--rl-bg-light);
}

.rl-btn-view,
.rl-btn-view:hover,
.rl-btn-view:focus,
.rl-btn-view:visited {
	background: var(--rl-accent);
	color: #fff;
}

.rl-btn-view {
	width: 100%;
	margin-top: 14px;
}

.rl-btn-view:hover {
	filter: brightness(0.93);
}

/* ---------- Grid + Cards ---------- */
.rl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 26px;
}

.rl-empty {
	padding: 40px 20px;
	text-align: center;
	color: var(--rl-text);
	background: var(--rl-bg-soft);
	border-radius: var(--rl-radius);
}

.rl-results {
	position: relative;
	min-height: 80px;
}

.rl-results.is-loading {
	opacity: 0.45;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.rl-results.is-loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 36px;
	height: 36px;
	margin: -18px 0 0 -18px;
	border: 3px solid var(--rl-bg-light);
	border-top-color: var(--rl-accent);
	border-radius: 50%;
	animation: rl-spin 0.7s linear infinite;
}

@keyframes rl-spin {
	to {
		transform: rotate(360deg);
	}
}

.rl-card {
	display: flex;
	flex-direction: column;
	background: var(--rl-white);
	border-radius: var(--rl-radius);
	overflow: hidden;
	border: 1px solid var(--rl-border);
	box-shadow: none;
	transition: transform 0.2s ease, border-color 0.2s ease;
}

.rl-card:hover {
	transform: translateY(-4px);
	border-color: var(--rl-border-hover);
	box-shadow: none;
}

.rl-card-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--rl-bg-light);
}

.rl-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.rl-card:hover .rl-card-media img {
	transform: scale(1.07);
}

.rl-card-media-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--rl-bg-light), var(--rl-bg-soft));
}

.rl-badge-price {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: var(--rl-accent);
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	padding: 6px 12px;
	border-radius: 6px;
	letter-spacing: 0.01em;
}

.rl-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 18px 18px 20px;
}

.rl-card-title {
	margin: 0 0 6px;
	font-size: 19px;
	line-height: 1.3;
}

.rl-card-title a {
	color: var(--rl-ink);
	text-decoration: none;
}

.rl-card-title a:hover {
	color: var(--rl-accent);
}

.rl-card-location {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	font-size: 13.5px;
	color: var(--rl-text);
}

.rl-card-location svg {
	flex-shrink: 0;
	color: var(--rl-accent);
}

.rl-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.rl-tag {
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	padding: 4px 9px;
	border-radius: 100px;
	background: var(--rl-bg-soft);
	color: var(--rl-navy);
}

.rl-tag-region {
	background: rgba(240, 140, 26, 0.12);
	color: var(--rl-accent);
}

/* Excerpt with fade-to-card mask + expand/collapse */
.rl-excerpt {
	font-size: 14px;
	line-height: 1.55;
	color: var(--rl-text);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- Modal ---------- */
.rl-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
}

.rl-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}

.rl-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(12, 35, 56, 0.55);
}

.rl-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	margin: auto;
	background: var(--rl-white);
	border-radius: var(--rl-radius);
	padding: 30px 26px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.rl-modal-dialog h2 {
	margin: 0 0 10px;
	font-size: 21px;
	color: var(--rl-ink);
}

.rl-modal-dialog p {
	margin: 0 0 20px;
	color: var(--rl-text);
	font-size: 14.5px;
}

.rl-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 32px;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: none;
	background: var(--rl-bg-light);
	font-size: 20px;
	line-height: 1;
	color: var(--rl-text);
	cursor: pointer;
}

.rl-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 10px;
}

.rl-modal-header h2 {
	margin: 0;
}

.rl-modal-header .rl-modal-close {
	position: static;
	flex-shrink: 0;
}

.rl-modal-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rl-modal-action {
	width: 100%;
}

/* ---------- Lightbox ---------- */
.rl-lightbox .rl-modal-overlay {
	background: rgba(5, 8, 12, 0.92);
}

.rl-lightbox-dialog {
	position: relative;
	max-width: 92vw;
	max-height: 88vh;
	margin: auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rl-lightbox-dialog img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 6px;
	display: block;
}

.rl-lightbox .rl-modal-close {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
}

.rl-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rl-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.3);
}

.rl-lightbox-prev {
	left: 16px;
}

.rl-lightbox-next {
	right: 16px;
}

.rl-gallery-main {
	cursor: zoom-in;
}

/* ---------- Related properties ---------- */
.rl-related {
	margin-top: 50px;
	padding-top: 30px;
}

.rl-related h2 {
	margin: 0 0 18px;
	font-size: 21px;
	color: var(--rl-ink);
}

/* ---------- Single listing page ---------- */
.rl-single-wrap {
	max-width: 1140px;
	margin: 0 auto;
	padding: 30px 20px 60px;
	overflow-x: hidden;
}

.rl-back-link {
	display: inline-block;
	margin-bottom: 18px;
	color: var(--rl-navy);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}

.rl-back-link:hover {
	color: var(--rl-accent);
}

.rl-single-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 36px;
	align-items: start;
}

.rl-gallery-main {
	aspect-ratio: 4 / 3;
	border-radius: var(--rl-radius);
	overflow: hidden;
	background: var(--rl-bg-light);
}

.rl-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rl-gallery-main-placeholder {
	background: linear-gradient(135deg, var(--rl-bg-light), var(--rl-bg-soft));
}

.rl-gallery-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.rl-gallery-thumb {
	width: 76px;
	height: 76px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: none;
}

.rl-gallery-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rl-gallery-thumb.is-active {
	border-color: var(--rl-accent);
}

.rl-gallery-hint {
	margin: 10px 0 0;
	font-size: 12.5px;
	color: var(--rl-text);
}

.rl-single-info {
	position: sticky;
	top: 24px;
	background: var(--rl-bg-soft);
	border-radius: var(--rl-radius);
	padding: 26px;
}

.rl-single-price {
	font-size: 28px;
	font-weight: 700;
	color: var(--rl-accent);
	margin-bottom: 8px;
}

.rl-single-title {
	margin: 0 0 10px;
	font-size: 24px;
	line-height: 1.3;
	color: var(--rl-ink);
}

.rl-single-location {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 14px;
	font-size: 14.5px;
	color: var(--rl-text);
}

.rl-single-location svg {
	flex-shrink: 0;
	color: var(--rl-accent);
}

.rl-single-tags {
	margin-bottom: 20px;
}

.rl-btn-request {
	width: 100%;
}

.rl-single-description {
	margin-top: 44px;
	padding-top: 30px;
}

.rl-single-description h2 {
	margin: 0 0 14px;
	font-size: 21px;
	color: var(--rl-ink);
}

.rl-single-content {
	color: var(--rl-text);
	font-size: 15.5px;
	line-height: 1.7;
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
	.rl-single-grid {
		grid-template-columns: 1fr;
	}

	.rl-single-info {
		position: static;
	}
}

@media (max-width: 768px) {
	.rl-wrap {
		padding-top: 28px;
	}

	.rl-filters-toggle {
		display: flex;
	}

	.rl-filters-panel {
		display: none;
	}

	.rl-filters.is-open .rl-filters-panel {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		margin-top: 14px;
	}

	.rl-field {
		width: 100%;
		flex: 0 0 auto;
	}

	.rl-field-actions {
		flex-direction: row;
		gap: 10px;
	}

	.rl-field-actions .rl-btn {
		flex: 1;
		width: auto;
	}

	.rl-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 18px;
	}
}

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

	.rl-card-title {
		font-size: 18px;
	}

	.rl-modal.is-open {
		padding: 0;
	}

	.rl-modal-dialog {
		margin: 0;
		max-width: 100%;
		min-height: 100%;
		border-radius: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}

	.rl-single-wrap {
		padding: 20px 14px 44px;
	}

	.rl-single-price {
		font-size: 24px;
	}

	.rl-single-title {
		font-size: 21px;
	}

	.rl-gallery-thumb {
		width: 64px;
		height: 64px;
	}

	.rl-lightbox-nav {
		width: 38px;
		height: 38px;
	}

	.rl-lightbox-prev {
		left: 6px;
	}

	.rl-lightbox-next {
		right: 6px;
	}

	.rl-lightbox .rl-modal-close {
		top: 10px;
		right: 10px;
	}
}

/* ---------- Taxonomy archives (Property Type / Region) ---------- */
.rl-archive-wrap {
	max-width: 1400px;
	margin: 0 auto;
	padding: 56px clamp(16px, 4vw, 48px) 80px;
}
.rl-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 13.5px;
	color: var(--rl-text);
	margin: 0 0 18px;
}
.rl-breadcrumb a { color: var(--rl-navy); text-decoration: none; }
.rl-breadcrumb a:hover { text-decoration: underline; }
.rl-breadcrumb .rl-sep { opacity: 0.45; }
.rl-breadcrumb .rl-crumb-current { color: var(--rl-ink); font-weight: 600; }

.rl-archive-head { margin: 0 0 34px; }
.rl-archive-kicker {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 12px;
	font-weight: 700;
	color: var(--rl-accent);
	margin: 0 0 6px;
}
.rl-archive-title {
	font-size: clamp(28px, 3.6vw, 40px);
	line-height: 1.1;
	color: var(--rl-ink);
	margin: 0 0 10px;
}
.rl-archive-desc { max-width: 70ch; color: var(--rl-text); margin: 0 0 8px; }
.rl-archive-count { color: var(--rl-text); font-size: 15px; margin: 0; }

/* clickable category / region tags on cards */
a.rl-tag { text-decoration: none; transition: filter 0.15s ease, background 0.15s ease; }
a.rl-tag:hover { filter: brightness(0.96); text-decoration: none; }

.rl-pagination { margin-top: 40px; }
.rl-pagination ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rl-pagination a,
.rl-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 8px;
	background: var(--rl-bg-soft);
	color: var(--rl-navy);
	text-decoration: none;
	font-weight: 600;
}
.rl-pagination .current { background: var(--rl-navy); color: #fff; }

.rl-archive-back { display: inline-block; margin-top: 36px; }

@media (max-width: 768px) {
	.rl-archive-wrap { padding: 34px 18px 56px; }
}
