/**
 * Listings panel: fixed card sizes + scrollable results (no squish).
 */

.site-premium #homes-explorer.zillow-explorer {
  min-height: min(52vh, 480px);
  max-height: min(72vh, 680px);
}

.site-premium .zillow-list-col {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.site-premium .homes-list--zillow {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(7, 21, 38, 0.35) rgba(7, 21, 38, 0.06);
}

.site-premium .homes-list--zillow::-webkit-scrollbar {
  width: 10px;
}

.site-premium .homes-list--zillow::-webkit-scrollbar-track {
  background: rgba(7, 21, 38, 0.06);
  border-radius: 8px;
}

.site-premium .homes-list--zillow::-webkit-scrollbar-thumb {
  background: rgba(7, 21, 38, 0.28);
  border-radius: 8px;
  border: 2px solid rgba(7, 21, 38, 0.04);
}

.site-premium .homes-list--zillow .zillow-card:not(.zillow-card--skeleton) {
  flex: 0 0 auto;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  min-height: 118px;
  grid-template-columns: 172px minmax(0, 1fr);
  align-items: stretch;
}

.site-premium .homes-list--zillow .zillow-card-photo-btn {
  position: relative;
  width: 172px;
  min-width: 172px;
  max-width: 172px;
  height: 118px;
  min-height: 118px;
  max-height: 118px;
  flex-shrink: 0;
  align-self: stretch;
}

.site-premium .homes-list--zillow .zillow-card-photo-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 118px;
  max-height: 118px;
  object-fit: cover;
  object-position: center;
}

.site-premium .homes-list-more {
  flex-shrink: 0;
}

.site-premium .list-scroll-sentinel {
  flex: 0 0 1px;
  height: 1px;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

/* Sentinel in column (legacy) — list scroll uses in-list sentinel */
.site-premium .zillow-list-col > .list-scroll-sentinel {
  display: none;
}

@media (max-width: 768px) {
  .site-premium #homes-explorer.zillow-explorer {
    min-height: 0 !important;
    max-height: none !important;
    height: auto !important;
  }

  .site-premium .zillow-list-col {
    overflow: visible;
    min-height: 0;
  }

  .site-premium .homes-list--zillow {
    flex: none;
    overflow: visible;
    max-height: none;
  }

  .site-premium .homes-list--zillow .zillow-card:not(.zillow-card--skeleton) {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .site-premium .homes-list--zillow .zillow-card-photo-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 16 / 10;
  }

  .site-premium .homes-list--zillow .zillow-card-photo-btn img {
    position: absolute;
    min-height: 0;
    max-height: none;
  }
}
