/* NairobiCity House Hunting + Merchant dashboard */

:root {
  --hh-blue: #0f76d7;
  --hh-blue-dark: #0b5fad;
  --hh-orange: #f97316;
  --hh-ink: #0f172a;
  --hh-muted: #64748b;
  --hh-line: #e2e8f0;
  --hh-soft: #f1f5f9;
  --hh-white: #ffffff;
  --hh-radius: 14px;
  --hh-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.hh-page {
  color: var(--hh-ink);
  padding-bottom: 2rem;
}

.hh-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--hh-radius);
  background:
    linear-gradient(120deg, rgba(7, 24, 50, 0.92) 0%, rgba(15, 118, 215, 0.88) 58%, rgba(249, 115, 22, 0.55) 120%),
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.35), transparent 42%);
  color: var(--hh-white);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--hh-shadow);
}

.hh-hero h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  line-height: 1.15;
}

.hh-hero p {
  margin: 0;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
}

.hh-filters {
  background: var(--hh-white);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  padding: 1rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.hh-filters .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--hh-muted);
  margin-bottom: 0.25rem;
}

.hh-filters .form-control,
.hh-filters .form-select {
  font-size: 0.875rem;
  border-color: var(--hh-line);
}

.hh-filters .form-check-label {
  font-size: 0.85rem;
  color: var(--hh-ink);
}

.hh-filters .btn-primary {
  background: var(--hh-blue);
  border-color: var(--hh-blue);
}

.hh-filters .btn-primary:hover {
  background: var(--hh-blue-dark);
  border-color: var(--hh-blue-dark);
}

.hh-results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  color: var(--hh-muted);
  font-size: 0.875rem;
}

/* auto-fill/minmax instead of fixed 3/2/1 breakpoints - the grid now sits
   in a 9-col main column (next to the sidebar every other page has)
   instead of the full container width the old breakpoints assumed, so it
   needs to reflow by available width rather than viewport width. Matches
   .nc-grid's rule (nairobicity.css) exactly. */
.hh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}

.hh-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--hh-white);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hh-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--hh-shadow);
}

.hh-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--hh-soft);
  overflow: hidden;
}

.hh-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hh-card__media-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hh-muted);
  background: linear-gradient(145deg, #e8eef5, #f8fafc);
}

.hh-card__save {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--hh-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.hh-card__save.is-saved,
.hh-card__save[aria-pressed="true"] {
  color: var(--hh-orange);
}

.hh-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.9rem 1rem;
  flex: 1;
}

.hh-card__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.3;
}

.hh-card__title a {
  color: var(--hh-ink);
  text-decoration: none;
}

.hh-card__title a:hover {
  color: var(--hh-blue);
}

.hh-card__estate {
  font-size: 0.8rem;
  color: var(--hh-muted);
}

.hh-card__rent {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--hh-blue);
}

.hh-card__rent span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hh-muted);
}

.hh-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  font-size: 0.78rem;
  color: var(--hh-muted);
}

.hh-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.hh-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--hh-soft);
  color: #334155;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}

.hh-chip--orange {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

.hh-chip--blue {
  background: rgba(15, 118, 215, 0.12);
  color: var(--hh-blue-dark);
}

.hh-chip--green {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.hh-card__summary {
  margin: 0;
  font-size: 0.8rem;
  color: var(--hh-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hh-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid var(--hh-line);
  font-size: 0.75rem;
  color: var(--hh-muted);
}

.hh-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--hh-line);
  border-radius: var(--hh-radius);
  background: var(--hh-soft);
}

.hh-empty h3 {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.1rem;
}

.hh-empty p {
  margin: 0;
  color: var(--hh-muted);
}

.hh-pagination .page-link {
  color: var(--hh-blue);
}

.hh-pagination .page-item.active .page-link {
  background: var(--hh-blue);
  border-color: var(--hh-blue);
}

/* Detail */
.hh-detail {
  padding-bottom: 5.5rem;
}

.hh-gallery {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hh-gallery__main,
.hh-gallery__thumbs img,
.hh-gallery__main img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--hh-soft);
}

.hh-gallery__thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

@media (max-width: 767.98px) {
  .hh-gallery {
    grid-template-columns: 1fr;
  }

  .hh-gallery__thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
}

.hh-detail__title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.hh-detail__location {
  color: var(--hh-muted);
  margin-bottom: 0.75rem;
}

.hh-price-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.hh-price-row__rent {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--hh-blue);
}

.hh-price-row__movein {
  font-size: 0.95rem;
  color: var(--hh-ink);
}

.hh-price-row__movein strong {
  color: var(--hh-orange);
}

