/**
 * Property page.
 *
 * Loaded only on /property/ pages, after frontend.css. Every selector starts
 * at .flexmls-spark-property so it outranks the theme's resets (Hello
 * Elementor gives every <button> a magenta border) without !important.
 *
 * Type follows the Elementor kit: Inter for text, Cormorant Garamond for the
 * headings, as on the rest of the site. Colours come from the --spark-*
 * tokens the child theme maps onto the brand.
 */

.flexmls-spark--property {
	--spark-font: var(--e-global-typography-text-font-family, "Inter"), "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--spark-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--spark-ink-soft: #33404f;
	--spark-card-radius: 14px;
	--spark-shadow: 0 1px 2px rgba(16, 28, 44, 0.06), 0 12px 32px rgba(16, 28, 44, 0.08);
	/* Clears the sticky site header when the sidebar sticks. */
	--spark-sticky-top: 128px;

	font-family: var(--spark-font);
}

/* Cormorant's default old-style figures turn "110" into "ııo" in addresses. */
.flexmls-spark-property .flexmls-spark-property__street,
.flexmls-spark-property .flexmls-spark-property__section-title,
.flexmls-spark-property .flexmls-spark-contact__name {
	font-feature-settings: "lnum" 1;
	font-variant-numeric: lining-nums;
}

.flexmls-spark--property .flexmls-spark__container {
	max-width: 1280px;
	padding: 1.25rem 1.25rem 4rem;
}

.flexmls-spark-property { color: var(--spark-text); }

.flexmls-spark-property h1,
.flexmls-spark-property h2,
.flexmls-spark-property h3 { font-family: inherit; }

/* ---------- Top bar ---------- */

.flexmls-spark-property .flexmls-spark-property__topbar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	justify-content: space-between;
	margin: 0 0 1rem;
}

.flexmls-spark-property .flexmls-spark-property__breadcrumb { margin: 0; }

.flexmls-spark-property .flexmls-spark-property__back {
	align-items: center;
	color: var(--spark-muted);
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.45rem;
	text-decoration: none;
}

.flexmls-spark-property .flexmls-spark-property__back:hover,
.flexmls-spark-property .flexmls-spark-property__back:focus-visible { color: var(--spark-accent-hover); }

/* Shown at its native size: Source MLS forbids cropping or distorting it. */
.flexmls-spark-property .flexmls-spark-property__source-mls {
	background: #fff;
	display: block;
	flex: none;
	height: 60px;
	max-width: none;
	width: 132px;
}

/* ---------- Gallery ---------- */

.flexmls-spark-property .flexmls-spark-gallery {
	margin: 0 0 2.25rem;
	position: relative;
}

.flexmls-spark-property .flexmls-spark-gallery__grid {
	border-radius: var(--spark-card-radius);
	display: grid;
	gap: 8px;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 1fr 1fr;
	height: clamp(340px, 58vh, 600px);
	overflow: hidden;
}

.flexmls-spark-property .flexmls-spark-gallery--tiles-1 .flexmls-spark-gallery__grid { grid-template-columns: 1fr; }
.flexmls-spark-property .flexmls-spark-gallery--tiles-2 .flexmls-spark-gallery__grid,
.flexmls-spark-property .flexmls-spark-gallery--tiles-3 .flexmls-spark-gallery__grid { grid-template-columns: 2fr 1fr; }
.flexmls-spark-property .flexmls-spark-gallery--tiles-2 .flexmls-spark-gallery__tile:nth-child(2),
.flexmls-spark-property .flexmls-spark-gallery--tiles-4 .flexmls-spark-gallery__tile:nth-child(2) { grid-row: span 2; }

.flexmls-spark-property .flexmls-spark-gallery__tile {
	background: var(--spark-surface-alt);
	display: block;
	min-height: 0;
	overflow: hidden;
	position: relative;
}

.flexmls-spark-property .flexmls-spark-gallery__tile--main { grid-row: 1 / span 2; }

.flexmls-spark-property .flexmls-spark-gallery__image {
	display: block;
	height: 100%;
	inset: 0;
	max-width: none;
	object-fit: cover;
	position: absolute;
	transition: transform 0.6s ease, filter 0.3s ease;
	width: 100%;
}

