/* Wspólna karta ogłoszenia (kafelek): strona główna + sekcje „Podobne / Inne oferty” na stronie ogłoszenia.
   Markup: listings/_home_card.html. Rozszerzenia wizualne: premium-v5.css. */

.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr)); gap: 16px; }
.home-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.home-card:hover { border-color: var(--accent, #0ea5e9); box-shadow: 0 6px 20px rgba(0, 0, 0, .14); }
.hc-image { aspect-ratio: 4 / 3; background: var(--hover); position: relative; overflow: hidden; }
.hc-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; box-shadow: none; }
.hc-noimage { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.hc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.hc-title { font-size: 17px; font-weight: 700; color: var(--text); }
.hc-meta { font-size: 14px; color: var(--muted); }
.hc-city { font-size: 13px; color: var(--muted); }
.hc-price { margin-top: 8px; font-size: 22px; font-weight: 800; color: var(--text); }
.hc-price span { font-size: 13px; font-weight: 600; color: var(--muted); }
.home-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 32px; }

.hc-badge {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px;
  background: #15803d; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}


.hc-meta, .hc-city, .hc-title { min-width: 0; }
.hc-body { flex: 1; }
.hc-price { margin-top: auto; padding-top: 8px; }  /* ceny w jednej linii przy kartach o różnej wysokości */
.hc-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Link „Zobacz wszystkie” pod sekcją na stronie ogłoszenia */
.detail-more-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--card-bg);
  color: var(--text); font-weight: 600; text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.detail-more-link:hover { border-color: var(--accent, #0ea5e9); color: var(--accent, #0ea5e9); }
.detail-cards { margin-top: 20px; }

@media (max-width: 640px) {
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hc-body { padding: 10px 12px 12px; }
  .hc-title { font-size: 15px; }
  .hc-price { font-size: 18px; }
}
@media (max-width: 400px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
}
