/**
 * Hericollny — map-free apartment listing grid
 * Visual language ported from new.html (Heritage Collection palette).
 * Everything is scoped under .hcny-lg so it cannot leak into the
 * existing map-based listing or the rest of the theme.
 */

.hcny-lg {
  --navy:        #303c6c;
  --navy-deep:   #242e55;
  --navy-light:  #3e4d88;
  --coral:       #ff8882;
  --coral-light: #ffb8b5;
  --coral-dark:  #e06460;
  --yellow:      #ffd881;
  --green:       #a3d3bf;
  --cream:       #f8f7f5;
  --white:       #ffffff;
  --text-dark:   #242e55;
  --text-mid:    #4a527a;
  --text-muted:  #8a90b0;
  --border:      #e4e3f0;
  --shadow-sm:   0 1px 4px rgba(48,60,108,0.08);
  --shadow-md:   0 4px 18px rgba(48,60,108,0.13);
  --shadow-lg:   0 8px 36px rgba(48,60,108,0.18);
  --radius:      6px;
  --radius-lg:   10px;

  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.6;
}

.hcny-lg *, .hcny-lg *::before, .hcny-lg *::after { box-sizing: border-box; }

/* ── SEARCH BAR ── */
.hcny-lg-search {
  background: #fff;
  border-radius: 70px;
  padding: 1rem;
  max-width: 960px;
  margin: 0 auto 2.5rem;
  box-shadow: var(--shadow-lg);
}

/* ── RESULTS BAR ── */
.hcny-lg-main { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.hcny-lg-results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.hcny-lg-results-count {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px; color: var(--text-muted);
}
.hcny-lg-results-count strong { color: var(--text-dark); font-weight: 600; }
.hcny-lg-sort-wrap {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; color: var(--text-muted);
}
.hcny-lg-sort-select-wrap { position: relative; }
.hcny-lg-sort-select-wrap::after {
  content: '\25BE'; position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%); color: var(--text-muted);
  pointer-events: none; font-size: 10px;
}
.hcny-lg-sort-select-wrap select {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 28px 6px 10px; font-size: 11px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark); background: var(--white);
  appearance: none; -webkit-appearance: none; cursor: pointer;
}

/* ── CARD GRID ── */
.hcny-lg .listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.hcny-lg .listing-card {
  background: var(--white); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex; flex-direction: column;
}
.hcny-lg .listing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.hcny-lg .card-img-wrap { position: relative; flex-shrink: 0; line-height: 0; font-size: 0; }
.hcny-lg .card-img-placeholder {
  width: 100%; height: 300px;
  background: linear-gradient(145deg, var(--navy-light) 0%, var(--navy-deep) 100%);
  display: flex; align-items: center; justify-content: center;
}
.hcny-lg .carousel-wrap {
  position: relative; width: 100%; height: 300px;
  overflow: hidden; display: block; line-height: 0; font-size: 0;
}
.hcny-lg .carousel-track { display: flex; height: 300px; transition: transform 0.35s ease; }
.hcny-lg .carousel-track img { width: 100%; height: 300px; object-fit: cover; flex-shrink: 0; }
.hcny-lg .carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.75); border: none; border-radius: 50%;
  width: 28px; height: 28px; cursor: pointer; font-size: 13px; color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  opacity: 0.7; transition: opacity 0.2s, background 0.2s; z-index: 10;
  padding: 0; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  -webkit-user-select: none; user-select: none;
}
.hcny-lg .carousel-wrap:hover .carousel-btn { opacity: 1; }
.hcny-lg .carousel-btn:hover { background: rgba(255,255,255,0.95); }
.hcny-lg .carousel-btn.prev { left: 10px; }
.hcny-lg .carousel-btn.next { right: 10px; }

