/*
 * Koro Island Properties — functional default styles ONLY.
 *
 * Deliberately minimal: single-class selectors, neutral tones, no fonts and
 * no brand colors, so Elementor / theme CSS overrides win easily. The
 * designer replaces the badge colors and everything else in the design phase.
 * Class names mirror the governing mockup DOM (koro- prefixed) so the design
 * CSS ports with a find-and-replace.
 *
 * © 2026 Mad About Islands, LLC; all rights reserved.
 */

/* ---- Listing layout: sidebar + main ------------------------------- */

.koro-listing {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 28px;
	align-items: start;
}

@media (max-width: 782px) {
	.koro-listing {
		grid-template-columns: 1fr;
	}
}

.koro-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ---- Filter groups ------------------------------------------------- */

.koro-filter-heading {
	margin: 0 0 8px;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.7;
}

.koro-filter-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.koro-filter-btn {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 999px;
	text-decoration: none;
	color: inherit;
	font-size: 0.88rem;
	line-height: 1.2;
	background: transparent;
}

.koro-filter-btn:hover {
	border-color: rgba(0, 0, 0, 0.45);
}

.koro-filter-btn.koro-filter--active {
	background: #2b2118;
	border-color: #2b2118;
	color: #fff;
}

.koro-filter-reset {
	font-size: 0.85rem;
	text-decoration: underline;
	color: inherit;
	opacity: 0.75;
}

/* Phase 2 keyword search box (rendered only when the flag is on). */
.koro-filter-search__input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
	font-size: 0.9rem;
}

/* ---- WhatsApp CTA (detail + pop-up, under "Send inquiry") ----------- */

.koro-wa-btn {
	box-sizing: border-box;
	width: 100%;
	margin: 12px 0 0;
}

/* Secondary button, WhatsApp green + glyph. Higher-specificity + brand colour so
   it wins over the neutral base and the skin's koro-btn rules. */
.koro-wa-btn.koro-wa-btn--whatsapp {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #25d366;
	color: #fff;
	border: 0;
	text-decoration: none;
}

.koro-wa-btn.koro-wa-btn--whatsapp:hover {
	background: #1da851;
	color: #fff;
}

.koro-wa-glyph {
	flex: none;
	display: block;
}

/* ---- Pagination ---------------------------------------------------- */

.koro-pagination {
	margin: 28px 0 4px;
	text-align: center;
}

.koro-pagination .page-numbers {
	display: inline-block;
	min-width: 38px;
	padding: 8px 12px;
	margin: 2px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 6px;
	text-decoration: none;
	line-height: 1.2;
	color: inherit;
}

.koro-pagination .page-numbers.current {
	background: #2b2118;
	border-color: #2b2118;
	color: #fff;
}

.koro-pagination .page-numbers.dots {
	border-color: transparent;
}

.koro-pagination ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.koro-pagination li {
	display: inline-block;
	margin: 0;
}

/* ---- Results header ------------------------------------------------ */

.koro-results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.koro-results-count {
	font-size: 0.9rem;
	opacity: 0.75;
}

/* ---- Grid ---------------------------------------------------------- */

.koro-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

.koro-grid-empty {
	margin: 24px 0;
	opacity: 0.7;
}

/* ---- Card ---------------------------------------------------------- */

.koro-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.koro-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.koro-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: #e9e9e9;
	overflow: hidden;
}

.koro-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.koro-card__noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(45deg, #e9e9e9, #e9e9e9 10px, #e2e2e2 10px, #e2e2e2 20px);
}

.koro-card__body {
	padding: 14px 16px 4px;
}

.koro-card__title {
	margin: 0 0 4px;
	font-size: 1.1rem;
	line-height: 1.3;
}

.koro-card__title a {
	text-decoration: none;
	color: inherit;
}

.koro-card__location {
	margin: 0 0 12px;
	font-size: 0.85rem;
	opacity: 0.75;
}

.koro-card__stats {
	display: flex;
	gap: 10px;
}

