/**
 * Public + widget styles — FlameWP Resales
 */

.fwp-resales-grid-widget {
	display: grid;
	grid-template-columns: repeat(var(--fwp-cols, 3), minmax(0, 1fr));
	gap: 1.5rem;
}

.fwp-resales-card-item {
	display: block;
	overflow: hidden;
}

.fwp-resales-card-item a {
	color: inherit;
	text-decoration: none;
}

.fwp-resales-card-item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	object-fit: cover;
}

.fwp-resales-card-item__body {
	padding: 0.85rem 0;
}

.fwp-resales-card-item h3 {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}

.fwp-resales-carousel {
	overflow: hidden;
}

.fwp-resales-carousel__track {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.fwp-resales-carousel__slide {
	flex: 0 0 min(320px, 85%);
	scroll-snap-align: start;
}

.fwp-resales-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.75rem;
}

.fwp-resales-gallery--carousel {
	display: block;
	position: relative;
	overflow: hidden;
	width: 100%;
}

.fwp-resales-gallery--carousel .fwp-resales-gallery__track {
	display: flex;
	transition: transform 0.35s ease;
	will-change: transform;
}

.fwp-resales-gallery--carousel .fwp-resales-gallery__item {
	flex: 0 0 100%;
	margin: 0;
	min-width: 0;
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	overflow: hidden;
	background: #e8eef3;
}

.fwp-resales-gallery--carousel img {
	width: 100%;
	height: 100%;
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	object-fit: cover;
	object-position: center;
	display: block;
}

.fwp-resales-gallery__nav {
	position: absolute;
	inset-block: 0;
	inset-inline: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
	z-index: 2;
}

.fwp-resales-gallery__btn {
	pointer-events: auto;
	appearance: none;
	border: 0;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	background: rgba(15, 23, 42, 0.55);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	font-size: 1.25rem;
}

.fwp-resales-gallery__btn:hover {
	background: rgba(15, 23, 42, 0.8);
}

/*
 * Elementor Image Carousel inside Loop Grid often measures viewport width
 * (~1140px) instead of the card, causing huge horizontal overflow and dead arrows.
 */
.elementor-loop-container .e-loop-item,
.elementor-loop-container .e-loop-item .e-con,
.elementor-loop-container .e-loop-item .e-con-inner {
	min-width: 0;
	max-width: 100%;
}

/* Equal-height Loop cards (Home + listing grids). */
.elementor-widget-loop-grid .elementor-loop-container.elementor-grid,
.elementor-loop-container.elementor-grid {
	align-items: stretch !important;
}

/*
 * Loop grids: 3 columns on desktop (Home featured properties + Buy listings).
 * Property detail recommendations stay at 2.
 *
 * IMPORTANT: Elementor blog hero uses `.elementor-grid-1` for a full-width
 * featured post. Never force 3 columns onto those widgets — a single item in a
 * 3-col grid collapses to ~1/3 width (broken title/author/CTA).
 * Exclude explicit column classes from the blanket rule; then set them below.
 */
body.home .elementor-widget-loop-grid:not(.elementor-grid-1):not(.elementor-grid-2):not(.elementor-grid-4) .elementor-loop-container.elementor-grid,
body.blog .elementor-widget-loop-grid:not(.elementor-grid-1):not(.elementor-grid-2):not(.elementor-grid-4) .elementor-loop-container.elementor-grid,
body:not(.home):not(.blog):not(.fwp-resales-single-property) .elementor-widget-loop-grid:not(.elementor-grid-1):not(.elementor-grid-2):not(.elementor-grid-4) .elementor-loop-container.elementor-grid {
	--grid-columns: 3;
	grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr)) !important;
}

body.fwp-resales-single-property .elementor-widget-loop-grid:not(.elementor-grid-1) .elementor-loop-container.elementor-grid {
	--grid-columns: 2;
	grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr)) !important;
}

/* Honour Elementor column classes (blog featured = grid-1 = full width). */
.elementor-widget-loop-grid.elementor-grid-1 .elementor-loop-container.elementor-grid,
body.home .elementor-widget-loop-grid.elementor-grid-1 .elementor-loop-container.elementor-grid,
body.blog .elementor-widget-loop-grid.elementor-grid-1 .elementor-loop-container.elementor-grid,
body:not(.home):not(.blog):not(.fwp-resales-single-property) .elementor-widget-loop-grid.elementor-grid-1 .elementor-loop-container.elementor-grid,
body.fwp-resales-single-property .elementor-widget-loop-grid.elementor-grid-1 .elementor-loop-container.elementor-grid {
	--grid-columns: 1 !important;
	grid-template-columns: minmax(0, 1fr) !important;
	width: 100% !important;
	max-width: 100% !important;
}
.elementor-widget-loop-grid.elementor-grid-1 .elementor-loop-container.elementor-grid > .e-loop-item {
	width: 100% !important;
	max-width: 100% !important;
	grid-column: 1 / -1;
}

