/* =========================
   GLOBAL SIZING + RESET
========================= */
:root {
  /* ✅ Your brand colors */
  --blue: #318fe3;
  --gray-1: #a3a3a3;

  /* ✅ derived (still based on your gray) */
  --gray-2: rgba(163, 163, 163, 0.95);
  --gray-bg: rgba(163, 163, 163, 0.12);

  --radius: 5px;
  --spec-icon: 24px;
  --font-small: 0.82rem;
  --font-normal: 0.9rem;
}

.estate-card {
  border-radius: 6px;
}

/* =========================
     ICONS
========================= */
.spec-item img,
.spec-icon {
  width: var(--spec-icon);
  height: var(--spec-icon);
  flex-shrink: 0;
}

.icon-btn {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.icon-btn.bookmark {
  width: 15px;
  height: 15px;
}

/* =========================
     LIST LAYOUT
========================= */
.list-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.list-cards {
  flex: 1;
}

/* Left Banner (default for desktop, controlled via media queries) */
.list-banner {
  flex: 0 0 520px;
  position: sticky;
  top: 150px;
}

.list-banner-img {
  width: 100%;
  height: 460px;
  object-fit: fill;
  border-radius: var(--radius);
}

/* =========================
     CARD IMAGE
========================= */
.estate-card-image {
  height: 100%;
  min-height: 220px;
  max-height: 220px;
}

.estate-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

/* =========================
     CENTER COLUMN
========================= */
.estate-card-center-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

/* Title */
.estate-card-center-inner h5 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
}

/* Address — one line + ellipsis */
.estate-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray-2);
  font-size: var(--font-small);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.estate-location i {
  color: var(--blue);
  font-size: 1rem;
  flex-shrink: 0;
}

/* =========================
     SPECS
========================= */
.specs-row {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: nowrap;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--font-normal);
  color: var(--gray-1);
  width: 30%;
  min-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* =========================
     ACTION BUTTONS
========================= */
.estate-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.estate-card-actions .btn {
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: 5px;
  white-space: nowrap;
}

/* =========================
     RIGHT ASIDE
========================= */
.estate-card-aside {
  background: rgba(163, 163, 163, 0.1);
  padding: 1rem;
  border-radius: 5px;
  border-bottom-right-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 220px;
}

/* Glass buttons */
.glassy-btn {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  backdrop-filter: blur(8px);
  background: var(--blue);
  border: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s;
}

.glassy-btn:hover {
  background: rgba(49, 143, 227, 0.45);
}

/* Prices */
.estate-card-prices {
  padding: 0.6rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--font-small);
}

/* META */
.estate-card-meta {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.4rem;
}

.estate-card-meta p {
  background: var(--gray-bg);
  padding: 6px 10px;
  border-radius: 5px;
  border: 1px solid rgba(163, 163, 163, 0.5);
  font-size: var(--font-small);
  margin-bottom: 6px;
  white-space: nowrap;
  color: var(--gray-1);
}

/* =========================
     RESPONSIVE — TABLET
========================= */
@media (max-width: 991.98px) {
  .estate-card-image {
    height: 220px;
  }

  .estate-card-aside {
    margin-top: 1rem;
  }

  .specs-row {
    gap: 1.2rem;
  }

  .spec-item {
    width: 45%;
    min-width: unset;
  }
}

/* =========================
     RESPONSIVE — MOBILE
========================= */
@media (max-width: 575.98px) {
  .specs-row {
    flex-direction: column;
    gap: 0.7rem;
  }

  .spec-item {
    width: 100%;
  }

  .estate-card-center-inner h5 {
    font-size: 0.95rem;
  }

  .estate-location {
    font-size: 0.78rem;
  }

  .spec-item span {
    font-size: 0.85rem;
  }

  .price-row {
    font-size: 0.78rem;
  }
}

/* =========================
   HOVER EFFECTS
========================= */
.estate-card-image img {
  transition: filter 0.2s ease;
}

/* (assuming .estate-card has border somewhere else; just set the hover border color) */
.estate-card:hover {
  border-color: var(--blue);
}

.estate-card:hover .estate-card-image img {
  filter: brightness(0.8);
}

/* =========================
   COMPACT DESKTOP CARD (≥ 992px)
   Smaller height & tighter layout
========================= */
@media (min-width: 992px) {
  .estate-card {
    max-height: 190px;
    overflow: hidden;
  }

  .estate-card-image {
    min-height: 190px;
    max-height: 190px;
    max-width: 350px;
  }

  .estate-card-aside {
    min-height: 190px;
    padding: 0.5rem 0.75rem;
  }

  .estate-card-center {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .estate-card-center-inner {
    gap: 0.35rem;
  }

  .estate-card-center-inner h5 {
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.2;
  }

  .estate-location {
    font-size: 0.75rem;
  }

  .specs-row {
    margin-top: 0.15rem;
    gap: 0.35rem;
  }

  .estate-card .specs-row.mt-3 {
    margin-top: 0.1rem !important;
  }

  .spec-item {
    font-size: 0.72rem;
    gap: 0.25rem;
    width: 32%;
    min-width: 90px;
  }

  .estate-card-actions {
    gap: 0.3rem;
    margin-top: 0.15rem;
  }

  .estate-card-actions .btn {
    padding: 1px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
  }

  .estate-card-prices {
    padding: 0.25rem 0;
    gap: 0.2rem;
  }

  .price-row {
    font-size: 0.72rem;
  }

  .estate-card-meta {
    gap: 0.2rem;
  }

  .estate-card-meta p {
    font-size: 0.68rem;
    padding: 2px 5px;
    margin-bottom: 2px;
  }
}

/* =========================
   LAYOUT BREAKPOINTS FOR BANNER
========================= */

/* DESKTOP (≥ 1200px): list + banner side by side */
@media (min-width: 1200px) {
  .list-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  .list-cards {
    flex: 1 1 auto;
    width: auto;
  }

  .list-banner {
    display: block;
  }
}

/* TABLET & MOBILE (< 1200px): full-width list, hide banner */
@media (max-width: 1199.98px) {
  .list-layout {
    flex-direction: column;
  }

  .list-cards {
    width: 100%;
  }

  .list-banner {
    display: none !important;
  }
}