.koro-stat {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 10px;
	background: rgba(0, 0, 0, 0.04);
	border-radius: 6px;
	min-width: 0; /* allow the value to ellipsize instead of overflowing the flex item */
}

/* Lot Size gets ~60% (its value "0.56 ac (2,250 sqm)" is the longer of the two);
   $/Acre takes the rest. Only split when both boxes are present. */
.koro-card__stats .koro-stat--size:not(:only-child) {
	flex: 0 0 58%;
}

.koro-card__stats .koro-stat--ppa {
	flex: 1 1 auto;
}

.koro-stat__label {
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	opacity: 0.6;
}

.koro-stat__value {
	font-size: 0.92rem;
	font-weight: 600;
	white-space: nowrap;      /* values must never wrap */
	overflow: hidden;         /* safety net: truncate a freak-long value... */
	text-overflow: ellipsis;  /* ...cleanly instead of blowing out the card */
}

.koro-card__footer {
	display: flex;
	gap: 8px;
	padding: 14px 16px 16px;
	margin-top: auto;
}

/* ---- Price chip ---------------------------------------------------- */

.koro-price-chip {
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 5px 12px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.95rem;
	color: #fff;
	background: rgba(20, 14, 8, 0.78);
}

/* ---- Badge --------------------------------------------------------- */

.koro-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	background: #555;
}

.koro-badge--available {
	background: #3a7d44; /* green */
}

.koro-badge--reserved {
	background: #c78a1e; /* amber */
}

.koro-badge--sold {
	background: #b23b3b; /* red */
}

.koro-summary .koro-badge {
	position: static;
	top: auto;
	left: auto;
}

/* ---- Buttons ------------------------------------------------------- */

.koro-btn {
	flex: 1;
	display: inline-block;
	text-align: center;
	padding: 9px 12px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.koro-btn--primary {
	background: #2b2118;
	color: #fff;
}

.koro-btn--primary:hover {
	opacity: 0.9;
}

.koro-btn--secondary {
	background: transparent;
	color: inherit;
	border: 1px solid rgba(0, 0, 0, 0.25);
}

.koro-btn--disabled {
	background: #cfcfcf;
	color: #666;
	cursor: default;
	pointer-events: none;
}

/* ---- Sold state ---------------------------------------------------- */

.koro-card--sold .koro-card__img {
	filter: grayscale(1);
	opacity: 0.75;
}

/* ---- Detail block -------------------------------------------------- */

.koro-detail__gallery,
.koro-detail__summary,
.koro-detail__description,
.koro-detail__video,
.koro-detail__cta {
	margin-bottom: 24px;
}

.koro-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
}

.koro-gallery__item {
	display: block;
	border-radius: 6px;
	overflow: hidden;
}

.koro-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.koro-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.koro-video__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.koro-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	padding: 16px 0;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.koro-summary__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.koro-summary__label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.6;
}

.koro-summary__value {
	font-size: 1.05rem;
	font-weight: 600;
}

.koro-cta__button {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	background: #2b2118;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
}

.koro-cta__button:hover {
	opacity: 0.9;
}

/* ---- Sort dropdown (Phase 2) -------------------------------------- */

.koro-sort {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
}

.koro-sort__select {
	padding: 6px 8px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 6px;
}

/* ---- Contact inquiry-ref line ------------------------------------- */

.koro-inquiry-ref {
	padding: 10px 14px;
	margin: 0 0 16px;
	border-left: 3px solid #2b2118;
	background: rgba(0, 0, 0, 0.04);
	font-size: 0.95rem;
}

/* ---- Single-property detail page (two-column) --------------------- */

.koro-pd {
	max-width: 1180px;
	margin: 0 auto;
}

.koro-pd__crumbs {
	font-size: 0.85rem;
	margin-bottom: 16px;
	opacity: 0.75;
}

.koro-pd__crumbs a {
	color: inherit;
	text-decoration: none;
}

