/* BOREA Properties — uses the theme's tokens when present, with fallbacks. */
.borea-grid, .borea-property, .borea-filters, .borea-empty, .borea-empty-box {
	--bp-accent: var(--petrol, #0f4c5c);
	--bp-muted: var(--moss, #5f6d59);
	--bp-ink: var(--charcoal, #1a1c1e);
	--bp-soft: var(--stone, #f4f2ec);
	--bp-line: var(--line-soft, #1a1c1e14);
	--bp-display: var(--font-display, inherit);
	--bp-radius: var(--radius-md, 4px);
}

/* ---------- Cards ---------- */
.borea-grid {
	display: grid;
	gap: 32px 24px;
	grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}
.borea-grid--1 { --cols: 1; }
.borea-grid--2 { --cols: 2; }
.borea-grid--3 { --cols: 3; }
.borea-grid--4 { --cols: 4; }
@media (max-width: 959px) { .borea-grid { --cols: 2 !important; } }
@media (max-width: 569px) { .borea-grid { --cols: 1 !important; } }

.borea-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3; /* landscape photos on the cards */
	overflow: hidden;
	background: var(--bp-soft);
	border-radius: var(--bp-radius);
}
/* Pinned to the four sides: Safari ignores height: 100% inside a box sized only by aspect-ratio. */
.borea-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s ease; }
.borea-card:hover .borea-card__media img { transform: scale(1.03); }
.borea-card__placeholder {
	position: absolute; inset: 0; display: grid; place-items: center;
	font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--bp-muted);
}
.borea-badge {
	position: absolute; top: 12px; left: 12px; z-index: 2;
	padding: 4px 10px; background: #fff; color: var(--bp-ink, #1a1c1e);
	font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
	border-radius: 2px;
}
.borea-card.is-sold .borea-card__media img,
.borea-card.is-rented .borea-card__media img { filter: grayscale(.6); opacity: .85; }

.borea-card { text-align: left; } /* also inside centred Uncode columns */
.borea-card__body { padding-top: 16px; }
.borea-card__body p { margin: 0; }
.borea-card__zone { font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-muted); }
.borea-card__title { margin: 8px 0 4px !important; font-size: 22px !important; font-weight: 300 !important; line-height: 1.3 !important; }
.borea-card__title a { color: var(--bp-ink); text-decoration: none; }
.borea-card:hover .borea-card__title a { color: var(--bp-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.borea-card__line { display: flex; flex-direction: column; gap: 2px; line-height: 1.6; } /* price, then the specs under it */
.borea-card__price { font-size: 17px; font-weight: 500; line-height: 1.6; color: var(--bp-ink); font-variant-numeric: tabular-nums; }
.borea-card__specs { font-size: 17px; color: var(--bp-muted); }
/* Sold or rented: the badge says it, the price is not shown (as on the Astro site). */
.borea-card.is-sold .borea-card__price,
.borea-card.is-rented .borea-card__price { display: none; }
.borea-empty { color: var(--bp-muted); }

/* Filtered list without results ("Lo sentimos"): stone box with the text and two buttons. */
.borea-empty-box { padding: 32px; background: var(--bp-soft); border-radius: 2px; }
.borea-empty-box__title { margin: 0 0 12px !important; font-family: var(--bp-display); font-size: 22px !important; font-weight: 300 !important; line-height: 1.3; }
.borea-empty-box p { max-width: 640px; margin: 0; }
.borea-empty-box__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.borea-empty-box__actions .btn { margin: 0 !important; }

.borea-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.borea-pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--bp-line); text-decoration: none; color: var(--bp-ink); }
.borea-pagination .current { background: var(--bp-accent); border-color: var(--bp-accent); color: #fff; }

/* ---------- Single property, as on the Astro site ---------- */
/* Photo + thumbnails | panel (title, price, facts, contact), then the body under the photo. */
.borea-detail {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
	grid-template-areas: "gallery panel" "body panel";
	gap: 32px;
	align-items: start;
	padding-top: 48px;
}
.borea-detail__gallery { grid-area: gallery; min-width: 0; }
.borea-detail__panel { grid-area: panel; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.borea-detail__body { grid-area: body; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
/* Phone/tablet: one column; the panel's parts join the page flow so the contact box can go last
   (gallery, title, facts, plans, description…, contact). Items stretch to the full width. */
@media (max-width: 959px) {
	.borea-detail { display: flex; flex-direction: column; align-items: stretch; gap: 24px; padding-top: 24px; }
	.borea-detail__panel { display: contents; }
	.borea-detail__gallery { order: 1; }
	.borea-detail__panel > header { order: 2; }
	.borea-detail__facts { order: 3; }
	.borea-detail__docs { order: 4; }
	.borea-detail__body { order: 6; margin-top: 24px; }
	.borea-contact { order: 7; margin-top: 24px; padding: 24px; scroll-margin-top: 96px; }
}

.borea-detail__photo { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bp-soft); border-radius: var(--bp-radius); }
.borea-detail__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.borea-detail__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.borea-detail__thumbs a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 2px; background: var(--bp-soft); }
.borea-detail__thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.borea-detail__thumbs a:hover img { transform: scale(1.04); }
.borea-detail__more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(26, 28, 30, .45); color: #fff; font-family: var(--bp-display); font-size: 24px; }

.borea-detail__panel header > * { margin: 0 !important; }
.borea-eyebrow { font-size: 13px; line-height: 20px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-muted); }
.borea-detail__panel header .borea-eyebrow { margin-bottom: 8px !important; }
/* Title, then price one step down and lighter (Jost extra-light), both scaling down on phones. */
.borea-detail__title, .borea-detail__price { font-family: var(--bp-display) !important; letter-spacing: 0 !important; color: var(--bp-ink) !important; }
.borea-detail__title { font-size: clamp(28px, 2.4vw, 34px) !important; font-weight: 300 !important; line-height: 1.18 !important; }
.borea-detail__price { font-size: clamp(22px, 1.8vw, 26px) !important; font-weight: 200 !important; line-height: 1.25 !important; font-variant-numeric: tabular-nums; }
.borea-detail__panel header .borea-detail__price { margin-top: 8px !important; } /* after "header > * { margin: 0 }" */
.borea-detail__price.is-closed { font-family: inherit !important; font-size: 17px !important; font-weight: 600 !important; letter-spacing: .18em !important; text-transform: uppercase; }

.borea-detail__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; margin: 0; }
/* Key facts: small uppercase label (with icon), then the value larger and light, so the numbers read at a glance. */
.borea-detail__facts dt { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 500; line-height: 20px; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-muted); }
.borea-detail__facts dd { margin: 6px 0 0; font-family: var(--bp-display); font-size: clamp(20px, 1.6vw, 22px); font-weight: 300; line-height: 1.3; color: var(--bp-ink); font-variant-numeric: tabular-nums; }
.borea-icon { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--bp-accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.borea-detail__docs { list-style: none; margin: 0; padding: 0; }
.borea-detail__docs li { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--bp-line); }
.borea-detail__docs .borea-icon { width: 28px; height: 28px; }
.borea-detail__docs b { display: block; font-family: var(--bp-display); font-weight: 300; font-size: 17px; line-height: 24px; }
.borea-detail__docs a { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.borea-detail__description > :first-child { margin-top: 0 !important; }
/* Section headings one level under the title (34 px): 28 px, 24 on phones. */
.borea-detail__description h2 { max-width: 760px; font-size: clamp(24px, 2vw, 28px) !important; font-weight: 300 !important; line-height: 1.25 !important; }
.borea-detail__description p { max-width: 666px; line-height: 1.6; }
.borea-detail__know { margin: 0; padding: 16px 24px; background: var(--bp-soft); border-radius: var(--bp-radius); }
.borea-detail__know b { font-weight: 600; }
.borea-detail__section h2 { margin: 0 0 16px !important; font-size: clamp(24px, 2vw, 28px) !important; font-weight: 300 !important; line-height: 1.25 !important; }
.borea-detail__table { width: 100%; margin: 0 !important; border: 0 !important; border-collapse: collapse; background: none !important; }
.borea-detail__table th, .borea-detail__table td { padding: 12px 0 !important; border: 0 !important; border-bottom: 1px solid var(--bp-line) !important; background: none !important; vertical-align: top; text-align: left; font-weight: 400; line-height: 26px !important; } /* no Uncode table grid */
.borea-detail__table th { width: 45%; padding-right: 16px !important; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-muted); } /* same label style as the key facts */
.borea-detail__table td { font-size: 17px; color: var(--bp-ink); }
/* Floor plans row: a link that opens the plans in the lightbox. */
.borea-plan-link { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 26px; color: var(--bp-ink) !important; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.borea-plan-link[hidden] { display: none; }
.borea-plan-link .borea-icon { width: 22px; height: 22px; flex: none; }
.borea-plan-link:hover { color: var(--bp-accent, var(--petrol, #2c5a63)) !important; }

.borea-detail__related { background: var(--bp-soft); }
.borea-detail__related h2 { margin: 0 0 40px !important; font-size: clamp(24px, 2vw, 28px) !important; font-weight: 300 !important; line-height: 1.25 !important; }
.borea-detail__more-link { margin: 48px 0 0 !important; text-align: center; }


.borea-embed, .borea-map { position: relative; aspect-ratio: 16 / 9; background: var(--bp-soft); border-radius: var(--bp-radius); overflow: hidden; }
.borea-embed iframe, .borea-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.borea-map iframe { filter: grayscale(1) contrast(.95); }

/* ---------- Single: contact box (in the panel, under the facts) ---------- */
.borea-contact { background: var(--bp-soft); padding: 32px; border-radius: var(--bp-radius); }
.borea-contact > p:first-child { margin-top: 0; }
.borea-contact__title { margin: 0 0 8px !important; font-size: clamp(22px, 1.7vw, 24px) !important; font-weight: 300 !important; line-height: 1.25 !important; }
.borea-contact__ref { font-size: 13px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--bp-muted); }
.borea-contact__line { margin: 8px 0 0; }
.borea-contact__line a { color: var(--bp-ink); }
/* Contact Form 7 in the box: label and field on consecutive lines, tighter rows. */
.borea-contact .wpcf7-form > p { margin: 16px 0 0 !important; }
.borea-contact .wpcf7-form label > br { display: none; }
.borea-contact .wpcf7-form label { display: block; margin: 0 !important; font-size: 15px; font-weight: 500; line-height: 1.4; }
.borea-contact .wpcf7-form small { font-size: 13px; font-weight: 400; color: var(--bp-muted); }
.borea-contact .wpcf7-list-item-label { font-size: 13px; font-weight: 400; }
.borea-contact .wpcf7-form input:not([type=checkbox]):not([type=submit]), .borea-contact .wpcf7-form textarea { margin-top: 4px !important; }
.borea-contact .wpcf7-form textarea { height: 96px !important; min-height: 0 !important; }
.borea-btn--block { display: block !important; width: 100%; text-align: center; margin: 16px 0 0 !important; }

/* ---------- Agents ---------- */
.borea-agent { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--bp-line); margin-bottom: 16px; }
.borea-agent__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.borea-agent p { margin: 0; }
.borea-agent__name { font-family: var(--bp-display); font-size: 18px; }
.borea-agent__role { font-size: 13px; color: var(--bp-muted); }

/* ---------- Filter bar ([borea_properties filters="1"]), as on the Astro site ---------- */
.borea-filters { scroll-margin-top: 140px; } /* lands under the sticky menu after a filter click (#inmuebles) */
.borea-filters { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--bp-line); }
.borea-filters__group { display: flex; align-items: flex-end; gap: 32px; min-width: 0; }
.borea-filters__tabs { display: flex; gap: 32px; }
.borea-filters__tabs a { display: flex; align-items: flex-end; height: 44px; padding-bottom: 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 17px; line-height: 26px; letter-spacing: .04em; color: var(--bp-muted); text-decoration: none !important; }
.borea-filters__tabs a:hover { color: var(--bp-ink); }
.borea-filters__tabs a.is-active { color: var(--bp-ink); font-weight: 600; border-bottom-color: var(--bp-accent); }
.borea-filters__select { position: relative; display: block; margin: 0; }
.borea-filters__zone { padding-left: 32px; }
.borea-filters__zone::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 16px; width: 1px; background: var(--bp-line); }
.borea-filters select {
	appearance: none; -webkit-appearance: none; cursor: pointer;
	width: auto !important; min-width: 0 !important; field-sizing: content; /* fit the chosen option, as on the Astro site */
	height: 44px !important; margin: 0 !important; padding: 6px 26px 12px 0 !important;
	border: 0 !important; border-radius: 0; box-shadow: none !important;
	font-size: 17px !important; line-height: 26px; color: var(--bp-ink) !important;
	background-color: transparent !important;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%) !important;
	background-position: calc(100% - 10px) 16px, calc(100% - 5px) 16px !important;
	background-size: 5px 5px, 5px 5px !important;
	background-repeat: no-repeat !important;
}
.borea-filters select:hover { color: var(--bp-accent) !important; }
.borea-filters__count { margin: 0 !important; padding: 6px 0 12px; white-space: nowrap; color: var(--bp-muted) !important; }
.borea-filters__count b { font-weight: 600; color: var(--bp-ink); }
@media (max-width: 959px) {
	.borea-filters { flex-direction: column; align-items: stretch; border-bottom: 0; }
	.borea-filters__group:first-child { justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--bp-line); }
	.borea-filters__tabs { gap: 24px; }
	.borea-filters__zone { padding-left: 0; }
	.borea-filters__zone::before { display: none; }
	.borea-filters__group:last-child { justify-content: space-between; align-items: center; }
}

/* [borea_whatsapp] button: on the same line as the call-to-action button before it (Uncode puts each
   button on its own line), stacked with 12 px between on small phones. */
.uncont > .btn-container:has(+ .btn-container > .borea-whatsapp:not(.borea-whatsapp--link)),
.uncont > .btn-container:has(> .borea-whatsapp:not(.borea-whatsapp--link)) { display: inline-block; vertical-align: middle; }
.uncont > .btn-container:has(> .borea-whatsapp:not(.borea-whatsapp--link)) { margin-left: 12px !important; }
@media (max-width: 569px) {
	.uncont > .btn-container:has(> .borea-whatsapp:not(.borea-whatsapp--link)) { display: block; margin: 12px 0 0 !important; }
}

/* [borea_properties empty="hide"] without results: hide the whole section (Uncode row) it sits in. */
.vc_row:has(.borea-hide-section) { display: none !important; }
