/* Lists page + shared search form polish */

.lists-page.property-search {
  max-width: 1320px;
  padding: 0 1rem 2rem !important;
}

.lists-page .page-title {
  margin: 0.75rem 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}

.lists-page > hr {
  margin: 0.75rem 0 1.25rem;
  border-color: rgba(44, 36, 25, 0.08);
}

.lists-page > .row {
  align-items: flex-start;
}

/* Sidebar — desktop sticky card */
@media (min-width: 992px) {
  .lists-page .lists-search-sidebar {
    position: sticky;
    top: 1rem;
    align-self: flex-start;
  }

  .lists-page .lists-search-panel__inner {
    display: block !important;
    padding: 1rem;
    background: #faf8f4;
    border: 1px solid rgba(188, 159, 93, 0.22);
    border-radius: 12px;
    max-height: calc(100vh - 110px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lists-page .lists-search-panel[aria-hidden="true"] .lists-search-panel__inner {
    display: block !important;
  }
}

.lists-page .lists-search,
.map-search-sidebar__filters .lists-search {
  gap: 0.85rem;
}

.lists-page .lists-search__block,
.map-search-sidebar__filters .lists-search__block {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(44, 36, 25, 0.06);
}

.lists-page .lists-search__block:last-of-type,
.map-search-sidebar__filters .lists-search__block:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.lists-page .lists-search__chips--district,
.map-search-sidebar__filters .lists-search__chips--district {
  max-height: 9.5rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.lists-page .lists-search__checks,
.map-search-sidebar__filters .lists-search__checks {
  display: grid;
  gap: 0.35rem;
}

.lists-page .lists-search__check,
.map-search-sidebar__filters .lists-search__check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  cursor: pointer;
  font-size: 0.88rem;
}

.lists-page .lists-search__actions,
.map-search-sidebar__filters .lists-search__actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.lists-page .lists-search__actions .lists-search__reset,
.map-search-sidebar__filters .lists-search__reset {
  flex: 1;
}

.lists-page .lists-search__submit,
.map-search-sidebar__filters .lists-search__submit {
  flex: 1.4;
}

body.lists-search-panel-open {
  overflow: hidden;
}

/* Active filter chips */
.lists-page .selected-criteria:not(.is-empty) {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem !important;
  background: #faf8f4 !important;
  border: 1px solid rgba(188, 159, 93, 0.2);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #7a6a58;
}

.lists-page .selected-criteria .btn-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 !important;
  padding: 0.28rem 0.55rem !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  line-height: 1.3;
  color: #5d3c19 !important;
  background: #fff !important;
  border: 1px solid rgba(44, 36, 25, 0.12) !important;
}

.lists-page .selected-criteria .btn-badge .badge {
  padding: 0;
  background: transparent !important;
  color: #cd212d;
}

/* Results toolbar */
.lists-page .search-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1rem !important;
  margin-bottom: 1rem;
  line-height: 1.4;
  background: #faf8f4;
  border: 1px solid rgba(188, 159, 93, 0.18);
  border-radius: 10px;
}

.lists-page .search-result__summary {
  font-size: 0.95rem;
  font-weight: 700;
  color: #5d3c19;
}

.lists-page .search-result__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.lists-page .search-result__sort,
.lists-page .lists-view-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.lists-page .search-result__sort-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9a8b78;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lists-page .btn-sort,
.lists-page .display-style {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(44, 36, 25, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #5d3c19;
}

.lists-page .btn-sort:hover,
.lists-page .display-style:hover {
  border-color: #bc9f5d;
  color: #5d3c19;
}

.lists-page .display-style.is-active,
.lists-page .display-style.active {
  background: #cd212d !important;
  border-color: #cd212d !important;
  color: #fff !important;
}

/* Result grid */
.lists-page .search-result-container {
  row-gap: 0.25rem;
}

.lists-page .search-result-container > [class*="col-"]:not(.pagination-wrapper) {
  display: flex;
}

.lists-page .property-item {
  margin-bottom: 1rem;
  width: 100%;
}

/* Property cards — override legacy padding on images */
.lists-page .list-property-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(188, 159, 93, 0.28);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lists-page .list-property-card:hover {
  box-shadow: 0 8px 24px rgba(44, 36, 25, 0.1);
  transform: translateY(-2px);
}

.lists-page .list-property-card .photos {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: #f0ebe3;
}

.lists-page .list-card-photo-link {
  display: block;
  width: 100%;
  height: 100%;
}

.lists-page .list-card-photo,
.lists-page .list-property-card .photos img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 100%;
  object-fit: cover;
  padding: 0 !important;
  border-radius: 0 !important;
}

