/* Public property listings */
body.page-listings main.listings-main {
  width: 100%;
  max-width: none;
  padding: clamp(7rem, 11vw, 9rem) 1rem clamp(4rem, 8vw, 7rem);
}

.listings-stage {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.listings-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2.5rem);
  border: 1px solid var(--so-line);
  border-radius: var(--so-radius-lg);
  background:
    radial-gradient(circle at 92% 2%, rgba(200, 170, 120, .18), transparent 26rem),
    rgba(255, 253, 249, .94);
  box-shadow: var(--so-shadow-md);
}

.listings-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--so-line);
}

.listings-kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .65rem;
  color: var(--so-gold-dark);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.listings-title {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 0;
  color: var(--so-ink);
  font-size: clamp(2.7rem, 6vw, 5.6rem);
}

.listings-title svg {
  width: clamp(2.2rem, 5vw, 3.6rem);
  height: auto;
  color: var(--so-gold-dark);
  flex: 0 0 auto;
}

.listings-copy {
  max-width: 720px;
  margin: .8rem 0 0;
  color: var(--so-muted);
  font-size: clamp(.98rem, 2vw, 1.08rem);
}

.listings-count {
  min-width: 120px;
  padding: .85rem 1rem;
  border: 1px solid var(--so-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .76);
  color: var(--so-muted);
  font-size: .78rem;
  font-weight: 750;
  text-align: center;
  box-shadow: var(--so-shadow-sm);
}

.listings-count strong {
  display: block;
  color: var(--so-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

#property-list {
  align-items: stretch;
}

#property-list > article {
  height: 100%;
}

.property-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(20, 23, 27, .1);
  border-radius: 25px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(18, 22, 27, .08);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.property-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 107, 61, .28);
  box-shadow: 0 28px 64px rgba(18, 22, 27, .16);
}

.property-card > button {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
}

.property-card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #e9e6df;
}

.property-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.2, .75, .25, 1);
}

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

.property-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(4, 7, 10, .72), transparent 55%);
}

.property-card-body {
  display: flex;
  min-height: 255px;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem;
}

.property-card-title {
  min-height: 3.15rem;
  color: var(--so-ink);
  font-size: clamp(1.45rem, 2.2vw, 1.75rem);
  line-height: 1.05;
}

.card-sub {
  overflow: hidden;
  color: var(--so-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-card-price {
  color: var(--so-ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.property-card-action {
  margin-top: auto;
  padding-top: 1.2rem;
}

.listings-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 2rem;
  border: 1px dashed rgba(20, 23, 27, .17);
  border-radius: 24px;
  background: rgba(255, 255, 255, .68);
  color: var(--so-muted);
  text-align: center;
}

.listings-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto 1rem;
  border: 3px solid rgba(139, 107, 61, .16);
  border-top-color: var(--so-gold-dark);
  border-radius: 50%;
  animation: listings-spin .8s linear infinite;
}

#detail-modal {
  overscroll-behavior: contain;
}

#detail-modal[aria-hidden="false"] { display: flex; }

#modal-content {
  scrollbar-color: var(--so-gold-dark) #ece9e2;
  scrollbar-width: thin;
}

#modal-content::-webkit-scrollbar { width: 9px; }
#modal-content::-webkit-scrollbar-track { background: #ece9e2; }
#modal-content::-webkit-scrollbar-thumb {
  border: 2px solid #ece9e2;
  border-radius: 999px;
  background: var(--so-gold-dark);
}

.detail-rich-text {
  white-space: pre-line;
}

@keyframes listings-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  body.page-listings main.listings-main { padding: 6.25rem .5rem 4rem; }
  .listings-panel { padding: 1rem; border-radius: 24px; }
  .listings-header { grid-template-columns: 1fr; }
  .listings-count { width: fit-content; min-width: 100px; }
  .property-card-body { min-height: 230px; }
  #detail-modal { padding: .35rem; }
  #modal-content { max-height: calc(100dvh - .7rem); border-radius: 22px; }
}
