/* Scan Global Realty listings.
   Theme neutral by design: surfaces, borders and muted text are mixed from the
   inherited text colour, so the same stylesheet reads correctly on a dark or a
   light theme without being told which it is. Override --sgr-accent and the
   radius or spacing tokens in the theme to brand it. */

.sgr-wrap,
.sgr-single,
.sgr-archive {
	--sgr-accent: #0f6e5c;
	--sgr-accent-ink: #ffffff;
	--sgr-surface: color-mix(in srgb, currentColor 5%, transparent);
	--sgr-surface-strong: color-mix(in srgb, currentColor 8%, transparent);
	--sgr-line: color-mix(in srgb, currentColor 16%, transparent);
	--sgr-line-soft: color-mix(in srgb, currentColor 10%, transparent);
	--sgr-muted: color-mix(in srgb, currentColor 62%, transparent);
	--sgr-radius: 14px;
	--sgr-radius-sm: 9px;
	--sgr-gap: 24px;
	--sgr-max: 1200px;
	color: inherit;
}

.sgr-wrap *,
.sgr-single * {
	box-sizing: border-box;
}

/* ---------- Filters ---------- */

.sgr-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: flex-end;
	padding: 18px;
	margin-bottom: var(--sgr-gap);
	background: var(--sgr-surface);
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius);
}

.sgr-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 150px;
}

.sgr-field > span {
	color: var(--sgr-muted);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-size: 10px;
}

.sgr-field select,
.sgr-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius-sm);
	background: var(--sgr-surface-strong);
	color: inherit;
	font: inherit;
	font-size: 14px;
}

.sgr-field select option {
	color: #15202b;
}

.sgr-submit {
	flex: 0 0 auto;
	padding: 11px 24px;
	border: 0;
	border-radius: var(--sgr-radius-sm);
	background: var(--sgr-accent);
	color: var(--sgr-accent-ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sgr-submit:hover {
	filter: brightness(1.12);
}

/* ---------- Grid and cards ---------- */

.sgr-grid {
	display: grid;
	gap: var(--sgr-gap);
	grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 620px) {
	.sgr-cols-2,
	.sgr-cols-3,
	.sgr-cols-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1000px) {
	.sgr-cols-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.sgr-cols-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.sgr-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--sgr-surface);
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.sgr-card:hover {
	border-color: color-mix(in srgb, var(--sgr-accent) 60%, transparent);
	transform: translateY(-3px);
}

.sgr-card-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--sgr-surface-strong);
	overflow: hidden;
}

.sgr-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.sgr-card:hover .sgr-card-media img {
	transform: scale(1.04);
}

.sgr-noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--sgr-surface-strong);
}

.sgr-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 6px 12px;
	border-radius: 100px;
	background: rgba(10, 14, 18, 0.72);
	backdrop-filter: blur(6px);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.sgr-card-body {
	padding: 18px 20px 20px;
}

.sgr-price {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: var(--sgr-accent);
	line-height: 1.2;
}

.sgr-freq {
	font-size: 0.68em;
	font-weight: 600;
	color: var(--sgr-muted);
}

.sgr-card-title {
	margin: 0 0 6px;
	font-size: 16px;
	line-height: 1.45;
}

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

.sgr-card-title a:hover {
	color: var(--sgr-accent);
}

.sgr-address {
	margin: 0 0 14px;
	font-size: 13px;
	color: var(--sgr-muted);
}

.sgr-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0;
	padding: 14px 0 0;
	list-style: none;
	border-top: 1px solid var(--sgr-line-soft);
	font-size: 13px;
	color: var(--sgr-muted);
}

.sgr-pagination ul {
	display: flex;
	gap: 8px;
	list-style: none;
	justify-content: center;
	margin: var(--sgr-gap) 0 0;
	padding: 0;
}

.sgr-pagination a,
.sgr-pagination span {
	display: inline-block;
	padding: 8px 14px;
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius-sm);
	text-decoration: none;
	color: inherit;
	font-size: 14px;
}

.sgr-pagination .current {
	background: var(--sgr-accent);
	border-color: var(--sgr-accent);
	color: var(--sgr-accent-ink);
}

.sgr-empty {
	padding: 48px 32px;
	text-align: center;
	color: var(--sgr-muted);
	border: 1px dashed var(--sgr-line);
	border-radius: var(--sgr-radius);
}