.lists-page .list-card-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.lists-page .list-card-badge--video {
  top: 0.5rem;
  left: 0.5rem;
}

.lists-page .list-card-badge--photos {
  bottom: 0.5rem;
  right: 0.5rem;
}

.lists-page .list-property-card .property-status {
  top: 0.35rem;
  right: 0.35rem;
  padding: 0;
}

.lists-page .list-property-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
  padding: 0.85rem 0.95rem 1rem !important;
}

.lists-page .list-property-card .card-title {
  margin: 0 !important;
  font-size: 1rem !important;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal !important;
  overflow: visible;
  text-overflow: unset;
  color: #5d3c19 !important;
}

.lists-page .list-property-card .card-title a {
  color: #5d3c19 !important;
  text-decoration: none;
}

.lists-page .list-property-card .card-title a:hover {
  color: #cd212d !important;
}

.lists-page .list-property-card .card-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: #9a8b78;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lists-page .list-property-card .card-text {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lists-page .list-property-card .district {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9a8b78;
}

.lists-page .list-card-meta {
  font-size: 0.84rem;
  color: #5d3c19;
  line-height: 1.45;
}

.lists-page .list-card-meta .currency,
.lists-page .list-card-meta .price-in-hkd {
  color: #cd212d;
  font-weight: 700;
}

.lists-page .list-card-meta--layout {
  color: #7a6a58;
}

.lists-page .list-card-meta--layout i {
  margin-right: 0.15rem;
  opacity: 0.75;
}

/* List view mode */
.lists-page .search-result-container.list-view .property-item {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.lists-page .search-result-container.list-view .list-property-card {
  flex-direction: row;
  align-items: stretch;
}

.lists-page .search-result-container.list-view .photos {
  width: 36%;
  max-width: 300px;
  aspect-ratio: auto;
  min-height: 180px;
}

.lists-page .search-result-container.list-view .list-card-photo-link,
.lists-page .search-result-container.list-view .list-card-photo {
  min-height: 180px;
}

.lists-page .search-result-container.list-view .card-body {
  justify-content: center;
}

.lists-page .search-result-container.list-view .card-text {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.85rem;
}

.lists-page .pagination-wrapper {
  margin-top: 0.5rem;
}

.lists-page .pagination-wrapper .pagination {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

@media (max-width: 991.98px) {
  .lists-page.property-search {
    padding: 0 0.75rem 1.5rem !important;
  }

  .lists-page .search-result {
    flex-direction: column;
    align-items: stretch;
  }

  .lists-page .search-result__actions {
    justify-content: space-between;
  }
}

@media (max-width: 767.98px) {
  .lists-page .search-result-container.list-view .list-property-card {
    flex-direction: column;
  }

  .lists-page .search-result-container.list-view .photos {
    width: 100%;
    max-width: none;
    aspect-ratio: 16 / 10;
  }

  .lists-page .search-result-container.list-view .card-text {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Empty results hint */
.lists-page .lists-empty-results {
  margin-bottom: 0.25rem;
}

.lists-page .lists-empty-results__text {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(188, 159, 93, 0.1);
  border: 1px solid rgba(188, 159, 93, 0.22);
  color: #5d3c19;
  font-size: 0.9375rem;
}

/* Broker assist — customized search CTA */
.lists-broker-assist {
  margin: 1rem 0 0.5rem;
}

.lists-broker-assist--empty {
  margin-top: 0;
}

.lists-broker-assist__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.85fr);
  gap: 1.25rem;
  padding: 1.35rem 1.4rem;
  border-radius: 14px;
  border: 1px solid rgba(188, 159, 93, 0.28);
  background:
    linear-gradient(135deg, rgba(250, 248, 244, 0.98) 0%, rgba(255, 255, 255, 0.98) 48%, rgba(245, 241, 232, 0.95) 100%);
  box-shadow: 0 10px 36px rgba(44, 36, 25, 0.07);
}

.lists-broker-assist--empty .lists-broker-assist__inner {
  border-color: rgba(205, 33, 45, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 251, 251, 0.98) 0%, rgba(255, 255, 255, 0.98) 55%, rgba(250, 248, 244, 0.96) 100%);
}

.lists-broker-assist__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a5863d;
}