.hcny-lg .card-badge {
  position: absolute; top: 12px; left: 12px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 9px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
  padding: 5px 12px; border-radius: 3px;
}
.hcny-lg .badge-popular { background: var(--coral); color: var(--white); padding: 6px 16px; }
.hcny-lg .badge-new { background: var(--yellow); color: var(--navy-deep); }
.hcny-lg .badge-avail { background: var(--green); color: #1e4038; }

.hcny-lg .card-body { padding: 1.1rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.hcny-lg .card-title {
  font-size: 19px; font-weight: 400; color: var(--text-dark);
  margin: 0 0 10px; line-height: 1.25;
}
.hcny-lg .card-meta {
  display: flex; gap: 1.2rem; margin-bottom: 1rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; color: var(--text-muted);
  flex-wrap: nowrap; white-space: nowrap; overflow: hidden;
}
.hcny-lg .card-pill {
  display: inline-flex; font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px; font-weight: 500; color: var(--coral);
  background: rgba(255,136,130,0.1); border: 1px solid rgba(255,136,130,0.3);
  border-radius: 20px; padding: 2px 10px;
}
.hcny-lg .card-pill-row { margin: -8px 0 6px; }
.hcny-lg .card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 1rem; border-top: 1px solid var(--border); margin-top: auto;
}
.hcny-lg .card-price {
  font-size: 12px; color: var(--text-muted);
  font-family: 'Helvetica Neue', Arial, sans-serif;
}
.hcny-lg .card-price strong {
  display: block; font-size: 16px; color: var(--text-dark);
  font-weight: 400; font-family: Georgia, serif; line-height: 1.2;
}
.hcny-lg .card-price-sub { display: block; font-size: 11px; color: var(--text-muted); }
.hcny-lg .card-actions { display: flex; gap: 6px; align-items: center; }
.hcny-lg .btn-view {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 9px 20px; border: 1.5px solid var(--navy); border-radius: var(--radius);
  background: transparent; color: var(--navy); cursor: pointer; text-decoration: none;
  transition: all 0.2s; white-space: nowrap; font-weight: 500;
}
.hcny-lg .btn-view:hover { background: var(--navy); color: var(--white); }

/* ── FAVORITE ── */
.hcny-lg .hericollny-favorite-btn {
  position: absolute; top: 12px; right: 12px; z-index: 11;
  background: rgba(255,255,255,0.85); border: none; border-radius: 50%;
  width: 34px; height: 34px; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.hcny-lg .hericollny-favorite-btn .heart-icon { width: 18px; height: 18px; fill: none; stroke: var(--navy); stroke-width: 1.8; }
.hcny-lg .hericollny-favorite-btn.is-favorited .heart-icon { fill: var(--coral); stroke: var(--coral); }

/* ── LOAD MORE / EMPTY / LOADING ── */
.hcny-lg-load-more { text-align: center; padding: 2rem 0 0; }
.hcny-lg .btn-load-more {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 12px 32px; border: none; border-radius: 40px;
  background: var(--navy); color: var(--white); cursor: pointer;
  transition: background 0.2s; font-weight: 600;
}
.hcny-lg .btn-load-more:hover { background: var(--navy-light); }
.hcny-lg .btn-load-more[disabled] { opacity: 0.6; cursor: default; }

.hcny-lg-empty {
  grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; color: var(--text-muted);
}
.hcny-lg-empty h3 { font-size: 20px; font-weight: 400; margin: 0 0 8px; font-family: Georgia, serif; color: var(--text-dark); }
.hcny-lg-empty p { font-size: 12px; font-family: 'Helvetica Neue', Arial, sans-serif; margin: 0; }

.hcny-lg-skeleton {
  grid-column: 1 / -1; text-align: center; padding: 3rem 2rem;
  font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 12px; color: var(--text-muted);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hcny-lg .listings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hcny-lg-main { padding: 0 1rem; }
  .hcny-lg-search { border-radius: var(--radius-lg); padding: 1rem; }
  .hcny-lg .listings-grid { gap: 1rem; }
  .hcny-lg .carousel-wrap,
  .hcny-lg .carousel-track,
  .hcny-lg .carousel-track img { height: 220px; }
  .hcny-lg .card-footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .hcny-lg .card-actions, .hcny-lg .btn-view { width: 100%; text-align: center; justify-content: center; }
  .hcny-lg-results-bar { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}
