/* ==========================================================================
   Panama MLS Listings
   Brand palette is defined once here — override these variables in the theme
   to restyle everything without touching plugin files.
   All classes are namespaced .paml-* to avoid collisions with Avada.
   ========================================================================== */

:root {
	--paml-primary: #1f2f60;
	--paml-primary-dark: #16224a;
	--paml-primary-tint: #eef0f7;
	--paml-secondary: #c6b358;
	--paml-secondary-dark: #a89544;
	--paml-text: #2b2b2b;
	--paml-muted: #6e7480;
	--paml-border: #e2e4ea;
	--paml-radius: 6px;
}

.paml-listings { width: 100%; }

/* --- Filters --- */
/* A grid rather than a flex row: fields line up in even columns and the
   price control can span two without dragging the others out of alignment. */
.paml-filters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 16px 18px;
	align-items: end;
	margin-bottom: 24px;
	padding: 20px;
	background: #f7f8fa;
	border: 1px solid var(--paml-border);
	border-radius: var(--paml-radius);
}
.paml-filter { display: flex; flex-direction: column; min-width: 0; }
.paml-filter label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #666;
	margin-bottom: 6px;
}
.paml-filters .paml-filter input[type="text"],
.paml-filters .paml-filter input[type="number"],
.paml-filters .paml-filter select {
	box-sizing: border-box;
	width: 100%;
	height: 42px;
	min-height: 42px;
	max-height: 42px;
	padding: 0 12px;
	margin: 0;
	border: 1px solid var(--paml-border);
	border-radius: var(--paml-radius);
	font-size: 14px;
	line-height: normal;
	background: #fff;
	color: var(--paml-text);
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.paml-filters .paml-filter select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e7480' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}
.paml-filters .paml-filter input:focus,
.paml-filters .paml-filter select:focus {
	outline: none;
	border-color: var(--paml-primary);
	box-shadow: 0 0 0 2px var(--paml-primary-tint);
}
/* The button sits on its own row on wide screens so it never orphans
   a lone field beside it. */
.paml-filter-submit { justify-content: flex-end; }
.paml-filter-submit button {
	height: 42px;
	padding: 0 28px;
	border: 0;
	border-radius: 4px;
	background: var(--paml-primary);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	font-size: 14px;
}
.paml-filter-submit button:hover { background: var(--paml-primary-dark); }

/* --- Results grid --- */
.paml-results {
	display: grid;
	gap: 24px;
	transition: opacity .2s ease;
}
.paml-results.is-loading { opacity: .45; }
.paml-cols-1 { grid-template-columns: 1fr; }
.paml-cols-2 { grid-template-columns: repeat(2, 1fr); }
.paml-cols-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 900px) {
	.paml-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.paml-cols-2,
	.paml-cols-3 { grid-template-columns: 1fr; }
	.paml-filter { flex: 1 1 100%; }
}

/* --- Card --- */
.paml-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0,0,0,.12);
	transition: box-shadow .2s ease, transform .2s ease;
}
.paml-card:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,.16);
	transform: translateY(-3px);
}
.paml-card-media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #ececec;
	overflow: hidden;
}
/* Without this the container computes to zero height wherever aspect-ratio is
   unsupported (Safari before 15), and every card photo renders invisible. */
@supports not (aspect-ratio: 4 / 3) {
	.paml-card-media {
		height: 0;
		padding-bottom: 75%;
	}
	.paml-card-media img,
	.paml-card-media .paml-card-noimage {
		position: absolute;
		inset: 0;
	}
}
.paml-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.paml-card-noimage {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #999;
	font-size: 13px;
}
.paml-tag {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: #fff;
	padding: 5px 11px;
	border-radius: 3px;
	background: var(--paml-primary);
	z-index: 2;
}
.paml-tag-type { background: var(--paml-primary); }