.lists-broker-assist__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.25;
  color: #2c2419;
}

.lists-broker-assist__title-alt {
  margin: 0.25rem 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #7a6a55;
}

.lists-broker-assist__message p {
  margin: 0 0 0.65rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #4a4034;
}

.lists-broker-assist__message-alt {
  font-size: 0.875rem !important;
  color: #7a6a55 !important;
  padding-top: 0.15rem;
  border-top: 1px dashed rgba(188, 159, 93, 0.28);
}

.lists-broker-assist__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin: 0.9rem 0 1rem;
  padding: 0;
  list-style: none;
}

.lists-broker-assist__highlights li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5d3c19;
}

.lists-broker-assist__highlights i {
  color: #bc9f5d;
  font-size: 0.8rem;
}

.lists-broker-assist__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.lists-broker-assist__btn {
  min-height: 40px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 999px;
}

.lists-broker-assist__btn--ghost {
  border-color: rgba(93, 60, 25, 0.22);
  color: #5d3c19;
  background: rgba(255, 255, 255, 0.85);
}

.lists-broker-assist__btn--ghost:hover {
  background: #fff;
  border-color: #bc9f5d;
  color: #5d3c19;
}

.lists-broker-assist__contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(188, 159, 93, 0.18);
}

.lists-broker-assist__qrcode {
  text-align: center;
}

.lists-broker-assist__qrcode img {
  display: block;
  width: 148px;
  height: 148px;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  object-fit: cover;
}

.lists-broker-assist__qrcode-hint {
  margin: 0.55rem 0 0.1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #2c2419;
}

.lists-broker-assist__qrcode-sub {
  margin: 0;
  font-size: 0.75rem;
  color: #888;
}

.lists-broker-assist__channels {
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lists-broker-assist__channels li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(188, 159, 93, 0.14);
}

.lists-broker-assist__channels li:first-child {
  border-top: 0;
  padding-top: 0;
}

.lists-broker-assist__channels i {
  width: 1rem;
  margin-top: 0.15rem;
  color: #bc9f5d;
  text-align: center;
  flex-shrink: 0;
}

.lists-broker-assist__channel-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a8b78;
}

.lists-broker-assist__channels a {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2c2419;
  word-break: break-all;
}

.lists-broker-assist__channels a:hover {
  color: #cd212d;
  text-decoration: none;
}

@media (max-width: 991.98px) {
  .lists-broker-assist__inner {
    grid-template-columns: 1fr;
  }

  .lists-broker-assist__contact {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
  }

  .lists-broker-assist__channels {
    flex: 1 1 220px;
    min-width: 200px;
  }
}

@media (max-width: 575.98px) {
  .lists-broker-assist__inner {
    padding: 1rem;
  }

  .lists-broker-assist__contact {
    flex-direction: column;
    align-items: center;
  }

  .lists-broker-assist__actions {
    flex-direction: column;
  }

  .lists-broker-assist__btn {
    width: 100%;
    justify-content: center;
  }
}

