/* ============================================
   Sweet Home Residential — Listings Styles
   ============================================ */

/* ========== FILTER BAR ========== */
.filter-bar {
  background: var(--white);
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 56px;
  z-index: 50;
}
.filter-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.filter-bar__select {
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  min-width: 140px;
}
.filter-bar__select:focus {
  border-color: var(--gold);
}
.filter-bar__count {
  font-size: 0.9rem;
  color: var(--gray-500);
  margin-left: auto;
}

/* ========== PROPERTY CARD GRID ========== */
.listings-section {
  padding: 60px 0 80px;
  background: var(--off-white);
}
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.listings-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}
.listings-empty h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--navy);
}

/* ========== PROPERTY CARD ========== */
.property-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--gray-100);
}
.property-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.property-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-200);
}
.property-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.property-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.property-card__badge--available {
  background: var(--sage);
  color: var(--white);
}
.property-card__badge--under-contract {
  background: var(--gold);
  color: var(--white);
}
.property-card__badge--sold, .property-card__badge--leased {
  background: var(--gray-500);
  color: var(--white);
}
.property-card__badge--coming-soon {
  background: var(--navy);
  color: var(--white);
}
.property-card__price {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--navy);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
}
.property-card__body {
  padding: 20px;
}
.property-card__address {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.property-card__meta {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--gray-500);
}
.property-card__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.property-card__desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.property-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.property-card__btn:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
}

/* ========== EXPANDED DETAIL VIEW ========== */
.property-detail {
  grid-column: 1 / -1;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--gold);
  overflow: hidden;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; max-height: 0; }
  to { opacity: 1; max-height: 2000px; }
}
.property-detail__inner {
  padding: 32px;
}
.property-detail__close {
  float: right;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: pointer;
  border: none;
  font-size: 1.2rem;
  transition: var(--transition);
}
.property-detail__close:hover {
  background: var(--cta);
  color: var(--white);
}
.property-detail__header {
  margin-bottom: 24px;
}
.property-detail__address {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.property-detail__price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}
.property-detail__gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 24px;
  scroll-snap-type: x mandatory;
}
.property-detail__gallery img {
  height: 240px;
  width: auto;
  border-radius: var(--radius-sm);
  scroll-snap-align: start;
  flex-shrink: 0;
  object-fit: cover;
}
.property-detail__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 24px;
}
.property-detail__spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.property-detail__spec-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  font-weight: 600;
}
.property-detail__spec-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}
.property-detail__description {
  margin-bottom: 24px;
}
.property-detail__description h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.property-detail__description p {
  color: var(--gray-700);
  line-height: 1.7;
  font-size: 0.95rem;
}
.property-detail__features {
  margin-bottom: 28px;
}
.property-detail__features h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.property-detail__features ul {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.property-detail__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--gray-700);
}
.property-detail__features li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
}
.property-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ========== BOTTOM CTA ========== */
.listings-cta {
  padding: 60px 0;
  background: var(--white);
  text-align: center;
}
.listings-cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 12px;
}
.listings-cta p {
  color: var(--gray-500);
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== RESPONSIVE — TABLET (768px+) ========== */
@media (min-width: 768px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .property-detail__features ul { grid-template-columns: repeat(2, 1fr); }
  .property-detail__gallery img { height: 300px; }
}

/* ========== RESPONSIVE — DESKTOP (1024px+) ========== */
@media (min-width: 1024px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
  .filter-bar { top: 60px; }
}