/* Location / photo-count strip across the bottom of the photo */
.paml-card-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
	padding: 26px 12px 10px;
	background: linear-gradient(to top, rgba(10,14,30,.78) 0%, rgba(10,14,30,.35) 55%, rgba(10,14,30,0) 100%);
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
	pointer-events: none;
}
.paml-overlay-location,
.paml-overlay-photos {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.paml-overlay-location { min-width: 0; }
.paml-overlay-location > span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.paml-overlay-photos {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}
.paml-card-overlay .paml-icon { color: var(--paml-secondary); }

.paml-card-body { padding: 16px 16px 18px; }
.paml-card .paml-card-price {
	margin: 0 0 10px;
	font-family: var(--paml-price-font, inherit);
	font-size: var(--paml-price-size, 20px);
	font-weight: var(--paml-price-weight, 700);
	font-style: var(--paml-price-style, normal);
	text-transform: var(--paml-price-transform, none);
	color: var(--paml-price-color, var(--paml-primary));
	line-height: 1.2;
}
/* Selector is intentionally specific: Avada styles h1–h6 globally and would
   otherwise win over a single class, making the configured size ineffective. */
.paml-listings .paml-card .paml-card-title,
.paml-results .paml-card .paml-card-title,
.paml-card .paml-card-title {
	font-family: var(--paml-title-font, inherit);
	font-size: var(--paml-title-size, 16px) !important;
	font-weight: var(--paml-title-weight, 600);
	font-style: var(--paml-title-style, normal);
	text-transform: var(--paml-title-transform, none);
	color: var(--paml-title-color, var(--paml-text));
	margin: 0 0 6px;
	padding: 0;
	line-height: 1.35;
	letter-spacing: normal;
}
.paml-card-location {
	font-family: var(--paml-location-font, inherit);
	font-size: var(--paml-location-size, 14px);
	font-weight: var(--paml-location-weight, 400);
	font-style: var(--paml-location-style, normal);
	text-transform: var(--paml-location-transform, none);
	color: var(--paml-location-color, var(--paml-muted));
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.paml-card-specs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	font-family: var(--paml-specs-font, inherit);
	font-size: var(--paml-specs-size, 14px);
	font-weight: var(--paml-specs-weight, 400);
	font-style: var(--paml-specs-style, normal);
	text-transform: var(--paml-specs-transform, none);
	color: var(--paml-specs-color, var(--paml-text));
	margin: 0 0 10px;
	padding-top: 10px;
	border-top: 1px solid var(--paml-border);
}
.paml-card-specs .paml-spec {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0 12px;
	border-left: 1px solid #000;
	line-height: 1.2;
}
.paml-card-specs .paml-spec:first-child {
	padding-left: 0;
	border-left: 0;
}

/* --- Icons --- */
.paml-icon {
	width: 1.05em;
	height: 1.05em;
	flex: 0 0 auto;
	color: var(--paml-secondary);
	vertical-align: -0.15em;
}
.paml-card-location .paml-icon { color: var(--paml-secondary); }

/* --- Pagination --- */
.paml-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
}

/* Server-rendered pagination sits inside the results grid, so it has to span
   every column rather than occupying a single grid cell. */
.paml-results .paml-pagination-server {
	grid-column: 1 / -1;
	width: 100%;
}
.paml-page {
	padding: 7px 13px;
	border: 1px solid #ccc;
	border-radius: 4px;
	text-decoration: none;
	color: #333;
	font-size: 14px;
	/* Pagination controls are buttons, not links, so that paging creates no
	   crawlable URLs. These resets keep them looking as they did. */
	background: #fff;
	font-family: inherit;
	line-height: 1.4;
	cursor: pointer;
	display: inline-block;
	box-shadow: none;
	text-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}
.paml-page:focus-visible {
	outline: 2px solid var(--paml-primary);
	outline-offset: 2px;
}
.paml-results.is-loading { opacity: .45; transition: opacity .15s ease; }
.paml-page.is-active {
	background: var(--paml-primary);
	color: #fff;
	border-color: var(--paml-primary);
	cursor: default;
	pointer-events: none;
}
.paml-page:hover:not(.is-active):not(.is-disabled) {
	border-color: var(--paml-primary);
	color: var(--paml-primary);
	background: var(--paml-primary-tint);
}
.paml-page.is-disabled {
	opacity: .4;
	cursor: not-allowed;
	pointer-events: none;
}
.paml-page-nav { font-weight: 600; white-space: nowrap; }
.paml-page-gap {
	padding: 7px 2px;
	color: var(--paml-muted);
	user-select: none;
}

