.properties-page {
  --property-bg: #f6f3ec;
  --property-surface: #ffffff;
  --property-ink: #171713;
  --property-muted: #6b6a62;
  --property-line: #ded8ca;
  --property-gold: #f6ae01;
  --property-gold-soft: #fff4d4;
  --property-green: #00a651;
  background: var(--property-bg);
  color: var(--property-ink);
}

.properties-page main {
  overflow-x: clip;
}

.properties-hero,
.property-detail-hero,
.properties-empty-state {
  padding: calc(var(--pa-navbar-height, 76px) + clamp(3rem, 6vw, 5.5rem)) 0 clamp(4rem, 7vw, 6.5rem);
}

.properties-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(17,17,14,.97) 0%, rgba(17,17,14,.88) 54%, rgba(17,17,14,.68) 100%),
    url('../images/b10.jpg') center 48%/cover no-repeat;
  color: #fff;
}

.properties-hero::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--property-gold);
  z-index: -1;
}

.properties-hero::after {
  content: '';
  position: absolute;
  width: min(42vw, 620px);
  aspect-ratio: 1;
  right: -14vw;
  bottom: -55%;
  border: 1px solid rgba(246,174,1,.28);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(246,174,1,.04), 0 0 0 94px rgba(246,174,1,.025);
  pointer-events: none;
  z-index: -1;
}

.properties-hero__inner {
  max-width: 900px;
}

.properties-hero .pa-kicker {
  color: var(--property-gold);
}

.properties-hero h1,
.properties-empty-state h1 {
  max-width: 840px;
  margin: 0 0 1.35rem;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: clamp(3rem, 6vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .96;
}

.properties-hero__inner > p:last-child {
  max-width: 650px;
  margin: 0;
  color: rgba(255,255,255,.76);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  line-height: 1.8;
}

.properties-catalogue {
  position: relative;
  padding: 0 0 clamp(4rem, 8vw, 7rem);
}

.properties-filter {
  display: grid;
  grid-template-columns: 1.5fr .85fr 1fr .9fr auto;
  gap: .85rem;
  align-items: end;
  padding: 1.25rem;
  margin: -2.8rem 0 0;
  position: relative;
  z-index: 3;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(222,216,202,.9);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(17,17,14,.11);
  backdrop-filter: blur(14px);
}

.properties-filter label {
  display: grid;
  gap: .45rem;
  min-width: 0;
}

.properties-filter label > span {
  color: var(--property-muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.properties-filter input,
.properties-filter select {
  width: 100%;
  min-height: 50px;
  padding: 0 .95rem;
  color: var(--property-ink);
  background: #fbfaf6;
  border: 1px solid var(--property-line);
  border-radius: 10px;
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.properties-filter input:hover,
.properties-filter select:hover {
  border-color: #bcb5a7;
  background: #fff;
}

.properties-filter input:focus,
.properties-filter select:focus {
  outline: 0;
  border-color: var(--property-gold);
  box-shadow: 0 0 0 3px rgba(246,174,1,.14);
  background: #fff;
}

.properties-filter__submit {
  min-height: 50px;
  padding: 0 1.45rem;
  border: 1px solid var(--property-ink);
  border-radius: 10px;
  background: var(--property-ink);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.properties-filter__submit:hover {
  transform: translateY(-1px);
  background: #2a2a23;
  border-color: #2a2a23;
}

.properties-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: end;
  margin: clamp(3.5rem, 6vw, 5.5rem) 0 1.8rem;
}

.properties-heading-row .pa-kicker {
  color: #8b6b18;
}

.properties-heading-row h2 {
  max-width: 760px;
  margin: 0;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: clamp(2.15rem, 4vw, 3.9rem);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
}

.properties-heading-row > a {
  color: var(--property-ink);
  font-size: .82rem;
  font-weight: 750;
  text-underline-offset: 4px;
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}

.property-card {
  min-width: 0;
  overflow: hidden;
  background: var(--property-surface);
  border: 1px solid var(--property-line);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(17,17,14,.035);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.property-card:hover {
  transform: translateY(-5px);
  border-color: rgba(246,174,1,.72);
  box-shadow: 0 22px 50px rgba(17,17,14,.10);
}

.property-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  display: block;
  overflow: hidden;
  background: #191a17;
}

.property-card__media::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(to top, rgba(0,0,0,.25), transparent);
  pointer-events: none;
}

.property-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2,.65,.2,1);
}

.property-card:hover .property-card__media img {
  transform: scale(1.045);
}

.property-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.72);
  background:
    linear-gradient(145deg, rgba(246,174,1,.11), transparent 46%),
    #181916;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: 1.45rem;
}

