/* Nigeria MLS IDX — Frontend Styles */
:root {
  --nmls-navy: #0f172f;
  --nmls-red:  #a6131c;
  --nmls-green:#007a3f;
  --nmls-grey: #f4f4f4;
  --nmls-text: #222;
  --nmls-muted:#666;
  --nmls-radius:8px;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.nmls-listing-grid-wrap { position:relative; }
.nmls-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  transition: opacity .2s;
}
@media (max-width:900px) { .nmls-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width:560px) { .nmls-grid { grid-template-columns: 1fr; } }

.nmls-results-meta { margin:.5rem 0 1rem; color:var(--nmls-muted); font-size:.9rem; }
.nmls-empty        { grid-column:1/-1; text-align:center; color:var(--nmls-muted); padding:3rem 0; }

/* ── Card ────────────────────────────────────────────────────────────────── */
.nmls-card { background:#fff; border-radius:var(--nmls-radius); overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.08); transition:box-shadow .2s; }
.nmls-card:hover { box-shadow:0 6px 20px rgba(0,0,0,.14); }
.nmls-card__img-wrap { display:block; position:relative; overflow:hidden; aspect-ratio:4/3; }
.nmls-card__img { width:100%; height:100%; object-fit:cover; display:block; }
.nmls-card__img--placeholder { width:100%; height:100%; background:#e8e8e8; }
.nmls-badge { position:absolute; top:10px; left:10px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.5px; padding:3px 9px; border-radius:4px; color:#fff; }
.nmls-badge--sale { background:var(--nmls-green); }
.nmls-badge--rent { background:var(--nmls-navy); }
.nmls-card__body   { padding:14px 16px; }
.nmls-card__price  { font-size:1.15rem; font-weight:700; color:var(--nmls-red); margin-bottom:4px; }
.nmls-card__title  { font-size:.95rem; margin:0 0 8px; line-height:1.35; }
.nmls-card__title a{ color:var(--nmls-navy); text-decoration:none; }
.nmls-card__title a:hover { color:var(--nmls-red); }
.nmls-card__meta   { display:flex; gap:10px; font-size:.82rem; color:var(--nmls-muted); margin-bottom:6px; flex-wrap:wrap; }
.nmls-card__location { font-size:.82rem; color:var(--nmls-muted); }

/* ── View toggle ─────────────────────────────────────────────────────────── */
.nmls-view-toggle { display:flex; gap:8px; margin-bottom:16px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.nmls-btn { display:inline-flex; align-items:center; justify-content:center;
  padding:8px 18px; border-radius:6px; border:2px solid var(--nmls-navy);
  background:transparent; color:var(--nmls-navy); font-size:.9rem; font-weight:600;
  cursor:pointer; transition:all .18s; }
.nmls-btn:hover, .nmls-btn--active { background:var(--nmls-navy); color:#fff; }
.nmls-btn--primary { background:var(--nmls-red); border-color:var(--nmls-red); color:#fff; }
.nmls-btn--primary:hover { background:#8b0f16; border-color:#8b0f16; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.nmls-input { padding:8px 12px; border:1.5px solid #d1d5db; border-radius:6px;
  font-size:.9rem; color:var(--nmls-text); background:#fff; outline:none; width:100%; box-sizing:border-box; }
.nmls-input:focus { border-color:var(--nmls-navy); }

/* ── Search form ─────────────────────────────────────────────────────────── */
.nmls-search-form { margin-bottom:24px; }
.nmls-search-row  { display:flex; gap:10px; margin-bottom:10px; flex-wrap:wrap; }
.nmls-search-row .nmls-input { flex:1; min-width:130px; }
.nmls-search-row .nmls-btn   { flex-shrink:0; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.nmls-pagination { display:flex; gap:6px; margin-top:24px; flex-wrap:wrap; }
.nmls-page-btn   { padding:6px 12px; border:1.5px solid #d1d5db; border-radius:6px; background:#fff; cursor:pointer; font-size:.88rem; }
.nmls-page-btn.active, .nmls-page-btn:hover { background:var(--nmls-navy); color:#fff; border-color:var(--nmls-navy); }

/* ── Loading ─────────────────────────────────────────────────────────────── */
.nmls-loading { position:absolute; inset:0; background:rgba(255,255,255,.6); display:flex; align-items:center; justify-content:center; font-weight:600; gap:10px; z-index:10; border-radius:var(--nmls-radius); }
.nmls-spinner { display:inline-block; width:20px; height:20px; border:3px solid #d1d5db; border-top-color:var(--nmls-navy); border-radius:50%; animation:nmls-spin .7s linear infinite; }
@keyframes nmls-spin { to { transform:rotate(360deg); } }

/* ── Single listing ──────────────────────────────────────────────────────── */
.nmls-single { display:grid; grid-template-columns:1fr 1fr; gap:32px; }
@media (max-width:700px) { .nmls-single { grid-template-columns:1fr; } }
.nmls-single__gallery img { width:100%; border-radius:var(--nmls-radius); margin-bottom:8px; display:block; }
.nmls-single__price  { font-size:1.6rem; font-weight:800; color:var(--nmls-red); margin:8px 0; }
.nmls-single__meta   { display:flex; gap:16px; color:var(--nmls-muted); font-size:.9rem; margin:8px 0 16px; flex-wrap:wrap; }
.nmls-single__location { color:var(--nmls-muted); margin-bottom:12px; }

/* ── Market data ─────────────────────────────────────────────────────────── */
.nmls-market { background:var(--nmls-navy); color:#fff; padding:24px; border-radius:var(--nmls-radius); }
.nmls-market__title { margin:0 0 16px; font-size:1.1rem; }
.nmls-market__grid  { display:grid; grid-template-columns:repeat(5,1fr); gap:16px; }
@media (max-width:700px) { .nmls-market__grid { grid-template-columns:repeat(2,1fr); } }
.nmls-stat { text-align:center; }
.nmls-stat__label { display:block; font-size:.76rem; color:rgba(255,255,255,.65); margin-bottom:4px; text-transform:uppercase; letter-spacing:.5px; }
.nmls-stat__value { display:block; font-size:1.05rem; font-weight:700; }
.nmls-market__updated { margin:16px 0 0; font-size:.76rem; color:rgba(255,255,255,.45); }

/* ── Neighbourhood card ──────────────────────────────────────────────────── */
.nmls-ncard { background:#fff; border-radius:var(--nmls-radius); overflow:hidden; box-shadow:0 2px 8px rgba(0,0,0,.08); }
.nmls-ncard__img  { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }
.nmls-ncard__body { padding:14px 16px; }
.nmls-ncard__title { margin:0 0 6px; font-size:1rem; }
.nmls-ncard__title a { color:var(--nmls-navy); text-decoration:none; }
.nmls-ncard__title a:hover { color:var(--nmls-red); }
.nmls-ncard__lga, .nmls-ncard__count { font-size:.82rem; color:var(--nmls-muted); }
.nmls-ncard__price { font-weight:700; color:var(--nmls-red); margin:4px 0; font-size:.95rem; }
.nmls-ncard__desc  { font-size:.85rem; color:var(--nmls-muted); margin:6px 0 0; }

/* ── Lead form ───────────────────────────────────────────────────────────── */
.nmls-lead-form { background:var(--nmls-grey); padding:24px; border-radius:var(--nmls-radius); }
.nmls-lead-form__title { margin:0 0 16px; font-size:1.05rem; color:var(--nmls-navy); }
.nmls-form-group { margin-bottom:12px; }
.nmls-lead-msg { padding:10px 14px; border-radius:6px; margin-bottom:12px; font-size:.9rem; }
.nmls-msg--ok    { background:#d1fae5; color:#065f46; }
.nmls-msg--error { background:#fee2e2; color:#991b1b; }

/* ── Map ─────────────────────────────────────────────────────────────────── */
.nmls-map-wrap { border-radius:var(--nmls-radius); overflow:hidden; }
.nmls-map      { border-radius:var(--nmls-radius); }
.nmls-error    { color:var(--nmls-red); }