.flexmls-spark-property .flexmls-spark-gallery__tile:hover .flexmls-spark-gallery__image { filter: brightness(0.94); transform: scale(1.025); }

.flexmls-spark-property .flexmls-spark-gallery__tile:focus-visible {
	outline: 3px solid var(--spark-accent);
	outline-offset: -3px;
}

.flexmls-spark-property .flexmls-spark-gallery__all {
	align-items: center;
	background: #fff;
	border-radius: 999px;
	bottom: 16px;
	box-shadow: 0 4px 14px rgba(16, 28, 44, 0.18);
	color: var(--spark-text);
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.5rem;
	padding: 0.6rem 1.05rem;
	position: absolute;
	right: 16px;
	text-decoration: none;
	transition: transform 0.15s ease;
}

.flexmls-spark-property .flexmls-spark-gallery__all:hover { color: var(--spark-text); transform: translateY(-1px); }
.flexmls-spark-property .flexmls-spark-gallery__all-count { display: none; }

.flexmls-spark-property .flexmls-spark-gallery--empty .flexmls-spark-placeholder {
	aspect-ratio: 16 / 7;
	background: linear-gradient(135deg, #eef1f6 0%, #e3e8f0 100%);
	border-radius: var(--spark-card-radius);
	min-height: 260px;
}

/* A phone shows one full-bleed photo and a counter; the viewer has the rest. */
@media (max-width: 767px) {
	.flexmls-spark-property .flexmls-spark-gallery { margin: 0 -1.25rem 1.5rem; }

	.flexmls-spark-property .flexmls-spark-gallery__grid {
		aspect-ratio: 4 / 3;
		border-radius: 0;
		display: block;
		height: auto;
		position: relative;
	}

	.flexmls-spark-property .flexmls-spark-gallery__tile { display: none; }
	.flexmls-spark-property .flexmls-spark-gallery__tile--main { display: block; height: 100%; }

	.flexmls-spark-property .flexmls-spark-gallery__all {
		background: rgba(12, 19, 10, 0.72);
		bottom: 12px;
		box-shadow: none;
		color: #fff;
		padding: 0.4rem 0.75rem;
		right: 12px;
	}

	.flexmls-spark-property .flexmls-spark-gallery__all:hover { color: #fff; }
	/* Off screen rather than display: none, so the link keeps "View all N
	   photos" as its name; the count shown instead is aria-hidden. */
	.flexmls-spark-property .flexmls-spark-gallery__all-label {
		clip-path: inset(50%);
		height: 1px;
		overflow: hidden;
		position: absolute;
		white-space: nowrap;
		width: 1px;
	}
	.flexmls-spark-property .flexmls-spark-gallery__all-count { display: inline; }
	.flexmls-spark-property .flexmls-spark-gallery--empty .flexmls-spark-placeholder { border-radius: 0; }
}

/* ---------- Photo viewer ---------- */

.flexmls-spark-lightbox {
	background: #0b0f14;
	border: 0;
	color: #fff;
	height: 100%;
	inset: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	overflow: hidden;
	padding: 0;
	width: 100%;
}

.flexmls-spark-lightbox[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
}

.flexmls-spark-lightbox::backdrop { background: rgba(11, 15, 20, 0.94); }

.flexmls-spark-lightbox__bar {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 0.75rem 1rem;
}

.flexmls-spark-lightbox__counter {
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
	margin: 0;
}

.flexmls-spark-lightbox__stage {
	align-items: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin: 0;
	min-height: 0;
	padding: 0 4.5rem;
	touch-action: pan-y;
}

.flexmls-spark-lightbox__image {
	display: block;
	height: auto;
	max-height: 100%;
	max-width: 100%;
	min-height: 0;
	object-fit: contain;
	user-select: none;
}

.flexmls-spark-lightbox__caption {
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.85rem;
	padding: 0.6rem 0 0;
	text-align: center;
}

.flexmls-spark-lightbox__caption:empty { display: none; }

.flexmls-spark-lightbox .flexmls-spark-lightbox__close,
.flexmls-spark-lightbox .flexmls-spark-lightbox__nav {
	align-items: center;
	background: rgba(255, 255, 255, 0.1);
	border: 0;
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	height: 44px;
	justify-content: center;
	padding: 0;
	transition: background-color 0.15s ease;
	width: 44px;
}

.flexmls-spark-lightbox .flexmls-spark-lightbox__nav {
	height: 52px;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
}

.flexmls-spark-lightbox .flexmls-spark-lightbox__nav--prev { left: 1rem; }
.flexmls-spark-lightbox .flexmls-spark-lightbox__nav--next { right: 1rem; }

.flexmls-spark-lightbox .flexmls-spark-lightbox__close:hover,
.flexmls-spark-lightbox .flexmls-spark-lightbox__close:focus-visible,
.flexmls-spark-lightbox .flexmls-spark-lightbox__nav:hover,
.flexmls-spark-lightbox .flexmls-spark-lightbox__nav:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
}

.flexmls-spark-lightbox__thumbs {
	display: flex;
	gap: 6px;
	list-style: none;
	margin: 0;
	overflow-x: auto;
	padding: 0.75rem 1rem 1rem;
	scrollbar-width: thin;
}

.flexmls-spark-lightbox .flexmls-spark-lightbox__thumb {
	background: none;
	border: 2px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	display: block;
	flex: none;
	height: 56px;
	opacity: 0.55;
	overflow: hidden;
	padding: 0;
	transition: opacity 0.15s ease, border-color 0.15s ease;
	width: 76px;
}

.flexmls-spark-lightbox .flexmls-spark-lightbox__thumb:hover { background: none; opacity: 0.85; }

.flexmls-spark-lightbox .flexmls-spark-lightbox__thumb[aria-current="true"] {
	border-color: #fff;
	opacity: 1;
}

.flexmls-spark-lightbox__thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

@media (max-width: 767px) {
	.flexmls-spark-lightbox__stage { padding: 0; }
	.flexmls-spark-lightbox .flexmls-spark-lightbox__nav { display: none; }
}

/* ---------- Layout ---------- */

.flexmls-spark-property .flexmls-spark-property__layout {
	align-items: start;
	display: grid;
	gap: 3.5rem;
	grid-template-columns: minmax(0, 1fr) 380px;
}

@media (max-width: 1080px) {
	.flexmls-spark-property .flexmls-spark-property__layout {
		gap: 2.5rem;
		grid-template-columns: minmax(0, 1fr) 340px;
	}
}

@media (max-width: 900px) {
	.flexmls-spark-property .flexmls-spark-property__layout {
		gap: 0;
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Header ---------- */

.flexmls-spark-property .flexmls-spark-property__header { padding: 0 0 2rem; }

.flexmls-spark-property .flexmls-spark-property__meta {
	align-items: center;
	color: var(--spark-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.875rem;
	gap: 0.4rem 0.9rem;
	margin: 0 0 0.9rem;
}

.flexmls-spark-property .flexmls-spark-property__status {
	background: var(--spark-surface-alt);
	border-radius: 999px;
	color: var(--spark-text);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	padding: 0.32rem 0.75rem;
	text-transform: uppercase;
}

.flexmls-spark-property .flexmls-spark-property__status--active { background: #e3f5ee; color: #0a6b4f; }
.flexmls-spark-property .flexmls-spark-property__status--activeundercontract,
.flexmls-spark-property .flexmls-spark-property__status--pending { background: #fdf1e0; color: #8a5a10; }
.flexmls-spark-property .flexmls-spark-property__status--comingsoon { background: #e8f0fd; color: #1d4fa8; }
.flexmls-spark-property .flexmls-spark-property__status--closed { background: #eef0f3; color: #4b5563; }

.flexmls-spark-property .flexmls-spark-property__listed::before,
.flexmls-spark-property .flexmls-spark-property__mls::before {
	color: #c3c9d2;
	content: "•";
	margin-right: 0.9rem;
}

.flexmls-spark-property .flexmls-spark-property__price {
	color: var(--spark-text);
	font-size: clamp(2rem, 4.2vw, 2.85rem);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.05;
	margin: 0 0 0.6rem;
}

.flexmls-spark-property .flexmls-spark-property__title {
	color: var(--spark-text);
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	margin: 0 0 1.6rem;
}

.flexmls-spark-property .flexmls-spark-property__street {
	font-family: var(--spark-display);
	font-size: clamp(1.75rem, 3.4vw, 2.5rem);
	font-weight: 600;
	letter-spacing: -0.005em;
	line-height: 1.1;
}

.flexmls-spark-property .flexmls-spark-property__location {
	color: var(--spark-muted);
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.4;
}

/* Key facts: one row of icon + number + label, divided by hairlines. */
.flexmls-spark-property .flexmls-spark-property__stats {
	border-bottom: 1px solid var(--spark-border);
	border-top: 1px solid var(--spark-border);
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 1.1rem 0;
	row-gap: 1rem;
}

.flexmls-spark-property .flexmls-spark-property__stat {
	align-items: center;
	border-left: 1px solid var(--spark-border);
	column-gap: 0.65rem;
	display: grid;
	grid-template-columns: auto auto;
	grid-template-rows: auto auto;
	padding: 0 1.6rem;
}

.flexmls-spark-property .flexmls-spark-property__stat:first-child {
	border-left: 0;
	padding-left: 0;
}

.flexmls-spark-property .flexmls-spark-property__stat-icon {
	color: var(--spark-accent-text);
	grid-row: span 2;
}

.flexmls-spark-property .flexmls-spark-property__stat-value {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.15;
}

.flexmls-spark-property .flexmls-spark-property__stat-label {
	color: var(--spark-muted);
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.2;
}

@media (max-width: 640px) {
	.flexmls-spark-property .flexmls-spark-property__stats {
		display: grid;
		gap: 1rem 0;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.flexmls-spark-property .flexmls-spark-property__stat {
		border-left: 0;
		grid-template-columns: 1fr;
		justify-items: start;
		padding: 0;
	}

	.flexmls-spark-property .flexmls-spark-property__stat-icon { grid-row: auto; margin-bottom: 0.2rem; }
}

/* The brokerage credit reads at the same size as the listing data. */
.flexmls-spark-property .flexmls-spark-property__attribution {
	color: var(--spark-ink-soft);
	font-size: 0.95rem;
	margin: 0 0 1.25rem;
}

.flexmls-spark-property .flexmls-spark-property__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
}

.flexmls-spark-property .flexmls-spark-property__action {
	align-items: center;
	border: 1px solid var(--spark-border);
	border-radius: 999px;
	color: var(--spark-text);
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	gap: 0.45rem;
	padding: 0.55rem 1rem;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.flexmls-spark-property .flexmls-spark-property__action:hover,
.flexmls-spark-property .flexmls-spark-property__action:focus-visible {
	border-color: var(--spark-accent);
	color: var(--spark-accent-hover);
}

.flexmls-spark-property .spark-share { margin: 0; }

/* ---------- Sections ---------- */

.flexmls-spark-property .flexmls-spark-property__section {
	border-top: 1px solid var(--spark-border);
	margin: 0;
	padding: 2.25rem 0;
}

.flexmls-spark-property .flexmls-spark-property__section-title,
.flexmls-spark-property .flexmls-spark-property__section--payment .spark-mortgage__title {
	border: 0;
	color: var(--spark-text);
	font-family: var(--spark-display);
	font-size: clamp(1.6rem, 2.6vw, 2rem);
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.15;
	margin: 0 0 1.25rem;
	padding: 0;
	text-transform: none;
}

.flexmls-spark-property .flexmls-spark-property__remarks {
	color: var(--spark-ink-soft);
	font-size: 1.03rem;
	line-height: 1.75;
	max-width: 72ch;
	position: relative;
}

.flexmls-spark-property .flexmls-spark-property__remarks p { margin: 0 0 1em; }
.flexmls-spark-property .flexmls-spark-property__remarks p:last-child { margin-bottom: 0; }

.flexmls-spark-property .flexmls-spark-property__remarks.is-clamped {
	max-height: 10.5em;
	-webkit-mask-image: linear-gradient(#000 55%, transparent);
	mask-image: linear-gradient(#000 55%, transparent);
	overflow: hidden;
}

.flexmls-spark-property .flexmls-spark-property__more {
	background: none;
	border: 0;
	border-radius: 0;
	color: var(--spark-accent-text);
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	margin-top: 0.75rem;
	padding: 0;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--spark-accent) 45%, transparent);
	text-underline-offset: 0.2em;
}

.flexmls-spark-property .flexmls-spark-property__more:hover,
.flexmls-spark-property .flexmls-spark-property__more:focus-visible {
	background: none;
	color: var(--spark-accent-hover);
}

/* ---------- Facts and features ---------- */

.flexmls-spark-property .flexmls-spark-features {
	display: grid;
	gap: 2rem 3rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.flexmls-spark-property .flexmls-spark-features__group--overview { grid-column: 1 / -1; }

.flexmls-spark-property .flexmls-spark-features__title {
	color: var(--spark-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0 0 0.5rem;
	text-transform: uppercase;
}

.flexmls-spark-property .flexmls-spark-property__facts {
	display: grid;
	gap: 0 3rem;
	grid-template-columns: minmax(0, 1fr);
	margin: 0;
}

@media (min-width: 640px) {
	.flexmls-spark-property .flexmls-spark-features__group--overview .flexmls-spark-property__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.flexmls-spark-property .flexmls-spark-property__fact {
	border-bottom: 1px solid var(--spark-border);
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	padding: 0.7rem 0;
}

.flexmls-spark-property .flexmls-spark-property__fact-label {
	color: var(--spark-muted);
	font-size: 0.925rem;
	margin: 0;
}

.flexmls-spark-property .flexmls-spark-property__fact-value {
	color: var(--spark-text);
	font-size: 0.925rem;
	font-weight: 600;
	margin: 0;
	overflow-wrap: anywhere;
}

/* ---------- Open houses ---------- */

.flexmls-spark-property .flexmls-spark-openhouses__list {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.flexmls-spark-property .flexmls-spark-openhouses__item {
	background: #f1faf6;
	border: 1px solid #cfeee2;
	border-left: 4px solid var(--spark-accent);
	border-radius: 10px;
	padding: 1rem 1.15rem;
}

.flexmls-spark-property .flexmls-spark-openhouses__when { font-weight: 700; margin: 0; }

.flexmls-spark-property .flexmls-spark-openhouses__type,
.flexmls-spark-property .flexmls-spark-openhouses__comments {
	color: var(--spark-muted);
	font-size: 0.9rem;
	margin: 0.35rem 0 0;
}

.flexmls-spark-property .flexmls-spark-openhouses__stream a { color: var(--spark-accent-text); }

/* ---------- Monthly payment ---------- */

.flexmls-spark-property .flexmls-spark-property__section--payment .spark-mortgage {
	background: none;
	border: 0;
	border-radius: 0;
	column-gap: 2.5rem;
	display: grid;
	grid-template-areas:
		"title title"
		"inputs result"
		"note note";
	grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
	margin: 0;
	padding: 0;
}

.flexmls-spark-property .spark-mortgage__title { grid-area: title; }
.flexmls-spark-property .spark-mortgage__inputs { grid-area: inputs; min-width: 0; }

.flexmls-spark-property .spark-mortgage__result {
	align-self: start;
	background: var(--spark-surface-alt);
	border-radius: 12px;
	grid-area: result;
	padding: 1.25rem 1.35rem;
}

.flexmls-spark-property .spark-mortgage__result .spark-mortgage__total { margin: 0 0 1rem; }
.flexmls-spark-property .spark-mortgage__result .spark-mortgage__amount { font-size: 2.1rem; }
.flexmls-spark-property .spark-mortgage__result .spark-mortgage__breakdown { margin: 0; }
.flexmls-spark-property .spark-mortgage__disclaimer { grid-area: note; margin-top: 1rem; }

@media (max-width: 700px) {
	.flexmls-spark-property .flexmls-spark-property__section--payment .spark-mortgage {
		grid-template-areas:
			"title"
			"result"
			"inputs"
			"note";
		grid-template-columns: minmax(0, 1fr);
		row-gap: 1.25rem;
	}
}

/* ---------- Location ---------- */

.flexmls-spark-property .flexmls-spark-property__map {
	aspect-ratio: 16 / 9;
	background: var(--spark-surface-alt);
	border-radius: 12px;
	margin-bottom: 1.25rem;
	width: 100%;
}

.flexmls-spark-property .flexmls-spark-property__place {
	align-items: center;
	background: var(--spark-surface-alt);
	border-radius: 12px;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	justify-content: space-between;
	padding: 1.15rem 1.35rem;
}

.flexmls-spark-property .flexmls-spark-property__place-address {
	align-items: center;
	display: flex;
	font-weight: 600;
	gap: 0.6rem;
	margin: 0;
}

.flexmls-spark-property .flexmls-spark-property__place-address svg { color: var(--spark-accent-text); flex: none; }

.flexmls-spark-property .flexmls-spark-property__place-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
}

.flexmls-spark-property .flexmls-spark-property__place .flexmls-spark-property__action { background: #fff; }

/* ---------- Sidebar: who to contact ---------- */

.flexmls-spark-property .flexmls-spark-property__sidebar { min-width: 0; }

.flexmls-spark-property .flexmls-spark-property__sticky {
	background: var(--spark-surface);
	border: 1px solid var(--spark-border);
	border-radius: var(--spark-card-radius);
	box-shadow: var(--spark-shadow);
	overflow: hidden;
}

/* Sticky only when the whole card fits on screen; a sticky card taller than
   the viewport would hide its own send button. */
@media (min-width: 901px) and (min-height: 940px) {
	.flexmls-spark-property .flexmls-spark-property__sticky {
		position: sticky;
		top: var(--spark-sticky-top);
	}
}

@media (max-width: 900px) {
	.flexmls-spark-property .flexmls-spark-property__sidebar {
		border-top: 1px solid var(--spark-border);
		padding-top: 2.25rem;
	}
}

.flexmls-spark-property .flexmls-spark-contact { padding: 1.5rem 1.5rem 1.25rem; }

.flexmls-spark-property .flexmls-spark-contact__person {
	align-items: center;
	display: flex;
	gap: 0.9rem;
}

.flexmls-spark-property .flexmls-spark-contact__photo {
	border-radius: 50%;
	flex: none;
	height: 64px;
	object-fit: cover;
	object-position: center 20%;
	width: 64px;
}

.flexmls-spark-property .flexmls-spark-contact__name {
	font-family: var(--spark-display);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.1;
	margin: 0;
}

.flexmls-spark-property .flexmls-spark-contact__title {
	color: var(--spark-muted);
	font-size: 0.82rem;
	margin: 0.25rem 0 0;
}

.flexmls-spark-property .flexmls-spark-contact__actions {
	display: grid;
	gap: 0.6rem;
	grid-template-columns: minmax(0, 1fr) auto;
	margin-top: 1.15rem;
}

.flexmls-spark-property .flexmls-spark-contact__button {
	align-items: center;
	border: 1px solid var(--spark-border);
	border-radius: 10px;
	color: var(--spark-text);
	display: inline-flex;
	font-size: 0.925rem;
	font-weight: 600;
	gap: 0.5rem;
	justify-content: center;
	min-height: 46px;
	padding: 0 1rem;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.flexmls-spark-property .flexmls-spark-contact__button:hover,
.flexmls-spark-property .flexmls-spark-contact__button:focus-visible {
	border-color: var(--spark-accent);
	color: var(--spark-accent-hover);
}

.flexmls-spark-property .flexmls-spark-contact__button--primary {
	background: var(--spark-accent-hover);
	border-color: var(--spark-accent-hover);
	color: #fff;
}

.flexmls-spark-property .flexmls-spark-contact__button--primary:hover,
.flexmls-spark-property .flexmls-spark-contact__button--primary:focus-visible {
	background: #0b3a38;
	border-color: #0b3a38;
	color: #fff;
}

.flexmls-spark-property .flexmls-spark-contact__button:only-child { grid-column: 1 / -1; }

/* The enquiry form is the lower half of the same card. */
.flexmls-spark-property .flexmls-spark-property__sidebar .spark-lead {
	background: var(--spark-surface-alt);
	border: 0;
	border-radius: 0;
	border-top: 1px solid var(--spark-border);
	margin: 0;
	padding: 1.35rem 1.5rem 1.5rem;
}

.flexmls-spark-property .flexmls-spark-property__sidebar .spark-lead__title {
	font-size: 1.05rem;
	font-weight: 700;
}

.flexmls-spark-property .flexmls-spark-property__sidebar .spark-lead__form,
.flexmls-spark-property .flexmls-spark-property__sidebar .spark-lead__grid { gap: 0.8rem; }

.flexmls-spark-property .flexmls-spark-property__sidebar .spark-lead .spark-lead__input { min-height: 44px; }
.flexmls-spark-property .flexmls-spark-property__sidebar .spark-lead .spark-lead__textarea { min-height: 88px; }

/* ---------- Similar homes ---------- */

.flexmls-spark-property .flexmls-spark-property__section--similar {
	margin-top: 1.5rem;
	padding-bottom: 1rem;
}

/* ---------- Compliance ---------- */

.flexmls-spark-property .flexmls-spark__compliance {
	border-top: 1px solid var(--spark-border);
	margin-top: 1.5rem;
	padding-top: 1.5rem;
}

/* ---------- Phone call / enquire bar ---------- */

.flexmls-spark-property .flexmls-spark-property__cta-bar { display: none; }

@media (max-width: 900px) {
	.flexmls-spark--property { padding-bottom: 76px; }

	.flexmls-spark-property .flexmls-spark-property__cta-bar {
		background: rgba(255, 255, 255, 0.97);
		border-top: 1px solid var(--spark-border);
		bottom: 0;
		box-shadow: 0 -6px 20px rgba(16, 28, 44, 0.08);
		display: flex;
		gap: 0.6rem;
		left: 0;
		padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom));
		position: fixed;
		right: 0;
		z-index: 90;
	}

	.flexmls-spark-property .flexmls-spark-property__cta {
		align-items: center;
		border-radius: 10px;
		display: inline-flex;
		flex: 1;
		font-size: 0.95rem;
		font-weight: 700;
		gap: 0.45rem;
		justify-content: center;
		min-height: 48px;
		text-decoration: none;
	}

	.flexmls-spark-property .flexmls-spark-property__cta--call {
		border: 1px solid var(--spark-border);
		color: var(--spark-text);
		flex: 0 0 34%;
	}

	.flexmls-spark-property .flexmls-spark-property__cta--enquire {
		background: var(--spark-accent-hover);
		color: #fff;
	}

	.flexmls-spark-property .flexmls-spark-property__cta--enquire:hover { color: #fff; }
}

/* ---------- Motion and print ---------- */

@media (prefers-reduced-motion: reduce) {
	.flexmls-spark-property .flexmls-spark-gallery__image,
	.flexmls-spark-property .flexmls-spark-gallery__all { transition: none; }
	.flexmls-spark-property .flexmls-spark-gallery__tile:hover .flexmls-spark-gallery__image { transform: none; }
}

@media print {
	.flexmls-spark-property .flexmls-spark-property__breadcrumb,
	.flexmls-spark-property .flexmls-spark-property__sidebar,
	.flexmls-spark-property .flexmls-spark-property__actions,
	.flexmls-spark-property .flexmls-spark-property__cta-bar,
	.flexmls-spark-property .flexmls-spark-property__section--similar,
	.flexmls-spark-property .flexmls-spark-gallery__all,
	.flexmls-spark-property .flexmls-spark-property__section--payment { display: none; }

	.flexmls-spark-property .flexmls-spark-property__layout { display: block; }
	.flexmls-spark-property .flexmls-spark-gallery__grid { height: 320px; }
	.flexmls-spark-property .flexmls-spark-property__remarks.is-clamped { max-height: none; -webkit-mask-image: none; mask-image: none; }
}
