/* Shared page styles for /homes, /homes/:id and /enquiry. */
.filters {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; background: var(--surface);
  border: 1px solid var(--border); border-radius: 22px; padding: 1.25rem 1.5rem; margin: 1.5rem 0 2rem;
  box-shadow: 0 20px 40px -28px rgba(18,51,43,.4);
}
main > h1 { margin-top: 2.5rem; font-size: clamp(2.4rem, 5.5vw, 4rem); }
main > h1::after { content: ""; display: block; width: 4rem; height: 4px; background: var(--accent); margin-top: 1rem; border-radius: 2px; }
.filters label, .enquiry label { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.filters input, .filters select, .enquiry input, .enquiry textarea, .hero-search input, .hero-search select, .prereg input {
  padding: .75rem .9rem; border: 1.5px solid var(--border); border-radius: 12px; font: inherit; font-size: 1rem;
  text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink); background: #fff;
  transition: border-color .2s, box-shadow .3s var(--ease), transform .3s var(--spring);
}
.filters input:focus, .filters select:focus, .enquiry input:focus, .enquiry textarea:focus, .hero-search input:focus, .hero-search select:focus, .prereg input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(217,98,43,.22); transform: translateY(-1px);
}
.filters label:has(input) { flex: 1 1 14rem; }

.result-count { color: var(--muted); font-weight: 500; }
.results { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.results th, .results td { text-align: left; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.results th { background: var(--sand-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.results tbody tr { transition: background-color .25s var(--ease); }
.results tbody tr:hover { background: #fbf6ec; }
.results tbody tr:last-child td { border-bottom: 0; }
.results th a { color: var(--ink); font-weight: 700; text-decoration: none; }
.results th[aria-sort="ascending"] a::after { content: " \25B2"; font-size: .7em; color: var(--accent); }
.results th[aria-sort="descending"] a::after { content: " \25BC"; font-size: .7em; color: var(--accent); }
.home-cell { max-width: 28rem; }
.home-cell a { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-cell a:hover { color: var(--accent-deep); }
.home-cell .address { display: block; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .price { font-weight: 700; white-space: nowrap; font-family: var(--serif); font-size: 1.1rem; }
.status { text-transform: capitalize; }

.pagination { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0; }
.pagination a, .pagination span { padding: .5rem 1rem; border: 1.5px solid var(--border); border-radius: 999px; text-decoration: none; background: var(--surface); color: var(--ink); transition: transform .35s var(--spring), border-color .2s; }
.pagination a:hover { transform: translateY(-2px); border-color: var(--ink); }
.pagination a:active { transform: scale(.94); }
.pagination [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }

.notice { background: var(--surface); border: 1.5px dashed var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.notice.error { border-style: solid; border-color: #b42318; color: #7a1a12; }
.notice.success { border-style: solid; border-color: var(--ink); }

.back { display: inline-block; margin-top: 1.5rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.back::before { content: "\2190"; display: inline-block; margin-right: .5rem; transition: transform .35s var(--spring); }
.back:hover::before { transform: translateX(-6px); }
.listing { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 3rem; align-items: start; }
.listing img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 26px; background: var(--sand); box-shadow: 0 40px 70px -40px rgba(18,51,43,.55); }
.listing-body h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.listing .address, .listing .meta { color: var(--muted); margin: 0 0 .5rem; }
.listing .price { font-family: var(--serif); font-size: 2.4rem; color: var(--accent-deep); margin: 1rem 0 .5rem; }
.listing .description { margin: 1.25rem 0 2rem; font-size: 1.1rem; }
.not-found { text-align: center; padding: 4rem 0; }

.enquiry-page { max-width: 38rem; padding-top: 2.5rem; }
.enquiry-page h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
.enquiry form { display: grid; gap: .6rem; max-width: 34rem; }
.field-error { color: #b42318; margin: 0; font-size: .875rem; }
.field-error[hidden], .enquiry [hidden] { display: none; }

@media (max-width: 720px) {
  .listing { grid-template-columns: 1fr; gap: 1.5rem; }
  .results th, .results td { padding: .65rem; }
}
