/* =========================================================
   HAVN — SHARED CARD SYSTEM
   Used by:
   - index.html
   - properties.html
   Mobile-first, no JS layout hacks
========================================================= */

:root {
  --card-bg: #ffffff;
  --card-radius: 20px;
  --card-shadow: 0 14px 40px rgba(15, 23, 42, 0.10);
  --card-shadow-hover: 0 18px 55px rgba(15, 23, 42, 0.14);
  --card-thumb-h: 150px;

  --text-main: #0f172a;
  --text-muted: #6b7280;
  --accent-soft: #eef2ff;
}

/* ================= GRID ================= */

.hp-grid {
  display: grid;
  grid-template-columns: 1fr; /* mobile first */
  gap: 14px;
  align-items: start;
}

/* Tablet */
@media (min-width: 720px) {
  .hp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hp-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}

/* ================= CARD ================= */

.hp-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.hp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}

/* ================= MEDIA ================= */

.hp-media {
  width: 100%;
  height: var(--card-thumb-h);
  background: #eef2ff;
  overflow: hidden;
}

.hp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= BODY ================= */

.hp-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  margin: 0;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hp-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* ================= CHIPS ================= */

.hp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 12px;
  color: #1f2a44;
  white-space: nowrap;
}

.hp-price {
  font-weight: 700;
  color: #111827;
}

/* ================= MOBILE TWEAKS ================= */

@media (max-width: 480px) {
  :root {
    --card-thumb-h: 170px; /* slightly taller for mobile readability */
  }

  .hp-title {
    font-size: 15px;
  }
}