@media (max-width: 600px) {
	.paml-pagination { gap: 5px; }
	.paml-page { padding: 6px 10px; font-size: 13px; }
	/* First/Last are redundant on small screens next to Prev/Next. */
	.paml-page-nav:first-child,
	.paml-page-nav:last-child { display: none; }
}
.paml-loadmore {
	padding: 11px 32px;
	border: 1px solid var(--paml-primary);
	background: #fff;
	color: var(--paml-primary);
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
}
.paml-loadmore:hover { background: var(--paml-primary); color: #fff; }

.paml-no-results,
.paml-loading,
.paml-empty {
	grid-column: 1 / -1;
	padding: 48px 20px;
	text-align: center;
	color: #888;
}

/* --- Map --- */
.paml-map-wrapper { margin: 24px 0; }
.paml-mapview {
	width: 100%;
	max-width: 100%;
	border-radius: var(--paml-radius);
	overflow: hidden;
	/* Height is set inline by the shortcode; these keep it sane on phones
	   where a tall fixed height would swallow the whole screen. */
	max-height: 80vh;
}
@media (max-width: 780px) {
	.paml-mapview { max-height: 70vh; }
	.paml-map-wrapper { margin: 18px 0; }
}
@media (max-width: 480px) {
	.paml-mapview { max-height: 60vh; }
}
/* Popups are cramped by default on small screens. */
.paml-mapview .leaflet-popup-content { margin: 12px 14px; min-width: 150px; }
.paml-pin-link { text-decoration: none; }

/* Fill mode: stretch to the parent column/container. */
.paml-map-wrapper.paml-map-fill {
	height: 100%;
	min-height: inherit;
	margin: 0;
	display: flex;
}
.paml-map-wrapper.paml-map-fill .paml-mapview { flex: 1 1 auto; border-radius: 0; }
.paml-pin-info { font-size: 13px; line-height: 1.5; }
.paml-pin-info .paml-pin-price { font-weight: 700; color: var(--paml-primary); }

/* ==========================================================================
   Listing view
   ========================================================================== */

.paml-listing-view {
	max-width: 1200px;
	margin: 0 auto;
	background: #fff;
	padding-top: var(--paml-listing-pad-top, 50px);
	padding-bottom: var(--paml-listing-pad-bottom, 50px);
}
.paml-lv-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 20px;
	flex-wrap: wrap;
	padding: 0 0 20px;
	border-bottom: 1px solid #eee;
	margin-bottom: 24px;
}
.paml-lv-title {
	margin: 0 0 6px;
	font-family: var(--paml-title-font, inherit);
	font-size: calc(var(--paml-title-size, 18px) * 1.5);
	font-weight: var(--paml-title-weight, 600);
	font-style: var(--paml-title-style, normal);
	text-transform: var(--paml-title-transform, none);
	color: var(--paml-title-color, var(--paml-text));
	line-height: 1.25;
}
.paml-lv-location {
	font-family: var(--paml-location-font, inherit);
	font-size: var(--paml-location-size, 14px);
	font-weight: var(--paml-location-weight, 400);
	font-style: var(--paml-location-style, normal);
	text-transform: var(--paml-location-transform, none);
	color: var(--paml-location-color, var(--paml-muted));
	display: flex;
	align-items: center;
	gap: 6px;
}
.paml-lv-actions { display: flex; align-items: center; gap: 14px; }
.paml-lv-price {
	font-family: var(--paml-price-font, inherit);
	font-size: calc(var(--paml-price-size, 22px) * 1.2);
	font-weight: var(--paml-price-weight, 700);
	font-style: var(--paml-price-style, normal);
	text-transform: var(--paml-price-transform, none);
	color: var(--paml-price-color, var(--paml-primary));
}
.paml-share-btn {
	padding: 8px 18px;
	border: 1px solid var(--paml-primary);
	background: #fff;
	color: var(--paml-primary);
	border-radius: 4px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
}
.paml-share-btn:hover { background: var(--paml-primary); color: #fff; }
.paml-close-btn {
	width: 38px;
	height: 38px;
	border: 1px solid #ddd;
	background: #fff;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}
.paml-close-btn:hover { background: #f2f2f2; color: #000; }

.paml-lv-body { display: flex; gap: 28px; align-items: flex-start; }
.paml-lv-nav {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 0 0 160px;
	position: sticky;
	top: 20px;
}
.paml-lv-tab {
	text-align: left;
	padding: 12px 16px;
	border: 0;
	border-left: 3px solid transparent;
	background: transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: #666;
	border-radius: 0 4px 4px 0;
}
.paml-lv-tab:hover { background: #f6f6f6; color: #222; }
.paml-lv-tab.is-active {
	border-left-color: var(--paml-primary);
	background: var(--paml-primary-tint);
	color: var(--paml-primary);
}
.paml-lv-panels { flex: 1 1 auto; min-width: 0; }
.paml-lv-panel { display: none; }
.paml-lv-panel.is-active { display: block; }

@media (max-width: 780px) {
	.paml-lv-body { flex-direction: column; }
	.paml-lv-nav {
		flex-direction: row;
		width: 100%;
		position: static;
		border-bottom: 1px solid #eee;
	}
	.paml-lv-tab {
		flex: 1;
		text-align: center;
		border-left: 0;
		border-bottom: 3px solid transparent;
		border-radius: 0;
	}
	.paml-lv-tab.is-active { border-left: 0; border-bottom-color: var(--paml-primary); }
	.paml-lv-header { flex-direction: column; }
}

/* --- Gallery --- */
/* ==========================================================================
   Gallery
   A single layout at every screen size: a main stage with arrows, a photo
   counter and an expand control, above a thumbnail strip that scrolls
   horizontally when space runs out. Sizes fluidly rather than switching
   between two different components at a breakpoint.
   ========================================================================== */

.paml-gal {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.paml-gal-viewport {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	background: #0e1016;
	border-radius: var(--paml-radius);
	overflow: hidden;
	aspect-ratio: 3 / 2;
}
/* Without a fallback the stage computes to zero height wherever aspect-ratio
   is unsupported, and every photo renders invisible. */
@supports not (aspect-ratio: 3 / 2) {
	.paml-gal-viewport { height: 0; padding-bottom: 66.66%; }
}

.paml-gal-track {
	position: absolute;
	inset: 0;
}

.paml-gal-slide {
	position: absolute;
	inset: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}
.paml-gal-slide.is-active {
	opacity: 1;
	visibility: visible;
}
.paml-gal-slide img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* --- Controls --- */
.paml-gal-prev,
.paml-gal-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	color: #fff;
	cursor: pointer;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.paml-gal-prev svg,
.paml-gal-next svg { width: 22px; height: 22px; }
.paml-gal-prev { left: 12px; }
.paml-gal-next { right: 12px; }
.paml-gal-prev:hover,
.paml-gal-next:hover { background: rgba(0,0,0,.75); }

.paml-gal-counter {
	position: absolute;
	bottom: 12px;
	left: 12px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 0;
	border-radius: 20px;
	background: rgba(0,0,0,.55);
	color: #fff;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	z-index: 3;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.paml-gal-counter svg { width: 15px; height: 15px; }
.paml-gal-counter:hover { background: rgba(0,0,0,.8); }

.paml-gal-expand {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,.45);
	color: #fff;
	cursor: pointer;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.paml-gal-expand svg { width: 18px; height: 18px; }
.paml-gal-expand:hover { background: rgba(0,0,0,.8); }

/* --- Thumbnails --- */
.paml-gal-thumbs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	overflow-y: hidden;
	padding: 12px 2px 4px;
	scroll-snap-type: x proximity;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.paml-gal-thumbs::-webkit-scrollbar { height: 6px; }
.paml-gal-thumbs::-webkit-scrollbar-thumb {
	background: var(--paml-border);
	border-radius: 3px;
}

.paml-gal-thumb {
	flex: 0 0 auto;
	width: 96px;
	height: 70px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	background: #eee;
	cursor: pointer;
	opacity: .55;
	scroll-snap-align: start;
	transition: opacity .2s ease, border-color .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.paml-gal-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.paml-gal-thumb:hover { opacity: .85; }
.paml-gal-thumb.is-active {
	opacity: 1;
	border-color: var(--paml-primary);
}

/* Fluid sizing rather than a layout swap. */
@media (max-width: 900px) {
	.paml-gal-viewport { aspect-ratio: 4 / 3; }
	@supports not (aspect-ratio: 4 / 3) {
		.paml-gal-viewport { padding-bottom: 75%; }
	}
	.paml-gal-thumb { width: 84px; height: 62px; }
}

@media (max-width: 600px) {
	.paml-gal-prev,
	.paml-gal-next { width: 40px; height: 40px; }
	.paml-gal-prev { left: 8px; }
	.paml-gal-next { right: 8px; }
	.paml-gal-counter { bottom: 8px; left: 8px; font-size: 11px; padding: 5px 10px; }
	.paml-gal-expand { top: 8px; right: 8px; width: 36px; height: 36px; }
	.paml-gal-thumbs { gap: 6px; padding: 10px 2px 4px; }
	.paml-gal-thumb { width: 68px; height: 52px; }
}

/* --- Fullscreen photo viewer ------------------------------------------- */
.paml-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 200000;
	background: rgba(0,0,0,.96);
	display: none;
	flex-direction: column;
}
.paml-fullscreen.is-open { display: flex; }
body.paml-fullscreen-open { overflow: hidden; }

.paml-fs-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	color: #fff;
	font-size: 14px;
	flex: 0 0 auto;
}
.paml-fs-counter { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.paml-fs-close {
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.14);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.paml-fs-close:hover { background: rgba(255,255,255,.28); }

.paml-fs-stage {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	padding: 0 16px 24px;
}
.paml-fs-image {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}
.paml-fs-prev,
.paml-fs-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.14);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.paml-fs-prev svg,
.paml-fs-next svg { width: 24px; height: 24px; }
.paml-fs-prev { left: 16px; }
.paml-fs-next { right: 16px; }
.paml-fs-prev:hover,
.paml-fs-next:hover { background: rgba(255,255,255,.3); }

@media (max-width: 600px) {
	.paml-fs-stage { padding: 0 8px 16px; }
	.paml-fs-prev,
	.paml-fs-next { width: 42px; height: 42px; }
	.paml-fs-prev { left: 6px; }
	.paml-fs-next { right: 6px; }
}

/* --- Details --- */
/* --- Key facts: the headline numbers, given visual weight --- */
.paml-key-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 1px;
	background: var(--paml-border);
	border: 1px solid var(--paml-border);
	border-radius: var(--paml-radius);
	overflow: hidden;
	margin: 0 0 28px;
}
.paml-key-fact {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 4px;
	padding: 20px 12px;
	background: #fff;
}
.paml-key-fact-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin-bottom: 4px;
	border-radius: 50%;
	background: var(--paml-primary-tint);
	color: var(--paml-primary);
}
.paml-key-fact-icon .paml-icon { width: 19px; height: 19px; color: var(--paml-primary); }
.paml-key-fact-value {
	font-family: var(--paml-specs-font, inherit);
	font-size: 20px;
	font-weight: 700;
	color: var(--paml-primary);
	line-height: 1.15;
}
.paml-key-fact-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--paml-muted);
}

/* --- Secondary detail grid --- */
.paml-details-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 2px;
	background: var(--paml-border);
	border: 1px solid var(--paml-border);
	border-radius: var(--paml-radius);
	overflow: hidden;
	margin: 0 0 32px;
}
.paml-detail {
	background: #fff;
	padding: 14px 16px;
}
.paml-detail dt {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--paml-muted);
	margin-bottom: 6px;
}
.paml-detail dt .paml-icon {
	width: 15px;
	height: 15px;
	color: var(--paml-secondary);
}
.paml-detail dd {
	margin: 0;
	font-family: var(--paml-specs-font, inherit);
	font-size: 16px;
	font-weight: 600;
	color: var(--paml-text);
	line-height: 1.35;
	word-break: break-word;
}