body.home .elementor-widget-loop-grid.elementor-grid-2 .elementor-loop-container.elementor-grid,
body.blog .elementor-widget-loop-grid.elementor-grid-2 .elementor-loop-container.elementor-grid,
body:not(.home):not(.blog):not(.fwp-resales-single-property) .elementor-widget-loop-grid.elementor-grid-2 .elementor-loop-container.elementor-grid {
	--grid-columns: 2 !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
body.home .elementor-widget-loop-grid.elementor-grid-4 .elementor-loop-container.elementor-grid,
body.blog .elementor-widget-loop-grid.elementor-grid-4 .elementor-loop-container.elementor-grid,
body:not(.home):not(.blog):not(.fwp-resales-single-property) .elementor-widget-loop-grid.elementor-grid-4 .elementor-loop-container.elementor-grid {
	--grid-columns: 4 !important;
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Tablet only — do NOT use max-width:1024 alone (it also matches phones). */
@media (min-width: 768px) and (max-width: 1024px) {
	body.home .elementor-widget-loop-grid:not(.elementor-grid-1):not(.elementor-grid-tablet-1) .elementor-loop-container.elementor-grid,
	body.blog .elementor-widget-loop-grid:not(.elementor-grid-1):not(.elementor-grid-tablet-1) .elementor-loop-container.elementor-grid,
	body:not(.home):not(.blog):not(.fwp-resales-single-property) .elementor-widget-loop-grid:not(.elementor-grid-1):not(.elementor-grid-tablet-1) .elementor-loop-container.elementor-grid {
		--grid-columns: 2;
		grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr)) !important;
	}

	.elementor-widget-loop-grid.elementor-grid-tablet-1 .elementor-loop-container.elementor-grid,
	body.home .elementor-widget-loop-grid.elementor-grid-tablet-1 .elementor-loop-container.elementor-grid,
	body.blog .elementor-widget-loop-grid.elementor-grid-tablet-1 .elementor-loop-container.elementor-grid {
		--grid-columns: 1 !important;
		grid-template-columns: minmax(0, 1fr) !important;
	}
	.elementor-widget-loop-grid.elementor-grid-tablet-2 .elementor-loop-container.elementor-grid,
	body.home .elementor-widget-loop-grid.elementor-grid-tablet-2 .elementor-loop-container.elementor-grid,
	body.blog .elementor-widget-loop-grid.elementor-grid-tablet-2 .elementor-loop-container.elementor-grid {
		--grid-columns: 2 !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
	.elementor-widget-loop-grid.elementor-grid-tablet-3 .elementor-loop-container.elementor-grid,
	body.home .elementor-widget-loop-grid.elementor-grid-tablet-3 .elementor-loop-container.elementor-grid,
	body.blog .elementor-widget-loop-grid.elementor-grid-tablet-3 .elementor-loop-container.elementor-grid {
		--grid-columns: 3 !important;
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	body.home .elementor-widget-loop-grid .elementor-loop-container.elementor-grid,
	body.blog .elementor-widget-loop-grid .elementor-loop-container.elementor-grid,
	body:not(.home):not(.blog) .elementor-widget-loop-grid .elementor-loop-container.elementor-grid,
	body.fwp-resales-single-property .elementor-widget-loop-grid .elementor-loop-container.elementor-grid {
		--grid-columns: 1 !important;
		grid-template-columns: minmax(0, 1fr) !important;
	}
}

.elementor-loop-container.elementor-grid > .e-loop-item {
	display: flex !important;
	flex-direction: column;
	height: 100%;
	align-self: stretch;
}

.elementor-loop-container.elementor-grid > .e-loop-item > .elementor {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 100%;
}

.elementor-loop-container.elementor-grid > .e-loop-item .e-con.e-parent {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100% !important;
	min-height: 100%;
}

.elementor-loop-container.elementor-grid > .e-loop-item .e-con-inner {
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
}

/* Push the last block (price / ref) to the card footer when heights stretch. */
.elementor-loop-container.elementor-grid > .e-loop-item .e-con-inner > .elementor-element:last-child {
	margin-top: auto;
	width: 100%;
	align-self: stretch;
}

.elementor-loop-container.elementor-grid > .e-loop-item .e-con-inner > .elementor-element:last-child .elementor-widget-container,
.elementor-loop-container.elementor-grid > .e-loop-item .fwp-resales-price {
	width: 100%;
}

/* Lazy preloader left behind after AJAX image hydrate. */
.elementor-loop-container .e-loop-item .swiper-lazy-preloader,
.fwp-resales-loop-ajax-host .e-loop-item .swiper-lazy-preloader {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

.elementor-loop-container .e-loop-item .elementor-widget-image-carousel,
.elementor-loop-container .e-loop-item .elementor-widget-media-carousel,
.elementor-loop-container .e-loop-item .elementor-image-carousel-wrapper,
.elementor-loop-container .e-loop-item .elementor-main-swiper,
.elementor-loop-container .e-loop-item .swiper {
	width: 100% !important;
	max-width: 100%;
	overflow: hidden;
	box-sizing: border-box;
}

/*
 * CLS hardening: reserve a fixed image frame before/after lazy-fill appends slides.
 * Height comes from aspect-ratio so adding slides must not grow the card.
 */
.elementor-loop-container .e-loop-item .elementor-widget-image-carousel > .elementor-widget-container,
.elementor-loop-container .e-loop-item .elementor-widget-media-carousel > .elementor-widget-container,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-widget-image-carousel > .elementor-widget-container,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-widget-media-carousel > .elementor-widget-container {
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	overflow: hidden;
	contain: layout paint;
}

.elementor-loop-container .e-loop-item .elementor-image-carousel-wrapper.swiper,
.elementor-loop-container .e-loop-item .elementor-main-swiper,
.elementor-loop-container .e-loop-item .swiper,
.fwp-resales-loop-ajax-host .e-loop-item .swiper {
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	overflow: hidden;
}

/* Fixed frame so portrait/landscape assets don't break card alignment.
 * Use absolute fill — height:100% collapses inside Swiper and hides images. */
.elementor-loop-container .e-loop-item .elementor-widget-image-carousel .swiper-slide-inner,
.elementor-loop-container .e-loop-item .elementor-widget-media-carousel .swiper-slide-inner {
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	overflow: hidden;
	margin: 0;
	width: 100%;
	position: relative;
	background: #e8eef3;
}

.elementor-loop-container .e-loop-item .swiper-slide {
	box-sizing: border-box;
}

.elementor-loop-container .e-loop-item .swiper-slide-image,
.elementor-loop-container .e-loop-item .elementor-carousel-image,
.elementor-loop-container .e-loop-item .elementor-widget-image-carousel img {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	object-fit: cover;
	object-position: center;
	display: block;
}

.elementor-loop-container .e-loop-item .elementor-swiper-button {
	z-index: 3;
}

/*
 * Home AJAX Loop: cards arrive without Elementor Swiper base CSS (no SSR carousel),
 * so .swiper-wrapper stays display:block, slides stack, and arrow SVGs grow to card size.
 */
.elementor-loop-container .e-loop-item .swiper-wrapper,
.fwp-resales-loop-ajax-host .e-loop-item .swiper-wrapper {
	display: flex !important;
	box-sizing: content-box;
	width: 100%;
	height: auto !important;
	align-items: stretch;
}

.elementor-loop-container .e-loop-item .swiper-slide,
.fwp-resales-loop-ajax-host .e-loop-item .swiper-slide {
	flex-shrink: 0 !important;
	width: 100% !important;
	height: auto !important;
	position: relative;
}

.elementor-loop-container .e-loop-item .elementor-image-carousel-wrapper.swiper,
.elementor-loop-container .e-loop-item .elementor-main-swiper,
.elementor-loop-container .e-loop-item .swiper,
.fwp-resales-loop-ajax-host .e-loop-item .swiper {
	position: relative !important;
	height: auto !important;
	max-height: none !important;
}

.elementor-loop-container .e-loop-item .elementor-swiper-button,
.elementor-loop-container .e-loop-item .elementor-swiper-button-prev,
.elementor-loop-container .e-loop-item .elementor-swiper-button-next,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button-prev,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button-next {
	position: absolute !important;
	top: 50% !important;
	bottom: auto !important;
	transform: translateY(-50%) !important;
	width: 2.5rem !important;
	height: 2.5rem !important;
	max-width: 2.5rem !important;
	max-height: 2.5rem !important;
	margin: 0 !important;
	padding: 0 !important;
	z-index: 40 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	line-height: 1 !important;
	overflow: hidden;
	pointer-events: auto !important;
	touch-action: manipulation;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.elementor-loop-container .e-loop-item .elementor-swiper-button-prev,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button-prev {
	left: 0.4rem !important;
	right: auto !important;
}

.elementor-loop-container .e-loop-item .elementor-swiper-button-next,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button-next {
	right: 0.4rem !important;
	left: auto !important;
}

.elementor-loop-container .e-loop-item .elementor-swiper-button svg,
.elementor-loop-container .e-loop-item .elementor-swiper-button i,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button svg,
.fwp-resales-loop-ajax-host .e-loop-item .elementor-swiper-button i {
	width: 1.15rem !important;
	height: 1.15rem !important;
	max-width: 1.15rem !important;
	max-height: 1.15rem !important;
	display: block !important;
}

.fwp-resales-search__form {
	display: grid;
	gap: 1rem;
	margin-bottom: 1.25rem;
	overflow: visible;
}

.fwp-resales-search {
	overflow: visible;
	position: relative;
	z-index: 5;
}

.fwp-resales-search.is-dropdown-open {
	z-index: 10050;
}

/* Elementor often clips widgets with overflow:hidden — keep dropdowns visible above the Loop. */
.elementor-widget-fwp-resales-search,
.elementor-widget-fwp-resales-search > .elementor-widget-container,
.elementor-element:has(> .elementor-widget-container > .fwp-resales-search),
.elementor-element:has(.fwp-resales-search) {
	overflow: visible !important;
}

.elementor-widget-fwp-resales-search:has(.is-open),
.elementor-element:has(.fwp-resales-search.is-dropdown-open) {
	position: relative;
	z-index: 10050 !important;
}

.fwp-resales-search__field,
.fwp-resales-search__field--compact {
	overflow: visible;
	min-width: 0;
}

.fwp-resales-search__row--fields,
.fwp-resales-search__row--4 {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem;
	align-items: end;
	overflow: visible;
}

.fwp-resales-search__checks {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.75rem 1rem;
	align-items: start;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.fwp-resales-search__checks label,
.fwp-resales-search__check {
	display: flex;
	gap: 0.4rem;
	align-items: flex-start;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	font-size: 0.95rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.fwp-resales-search__check input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 0.15em;
}

.fwp-resales-search__field--compact {
	gap: 0;
}

.fwp-resales-search__field--compact > .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.fwp-resales-search__field input[type="text"],
.fwp-resales-search__field input[type="number"],
.fwp-resales-search__field select {
	width: 100%;
	min-height: 2.5rem;
	box-sizing: border-box;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	padding: 0.55rem 0.75rem;
	background: #f9fafb;
	font: inherit;
}

.fwp-resales-search__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-start;
	align-items: center;
}

/* Place Buscar / Limpiar in the fields grid, next to the last filter. */
.fwp-resales-search--actions-inline .fwp-resales-search__row--fields > .fwp-resales-search__actions {
	grid-column: span 2;
	align-self: end;
	min-height: 2.5rem;
}

.fwp-resales-search--actions-inline .fwp-resales-search__row--fields > .fwp-resales-search__actions .fwp-resales-search__submit,
.fwp-resales-search--actions-inline .fwp-resales-search__row--fields > .fwp-resales-search__actions .fwp-resales-search__clear {
	flex: 1 1 auto;
	min-width: 0;
	white-space: nowrap;
}

.fwp-resales-search__clear {
	appearance: none;
	border: 1px solid #d1d5db;
	background: #fff;
	color: #374151;
	padding: 0.55rem 1rem;
	border-radius: 0.45rem;
	cursor: pointer;
	font: inherit;
}

.fwp-resales-search__clear:hover {
	border-color: #9ca3af;
	background: #f9fafb;
}

.fwp-resales-search__field,
.fwp-resales-contact label,
.fwp-resales-mortgage label {
	display: grid;
	gap: 0.35rem;
}

.fwp-resales-search__field--location {
	position: relative;
}

.fwp-resales-search__location-wrap {
	position: relative;
}

.fwp-resales-search__field select,
.fwp-resales-autocomplete {
	width: 100%;
	min-height: 2.5rem;
	box-sizing: border-box;
}

.fwp-resales-autocomplete {
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	padding: 0.55rem 0.75rem;
	background: #f9fafb;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fwp-resales-autocomplete:focus {
	border-color: #c45c26;
	box-shadow: 0 0 0 3px color-mix(in srgb, #c45c26 20%, transparent);
	outline: none;
	background: #fff;
}

.fwp-resales-search__suggestions {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 0.25rem);
	z-index: 40;
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0.35rem 0;
	overflow-y: auto;
	max-height: 260px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.fwp-resales-search__suggestions[hidden] {
	display: none !important;
}

.fwp-resales-search__suggestion {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	margin: 0;
	padding: 0.55rem 0.85rem;
	border: 0;
	background: transparent;
	text-align: left;
	cursor: pointer;
	appearance: none;
	font: inherit;
}

.fwp-resales-search__suggestion:hover,
.fwp-resales-search__suggestion:focus-visible {
	outline: none;
}

.fwp-resales-search__suggestion-thumb {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 0.45rem;
	object-fit: cover;
	background: #e5e7eb;
}

.fwp-resales-search__suggestion-thumb--empty {
	display: inline-block;
}

.fwp-resales-search__suggestion-label {
	flex: 1 1 auto;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.3;
}

.fwp-resales-search__field-label {
	display: block;
	margin-bottom: 0.35rem;
}

.fwp-resales-search__price {
	position: relative;
	--fwp-price-accent: #1f4b7a;
	--fwp-price-track: #d1d5db;
	--fwp-price-thumb-size: 18px;
	--fwp-price-thumb-border: #fff;
	z-index: 5;
	overflow: visible;
}

.fwp-resales-search__price.is-open {
	z-index: 10060;
}

.fwp-resales-search__price-trigger,
.fwp-resales-search__type-trigger,
.fwp-resales-search__location-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	min-height: 2.5rem;
	padding: 0.55rem 0.85rem;
	border: 1px solid #d1d5db;
	border-radius: 0.15rem;
	background: #f8f6f2;
	color: #374151;
	font: inherit;
	text-align: left;
	cursor: pointer;
	box-sizing: border-box;
}

.fwp-resales-search__price-trigger-text,
.fwp-resales-search__type-trigger-text,
.fwp-resales-search__location-trigger-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	min-width: 0;
	flex: 1 1 auto;
}

.fwp-resales-search__price-chevron,
.fwp-resales-search__type-chevron,
.fwp-resales-search__location-chevron {
	width: 0.55rem;
	height: 0.55rem;
	border-right: 2px solid #4b5563;
	border-bottom: 2px solid #4b5563;
	transform: rotate(45deg);
	margin-top: -0.2rem;
	flex: 0 0 auto;
}

.fwp-resales-search__price.is-open .fwp-resales-search__price-chevron,
.fwp-resales-search__type.is-open .fwp-resales-search__type-chevron,
.fwp-resales-search__location.is-open .fwp-resales-search__location-chevron {
	transform: rotate(-135deg);
	margin-top: 0.2rem;
}

.fwp-resales-search__price-panel,
.fwp-resales-search__type-panel,
.fwp-resales-search__location-panel {
	position: absolute;
	left: 0;
	right: auto;
	top: calc(100% + 0.5rem);
	bottom: auto;
	z-index: 10070;
	margin: 0;
	padding: 1rem 1rem 0.85rem;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.35rem;
	box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
	width: min(360px, calc(100vw - 2rem));
	min-width: min(280px, calc(100vw - 2rem));
	max-width: calc(100vw - 2rem);
	box-sizing: border-box;
}

.fwp-resales-search__price-panel[hidden],
.fwp-resales-search__type-panel[hidden],
.fwp-resales-search__location-panel[hidden] {
	display: none !important;
}

.fwp-resales-search__location-panel-title,
.fwp-resales-search__type-panel-title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid #e5e7eb;
	color: #6b7280;
	font-size: 0.95rem;
}

.fwp-resales-search__location-fields,
.fwp-resales-search__type-fields {
	display: grid;
	gap: 0.75rem;
	margin-bottom: 0.35rem;
}

.fwp-resales-search__location-field,
.fwp-resales-search__type-field {
	display: grid;
	gap: 0.3rem;
	min-width: 0;
}

.fwp-resales-search__location-field span,
.fwp-resales-search__type-field span {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--fwp-price-accent, #1f4b7a);
}

.fwp-resales-search__location-field select,
.fwp-resales-search__type-field select {
	width: 100%;
	min-height: 2.5rem;
	box-sizing: border-box;
	border: 1px solid color-mix(in srgb, var(--fwp-price-accent, #1f4b7a) 55%, #d1d5db);
	border-radius: 0.35rem;
	padding: 0.55rem 0.75rem;
	background: #fff;
	color: #111827;
	font: inherit;
	appearance: none;
	-webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #4b5563 50%), linear-gradient(135deg, #4b5563 50%, transparent 50%);
	background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 12px) calc(50% + 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 2rem;
}

.fwp-resales-search__location-field select:focus,
.fwp-resales-search__type-field select:focus {
	outline: none;
	border-color: var(--fwp-price-accent, #1f4b7a);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fwp-price-accent, #1f4b7a) 18%, transparent);
}

.fwp-resales-search__location-field select:disabled,
.fwp-resales-search__type-field select:disabled {
	background-color: #f3f4f6;
	color: #9ca3af;
	cursor: not-allowed;
}

.fwp-resales-search__location-panel-row,
.fwp-resales-search__type-panel-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.fwp-resales-search__location-apply,
.fwp-resales-search__location-reset,
.fwp-resales-search__type-apply,
.fwp-resales-search__type-reset {
	appearance: none;
	border: 1px solid transparent;
	padding: 0.55rem 1rem;
	border-radius: 0.35rem;
	cursor: pointer;
	font: inherit;
}

.fwp-resales-search__location-apply,
.fwp-resales-search__type-apply {
	background: var(--fwp-price-accent, #1f4b7a);
	color: #fff;
	border-color: var(--fwp-price-accent, #1f4b7a);
	display: none !important;
}

.fwp-resales-search__location-reset,
.fwp-resales-search__type-reset {
	display: block;
	width: 100%;
	margin-top: 0.65rem;
	background: #fff;
	color: #374151;
	border-color: #d1d5db;
}

.fwp-resales-search__location-summary,
.fwp-resales-search__type-summary {
	color: #111827;
	font-weight: 600;
	font-size: 0.95rem;
}

.fwp-resales-search__price-panel-title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid #e5e7eb;
	color: #6b7280;
	font-size: 0.95rem;
}

.fwp-resales-search__price-fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 0.65rem;
	align-items: end;
	margin-bottom: 0.35rem;
	width: 100%;
}

.fwp-resales-search__price-field {
	display: grid;
	gap: 0.3rem;
	min-width: 0;
}

.fwp-resales-search__price-field span {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--fwp-price-accent, #1f4b7a);
}

.fwp-resales-search__price-edit {
	display: block;
	width: 100%;
	min-width: 0;
	min-height: 2.7rem;
	box-sizing: border-box;
	border: 1px solid color-mix(in srgb, var(--fwp-price-accent, #1f4b7a) 55%, #d1d5db);
	border-radius: 0.35rem;
	padding: 0.6rem 0.75rem;
	background: #fff;
	color: #111827;
	font: inherit;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.01em;
	text-align: left;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: textfield;
}

.fwp-resales-search__price-edit::-webkit-outer-spin-button,
.fwp-resales-search__price-edit::-webkit-inner-spin-button {
	appearance: none;
	margin: 0;
}

.fwp-resales-search__price-edit:focus {
	outline: none;
	border-color: var(--fwp-price-accent, #1f4b7a);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--fwp-price-accent, #1f4b7a) 18%, transparent);
}

.fwp-resales-search__price-sep {
	padding-bottom: 0.55rem;
	color: #9ca3af;
	font-weight: 600;
}

.fwp-resales-search__price-hint {
	margin: 0 0 0.85rem;
	font-size: 0.78rem;
	color: #9ca3af;
}

.fwp-resales-search__price-slider {
	position: relative;
	height: 2.25rem;
	margin: 0.35rem 0 1rem;
}

.fwp-resales-search__price-track {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 4px;
	transform: translateY(-50%);
	background: var(--fwp-price-track, #d1d5db);
	border-radius: 999px;
}

.fwp-resales-search__price-range {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	background: var(--fwp-price-accent);
	border-radius: 999px;
}

.fwp-resales-search__price-thumb {
	position: absolute;
	left: 0;
	top: 50%;
	width: 100%;
	margin: 0;
	transform: translateY(-50%);
	appearance: none;
	background: transparent;
	pointer-events: none;
	height: 2.25rem;
}

.fwp-resales-search__price-thumb::-webkit-slider-thumb {
	appearance: none;
	width: var(--fwp-price-thumb-size, 18px);
	height: var(--fwp-price-thumb-size, 18px);
	border-radius: 50%;
	background: var(--fwp-price-accent);
	border: 2px solid var(--fwp-price-thumb-border, #fff);
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
	pointer-events: auto;
	cursor: pointer;
}

.fwp-resales-search__price-thumb::-moz-range-thumb {
	width: var(--fwp-price-thumb-size, 18px);
	height: var(--fwp-price-thumb-size, 18px);
	border-radius: 50%;
	background: var(--fwp-price-accent);
	border: 2px solid var(--fwp-price-thumb-border, #fff);
	box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
	pointer-events: auto;
	cursor: pointer;
}

.fwp-resales-search__price-thumb--min {
	z-index: 3;
}

.fwp-resales-search__price-thumb--max {
	z-index: 4;
}

.fwp-resales-search__price-thumb::-webkit-slider-runnable-track,
.fwp-resales-search__price-thumb::-moz-range-track {
	background: transparent;
	border: none;
	height: 4px;
}

.fwp-resales-search__price-panel-row {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin-bottom: 0.75rem;
}

.fwp-resales-search__price-apply,
.fwp-resales-search__price-reset {
	appearance: none;
	border: 1px solid #d1d5db;
	background: #f3f4f6;
	color: #111827;
	padding: 0.45rem 0.9rem;
	border-radius: 0.2rem;
	font: inherit;
	cursor: pointer;
}

.fwp-resales-search__price-apply {
	display: none !important;
}

.fwp-resales-search__price-reset {
	width: 100%;
	text-align: center;
}

.fwp-resales-search__price-summary {
	color: #111827;
	font-weight: 600;
	font-size: 0.95rem;
}

.fwp-resales-search__type,
.fwp-resales-search__location {
	position: relative;
	z-index: 5;
	overflow: visible;
	min-width: 0;
}

.fwp-resales-search__type.is-open,
.fwp-resales-search__location.is-open {
	z-index: 10060;
}

.fwp-resales-search__type-trigger {
	border: 1px solid var(--fwp-type-border, #d1d5db);
	border-radius: var(--fwp-type-radius, 0.15rem);
	background: var(--fwp-type-bg, #f8f6f2);
	color: var(--fwp-type-color, #374151);
}

.fwp-resales-search__type-chevron {
	border-right-color: var(--fwp-type-chevron, #4b5563);
	border-bottom-color: var(--fwp-type-chevron, #4b5563);
}

.fwp-resales-search__results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1.25rem;
}

.fwp-resales-virtual-tour {
	margin: 1.25rem 0;
}

.fwp-resales-virtual-tour__frame {
	display: block;
	width: 100%;
	background: #0f172a;
}

.fwp-resales-virtual-tour__unavailable {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 1.25rem 1rem;
	margin: 0;
	text-align: center;
	color: #4b5563;
	background: #f3f4f6;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
}

.fwp-resales-virtual-tour__unavailable-text {
	margin: 0;
}

.fwp-resales-gallery--grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 0.75rem;
}

.fwp-resales-gallery--grid .fwp-resales-gallery__item {
	margin: 0;
	overflow: hidden;
	background: #e8eef3;
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
}

.fwp-resales-gallery--grid img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Single property: 1 large left + 2 stacked right */
.fwp-resales-gallery--hero-split,
.fwp-resales-single__carousel {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	gap: 0.5rem;
	width: 100%;
	align-items: stretch;
	margin-bottom: 1.25rem;
}

.fwp-resales-gallery--hero-split.fwp-resales-gallery--count-1 {
	grid-template-columns: 1fr;
}

.fwp-resales-gallery__main,
.fwp-resales-single__carousel-item:first-child {
	margin: 0;
	min-width: 0;
	overflow: hidden;
	background: #e8eef3;
	aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
}

.fwp-resales-gallery--hero-split.fwp-resales-gallery--count-2 .fwp-resales-gallery__side {
	grid-template-rows: 1fr;
}

.fwp-resales-gallery__side-item,
.fwp-resales-single__carousel-item:nth-child(n + 2) {
	margin: 0;
	min-height: 0;
	overflow: hidden;
	background: #e8eef3;
}

.fwp-resales-gallery--hero-split img,
.fwp-resales-single__carousel img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.fwp-resales-gallery__side {
	display: grid;
	grid-template-rows: 1fr 1fr;
	gap: 0.5rem;
	min-width: 0;
	min-height: 0;
}

.fwp-resales-gallery__trigger {
	cursor: zoom-in;
	margin: 0;
}

.fwp-resales-single-gallery .elementor-location-single .elementor-widget-image:not(.e-loop-item):not(.elementor-widget-theme-site-logo):not(.elementor-widget-site-logo),
.fwp-resales-single-gallery .elementor-widget-image-carousel .swiper-slide {
	cursor: zoom-in;
}

.fwp-resales-single-gallery .elementor-location-single .elementor-widget-image:not(.elementor-widget-theme-site-logo):not(.elementor-widget-site-logo) img,
.fwp-resales-single-gallery .elementor-widget-image-carousel .swiper-slide img {
	pointer-events: auto;
}

/* Header: do not restyle logo/flags — only hide our gallery loaders there. */
html.fwp-resales-single-gallery .elementor-location-header .elementor-widget-image .elementor-widget-container,
html.fwp-resales-single-gallery header .elementor-widget-image .elementor-widget-container {
	min-height: 0 !important;
	background: transparent !important;
	animation: none !important;
}

html.fwp-resales-single-gallery .elementor-location-header .fwp-resales-img-loader,
html.fwp-resales-single-gallery header .fwp-resales-img-loader {
	display: none !important;
}

html.fwp-resales-single-gallery .elementor-location-single .elementor-widget-image:not(.e-loop-item):not(.elementor-widget-theme-site-logo):not(.elementor-widget-site-logo) .elementor-widget-container,
html.fwp-resales-single-gallery .elementor-location-single .elementor-widget-image-carousel .swiper-slide,
html.fwp-resales-single-gallery .fwp-resales-gallery__frame {
	position: relative;
	overflow: hidden;
	min-height: 8rem;
	background: #eef2f6;
}

html.fwp-resales-single-gallery .fwp-resales-img-host.is-loading {
	background: radial-gradient(120% 90% at 50% 40%, #f7f9fb 0%, #e8eef4 55%, #dde5ee 100%);
}

html.fwp-resales-single-gallery .fwp-resales-img-host.is-loaded {
	background: transparent;
	min-height: 0;
}

html.fwp-resales-single-gallery .elementor-location-single .fwp-resales-img-pending {
	opacity: 0 !important;
	visibility: hidden !important;
}

html.fwp-resales-single-gallery .elementor-location-single .fwp-resales-img-ready {
	opacity: 1 !important;
	visibility: visible !important;
	transition: opacity 0.35s ease;
}

html.fwp-resales-single-gallery .elementor-location-single img.fwp-resales-img-empty,
html.fwp-resales-single-gallery .elementor-location-single img.fwp-resales-img-failed {
	display: none !important;
}

.fwp-resales-img-loader {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.fwp-resales-img-loader__mark {
	position: relative;
	width: min(28%, 5.5rem);
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: fwp-resales-loader-pulse 1.6s ease-in-out infinite;
}

.fwp-resales-img-loader__mark::before {
	content: "";
	position: absolute;
	inset: -18%;
	border-radius: 50%;
	border: 1.5px solid rgba(26, 54, 93, 0.12);
	border-top-color: rgba(74, 144, 200, 0.85);
	animation: fwp-resales-loader-spin 1s linear infinite;
}

.fwp-resales-img-loader__mark svg {
	width: 72%;
	height: 72%;
	object-fit: contain;
	display: block;
}

@keyframes fwp-resales-loader-pulse {
	0%,
	100% {
		transform: scale(0.96);
		opacity: 0.78;
	}

	50% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes fwp-resales-loader-spin {
	to {
		transform: rotate(360deg);
	}
}

.fwp-resales-gallery__trigger:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

html.fwp-resales-lightbox-open {
	overflow: hidden;
}

.fwp-resales-lightbox[hidden] {
	display: none !important;
}

.fwp-resales-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
}

.fwp-resales-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
}

.fwp-resales-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: 3.5rem 1.25rem 1.5rem;
	box-sizing: border-box;
}

.fwp-resales-lightbox__stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	max-width: min(1100px, 96vw);
	width: 100%;
}

.fwp-resales-lightbox__main {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
	max-width: min(1100px, 96vw);
	background: transparent;
}

.fwp-resales-lightbox__viewport {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
}

.fwp-resales-lightbox__adjacent {
	flex: 0 0 18%;
	max-width: 18%;
	max-height: 52vh;
	width: auto;
	height: auto;
	object-fit: cover;
	opacity: 0.38;
	filter: brightness(0.55);
	pointer-events: none;
	user-select: none;
	border-radius: 2px;
}

.fwp-resales-lightbox__adjacent[hidden] {
	display: none !important;
}

.fwp-resales-lightbox__figure {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 64%;
	text-align: center;
	background: #111;
}

.fwp-resales-lightbox__img {
	max-width: 100%;
	max-height: 62vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
	background: #111;
}

.fwp-resales-lightbox__counter {
	margin: 0;
	color: #f0f0f1;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
}

.fwp-resales-lightbox__thumbs-row {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	width: 100%;
	max-width: 42rem;
}

.fwp-resales-lightbox__thumbs-row[hidden] {
	display: none !important;
}

.fwp-resales-lightbox__thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 0.4rem;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.fwp-resales-lightbox__thumb {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 2px;
	overflow: hidden;
	cursor: pointer;
	background: #1a1a1a;
	opacity: 0.78;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.fwp-resales-lightbox__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.fwp-resales-lightbox__thumb:hover,
.fwp-resales-lightbox__thumb:focus-visible {
	opacity: 1;
	outline: none;
}

.fwp-resales-lightbox__thumb.is-active {
	opacity: 1;
	border-color: #c4a574;
}

/* Theme often paints Elementor/theme buttons pink — lock FlameWP controls to white. */
.fwp-resales-lightbox .fwp-resales-lightbox__close,
.fwp-resales-lightbox .fwp-resales-lightbox__nav,
.fwp-resales-lightbox .fwp-resales-lightbox__thumbs-nav,
.fwp-resales-lightbox button.fwp-resales-lightbox__close,
.fwp-resales-lightbox button.fwp-resales-lightbox__nav,
.fwp-resales-lightbox button.fwp-resales-lightbox__thumbs-nav {
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	outline: none !important;
	color: #ffffff !important;
	fill: #ffffff !important;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
	cursor: pointer;
	line-height: 1;
	z-index: 5;
	opacity: 1 !important;
	transition: opacity 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.fwp-resales-lightbox .fwp-resales-lightbox__close:hover,
.fwp-resales-lightbox .fwp-resales-lightbox__close:focus,
.fwp-resales-lightbox .fwp-resales-lightbox__close:active,
.fwp-resales-lightbox .fwp-resales-lightbox__nav:hover,
.fwp-resales-lightbox .fwp-resales-lightbox__nav:focus,
.fwp-resales-lightbox .fwp-resales-lightbox__nav:active,
.fwp-resales-lightbox .fwp-resales-lightbox__thumbs-nav:hover:not(:disabled),
.fwp-resales-lightbox .fwp-resales-lightbox__thumbs-nav:focus:not(:disabled),
.fwp-resales-lightbox .fwp-resales-lightbox__thumbs-nav:active:not(:disabled) {
	border: 0 !important;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #ffffff !important;
	fill: #ffffff !important;
	opacity: 0.82 !important;
}

.fwp-resales-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	left: auto;
	width: 2.75rem;
	height: 2.75rem;
	font-size: 2.25rem;
	font-weight: 300;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fwp-resales-lightbox__nav {
	position: static;
	transform: none;
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.85rem;
	font-weight: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
}

.fwp-resales-lightbox__nav--prev,
.fwp-resales-lightbox__nav--next {
	left: auto;
	right: auto;
}

.fwp-resales-lightbox__thumbs-nav {
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.85rem;
	font-weight: 300;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fwp-resales-lightbox__thumbs-nav:disabled {
	opacity: 0.35 !important;
	cursor: default;
}

.fwp-resales-lightbox__thumbs-nav[hidden] {
	visibility: hidden;
}

.fwp-resales-lightbox__thumb img {
	background: #222;
}

@media (max-width: 767px) {
	.fwp-resales-lightbox__dialog {
		padding: 3.25rem 0.5rem 1rem;
	}

	.fwp-resales-lightbox__img {
		max-height: 52vh;
	}

	.fwp-resales-lightbox__thumbs {
		/* Match JS VISIBLE_THUMBS (5) so the active thumb stays centered on mobile. */
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 0.25rem;
	}

	.fwp-resales-lightbox__nav {
		width: 2.25rem;
		height: 2.25rem;
		font-size: 1.6rem;
	}

	.fwp-resales-lightbox__main {
		gap: 0.35rem;
	}

	.fwp-resales-lightbox__adjacent {
		display: none !important;
	}

	.fwp-resales-lightbox__figure {
		max-width: 100%;
	}

	.fwp-resales-lightbox__close {
		top: 0.75rem;
		right: 0.75rem;
		left: auto;
	}
}

/* Elementor carousels with multiple visible slides: keep every slide clickable. */
body:not(.elementor-editor-active) .elementor-widget-image-carousel .swiper-slide {
	pointer-events: auto;
}

/* Fallback template: first image spans full height of the right stack */
.fwp-resales-single__carousel {
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
	grid-template-rows: 1fr 1fr;
}

.fwp-resales-single__carousel-item:first-child {
	grid-row: 1 / -1;
	aspect-ratio: auto;
	height: 100%;
}

.fwp-resales-single__carousel-item {
	margin: 0;
	overflow: hidden;
	background: #e8eef3;
}

.fwp-resales-search__map,
.fwp-resales-map {
	margin-top: 1.25rem;
	min-height: 280px;
	background: #e8eef3;
}

.fwp-resales-map__empty {
	margin: 0;
	padding: 2rem 1rem;
	text-align: center;
	color: #50575e;
}

@media (max-width: 900px) {
	.fwp-resales-gallery--hero-split,
	.fwp-resales-single__carousel {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}

	.fwp-resales-gallery__main,
	.fwp-resales-single__carousel-item:first-child {
		grid-row: auto;
		aspect-ratio: var(--fwp-gallery-aspect, 4 / 3);
	}

	.fwp-resales-gallery__side {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: none;
	}

	.fwp-resales-gallery--hero-split.fwp-resales-gallery--count-2 .fwp-resales-gallery__side {
		grid-template-columns: 1fr;
	}

	.fwp-resales-search__row--fields,
	.fwp-resales-search__row--4,
	.fwp-resales-search__checks {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fwp-resales-search__checks {
		gap: 0.65rem 0.75rem;
	}

	.fwp-resales-search--actions-inline .fwp-resales-search__row--fields > .fwp-resales-search__actions {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.fwp-resales-search__row--fields,
	.fwp-resales-search__row--4 {
		grid-template-columns: 1fr;
	}

	/* Keep amenity checks in two columns on phones so they stay compact without overflowing. */
	.fwp-resales-search__checks {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.55rem 0.65rem;
	}

	.fwp-resales-search__check {
		font-size: 0.9rem;
	}

	.fwp-resales-search--actions-inline .fwp-resales-search__row--fields > .fwp-resales-search__actions {
		grid-column: auto;
		flex-direction: column;
		align-items: stretch;
	}
}

.fwp-resales-features {
	margin: 0;
	padding-left: 1.1rem;
}

.fwp-resales-price {
	font-size: 1.5rem;
	font-weight: 700;
}

.fwp-resales-agent-card {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.fwp-resales-agent-card__photo {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.fwp-resales-single__hero img {
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
}

.fwp-resales-single__content {
	max-width: 880px;
	margin: 2rem auto;
	padding: 0 1rem;
}

.fwp-resales-single__meta {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.fwp-resales-list-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	flex-wrap: wrap;
	width: 100%;
	margin: 0 0 1.25rem;
}

.fwp-resales-list-toolbar__count {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #4b5563;
}

.fwp-resales-list-toolbar__count-strong,
.fwp-resales-list-toolbar__count-number {
	font-weight: 700;
	color: #111827;
}

.fwp-resales-list-toolbar__count-rest {
	font-weight: 400;
}

.fwp-resales-list-toolbar__sort {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
}

.fwp-resales-list-toolbar__sort-label {
	font-size: 0.95rem;
	font-weight: 700;
	color: #111827;
}

.fwp-resales-list-toolbar__sort-options {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.85rem;
}

.fwp-resales-list-toolbar__sort-link {
	font-size: 0.95rem;
	font-weight: 500;
	color: #4b5563;
	text-decoration: none;
	transition: color 0.15s ease;
}

.fwp-resales-list-toolbar__sort-link:hover,
.fwp-resales-list-toolbar__sort-link:focus-visible {
	color: #c4a574;
}

.fwp-resales-list-toolbar__sort-link.is-active {
	color: #c4a574;
	font-weight: 600;
}

.fwp-resales-loop-loader {
	display: none;
	position: relative;
	z-index: 2;
	grid-column: 1 / -1;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	padding: 0.5rem 0 1rem;
	width: 100%;
	max-width: 100%;
	pointer-events: none;
	background: transparent;
	box-sizing: border-box;
}

/* Span full Elementor Loop Grid — otherwise one grid cell squeezes cards into pills. */
.elementor-loop-container.elementor-grid > .fwp-resales-loop-loader {
	grid-column: 1 / -1 !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
}

.fwp-resales-loop-loader.is-visible,
html.fwp-resales-loop-pending .fwp-resales-loop-loader {
	display: grid !important;
}

.fwp-resales-loop-loader__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 100%;
	background: rgb(255 255 255 / 55%);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgb(17 24 39 / 6%);
}

.fwp-resales-loop-loader__image {
	width: 100%;
	min-height: 9rem;
	aspect-ratio: 4 / 3;
	background: linear-gradient(110deg, #e8e4dc 8%, #f4f0e8 18%, #e8e4dc 33%);
	background-size: 200% 100%;
	animation: fwp-resales-loop-shimmer 1.35s linear infinite;
}

.fwp-resales-loop-loader__lines {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 1rem 1rem 1.15rem;
}

.fwp-resales-loop-loader__lines span {
	display: block;
	height: 0.75rem;
	border-radius: 999px;
	background: linear-gradient(110deg, #e8e4dc 8%, #f4f0e8 18%, #e8e4dc 33%);
	background-size: 200% 100%;
	animation: fwp-resales-loop-shimmer 1.35s linear infinite;
}

.fwp-resales-loop-loader__lines span:nth-child(1) {
	width: 72%;
}

.fwp-resales-loop-loader__lines span:nth-child(2) {
	width: 48%;
	animation-delay: 0.12s;
}

.fwp-resales-loop-loader__lines span:nth-child(3) {
	width: 36%;
	animation-delay: 0.24s;
}

@keyframes fwp-resales-loop-shimmer {
	0% {
		background-position: 100% 0;
	}

	100% {
		background-position: -100% 0;
	}
}

@media (max-width: 1024px) {
	.fwp-resales-loop-loader {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 782px) {
	.fwp-resales-list-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.fwp-resales-list-toolbar__sort {
		width: 100%;
		justify-content: flex-start;
	}

	.fwp-resales-loop-loader {
		grid-template-columns: 1fr;
		min-height: 24rem;
	}
}

@media (max-width: 782px) {
	.fwp-resales-grid-widget {
		grid-template-columns: 1fr;
	}

	.fwp-resales-list-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.fwp-resales-list-toolbar__sort {
		width: 100%;
		justify-content: flex-start;
	}
}

/* Loop Grid pagination: prevent wrapped page buttons overlapping on mobile. */
.elementor-widget-loop-grid .elementor-pagination,
.elementor-widget-loop-grid nav.elementor-pagination,
.elementor-location-archive .elementor-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	align-content: flex-start;
	gap: 0.5rem;
	row-gap: 0.65rem;
	width: 100%;
	max-width: 100%;
	height: auto !important;
	min-height: 0;
	line-height: normal;
	overflow: visible;
}

.elementor-widget-loop-grid .elementor-pagination .page-numbers,
.elementor-widget-loop-grid nav.elementor-pagination .page-numbers,
.elementor-location-archive .elementor-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: static;
	float: none;
	margin: 0 !important;
	vertical-align: middle;
	box-sizing: border-box;
	flex: 0 0 auto;
	line-height: 1.2;
}

.fwp-resales-search__pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	row-gap: 0.65rem;
}

@media (max-width: 782px) {
	.elementor-widget-loop-grid .elementor-pagination,
	.elementor-widget-loop-grid nav.elementor-pagination,
	.elementor-location-archive .elementor-pagination {
		gap: 0.4rem;
		row-gap: 0.75rem;
		padding-block: 0.35rem 0.75rem;
	}
}

/**
 * Elementor message textarea (property inquiry + contact Comments):
 * theme forces textarea { height: 3rem } (and Elementor may set height:15px inline).
 * Taller default without !important so the native resize handle still works;
 * inline collapse is corrected in public.js.
 */
.elementor-field-group-message textarea.elementor-field-textual,
textarea#form-field-message.elementor-field-textual {
	height: 6.4rem;
	min-height: 6.4rem;
	resize: vertical;
}