/* ---------- Single property ---------- */

.sgr-single {
	max-width: var(--sgr-max);
	margin: 0 auto;
	/* Clears a fixed or overlaying theme header. */
	padding: clamp(32px, 7vw, 72px) 20px 80px;
}

.sgr-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 20px;
	font-size: 13px;
	color: var(--sgr-muted);
}

.sgr-breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.sgr-breadcrumb a:hover {
	color: var(--sgr-accent);
}

.sgr-breadcrumb span[aria-hidden] {
	opacity: 0.5;
}

.sgr-hero {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 24px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--sgr-line-soft);
}

.sgr-hero-main {
	flex: 1 1 420px;
	min-width: 0;
}

.sgr-eyebrow {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sgr-muted);
}

.sgr-tag {
	padding: 5px 11px;
	border-radius: 100px;
	border: 1px solid var(--sgr-line);
	background: var(--sgr-surface);
}

.sgr-tag-accent {
	border-color: transparent;
	background: var(--sgr-accent);
	color: var(--sgr-accent-ink);
}

.sgr-single h1 {
	margin: 0 0 10px;
	font-size: clamp(25px, 3.4vw, 40px);
	line-height: 1.2;
	color: inherit;
}

.sgr-location-line {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 0;
	font-size: 15px;
	color: var(--sgr-muted);
}

.sgr-location-line svg {
	flex: 0 0 auto;
	margin-top: 3px;
	opacity: 0.8;
}

.sgr-hero-price {
	flex: 0 0 auto;
	text-align: right;
}

.sgr-hero-price .sgr-amount {
	display: block;
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 700;
	line-height: 1.1;
	color: var(--sgr-accent);
}

.sgr-hero-price .sgr-per {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	color: var(--sgr-muted);
}

@media (max-width: 620px) {
	.sgr-hero-price {
		text-align: left;
	}
}

/* Gallery */

.sgr-gallery {
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr;
	margin-bottom: 36px;
}

.sgr-shot {
	position: relative;
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	border-radius: var(--sgr-radius);
	background: var(--sgr-surface-strong);
	cursor: zoom-in;
	aspect-ratio: 4 / 3;
}

.sgr-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.45s ease;
}

.sgr-shot:hover img {
	transform: scale(1.03);
}

.sgr-shot-main {
	aspect-ratio: 16 / 10;
}

.sgr-more {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 14, 18, 0.58);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.sgr-view-all {
	margin: -24px 0 36px;
}

@media (min-width: 760px) {
	/* Scoped so it beats .sgr-btn, which is declared later in this file. */
	.sgr-single .sgr-view-all {
		display: none;
	}

	.sgr-gallery {
		grid-template-columns: 2fr 1fr 1fr;
		grid-template-rows: repeat(2, 1fr);
	}

	.sgr-shot-main {
		grid-column: 1;
		grid-row: 1 / span 2;
		aspect-ratio: auto;
		height: 100%;
		min-height: 420px;
	}

	.sgr-shot {
		aspect-ratio: auto;
	}
}

@media (max-width: 759px) {
	/* One lead image on a phone, the rest behind the button, so the page
	   reaches the actual details without a long scroll through thumbnails. */
	.sgr-shot:not(.sgr-shot-main) {
		display: none;
	}

	.sgr-gallery {
		margin-bottom: 36px;
	}
}

/* Layout */

.sgr-layout {
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}

@media (min-width: 1000px) {
	.sgr-layout {
		grid-template-columns: minmax(0, 1fr) 340px;
	}
}

.sgr-facts {
	display: grid;
	/* Fixed tracks rather than auto-fit, so six facts land as a tidy 3 by 2
	   instead of five across with an orphan underneath. */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 0 0 40px;
	background: var(--sgr-line-soft);
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius);
	overflow: hidden;
}