@media (max-width: 600px) {
	.paml-key-facts { grid-template-columns: repeat(2, 1fr); }
	.paml-details-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Detail blocks need clear separation — run together they read as one
   undifferentiated column of text. */
.paml-details-grid { margin-bottom: 34px; }
.paml-key-facts { margin-bottom: 30px; }

.paml-description {
	margin-top: 34px;
	margin-bottom: 34px;
	padding-top: 26px;
	border-top: 1px solid var(--paml-border);
}
.paml-video {
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid var(--paml-border);
}
/* No rule above the first block in the panel. */
.paml-lv-panel > .paml-description:first-child,
.paml-lv-panel > .paml-video:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}
.paml-description h3,
.paml-video h3 {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--paml-primary);
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--paml-secondary);
	display: inline-block;
}
.paml-description p { line-height: 1.7; color: var(--paml-text); margin: 0; font-size: 15px; }

.paml-video-embed {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	border-radius: 8px;
	overflow: hidden;
}
.paml-video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* --- Single map --- */
.paml-single-map { width: 100%; border-radius: 8px; overflow: hidden; }
.paml-map-note { font-size: 13px; color: #888; margin-top: 10px; font-style: italic; }

/* --- Share toast --- */
.paml-share-toast {
	position: fixed;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%) translateY(20px);
	background: #222;
	color: #fff;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 14px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease, transform .25s ease;
	z-index: 9999;
}
.paml-share-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }


