:root {
  --green:#12a454;
  --muted:#6b7280;
  --bg:#f5f7f6;
  --card:#ffffff;
  --radius:12px;
  --soft-shadow:0 6px 18px rgba(16,24,40,0.06);
  font-family:'Inter',sans-serif;
}

*{box-sizing:border-box;margin:0;padding:0;}
body{background:var(--bg);color:#0f172a;}

header {
  background:white;
  padding:20px 28px;
  display:flex;
  align-items:center;
  gap:18px;
  border-bottom:1px solid #eef2f4;
}
.logo {font-weight:700;color:var(--green);font-size:28px;}
.searchbar {flex:1;display:flex;gap:8px;align-items:center;}
.searchbar input {
  flex:1;padding:12px 16px;
  border:1px solid #e6eef0;
  border-radius:28px;
  background:#f7faf9;
}
.searchbar button {
  padding:10px 18px;
  border-radius:8px;
  border:none;
  background:var(--green);
  color:white;
  font-weight:600;
}
.actions {display:flex;gap:10px;}
.btn-outline {
  padding:8px 12px;border-radius:8px;
  border:1px solid #e6eef0;background:white;
}
.btn-primary {
  padding:8px 12px;border-radius:8px;
  border:none;background:var(--green);color:white;
}

/* Layout */
.wrap {
  display:flex;
  gap:24px;
  padding:28px;
  max-width:1200px;
  margin:18px auto;
}
.sidebar {
  width:260px;
  background:var(--card);
  border-radius:12px;
  padding:18px;
  box-shadow:var(--soft-shadow);
  position:sticky;
  top:20px;
  align-self:flex-start;
}
.content {flex:1;}
.filter-row {margin-bottom:16px;}
label {display:block;font-size:13px;color:var(--muted);margin-bottom:8px;}
select, input[type="number"] {
  width:100%;padding:10px;
  border-radius:8px;
  border:1px solid #e6eef0;
}
.price-range {display:flex;gap:8px;align-items:center;}
.price-range input{flex:1;}
.filter-actions{display:flex;gap:8px;margin-top:10px;}

.results-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
}
.cards {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:18px;
}
.card {
  background:var(--card);
  border-radius:12px;
  box-shadow:var(--soft-shadow);
  cursor:pointer;
  transition:transform .2s ease, box-shadow .2s ease;
}
.card:hover {
  transform:translateY(-3px);
  box-shadow:0 10px 25px rgba(0,0,0,0.08);
}
.card img {
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:12px 12px 0 0;
}
.card-body {padding:10px 14px;}
.card-title {font-weight:600;margin-bottom:6px;}
.card-price {color:var(--green);font-weight:700;margin-bottom:6px;}
.card-meta {font-size:13px;color:var(--muted);}
.muted {color:var(--muted);}
.chip {
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  background:#f3f7f6;
  border:1px solid #edf2f2;
  font-size:13px;
}
footer {
  max-width:1200px;
  margin:36px auto;
  color:var(--muted);
  font-size:14px;
  text-align:center;
}

/* Modal */
.modal {
  position:fixed;
  top:0;left:0;width:100%;height:100%;
  background:rgba(0,0,0,0.5);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:1000;
}
.modal.hidden {display:none;}
.modal-content {
  background:white;
  border-radius:12px;
  padding:20px;
  width:90%;
  max-width:500px;
  box-shadow:var(--soft-shadow);
  animation:fadeIn .3s ease;
}
.modal-content img {
  width:100%;
  border-radius:8px;
  margin-bottom:12px;
}
.modal-close {
  float:right;
  font-size:24px;
  cursor:pointer;
}
.price {color:var(--green);font-weight:700;margin-bottom:10px;}
.desc {margin-top:10px;color:var(--muted);}
@keyframes fadeIn {from{opacity:0;transform:translateY(-10px);}to{opacity:1;transform:translateY(0);}}

.modal-content.small {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #e6eef0;
  border-radius: 8px;
  font-size: 14px;
}

.modal-content textarea {
  min-height: 80px;
  resize: vertical;
}

#postAdModal input[type="file"] {
  border: none;
  background: #f8fafb;
  padding: 6px;
  font-size: 13px;
}

