:root {
  --bg: #ffffff;
  --text: #121212;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #ff385c;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
}
.brand { font-weight: 700; color: var(--brand); text-decoration: none; }
.nav-link { color: var(--text); text-decoration: none; margin-left: 12px; }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; }

.searchbar { margin: 10px 0 20px; }
#search-form {
  display: grid;
  grid-template-columns: 1fr 180px 120px;
  gap: 10px;
}
#search-form input, #search-form select, #search-form button {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
}
#search-form button { background: var(--brand); color: #fff; border: none; cursor: pointer; }

.results-count { color: var(--muted); margin-bottom: 10px; }

.listing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.card-media { height: 170px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { padding: 12px; }
.card-title { font-weight: 600; margin: 0 0 4px; }
.card-meta { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.card-price { font-weight: 600; }
.card-link { color: inherit; text-decoration: none; display: block; }

.prop-card { border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.04); display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.prop-card.selected { border-color: #1F77A6; }
.prop-media { position: relative; height: 160px; overflow: hidden; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.like-btn { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 9999px; background: #fff; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.12); color: #111827; transition: transform .2s ease; }
.like-btn svg { transition: fill .2s ease, stroke .2s ease; }
.like-btn:hover svg path { stroke: #ef4444; }
.like-btn.liked svg path { fill: #ef4444; stroke: transparent; }
@keyframes heartPop { 0%{ transform: scale(1);} 50%{ transform: scale(1.25);} 100%{ transform: scale(1);} }
.like-btn.pop { animation: heartPop .35s ease-out; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 9999px; background: rgba(255,255,255,0.75); display: flex; align-items: center; justify-content: center; color: #1B70A0; opacity: 0; pointer-events: none; transition: opacity .2s ease, background .2s ease; backdrop-filter: blur(4px); }
.carousel-btn.left { left: 6px; }
.carousel-btn.right { right: 6px; }
.carousel-btn:hover { background: rgba(255,255,255,0.9); }
.carousel-btn svg { width: 16px; height: 16px; }
.prop-card:hover .carousel-btn { opacity: 1; pointer-events: auto; }
.carousel-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.prop-card:hover .carousel-dots { opacity: 1; pointer-events: auto; }
.carousel-dot { width: 6px; height: 6px; border-radius: 9999px; background: rgba(255,255,255,0.9); opacity: 0.6; cursor: pointer; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.carousel-dot:hover { transform: scale(1.2); opacity: 1; background: #1B70A0; }
.carousel-dot.active { opacity: 1; background: #1B70A0; }
.prop-body { padding: 10px; }
.prop-title { font-size: 16px; font-weight: 600; margin: 0 0 6px; color: #111827; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.prop-sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.prop-feats { font-size: 13px; color: #374151; margin-bottom: 8px; }
.prop-price { font-size: 18px; font-weight: 700; color: #111827; }
.prop-price-sub { font-size: 12px; color: var(--muted); }
.card-link { color: inherit; text-decoration: none; display: block; height: 100%; }

.site-footer { border-top: 1px solid var(--border); padding: 20px 24px; color: var(--muted); }

.detail { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; }
.detail-media img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.detail-info h1 { margin: 0 0 6px; }
.muted { color: var(--muted); }
.pill-row { display: flex; gap: 8px; margin: 8px 0; }
.pill { border: 1px solid var(--border); border-radius: 999px; padding: 6px 10px; font-size: 12px; color: var(--muted); }
.price { font-size: 18px; font-weight: 700; margin: 10px 0; }
.amenities { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.button { display: inline-block; background: var(--brand); color: #fff; padding: 12px 16px; border-radius: 10px; text-decoration: none; }

@media (max-width: 980px) {
  .listing-grid { grid-template-columns: repeat(3, 1fr); }
  #search-form { grid-template-columns: 1fr 1fr auto; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .listing-grid { grid-template-columns: 1fr; }
}