.property-card__type,
.property-card__featured {
  position: absolute;
  top: 1rem;
  z-index: 2;
  padding: .5rem .72rem;
  border-radius: 999px;
  font-size: .63rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}

.property-card__type {
  left: 1rem;
  color: var(--property-ink);
  background: rgba(255,255,255,.94);
}

.property-card__featured {
  right: 1rem;
  color: #171713;
  background: var(--property-gold);
}

.property-card__body {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 1.35rem 1.4rem 1.45rem;
}

.property-card__location {
  margin: 0 0 .6rem;
  color: var(--property-muted);
  font-size: .78rem;
  font-weight: 650;
}

.property-card h3 {
  margin: 0 0 .8rem;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: clamp(1.45rem, 2vw, 1.95rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.property-card h3 a,
.property-card__link {
  color: inherit;
  text-decoration: none;
}

.property-card h3 a:focus-visible,
.property-card__link:focus-visible,
.property-card__media:focus-visible {
  outline: 3px solid rgba(246,174,1,.65);
  outline-offset: 3px;
}

.property-card__price {
  margin: 0 0 .9rem;
  color: var(--property-ink);
  font-size: 1.02rem;
  font-weight: 850;
  letter-spacing: -.01em;
}

.property-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  min-height: 1.4rem;
  margin-bottom: 1.15rem;
  color: var(--property-muted);
  font-size: .76rem;
}

.property-card__facts span {
  padding: .36rem .58rem;
  background: #f5f2ea;
  border-radius: 999px;
}

.property-card__link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: .45rem;
  margin-top: auto;
  padding-bottom: .16rem;
  border-bottom: 1px solid rgba(23,23,19,.55);
  font-size: .8rem;
  font-weight: 800;
  transition: color .2s ease, border-color .2s ease;
}

.property-card__link::after {
  content: '→';
  transition: transform .2s ease;
}

.property-card:hover .property-card__link {
  color: #8b6500;
  border-color: var(--property-gold);
}

.property-card:hover .property-card__link::after {
  transform: translateX(3px);
}

.properties-notice {
  padding: clamp(1.5rem, 4vw, 2.6rem);
  background: #fff;
  border: 1px solid var(--property-line);
  border-radius: 16px;
  color: var(--property-muted);
  line-height: 1.7;
  box-shadow: 0 10px 28px rgba(17,17,14,.04);
}

.properties-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 3.2rem;
}

.properties-pagination a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--property-line);
  border-radius: 10px;
  background: #fff;
  font-size: .82rem;
  font-weight: 750;
}

.properties-pagination a:hover,
.properties-pagination a.is-active {
  color: #171713;
  border-color: var(--property-gold);
  background: var(--property-gold);
}

.property-detail-hero {
  background:
    linear-gradient(to bottom, #f9f7f2 0, #fff 48%, #fff 100%);
}

.property-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.7rem;
  color: var(--property-muted);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 750;
}

.property-back::before {
  content: '←';
}

.property-back:hover {
  color: var(--property-ink);
}

.property-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.property-gallery {
  min-width: 0;
}

.property-gallery__main,
.property-gallery__empty {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 18px;
}

.property-gallery__main {
  display: block;
  object-fit: cover;
  background: #f1eee5;
  box-shadow: 0 18px 45px rgba(17,17,14,.10);
}

.property-gallery__empty {
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.72);
  background:
    linear-gradient(145deg, rgba(246,174,1,.12), transparent 48%),
    #181916;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: 1.35rem;
}