.koro-pd__gallery {
	display: grid;
	grid-template-columns: 1fr 92px;
	gap: 12px;
	margin-bottom: 28px;
}

.koro-pd__stage {
	border-radius: 10px;
	overflow: hidden;
	aspect-ratio: 3 / 2;
	background: #e9e9e9;
}

.koro-pd__leadimg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.koro-pd__thumbs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: calc(100% );
	overflow-y: auto;
}

.koro-pd__thumb {
	display: block;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border: 2px solid transparent;
	opacity: 0.6;
	cursor: pointer;
	transition: opacity 0.15s, border-color 0.15s;
	flex: none;
}

.koro-pd__thumb:hover {
	opacity: 1;
}

.koro-pd__thumb.is-active {
	opacity: 1;
	border-color: #2b2118;
}

.koro-pd__thumbimg {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.koro-pd__cols {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 40px;
	align-items: start;
}

.koro-pd__title {
	margin: 0 0 6px;
	font-size: 1.9rem;
	line-height: 1.15;
}

.koro-pd__meta {
	margin: 0 0 16px;
	opacity: 0.7;
}

.koro-pd__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 24px;
}

.koro-pill {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 0.85rem;
}

.koro-pd__section {
	padding-top: 22px;
	margin-top: 22px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.koro-pd__h2 {
	font-size: 1.15rem;
	margin: 0 0 12px;
}

/* Right column */
.koro-pd__aside {
	position: sticky;
	top: 24px;
}

/* Scroll target for card "Request details" CTAs (#inquire is on .koro-pd__aside).
   scroll-margin-top offsets the anchored scroll so a sticky site header/toolbar
   doesn't cover the form. Tune per site via --koro-anchor-offset in the theme CSS. */
#inquire {
	scroll-margin-top: var(--koro-anchor-offset, 100px);
}

.koro-pd__pricebar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.koro-pd__price {
	font-size: 1.6rem;
	font-weight: 700;
}

.koro-pd__pricebar .koro-badge {
	position: static;
}

/* ---- Contact card + form ------------------------------------------ */

.koro-contact-card {
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 12px;
	padding: 20px;
	background: #fff;
}

.koro-contact-card__title {
	margin: 0 0 10px;
	font-size: 1.15rem;
}

.koro-contact-card__ref {
	font-size: 0.85rem;
	opacity: 0.8;
	margin: 0 0 14px;
}

.koro-contact-card__success {
	padding: 10px 12px;
	border-radius: 8px;
	background: #e3f3e6;
	color: #1e5a2c;
	font-size: 0.9rem;
}

.koro-contact-card__error {
	padding: 10px 12px;
	border-radius: 8px;
	background: #f7e3e3;
	color: #8a2a2a;
	font-size: 0.9rem;
}

.koro-field {
	margin: 0 0 12px;
}

.koro-field label {
	display: block;
	font-size: 0.8rem;
	margin-bottom: 4px;
	opacity: 0.8;
}

.koro-field input,
.koro-field textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	font: inherit;
	box-sizing: border-box;
}

.koro-contact-form__submit {
	width: 100%;
	padding: 12px;
	border: 0;
	border-radius: 8px;
	background: #2b2118;
	color: #fff;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.koro-contact-form__submit:hover {
	opacity: 0.92;
}

/* Honeypot — hidden from humans. */
.koro-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 860px) {
	.koro-pd__cols {
		grid-template-columns: 1fr;
	}
	.koro-pd__aside {
		position: static;
	}
	.koro-pd__gallery {
		grid-template-columns: 1fr;
	}
	.koro-pd__thumbs {
		flex-direction: row;
		overflow-x: auto;
	}
	.koro-pd__thumb {
		width: 80px;
	}
}

/* ---- Phase 3 quick-view modal ------------------------------------- */

.koro-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center; /* centered box, not a full-page takeover */
	justify-content: center;
	overflow-y: auto;
	padding: 24px 16px;
}

