* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6fb;
  color: #111827;
}

a {
  color: inherit;
  text-decoration: none;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.nav-brand {
  font-weight: 700;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.nav-links a:hover {
  color: #2563eb;
}

.hero {
  padding: 48px 16px 32px;
  background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
  color: white;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.hero p {
  opacity: 0.9;
  margin-bottom: 16px;
}

.search-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px;
  backdrop-filter: blur(8px);
}

.search-bar input {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 8px 10px;
  font-size: 14px;
  background: rgba(255,255,255,0.9);
}

.search-bar input::placeholder {
  color: #6b7280;
}

.search-bar button {
  border-radius: 8px;
  border: none;
  padding: 8px 10px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}

#search-btn {
  background: #22c55e;
  color: white;
}

.secondary {
  background: #111827;
  color: white;
}

.results {
  max-width: 1100px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.status {
  text-align: center;
  padding: 32px 12px;
  font-size: 15px;
}

.status-loading {
  color: #2563eb;
}

.status-error {
  color: #b91c1c;
}

.status-empty {
  color: #6b7280;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.results-header h2 {
  font-size: 18px;
}

.btn-outline {
  border-radius: 999px;
  border: 1px solid #9ca3af;
  padding: 6px 12px;
  background: white;
  font-size: 13px;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15,23,42,0.08);
  display: flex;
  flex-direction: column;
}

.card-img-wrap {
  width: 100%;
  height: 180px;
  background: #e5e7eb;
  overflow: hidden;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-price {
  font-weight: 700;
  color: #047857;
}

.card-address {
  font-weight: 600;
  font-size: 14px;
}

.card-location {
  font-size: 13px;
  color: #6b7280;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #4b5563;
}

.card-desc {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.pager button {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 6px 14px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.pager button:disabled {
  opacity: 0.4;
  cursor: default;
}

.footer {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

@media (max-width: 900px) {
  .search-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .search-bar {
    grid-template-columns: 1fr;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
  }
}