/* ==========================================================================
   Modal
   ========================================================================== */

body.paml-modal-open { overflow: hidden; }

.paml-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}
.paml-modal.is-open { display: block; }

.paml-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 20, 40, .72);
	backdrop-filter: blur(2px);
}
.paml-modal-inner {
	position: relative;
	max-width: 1180px;
	margin: 3vh auto;
	max-height: 94vh;
	background: #fff;
	border-radius: 10px;
	overflow: auto;
	box-shadow: 0 24px 70px rgba(0,0,0,.4);
}
/* Horizontal padding only — vertical spacing comes from .paml-listing-view so
   the two don't compound into an oversized gap. */
.paml-modal-content { padding: 0 30px; }

@media (max-width: 820px) {
	.paml-modal-inner {
		margin: 0;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
		min-height: 100vh;
		-webkit-overflow-scrolling: touch;
	}
	.paml-modal-content { padding: 0 16px; }
	.paml-modal-inner,
	.paml-modal-content { max-width: 100%; overflow-x: hidden; }
}

.paml-modal-spinner {
	width: 42px;
	height: 42px;
	margin: 80px auto;
	border: 3px solid var(--paml-border);
	border-top-color: var(--paml-primary);
	border-radius: 50%;
	animation: paml-spin .8s linear infinite;
}
@keyframes paml-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Avada compatibility
   Avada styles generic elements aggressively; these keep plugin markup intact.
   ========================================================================== */

.paml-card,
.paml-card:hover,
.paml-card:focus { text-decoration: none !important; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.paml-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.16); }

.paml-details-grid,
.paml-details-grid dt,
.paml-details-grid dd { margin: 0; }