.property-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .7rem;
  margin-top: .7rem;
}

.property-gallery__thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--property-line);
}

.property-detail-copy {
  position: sticky;
  top: calc(var(--pa-navbar-height, 76px) + 1.35rem);
  padding: clamp(1.35rem, 2vw, 2rem);
  background: #fff;
  border: 1px solid var(--property-line);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(17,17,14,.07);
}

.property-detail-copy__topline {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-bottom: 1rem;
}

.property-detail-copy__topline span {
  padding: .45rem .7rem;
  border: 1px solid var(--property-line);
  border-radius: 999px;
  color: var(--property-muted);
  background: #fbfaf6;
  font-size: .62rem;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.property-detail-copy__topline span:last-child:not(:first-child) {
  border-color: var(--property-gold);
  color: #171713;
  background: var(--property-gold-soft);
}

.property-detail-copy h1 {
  margin: 0 0 .9rem;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: clamp(2.45rem, 4.4vw, 4.8rem);
  font-weight: 500;
  letter-spacing: -.05em;
  line-height: .98;
}

.property-detail-location {
  margin: 0 0 .85rem;
  color: var(--property-muted);
  font-size: .95rem;
}

.property-detail-price {
  margin: 0 0 1.4rem;
  color: var(--property-ink);
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 850;
}

.property-detail-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  padding: 1rem 0;
  border-top: 1px solid var(--property-line);
  border-bottom: 1px solid var(--property-line);
}

.property-detail-facts span {
  min-width: 0;
  padding: .8rem;
  color: var(--property-muted);
  background: #f7f4ed;
  border-radius: 10px;
  font-size: .75rem;
}

.property-detail-facts strong {
  display: block;
  margin-bottom: .18rem;
  color: var(--property-ink);
  font-size: 1.08rem;
}

.property-detail-description {
  padding: 1.5rem 0;
}

.property-detail-description h2 {
  margin: 0 0 .65rem;
  font-family: var(--pa-font-display, Georgia, serif);
  font-size: 1.6rem;
  font-weight: 500;
}

.property-detail-description p {
  margin: 0;
  color: var(--property-muted);
  line-height: 1.8;
}

.property-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}

.property-detail-actions .pa-button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.properties-empty-state {
  min-height: 65vh;
  display: flex;
  align-items: center;
  background: var(--property-bg);
}

@media (max-width: 1120px) {
  .properties-filter {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .properties-filter label:nth-of-type(4) {
    grid-column: span 2;
  }

  .properties-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .property-detail-grid {
    grid-template-columns: 1fr;
  }

  .property-detail-copy {
    position: static;
  }
}

@media (max-width: 760px) {
  .properties-hero,
  .property-detail-hero,
  .properties-empty-state {
    padding-top: calc(var(--pa-navbar-height, 68px) + 2.5rem);
  }

  .properties-hero {
    background-position: 62% center;
  }

  .properties-filter {
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
    margin-top: -2rem;
    border-radius: 14px;
  }

  .properties-filter label:first-child,
  .properties-filter label:nth-of-type(4),
  .properties-filter__submit {
    grid-column: 1 / -1;
  }

  .properties-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .property-detail-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .properties-hero h1,
  .properties-empty-state h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .properties-filter,
  .properties-grid {
    grid-template-columns: 1fr;
  }

  .properties-filter label,
  .properties-filter label:nth-of-type(4),
  .properties-filter__submit {
    grid-column: auto;
  }

  .property-card {
    border-radius: 14px;
  }

  .property-card__body {
    min-height: 0;
    padding: 1.15rem;
  }

  .property-gallery__main,
  .property-gallery__empty {
    border-radius: 14px;
  }

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

  .property-detail-copy {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .property-detail-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .property-card__type,
  .property-card__featured {
    top: .75rem;
    padding: .42rem .58rem;
    font-size: .58rem;
  }

  .property-card__type { left: .75rem; }
  .property-card__featured { right: .75rem; }

  .property-detail-facts {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .property-card,
  .property-card__media img,
  .property-card__link::after,
  .properties-filter__submit {
    transition: none;
  }
}
