/* ============================================================================
   NtaKomisiyo — Rwanda's direct marketplace
   Deep green + white + amber. Mobile-first, fast, no frameworks.
   ========================================================================== */

:root{
  --green:#0b6b3a;
  --green-dark:#084d29;
  --green-light:#e7f4ec;
  --amber:#f5a800;
  --amber-dark:#d18f00;
  --ink:#1c2b22;
  --muted:#5c6f64;
  --line:#dbe7de;
  --wa:#25d366;
  --radius:14px;
}

*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  color:var(--ink);
  background:#fff;
  line-height:1.5;
}
img{max-width:100%;display:block;}
a{color:var(--green);}
h1,h2,h3{line-height:1.2;margin:0 0 .5em;}
button{font:inherit;cursor:pointer;}
input,select,textarea{font:inherit;}

.wrap{max-width:1060px;margin:0 auto;padding:0 16px;}

/* ------------------------------ header ---------------------------------- */
.site-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:12px 16px;background:var(--green-dark);
  position:sticky;top:0;z-index:20;
}
.logo{color:#fff;text-decoration:none;font-weight:800;font-size:24px;letter-spacing:-.5px;}
.logo span{color:var(--amber);}

/* ------------------------------ buttons --------------------------------- */
.btn{
  display:inline-block;border:none;border-radius:10px;
  padding:12px 20px;font-weight:700;text-decoration:none;text-align:center;
}
.btn-amber{background:var(--amber);color:#231a00;}
.btn-amber:hover{background:var(--amber-dark);}
.btn-green{background:var(--green);color:#fff;}
.btn-green:hover{background:var(--green-dark);}
.btn-wa{background:var(--wa);color:#08351a;}
.btn-ghost{background:transparent;color:#fff;border:1.5px solid #fff;}
.btn-small{padding:8px 14px;font-size:14px;}
.btn-big{display:block;width:100%;padding:16px;font-size:18px;margin:10px 0;}

/* ------------------------------ hero ------------------------------------ */
.hero{
  background:linear-gradient(160deg,var(--green) 0%,var(--green-dark) 100%);
  color:#fff;padding:36px 16px 30px;text-align:center;
}
.hero h1{font-size:32px;margin-bottom:10px;}
.hero h1 em{font-style:normal;color:var(--amber);}
.hero-sub{max-width:560px;margin:0 auto 20px;color:#dff2e6;font-size:16px;}

.search-bar{
  max-width:720px;margin:0 auto;background:#fff;border-radius:var(--radius);
  padding:10px;display:flex;flex-direction:column;gap:8px;
  box-shadow:0 8px 30px rgba(0,0,0,.25);
}
.search-bar input,.search-bar select{
  width:100%;padding:12px;border:1.5px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);
}
.search-bar .btn{width:100%;}

/* --------------------------- category tiles ------------------------------ */
.cat-tiles{
  display:grid;grid-template-columns:repeat(2,1fr);gap:10px;
  margin:22px 0 6px;
}
.cat-tile{
  background:var(--green-light);border:1.5px solid var(--line);border-radius:var(--radius);
  padding:18px 8px;font-size:30px;display:flex;flex-direction:column;align-items:center;gap:6px;
  color:var(--green-dark);
}
.cat-tile span{font-size:15px;font-weight:700;}
.cat-tile.active{background:var(--green);color:#fff;border-color:var(--green);}

/* ------------------------------ how ------------------------------------- */
.how{padding:14px 16px 4px;}
.how h2{text-align:center;color:var(--green-dark);}
.steps{display:grid;grid-template-columns:1fr;gap:12px;}
.step{background:#fff;border:1.5px solid var(--line);border-radius:var(--radius);padding:16px;}
.step-num{
  width:34px;height:34px;border-radius:50%;background:var(--amber);color:#231a00;
  font-weight:800;display:flex;align-items:center;justify-content:center;margin-bottom:8px;
}
.step h3{margin-bottom:4px;color:var(--green-dark);}
.step p{margin:0;color:var(--muted);font-size:15px;}

.trust-strip{
  background:#fff7e0;border:1.5px solid var(--amber);border-radius:10px;
  padding:12px 14px;font-size:14.5px;margin:18px 0;
}

/* ----------------------------- listings --------------------------------- */
.listings-head{display:flex;align-items:baseline;justify-content:space-between;margin-top:10px;}
.listings-head h2{color:var(--green-dark);}
.listings-count{color:var(--muted);font-size:14px;}
.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;padding-bottom:10px;}
.card{
  border:1.5px solid var(--line);border-radius:var(--radius);overflow:hidden;
  text-decoration:none;color:var(--ink);background:#fff;display:flex;flex-direction:column;
}
.card:hover{border-color:var(--green);}
.card-photo{aspect-ratio:4/3;background:var(--green-light);overflow:hidden;}
.card-photo img{width:100%;height:100%;object-fit:cover;}
.card-no-photo{
  width:100%;height:100%;display:flex;align-items:center;justify-content:center;
  font-size:44px;color:var(--green);
}
.card-body{padding:10px 12px 12px;display:flex;flex-direction:column;gap:4px;}
.card-title{font-weight:700;font-size:15.5px;line-height:1.3;}
.card-price{color:var(--green);font-weight:800;font-size:16px;}
.card-loc{color:var(--muted);font-size:13.5px;}
.badge{
  align-self:flex-start;background:var(--green-light);color:var(--green-dark);
  font-size:12px;font-weight:700;padding:3px 9px;border-radius:999px;
}
.empty{text-align:center;padding:36px 10px;}
.empty-big{font-size:19px;font-weight:700;color:var(--green-dark);}
.loading{color:var(--muted);text-align:center;padding:18px;}

/* ------------------------------ detail ---------------------------------- */
.detail-wrap{padding-top:14px;}
.back-link{font-weight:600;text-decoration:none;}
.detail-photos{display:grid;grid-template-columns:1fr;gap:8px;margin:12px 0;}
.detail-photos img{border-radius:var(--radius);width:100%;max-height:420px;object-fit:cover;}
.detail-body h1{font-size:26px;margin-top:8px;}
.detail-price{font-size:24px;font-weight:800;color:var(--green);margin:4px 0;}
.detail-location{color:var(--muted);margin:2px 0 12px;}
.detail-desc{white-space:pre-wrap;margin:0 0 14px;}
.detail-seller{font-weight:600;margin:0 0 6px;}
.contact-btns{margin:8px 0;}
.report-link{
  background:none;border:none;color:var(--muted);font-size:13.5px;
  text-decoration:underline;padding:6px 0;
}
.report-done{color:var(--green);font-size:14px;}

/* ------------------------------- post ----------------------------------- */
.post-wrap{max-width:640px;padding-top:20px;}
.post-intro{color:var(--muted);}
.post-form{display:flex;flex-direction:column;gap:6px;}
.post-form label{font-weight:600;font-size:15px;display:flex;flex-direction:column;gap:5px;margin-top:10px;}
.post-form input,.post-form select,.post-form textarea{
  padding:12px;border:1.5px solid var(--line);border-radius:10px;font-weight:400;background:#fff;
}
.post-form .check-row{flex-direction:row;align-items:center;gap:8px;font-weight:500;margin-top:2px;}
.post-form .check-row input{width:20px;height:20px;}
.photo-preview{display:flex;gap:8px;flex-wrap:wrap;margin-top:6px;}
.photo-preview img{width:76px;height:76px;object-fit:cover;border-radius:8px;border:1.5px solid var(--line);}
.form-error{background:#fdecec;border:1.5px solid #e5a3a3;color:#8c1d1d;border-radius:10px;padding:10px 12px;}
.fineprint{color:var(--muted);font-size:13.5px;text-align:center;}
.success-panel{
  background:var(--green-light);border:1.5px solid var(--green);border-radius:var(--radius);
  padding:22px;text-align:center;margin-top:20px;
}
.success-big{font-size:21px;font-weight:800;color:var(--green-dark);}

/* ------------------------------ footer ---------------------------------- */
.footer{
  background:var(--green-dark);color:#cfe8d8;text-align:center;
  padding:26px 16px;margin-top:34px;font-size:14.5px;
}
.footer a{color:var(--amber);}

/* ----------------------------- larger screens ---------------------------- */
@media (min-width:640px){
  .hero h1{font-size:42px;}
  .search-bar{flex-direction:row;flex-wrap:wrap;}
  .search-bar input[type="search"]{flex:1 1 100%;}
  .search-bar select{flex:1 1 180px;}
  .search-bar .btn{flex:0 0 auto;width:auto;padding:12px 30px;}
  .cat-tiles{grid-template-columns:repeat(5,1fr);}
  .steps{grid-template-columns:repeat(3,1fr);}
  .grid{grid-template-columns:repeat(3,1fr);}
  .detail-photos{grid-template-columns:repeat(2,1fr);}
  .btn-big{max-width:420px;}
}
@media (min-width:960px){
  .grid{grid-template-columns:repeat(4,1fr);}
}