.paml-filters select,
.paml-filters input[type="text"],
.paml-filters input[type="number"] {
	height: auto;
	min-height: 0;
	margin: 0;
}

.paml-lv-tab,
.paml-share-btn,
.paml-close-btn,
.paml-loadmore,
.paml-filter-submit button {
	box-shadow: none;
	text-shadow: none;
	line-height: 1.3;
}

.paml-listing-view img,
.paml-card img { max-width: 100%; height: auto; }

/* Field shortcodes */
.paml-f-title { margin-top: 0; }
.paml-f-price { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.paml-f-price-sale { font-size: 28px; font-weight: 700; color: var(--paml-primary); }
.paml-f-price-rent { font-size: 20px; font-weight: 600; color: var(--paml-secondary-dark); }
.paml-f-location { color: var(--paml-muted); font-size: 15px; }
.paml-f-mls { font-size: 13px; color: var(--paml-muted); letter-spacing: .03em; }
.paml-standalone-map { border-radius: var(--paml-radius); overflow: hidden; }

.paml-details-grid.paml-cols-1 { grid-template-columns: 1fr; }
.paml-details-grid.paml-cols-2 { grid-template-columns: repeat(2, 1fr); }
.paml-details-grid.paml-cols-3 { grid-template-columns: repeat(3, 1fr); }
.paml-details-grid.paml-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) {
	.paml-details-grid.paml-cols-2,
	.paml-details-grid.paml-cols-3,
	.paml-details-grid.paml-cols-4 { grid-template-columns: repeat(2, 1fr); }
}


/* Inline/single-view back button matches the modal close button */
.paml-back-btn {
	width: 38px;
	height: 38px;
	border: 1px solid var(--paml-border);
	background: #fff;
	border-radius: 50%;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--paml-muted);
}
.paml-back-btn:hover { background: #f2f2f2; color: #000; }

/* Detail values pick up the specs typography */
.paml-detail dd {
	font-family: var(--paml-specs-font, inherit);
	font-weight: var(--paml-specs-weight, 400);
	color: var(--paml-specs-color, var(--paml-text));
}


/* --- Contact tab -------------------------------------------------------- */
/* The staging container for the contact form. Deliberately offscreen rather
   than display:none — some form scripts (recaptcha, date pickers) fail to
   initialise inside a display:none element. */
.paml-contact-template {
	position: absolute;
	left: -9999px;
	top: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
	pointer-events: none;
}

.paml-contact-panel { max-width: 640px; }
.paml-contact-warning {
	padding: 14px 16px;
	border-left: 3px solid #b32d2e;
	background: #fdf3f3;
	color: #7a2320;
	font-size: 14px;
	margin: 0;
}
.paml-contact-panel input[type="text"],
.paml-contact-panel input[type="email"],
.paml-contact-panel input[type="tel"],
.paml-contact-panel textarea,
.paml-contact-panel select {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}
.paml-contact-panel textarea { min-height: 130px; }


/* ==========================================================================
   Mobile listing view
   Laid out for a phone rather than scaled down from the desktop view.
   ========================================================================== */
@media (max-width: 780px) {
	/* Tabs become a full-width, horizontally scrollable strip. */
	.paml-lv-nav {
		gap: 0;
		overflow-x: auto;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		margin-bottom: 16px;
	}
	.paml-lv-nav::-webkit-scrollbar { display: none; }
	.paml-lv-tab {
		flex: 1 0 auto;
		min-width: 84px;
		padding: 12px 14px;
		font-size: 13px;
	}

	/* Header stacks: title, location, then price and actions on one row. */
	.paml-lv-header {
		gap: 12px;
		padding-bottom: 16px;
		margin-bottom: 18px;
	}
	.paml-lv-heading { width: 100%; }
	.paml-lv-title { font-size: calc(var(--paml-title-size, 18px) * 1.2); }
	.paml-lv-actions {
		width: 100%;
		justify-content: space-between;
		gap: 10px;
	}
	.paml-lv-price { font-size: calc(var(--paml-price-size, 22px) * 1.05); }
	.paml-share-btn { padding: 9px 16px; font-size: 13px; }

	/* Key facts read better two-up than squeezed into four columns. */
	.paml-key-facts { grid-template-columns: repeat(2, 1fr); }
	.paml-key-fact { padding: 16px 10px; }
	.paml-key-fact-value { font-size: 18px; }

	.paml-details-grid { grid-template-columns: 1fr; }
	.paml-detail { padding: 12px 14px; }

	.paml-description p { font-size: 15px; }
	.paml-single-map {
		height: 320px !important;
		min-height: 320px;
		width: 100%;
	}
}


/* --- Listing view spacing ---------------------------------------------- */
@media (max-width: 780px) {
	.paml-listing-view {
		--paml-listing-pad-top: 50px;
		--paml-listing-pad-bottom: 150px;
	}
}


/* --- Overflow containment ---------------------------------------------- */
/* The gallery is a horizontal scroller; without this the page itself gains a
   sideways scrollbar on narrow screens. */
.paml-listing-view,
.paml-lv-panels,
.paml-lv-panel {
	max-width: 100%;
	min-width: 0;
}
@media (max-width: 780px) {
	.paml-listing-view { overflow-x: hidden; }
	.paml-listing-view img,
	.paml-listing-view iframe { max-width: 100%; }
}

/* --- Price range slider ------------------------------------------------- */
.paml-filter-price { grid-column: span 2; min-width: 240px; }

@media (max-width: 620px) {
	.paml-filter-price { grid-column: span 1; }
}

.paml-price-readout {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--paml-primary);
	font-variant-numeric: tabular-nums;
	margin-bottom: 2px;
	min-height: 18px;
}

