/* Search pages for /home/listings/ and /home/sold/, from the sister sites' /home/assets/style.css. Variables are in site.css */

/* ---------- buttons ---------- */


.icon-btn {
	width: 40px; height: 40px;
	border: 0; border-radius: 50%;
	background: transparent;
	font-size: 28px; line-height: 1;
	color: inherit; cursor: pointer;
}
.link-btn {
	border: 0; background: none; padding: 0;
	font: inherit; font-size: 14px;
	color: var(--muted); text-decoration: underline; cursor: pointer;
}

.badge {
	display: inline-block;
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	color: var(--ink);
	font-size: 12px; font-weight: 700;
	letter-spacing: .02em;
}
.badge-new { background: var(--blue); color: #fff; }
.badge-dark { background: var(--ink); color: #fff; }

.panel {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 24px;
	box-shadow: var(--shadow);
}


/* ---------- hero + search ---------- */

.hero {
	background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
	padding: 28px 0 8px;
	text-align: center;
}
.hero h1 {
	font-family: var(--display);
	font-size: 26px; line-height: 1.2;
	max-width: 620px; margin: 0 auto;
	text-wrap: balance;
}
.hero-stats {
	display: flex; flex-wrap: wrap; justify-content: center;
	gap: 6px 18px; margin: 12px 0 20px;
	font-size: 14px; color: var(--muted);
}
.hero-stats span:first-child { color: var(--blue); font-weight: 600; }
.hero-stats strong { font-size: 16px; }

.search { max-width: 980px; margin: 0 auto; text-align: left; }
.search-bar {
	display: flex; align-items: center; gap: 8px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 6px 6px 6px 18px;
	box-shadow: var(--shadow);
	color: var(--muted);
}
.search-bar:focus-within { border-color: var(--ink); }
.search-bar svg { flex: none; }
@keyframes search-flip { from { opacity: 0; transform: translateX(-10px); } }
.search-bar input {
	flex: 1; min-width: 0;
	border: 0; outline: 0; background: transparent;
	font: 16px var(--sans); color: var(--ink);
	padding: 8px 0;
}
.filters-toggle { margin-top: 10px; width: 100%; }

.filters {
	display: none;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 12px;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.filters.open { display: grid; }
.filters label span, .sort span {
	display: block;
	font-size: 12px; font-weight: 600;
	color: var(--muted);
	margin-bottom: 4px;
}
select {
	width: 100%;
	padding: 9px 30px 9px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236f7782' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 11px center;
	font: 15px var(--sans); color: var(--ink);
	-webkit-appearance: none; appearance: none;
}
select:focus { outline: 0; border-color: var(--ink); }
.filters input[type="text"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #fff;
	font: 15px var(--sans); color: var(--ink);
}
.filters input[type="text"]:focus { outline: 0; border-color: var(--ink); }
.filters input::placeholder { color: var(--ink); opacity: 1; }

/* phones: the search button is just the magnifying glass, leaving room to type */
.search-bar .btn { padding: 11px; }
.search-bar .btn span { display: none; }
/* a range shows as one box ("Any") until clicked, then as min and max fields */
.range { min-width: 0; }
.range-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.range-summary {
	display: block; width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--line); border-radius: 10px;
	background: #fff;
	font: 15px/normal var(--sans); color: var(--ink);
	text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	cursor: text;
}
.range-summary:focus { outline: 0; border-color: var(--ink); }
.range-fields { display: none; grid-template-columns: 1fr 1fr; gap: 6px; }
.range-fields input[type="text"] { min-width: 0; padding-left: 10px; padding-right: 6px; }
.range.open .range-summary { display: none; }
.range.open .range-fields { display: grid; animation: search-flip .18s ease-out; }
.filters .range-fields input::placeholder { color: var(--muted); }

/* radio buttons shown as a row of pill buttons */
.filters .seg { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; border: 0; display: flex; }
.filters .seg legend {
	padding: 0; margin-bottom: 4px;
	font-size: 12px; font-weight: 600; color: var(--muted);
}
.filters .seg label { flex: 1; position: relative; cursor: pointer; }
.filters .seg input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.filters .seg label span {
	display: block; margin: 0 0 0 -1px;
	padding: 9px 8px;
	border: 1px solid var(--line);
	background: #fff;
	font-size: 15px; font-weight: 500; color: var(--ink);
	text-align: center; white-space: nowrap;
}
.filters .seg label:first-of-type span { margin-left: 0; border-radius: 10px 0 0 10px; }
.filters .seg label:last-of-type span { border-radius: 0 10px 10px 0; }
.filters .seg input:checked + span { position: relative; background: var(--blue); border-color: var(--blue); color: #fff; }
.filters .seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
/* five choices in one row: size each to its text so they all fit on a phone */
.filters .seg-wide label { flex: 1 1 auto; }
.filters .seg-wide label span { padding-left: 4px; padding-right: 4px; font-size: 13px; line-height: 23px; }
.filters .check {
	grid-column: 1 / -1;
	display: flex; align-items: center; gap: 8px;
}
.filters .check span { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.filters .check input { width: 18px; height: 18px; accent-color: var(--blue); }
.filters-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.filters-actions .btn-primary { flex: 1; }

/* ---------- results ---------- */

.results-head {
	display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
	gap: 12px; margin: 24px 0 16px;
}
.results-head h2 { font-family: var(--display); font-size: 24px; }
.results-count { margin-left: 6px; font: 500 15px var(--sans); color: var(--muted); white-space: nowrap; }
.neighbors { padding-top: 32px; padding-bottom: 64px; border-top: 1px solid var(--line); }
.homes-main, .property { padding-bottom: 64px; }
.results-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.results-share { display: inline-flex; gap: 14px; }
.share-link {
	border: 0; background: none; padding: 0;
	font: 600 14px var(--sans);
	color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px;
	cursor: pointer;
}
.share-link:hover { color: var(--ink); }
.results-active { align-self: center; padding: 6px 14px; font-size: 14px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort span { margin: 0; }
.sort select { width: auto; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #fff; border: 1px solid var(--line);
	font-size: 13px; font-weight: 500;
	color: var(--ink); text-decoration: none;
}
.chip:hover { border-color: var(--ink); }
.chip span { color: var(--muted); font-size: 16px; line-height: 1; }
.chip-clear { background: transparent; border-color: transparent; color: var(--blue-dark); }

/* totals for the sales being shown */
.keyfacts.stats { grid-template-columns: 1fr 1fr; margin-bottom: 20px; box-shadow: var(--shadow); }
.keyfacts.stats strong { font-size: 22px; }

.grid { display: grid; grid-template-columns: 1fr; gap: 20px; }

.card {
	position: relative;
	background: var(--card);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.card-media {
	position: relative; display: block;
	aspect-ratio: 3 / 2;
	background: #eceae6;
	overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-media .badge { position: absolute; left: 12px; top: 12px; }
.card-media.no-photo::after {
	content: "Photos coming soon";
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	color: var(--muted); font-weight: 600;
}

.heart {
	position: absolute; right: 10px; top: 10px;
	width: 38px; height: 38px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
	cursor: pointer;
	transition: transform .12s;
}
.heart:hover { transform: scale(1.08); }
.heart svg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.heart[aria-pressed="true"] svg { fill: var(--blue); stroke: var(--blue); }

.card-body { padding: 14px 16px 16px; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card-price { font-family: var(--display); font-size: 23px; font-weight: 700; color: var(--ink); }
.card-dom { font-size: 12px; color: var(--muted); }
.card-address {
	display: block; margin-top: 2px;
	font-weight: 600; color: var(--ink); text-decoration: none;
}
.card-address:hover { text-decoration: underline; }
.card-city { font-size: 14px; color: var(--muted); }
.card-city span { color: #c5c1ba; }
.card-facts {
	display: flex; flex-wrap: wrap; gap: 4px 14px;
	list-style: none; margin: 12px 0 0; padding: 12px 0 0;
	border-top: 1px solid var(--line);
	font-size: 14px;
}
.card-facts strong { color: var(--ink); }
.card-office { margin-top: 10px; font-size: 12px; color: var(--muted); }


/* ---------- property page ---------- */

.back {
	display: inline-block; margin: 18px 0 10px;
	font-size: 14px; font-weight: 500;
	color: var(--muted); text-decoration: none;
}
.back:hover { color: var(--ink); }

.property-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.property-tags { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.property-listed { font-size: 14px; font-weight: 600; color: var(--blue); }
.property-head h1 { font-family: var(--display); font-size: 30px; line-height: 1.15; }
.property-sub { margin: 4px 0 0; color: var(--muted); }
.property-sub span { color: #c5c1ba; }
.property-price { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.property-price .price { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); }
.heart-labeled {
	position: static;
	width: auto; height: auto;
	gap: 8px; padding: 9px 16px;
	border: 1px solid var(--line); border-radius: 999px;
	box-shadow: none; background: #fff;
	font: 600 15px var(--sans); color: var(--ink);
}

/* phones: swipe through the photos; larger screens: a mosaic of the first five */
.gallery {
	position: relative;
	display: flex; gap: 8px;
	margin: 0 -16px;
	padding: 0 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery-item {
	flex: 0 0 92%;
	aspect-ratio: 3 / 2;
	padding: 0; border: 0;
	border-radius: var(--radius);
	overflow: hidden;
	background: #eceae6;
	cursor: zoom-in;
	scroll-snap-align: center;
}
.gallery-item:only-of-type { flex-basis: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-wrap { position: relative; }
.gallery-all {
	position: absolute; right: 12px; bottom: 12px;
	display: inline-flex;
	padding: 8px 14px;
	border: 1px solid var(--ink); border-radius: 999px;
	background: #fff;
	font: 600 14px var(--sans); color: var(--ink);
	cursor: pointer;
}
/* phones swipe; larger screens also get arrows */
.gallery-step {
	position: absolute; top: 50%;
	width: 46px; height: 46px; margin-top: -23px;
	display: none; align-items: center; justify-content: center;
	padding: 0 0 4px;
	border: 0; border-radius: 50%;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 1px 6px rgba(0, 0, 0, .22);
	font-size: 34px; line-height: 1; color: var(--ink);
	cursor: pointer;
}
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-item img { transition: transform .4s; }
.gallery-item:hover img { transform: scale(1.03); }
.photos-soon { text-align: center; font-weight: 700; color: var(--blue); padding: 60px 20px; }

.property-body { display: grid; gap: 28px; margin-top: 24px; }
.property-main section { margin-top: 32px; }
.property-main h2 { font-family: var(--display); font-size: 22px; margin-bottom: 12px; }

.keyfacts {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
	list-style: none; margin: 0; padding: 0;
	background: #fff;
	border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden;
}
.keyfacts li { padding: 16px 6px; text-align: center; box-shadow: 1px 1px 0 var(--line); }
.keyfacts strong { display: block; font-family: var(--display); font-size: 24px; color: var(--ink); }
.keyfacts span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.remarks { margin: 0; font-size: 17px; line-height: 1.7; }

.facts { display: grid; grid-template-columns: 1fr; gap: 0 32px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

.features { margin: 0; }
.features div { display: grid; grid-template-columns: 1fr; gap: 2px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.features dt { color: var(--muted); }
.features dd { margin: 0; font-weight: 500; color: var(--ink); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.timeline li { position: relative; padding: 0 0 18px 24px; border-left: 2px solid var(--line); }
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
	content: "";
	position: absolute; left: -7px; top: 5px;
	width: 12px; height: 12px;
	border-radius: 50%;
	background: #fff; border: 2px solid var(--muted);
}
.timeline li:last-child::before { background: var(--blue); border-color: var(--blue); }
.timeline span { display: block; font-size: 13px; color: var(--muted); }
.timeline strong { color: var(--ink); }

.schools { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.schools li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.schools span { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.schools strong { color: var(--ink); }

.map { width: 100%; height: 320px; border: 0; border-radius: var(--radius); display: block; }
.listed-by { margin: 24px 0 0; font-size: 13px; color: var(--muted); }

.contact h2 { font-family: var(--display); font-size: 20px; }
.contact p { margin: 8px 0 16px; font-size: 14px; }
.contact .btn { margin-top: 8px; }
.contact hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 10px; }

/* ---------- photo viewer ---------- */

.lightbox {
	position: fixed; inset: 0; z-index: 100;
	display: flex; align-items: center; justify-content: center;
	background: rgba(12, 14, 17, .95);
	color: #fff;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox .icon-btn { position: absolute; background: rgba(255, 255, 255, .12); font-size: 32px; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 10px; top: 50%; margin-top: -24px; width: 48px; height: 48px; }
.lightbox-next { right: 10px; top: 50%; margin-top: -24px; width: 48px; height: 48px; }
.lightbox-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 14px; }

/* ---------- saved homes ---------- */

.saved-fab {
	position: fixed; right: 16px; bottom: 16px; z-index: 60;
	display: inline-flex; align-items: center; gap: 8px;
	padding: 12px 18px;
	border: 0; border-radius: 999px;
	background: var(--ink); color: #fff;
	font: 600 15px var(--sans);
	box-shadow: var(--shadow-lift);
	cursor: pointer;
}
.saved-fab svg { fill: var(--blue); stroke: var(--blue); }
.saved-count {
	min-width: 24px; padding: 2px 7px;
	border-radius: 999px;
	background: var(--blue);
	font-size: 13px; text-align: center;
}
.saved-fab.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.1); } }

.saved-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(12, 14, 17, .45); }
.saved-drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
	width: 400px; max-width: 100%;
	display: flex; flex-direction: column;
	background: #fff;
	box-shadow: var(--shadow-lift);
	transform: translateX(105%);
	visibility: hidden;
	transition: transform .25s, visibility .25s;
}
.saved-drawer.open { transform: none; visibility: visible; }
.saved-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 14px 20px; border-bottom: 1px solid var(--line); }
.saved-head h2 { font-family: var(--display); font-size: 22px; }
.saved-list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 8px 12px; }
.saved-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.saved-item:hover { background: var(--bg); }
.saved-item a { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.saved-item img { flex: none; width: 84px; height: 62px; object-fit: cover; border-radius: 8px; background: #eceae6; }
.saved-item strong { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-item small { display: block; color: var(--muted); font-size: 13px; }
.saved-item div { min-width: 0; }
.saved-item .icon-btn { flex: none; width: 32px; height: 32px; font-size: 22px; color: var(--muted); }
.saved-item .icon-btn:hover { background: var(--line); color: var(--ink); }
.saved-actions { padding: 14px 20px 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; text-align: center; }
.saved-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.saved-note { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- alerts ---------- */

.alerts-panel { max-width: 560px; margin: 40px auto 64px; text-align: center; }
.alerts-panel h1 { font-family: var(--display); font-size: 28px; line-height: 1.2; }
.alerts-form { display: grid; gap: 14px; text-align: left; }
.alerts-form label span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.alerts-form input {
	width: 100%; padding: 12px 14px;
	border: 1px solid var(--line); border-radius: 10px;
	font: 16px var(--sans); color: var(--ink);
}
.alerts-form input:focus { outline: 0; border-color: var(--ink); }
.hp { position: absolute; left: -9999px; }
.form-error { color: #b3261e; font-weight: 600; }
.alerts-alt { margin: 20px 0 0; font-size: 14px; }


/* ---------- tablet ---------- */

@media (min-width: 700px) {



	.hero { padding: 44px 0 12px; }
	.hero h1 { font-size: 36px; }
	.hero-stats { font-size: 15px; margin-bottom: 24px; }

	.filters-toggle { display: none; }
	.search-bar .btn { padding: 10px 18px; }
	.search-bar .btn span { display: inline; }
	.search-bar .btn svg { display: none; }
	.filters { display: grid; grid-template-columns: repeat(4, 1fr); box-shadow: var(--shadow); }
	.filters .seg { grid-column: span 2; }
	.filters .seg-wide { grid-column: 1 / -1; }
	.filters .seg-wide label span { padding-left: 8px; padding-right: 8px; font-size: 15px; }
	.keyfacts.stats { grid-template-columns: repeat(4, 1fr); }
	.keyfacts.stats strong { font-size: 24px; }
	.filters .check { grid-column: 1 / 3; }
	.filters-actions { grid-column: 3 / 5; align-self: end; justify-content: flex-end; }
	.filters-actions .btn-primary { flex: none; }

	.grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }

	.property-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
	.property-head h1 { font-size: 38px; }
	.property-price { flex-direction: column; align-items: flex-end; gap: 10px; }
	.property-price .price { font-size: 36px; }

	.gallery { margin: 0; padding: 0; }
	.gallery-item { flex-basis: 70%; }
	.gallery-step { display: flex; }
	.facts { grid-template-columns: 1fr 1fr; }
	.features div { grid-template-columns: 190px 1fr; }
	.schools { grid-template-columns: repeat(3, 1fr); }
	.map { height: 420px; }
}

/* ---------- desktop ---------- */

@media (min-width: 1000px) {

	/* wide screens: photos keep a set height (about the old mosaic's) rather than growing with the page */
	.gallery-item { flex: 0 0 auto; width: auto; height: 470px; }


	.grid { grid-template-columns: repeat(3, 1fr); }


	.property-body { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
	.property-main section:first-of-type { margin-top: 28px; }
	.property-side .contact { position: sticky; top: 24px; }
}

@media (min-width: 1500px) {
	.grid { grid-template-columns: repeat(4, 1fr); }
}