@media (min-width: 680px) {
	.sgr-facts {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sgr-fact {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 18px 18px;
	margin: 0;
	background: var(--sgr-surface);
}

.sgr-fact svg {
	flex: 0 0 auto;
	margin-top: 2px;
	color: var(--sgr-accent);
}

.sgr-fact dt {
	margin: 0 0 3px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sgr-muted);
}

.sgr-fact dd {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	color: inherit;
}

.sgr-section {
	margin: 0 0 40px;
}

.sgr-section-title {
	margin: 0 0 16px;
	font-size: clamp(19px, 2vw, 23px);
	line-height: 1.3;
	color: inherit;
}

.sgr-description {
	font-size: 16px;
	line-height: 1.8;
	color: color-mix(in srgb, currentColor 88%, transparent);
}

.sgr-description p {
	margin: 0 0 1.1em;
}

.sgr-amenities {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sgr-amenities li {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 15px;
	border: 1px solid var(--sgr-line);
	border-radius: 100px;
	background: var(--sgr-surface);
	font-size: 14px;
	color: inherit;
}

.sgr-amenities svg {
	color: var(--sgr-accent);
	flex: 0 0 auto;
}

/* Map */

.sgr-map {
	position: relative;
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius);
	overflow: hidden;
	background: var(--sgr-surface);
	min-height: 260px;
}

.sgr-map-prompt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 260px;
	padding: 32px 20px;
	text-align: center;
	color: var(--sgr-muted);
	font-size: 14px;
}

.sgr-map iframe {
	display: block;
	width: 100%;
	height: 360px;
	border: 0;
}

/* Agent card */

.sgr-agent {
	position: sticky;
	top: 24px;
	padding: 24px;
	background: var(--sgr-surface);
	border: 1px solid var(--sgr-line);
	border-radius: var(--sgr-radius);
}

.sgr-agent-head {
	padding-bottom: 18px;
	margin-bottom: 18px;
	border-bottom: 1px solid var(--sgr-line-soft);
}

.sgr-agent-label {
	margin: 0 0 8px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--sgr-muted);
}

.sgr-agent-name {
	margin: 0 0 4px;
	font-size: 19px;
	line-height: 1.3;
	color: inherit;
}

.sgr-agent-firm {
	margin: 0;
	font-size: 14px;
	color: var(--sgr-muted);
}

.sgr-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	padding: 13px 18px;
	border: 1px solid transparent;
	border-radius: var(--sgr-radius-sm);
	background: var(--sgr-accent);
	color: var(--sgr-accent-ink);
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	margin-bottom: 10px;
	cursor: pointer;
	transition: filter 0.2s ease, border-color 0.2s ease;
}

.sgr-btn:hover,
.sgr-btn:focus {
	filter: brightness(1.12);
	color: var(--sgr-accent-ink);
}

.sgr-btn-ghost {
	background: transparent;
	border-color: var(--sgr-line);
	color: inherit;
}

.sgr-btn-ghost:hover,
.sgr-btn-ghost:focus {
	filter: none;
	color: inherit;
	border-color: var(--sgr-accent);
}

.sgr-agent-meta {
	margin: 18px 0 0;
	padding-top: 16px;
	border-top: 1px solid var(--sgr-line-soft);
	font-size: 12px;
	line-height: 1.6;
	color: var(--sgr-muted);
}

.sgr-agent-meta span {
	display: block;
}

/* Similar properties */

.sgr-related {
	margin-top: 64px;
	padding-top: 40px;
	border-top: 1px solid var(--sgr-line-soft);
}

/* Lightbox */

.sgr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(8, 11, 14, 0.94);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
}

.sgr-lightbox.is-open {
	opacity: 1;
	pointer-events: auto;
}

.sgr-lightbox img {
	max-width: 92vw;
	max-height: 84vh;
	object-fit: contain;
	border-radius: 8px;
}

.sgr-lb-btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.sgr-lb-btn:hover {
	background: rgba(255, 255, 255, 0.18);
}

.sgr-lb-prev {
	left: 3vw;
}

.sgr-lb-next {
	right: 3vw;
}

.sgr-lb-close {
	top: 3vh;
	right: 3vw;
}

.sgr-lb-count {
	position: absolute;
	bottom: 4vh;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
	letter-spacing: 0.04em;
}

/* Archive */

.sgr-archive {
	max-width: var(--sgr-max);
	margin: 0 auto;
	padding: clamp(32px, 7vw, 72px) 20px 80px;
}

.sgr-archive-head {
	margin-bottom: 32px;
}

.sgr-archive-head h1 {
	margin: 0 0 8px;
	color: inherit;
}

.sgr-archive-head p {
	margin: 0;
	color: var(--sgr-muted);
}

@media print {
	.sgr-agent,
	.sgr-filters,
	.sgr-related,
	.sgr-lightbox {
		display: none !important;
	}
}