.paml-price-slider {
	position: relative;
	height: 34px;
	display: flex;
	align-items: center;
}

.paml-price-track,
.paml-price-fill {
	position: absolute;
	height: 4px;
	border-radius: 2px;
	pointer-events: none;
}
.paml-price-track {
	left: 0;
	right: 0;
	background: #d8dbe2;
}
.paml-price-fill { background: var(--paml-primary); }

/* Both inputs are stacked and transparent; only their thumbs are visible,
   which is what produces a two-handle control from native elements. */
.paml-price-range {
	position: absolute;
	left: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
	height: 34px;
}
.paml-price-range:focus { outline: none; }

.paml-price-range::-webkit-slider-runnable-track {
	background: transparent;
	border: 0;
	height: 34px;
}
.paml-price-range::-moz-range-track {
	background: transparent;
	border: 0;
	height: 34px;
}

.paml-price-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--paml-primary);
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	cursor: grab;
	margin-top: 8px;
}
.paml-price-range::-moz-range-thumb {
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--paml-primary);
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	cursor: grab;
}
.paml-price-range:active::-webkit-slider-thumb { cursor: grabbing; }
.paml-price-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--paml-primary-tint); }
.paml-price-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--paml-primary-tint); }

/* Without JS the two handles overlap; still usable, just not styled as a pair. */
.paml-price-range-max { z-index: 2; }

/* --- Linked locations --------------------------------------------------- */
.paml-location-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--paml-secondary);
	transition: color .15s ease;
}
.paml-location-link:hover {
	color: var(--paml-primary);
	text-decoration-color: var(--paml-primary);
}

/* Category link inside the details grid */
.paml-type-link {
	color: var(--paml-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--paml-secondary);
	transition: text-decoration-color .15s ease;
}
.paml-type-link:hover { text-decoration-color: var(--paml-primary); }


/* The [mls_details] shortcode shares the detail grid, so it inherits the same
   separation when placed above a description block. */
.paml-f-details { margin-bottom: 34px; }
.paml-f-description { margin-top: 34px; }

/* ==========================================================================
   Single-column card
   A distinct horizontal layout rather than a stretched grid card: photo on
   the left at a fixed proportion, details on the right. Reverts to the
   stacked layout on narrow screens, where side-by-side leaves neither
   column enough room.
   ========================================================================== */

.paml-cols-1 { gap: 18px; }

.paml-card-wide {
	display: grid;
	grid-template-columns: minmax(240px, 38%) 1fr;
	align-items: stretch;
	overflow: hidden;
}

/* The photo fills its column rather than sitting in a fixed-ratio box, so
   both sides finish at the same height whatever the text length. */
.paml-card-wide .paml-card-media {
	aspect-ratio: auto;
	height: 100%;
	min-height: 220px;
}
@supports not (aspect-ratio: 4 / 3) {
	.paml-card-wide .paml-card-media { height: 100%; padding-bottom: 0; }
}
.paml-card-wide .paml-card-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.paml-card-wide .paml-card-body {
	display: flex;
	flex-direction: column;
	padding: 22px 24px;
	min-width: 0;
}

.paml-card-wide .paml-card-title {
	font-size: calc(var(--paml-title-size, 16px) * 1.15) !important;
	margin-bottom: 8px;
}

.paml-card-wide .paml-card-price {
	font-size: calc(var(--paml-price-size, 20px) * 1.05);
	margin-bottom: 12px;
}

.paml-card-excerpt {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--paml-muted);
	/* Two lines keeps every card the same shape regardless of copy length. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Specs sit at the bottom, so cards of differing text length still align. */
.paml-card-wide .paml-card-specs {
	margin-top: auto;
	margin-bottom: 10px;
	padding-top: 14px;
}


/* The overlay strip is proportionally taller on a wide card, so ease it off. */
.paml-card-wide .paml-card-overlay { padding: 22px 12px 10px; }