.hh-section {
  background: var(--hh-white);
  border: 1px solid var(--hh-line);
  border-radius: var(--hh-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.hh-section h2,
.hh-section h3 {
  font-size: 1rem;
  font-weight: 750;
  margin: 0 0 0.75rem;
}

.hh-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hh-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--hh-line);
  font-size: 0.9rem;
}

.hh-breakdown li:last-child {
  border-bottom: 0;
  font-weight: 700;
}

.hh-merchant-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hh-actions .btn-whatsapp {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.hh-actions .btn-whatsapp:hover {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.hh-actions .btn-orange {
  background: var(--hh-orange);
  border-color: var(--hh-orange);
  color: #fff;
}

.hh-actions .btn-orange:hover {
  background: #ea580c;
  border-color: #ea580c;
  color: #fff;
}

.hh-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  display: none;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--hh-line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

.hh-sticky-bar .btn {
  flex: 1;
}

@media (max-width: 767.98px) {
  .hh-sticky-bar {
    display: flex;
  }
}

.hh-viewing-form .form-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.hh-alert {
  display: none;
  margin-top: 0.75rem;
}

.hh-alert.is-visible {
  display: block;
}

/* Merchant dashboard */
.merchant-page {
  padding-bottom: 2rem;
}

.merchant-nav .side-nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.merchant-stat {
  background: var(--hh-white);
  border: 1px solid var(--hh-line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  height: 100%;
}

.merchant-stat__label {
  font-size: 0.75rem;
  color: var(--hh-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.merchant-stat__value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--hh-blue);
  line-height: 1.2;
}

.merchant-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--hh-muted);
  white-space: nowrap;
}

.merchant-table td {
  vertical-align: middle;
  font-size: 0.875rem;
}

.merchant-public-hero {
  border-radius: var(--hh-radius);
  background: linear-gradient(120deg, #071832 0%, var(--hh-blue) 70%, rgba(249, 115, 22, 0.75) 130%);
  color: #fff;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.merchant-public-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
}

.merchant-cap-card {
  border: 1px solid var(--hh-line);
  border-radius: 12px;
  padding: 0.9rem;
  height: 100%;
  background: #fff;
}

.merchant-cap-card.active {
  border-color: rgba(15, 118, 215, 0.35);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 215, 0.12);
}

.hh-badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--hh-blue);
  font-weight: 700;
}

.hh-estate-links { display:flex; flex-wrap:wrap; gap:.4rem; }
.hh-card__compare {
  position:absolute; top:.65rem; left:.65rem; z-index:2;
  width:2.1rem; height:2.1rem; border:0; border-radius:999px;
  background:rgba(255,255,255,.92); color:#334155; box-shadow:0 2px 8px rgba(0,0,0,.12);
}
.hh-card__compare.is-active { background:#0f76d7; color:#fff; }
.hh-stat { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:1rem; text-align:center; }
.hh-stat__n { font-size:1.4rem; font-weight:800; color:#0f172a; }
.hh-stat__l { font-size:.8rem; color:#64748b; }
.hh-trend__row { display:grid; grid-template-columns:7rem 1fr auto; gap:.5rem; align-items:center; margin:.35rem 0; font-size:.85rem; }
.hh-trend__bar { display:inline-block; height:.55rem; background:linear-gradient(90deg,#0f76d7,#38bdf8); border-radius:999px; min-width:4%; }
.hh-trend__date { color:#64748b; }
.hh-compare-table th { white-space:nowrap; }
.hh-video iframe { width:100%; height:100%; border:0; border-radius:12px; }

.merchant-quick-add__head {
  margin-bottom: 0.25rem;
}

.merchant-offer-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--hh-line);
  border-radius: 14px;
  background: var(--hh-white);
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.merchant-offer-card--house {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.06) 0%, #fff 42%);
}

.merchant-offer-card--auto {
  border-color: rgba(15, 118, 215, 0.35);
  background: linear-gradient(180deg, rgba(15, 118, 215, 0.06) 0%, #fff 42%);
}

.merchant-offer-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hh-soft);
  color: var(--hh-blue);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.merchant-offer-card--house .merchant-offer-card__icon {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.merchant-offer-card--auto .merchant-offer-card__icon {
  background: rgba(15, 118, 215, 0.12);
  color: var(--hh-blue-dark);
}

.merchant-offer-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hh-muted);
}

.merchant-offer-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0.15rem 0 0.45rem;
}

.merchant-offer-card__summary {
  font-size: 0.84rem;
  color: var(--hh-muted);
  margin-bottom: 0.65rem;
}

.merchant-offer-card__fields {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.merchant-offer-card__fields li {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--hh-soft);
  color: #334155;
}

.merchant-offer-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.merchant-offer-card__actions {
  margin-top: auto;
}

.merchant-nav-quick .btn {
  white-space: normal;
}