.koro-modal__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.koro-modal__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1100px;
	max-height: 90vh;      /* cap height — the page stays visible behind */
	overflow-y: auto;      /* scroll inside the dialog, not the whole page */
	background: #fff;
	border-radius: 12px;
	padding: 30px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ---- Pop-up-only refinements (scoped to .koro-modal; the full detail page is
       unchanged) ------------------------------------------------------------ */

/* Fluid heading sizing (same clamp() approach as the hero). Body text unchanged. */
.koro-modal .koro-pd__title {
	font-size: clamp(2rem, 3.4vw, 2.25rem);      /* ~32–36px */
}
.koro-modal .koro-pd__h2 {
	font-size: clamp(1.25rem, 2vw, 1.375rem);    /* ~20–22px */
}

/* Kill the dead space under the lead image: pin the gallery to a fixed, compact
   row so the tall thumbnail column can't stretch the row past the image cell. */
.koro-modal .koro-pd__gallery {
	grid-template-rows: 56vh;
	margin-bottom: 18px;
}
.koro-modal .koro-pd__stage {
	aspect-ratio: auto;
	height: 100%;
}
.koro-modal .koro-pd__thumbs {
	max-height: 100%;
}

.koro-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	font-size: 1.7rem;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.koro-modal__close:hover {
	opacity: 0.7;
}

body.koro-modal-open {
	position: fixed;
	width: 100%;
	overflow: hidden;
}

/* ---- Featured / random lots section ([kro_random_4]) ---------------- */
/* Structural only — neutral tones, no fonts. Page/Elementor CSS skins it
   (the blue palette in the mockup is page-level, not plugin CSS). */

.koro-r4 {
	margin: 0 auto;
}

.koro-r4-head {
	text-align: center;
	margin-bottom: 28px;
}

.koro-r4-eyebrow {
	margin: 0 0 6px;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
}

.koro-r4-heading {
	margin: 0 0 8px;
	line-height: 1.2;
}

.koro-r4-subheading {
	margin: 0;
	font-size: 0.95rem;
	opacity: 0.75;
}

/* Hero (1fr) + cards (2fr) on desktop. */
.koro-r4-grid {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 24px;
	align-items: stretch;
}

.koro-r4-hero {
	position: relative;
	min-height: 320px;
	display: flex;
	align-items: flex-end;
	border-radius: 8px;
	overflow: hidden;
	background-color: #e9e9e9;
	background-size: cover;
	background-position: center;
}

.koro-r4-hero-caption {
	position: relative;
	padding: 20px;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	/* Neutral scrim so the caption stays legible over any image by default. */
	width: 100%;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

/* Cards: 2x2 on desktop. */
.koro-r4-cards {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.koro-r4-card {
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.koro-r4-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.koro-r4-card-media {
	display: block;
	aspect-ratio: 4 / 3;
	background: #e9e9e9;
	overflow: hidden;
}

.koro-r4-card-media .koro-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.koro-r4-card-title {
	margin: 12px 14px 2px;
	font-size: 1rem;
	line-height: 1.3;
}

.koro-r4-card-title a {
	text-decoration: none;
	color: inherit;
}

.koro-r4-card-loc {
	margin: 0 14px 6px;
	font-size: 0.82rem;
	opacity: 0.75;
}

.koro-r4-card-price {
	margin: 0 14px 10px;
	font-weight: 700;
}

.koro-r4-card-cta {
	margin: auto 14px 14px;
	display: inline-block;
	text-align: center;
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.2;
	background: #2b2118;
	color: #fff;
}

.koro-r4-card-cta:hover {
	opacity: 0.9;
}

/* No hero: the 4 cards fill the full width (still 2x2). */
.koro-r4--no-hero .koro-r4-grid {
	grid-template-columns: 1fr;
}

/* Stack to one column on narrow screens. */
@media (max-width: 768px) {
	.koro-r4-grid {
		grid-template-columns: 1fr;
	}

	.koro-r4-cards {
		grid-template-columns: 1fr;
	}
}