@media (max-width: 700px) {
	.paml-card-wide {
		grid-template-columns: 1fr;
	}
	.paml-card-wide .paml-card-media {
		aspect-ratio: 4 / 3;
		height: auto;
		min-height: 0;
	}
	@supports not (aspect-ratio: 4 / 3) {
		.paml-card-wide .paml-card-media { height: 0; padding-bottom: 75%; }
	}
	.paml-card-wide .paml-card-body { padding: 16px 16px 18px; }
	.paml-card-wide .paml-card-title { font-size: var(--paml-title-size, 16px) !important; }
	.paml-card-wide .paml-card-specs { margin-top: 14px; }
}

/* ==========================================================================
   Two-column card
   More generous than the three-up grid: a taller photo, room for a short
   description, and specs pinned to the bottom so cards align across a row
   regardless of how long each title or excerpt runs.
   ========================================================================== */

.paml-cols-2 { gap: 26px; }

.paml-cols-2 .paml-card {
	display: flex;
	flex-direction: column;
}

.paml-cols-2 .paml-card-media { aspect-ratio: 3 / 2; }
@supports not (aspect-ratio: 3 / 2) {
	.paml-cols-2 .paml-card-media { height: 0; padding-bottom: 66.66%; }
}

.paml-cols-2 .paml-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 20px 20px 18px;
}

.paml-cols-2 .paml-card-title {
	font-size: calc(var(--paml-title-size, 16px) * 1.08) !important;
	margin-bottom: 7px;
}

.paml-cols-2 .paml-card-price {
	font-size: calc(var(--paml-price-size, 20px) * 1.02);
	margin-bottom: 11px;
}

/* Excerpt clamped to two lines so every card keeps the same proportions. */
.paml-cols-2 .paml-card-excerpt {
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.55;
}

/* Pushed to the bottom so the spec rows line up across the row. */
.paml-cols-2 .paml-card-specs {
	margin-top: auto;
	margin-bottom: 9px;
	padding-top: 14px;
}

.paml-cols-2 .paml-card-overlay { padding: 24px 12px 10px; }

@media (max-width: 700px) {
	.paml-cols-2 .paml-card-body { padding: 16px 16px 18px; }
	.paml-cols-2 .paml-card-title { font-size: var(--paml-title-size, 16px) !important; }
	.paml-cols-2 .paml-card-specs { margin-top: 14px; }
}

/* --- Share panel -------------------------------------------------------- */
.paml-share { position: relative; }

.paml-share-panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 20;
	width: min(420px, 78vw);
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--paml-border);
	border-radius: var(--paml-radius);
	box-shadow: 0 8px 26px rgba(0,0,0,.14);
}
.paml-share-panel[hidden] { display: none; }

.paml-share-label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--paml-muted);
	margin-bottom: 7px;
}

.paml-share-row { display: flex; gap: 8px; }

.paml-share-url {
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
	height: 38px;
	padding: 0 10px;
	border: 1px solid var(--paml-border);
	border-radius: 4px;
	font-size: 13px;
	color: var(--paml-text);
	background: #f9fafb;
	font-family: inherit;
}
.paml-share-url:focus {
	outline: none;
	border-color: var(--paml-primary);
	background: #fff;
}

.paml-share-copy {
	flex: 0 0 auto;
	height: 38px;
	padding: 0 16px;
	border: 1px solid var(--paml-primary);
	border-radius: 4px;
	background: var(--paml-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background .15s ease;
}
.paml-share-copy:hover { background: var(--paml-primary-dark); }
.paml-share-copy.is-done { background: #1a7f37; border-color: #1a7f37; }

@media (max-width: 600px) {
	.paml-share-panel {
		right: auto;
		left: 0;
		width: min(340px, 88vw);
	}
}

/* Category link in the listing details */
.paml-category-link {
	color: var(--paml-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--paml-secondary);
	transition: text-decoration-color .15s ease;
}
.paml-category-link:hover { text-decoration-color: var(--paml-primary); }

/* Monthly-rent qualifier beside a price */
.paml-card-price-unit,
.paml-lv-price-unit {
	font-size: .58em;
	font-weight: 500;
	color: var(--paml-muted);
	margin-left: 2px;
	letter-spacing: .01em;
}

/* Shown in place of a map when no listing matches the current filters */
.paml-map-empty {
	margin: 0;
	padding: 28px 20px;
	text-align: center;
	color: var(--paml-muted);
	background: #f7f8fa;
	border: 1px dashed var(--paml-border);
	border-radius: var(--paml-radius);
	font-size: 14px;
}

/* Paging scrolls the grid into view; this keeps it clear of a sticky header
   even when the JS offset calculation is unavailable. */
.paml-grid { scroll-margin-top: 120px; }
