html,
body {
  background: var(--mm-bg);
  color: var(--mm-ink);
  font-family: "Readex Pro", system-ui, sans-serif;
}

a { color: inherit; text-decoration: none; }
.display-font { font-family: "Amiri", "Readex Pro", serif; font-weight: 700; }
.mono { font-family: "JetBrains Mono", monospace; }
.text-soft { color: var(--mm-ink-soft); }
.text-faint { color: var(--mm-ink-faint); }

.btn-primary {
  --bs-btn-bg: var(--mm-primary);
  --bs-btn-border-color: var(--mm-primary);
  --bs-btn-hover-bg: var(--mm-primary-deep);
  --bs-btn-hover-border-color: var(--mm-primary-deep);
  font-weight: 700;
}
.btn-accent { background: var(--mm-accent); border-color: var(--mm-accent); color: #fffdfa; font-weight: 700; }
.btn-accent:hover { background: #b56a32; color: #fffdfa; }
.btn-outline-mm { border: 1px solid var(--mm-line); color: var(--mm-ink); background: transparent; font-weight: 600; }
.btn-outline-mm:hover { background: var(--mm-surface-alt); }
.btn-wa { background: #25d366; color: #fffdfa; font-weight: 700; }

.utility-strip {
  background: var(--mm-primary-deep);
  color: #e9dfc9;
  font-size: 12px;
  padding: 8px 0;
}
.utility-strip select {
  background: rgba(255, 255, 255, .08);
  color: #e9dfc9;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  padding: 3px 8px;
}

.site-header {
  background: var(--mm-surface);
  border-bottom: 1px solid var(--mm-line);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 40;
}
.logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--mm-line);
  display: grid;
  place-items: center;
  background: #fffdfa;
  color: var(--mm-primary);
  font-size: 24px;
}
.logo-title { font-family: "Amiri", serif; color: var(--mm-primary-deep); font-weight: 700; font-size: 22px; line-height: 1; }
.logo-sub { color: var(--mm-ink-faint); font-size: 10px; letter-spacing: .18em; font-family: "JetBrains Mono", monospace; }

.search-shell {
  border: 1px solid var(--mm-line);
  background: var(--mm-bg);
  border-radius: 8px;
  padding: 6px;
}
.search-shell input,
.search-shell select {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.search-shell input:focus,
.search-shell select:focus { box-shadow: none; }

.category-nav {
  background: var(--mm-surface);
  border-bottom: 1px solid var(--mm-line);
  overflow-x: auto;
}
.category-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  color: var(--mm-ink-soft);
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
}
.category-nav a:hover { color: var(--mm-primary); }

.hero {
  background: var(--mm-primary);
  color: #fffdfa;
  border-radius: 8px;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.11) 0 2px, transparent 2px 24px);
  opacity: .35;
}
.hero > * { position: relative; }
.hero h1 { font-size: clamp(38px, 5vw, 58px); line-height: 1.05; max-width: 720px; }
.hero p { color: #eadfc9; max-width: 620px; font-size: 18px; line-height: 1.9; }

.stat-card,
.panel,
.listing-card,
.company-card,
.filter-panel {
  background: var(--mm-surface);
  border: 1px solid var(--mm-line);
  border-radius: 8px;
  box-shadow: var(--mm-shadow);
}
.stat-card { padding: 22px; }
.stat-value { font-family: "Amiri", serif; color: var(--mm-primary-deep); font-size: 34px; font-weight: 700; }

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 42px 0 18px;
}
.section-head h2 { font-family: "Amiri", serif; font-size: 34px; margin: 0; color: var(--mm-primary-deep); }

.category-card {
  border: 1px solid var(--mm-line);
  background: var(--mm-surface);
  border-radius: 8px;
  padding: 18px;
  min-height: 126px;
  transition: transform .18s ease, border-color .18s ease;
}
.category-card:hover { transform: translateY(-3px); border-color: var(--mm-primary); }
.category-card.is-primary { background: var(--mm-primary); color: #fffdfa; }
.category-card i { font-size: 26px; color: var(--mm-accent); }
.category-card.is-primary i { color: #f0d7b8; }

.listing-card { overflow: hidden; height: 100%; box-shadow: none; }
.listing-thumb {
  aspect-ratio: 4 / 3;
  background: var(--mm-surface-alt);
  width: 100%;
  object-fit: cover;
  display: block;
}
.listing-body { padding: 14px; }
.listing-title { font-weight: 700; line-height: 1.5; min-height: 44px; }
.listing-price { color: var(--mm-primary); font-size: 20px; font-weight: 800; }
.badge-mm { background: var(--mm-accent-soft); color: #7a421f; border: 1px solid #ead0b5; }

.company-card { overflow: hidden; }
.company-cover { min-height: 88px; color: #fffdfa; padding: 18px; }
.company-body { padding: 16px; }

.filter-panel { padding: 18px; position: sticky; top: 92px; box-shadow: none; }
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.spec-item { background: var(--mm-surface-alt); border: 1px solid var(--mm-line); border-radius: 8px; padding: 12px; }

.gallery-main { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--mm-line); background: var(--mm-surface-alt); width: 100%; }
.thumb-row img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--mm-line); }

.sell-banner {
  background: var(--mm-primary-deep);
  color: #fffdfa;
  border-radius: 8px;
  padding: 28px;
  margin: 42px 0;
}

.dashboard-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; }
.side-nav { background: var(--mm-primary-deep); color: #eadfc9; border-radius: 8px; padding: 18px; }
.side-nav a { display: block; padding: 10px 12px; border-radius: 6px; color: #eadfc9; }
.side-nav a:hover { background: rgba(255,255,255,.08); }

.site-footer {
  margin-top: 56px;
  background: var(--mm-primary-deep);
  color: #e9dfc9;
  padding: 46px 0 24px;
}
.site-footer a { color: #e9dfc9; display: block; margin: 8px 0; }

@media (max-width: 991px) {
  .site-header { position: static; }
  .dashboard-shell { grid-template-columns: 1fr; }
  .filter-panel { position: static; }
}

@media (max-width: 575px) {
  .hero { min-height: auto; }
  .hero h1 { font-size: 36px; }
  .section-head { align-items: start; flex-direction: column; }
  .spec-grid { grid-template-columns: 1fr; }
}

/* Visual polish pass: marketplace-grade home and stable controls */
body {
  background:
    radial-gradient(circle at 90% 12%, rgba(201, 123, 63, .10), transparent 26rem),
    linear-gradient(180deg, #f9f5ec 0, var(--mm-bg) 34rem);
}

.utility-link { color: #eadfc9; text-decoration: underline; text-underline-offset: 3px; }
.utility-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.utility-controls label span { color: rgba(233, 223, 201, .78); }
.utility-strip select:focus { outline: 2px solid rgba(255,255,255,.24); outline-offset: 1px; }

.site-header {
  box-shadow: 0 10px 24px rgba(28, 24, 18, .05);
  backdrop-filter: saturate(130%);
}
.logo-link { min-width: 148px; }
.search-shell {
  grid-template-columns: 120px minmax(220px, 1fr) 150px auto;
  gap: 4px;
  background: #fffdfa;
  border: 1px solid #d7ceb9;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), 0 10px 28px rgba(28, 24, 18, .06);
}
.search-shell .form-select,
.search-shell .form-control {
  min-height: 42px;
}
.search-shell .search-scope,
.search-shell .search-location {
  background: var(--mm-surface-alt);
  border-radius: 6px;
}
.search-shell .search-input { font-weight: 600; }
.search-shell .search-button {
  min-width: 112px;
  border-radius: 6px;
}

.category-nav {
  box-shadow: 0 8px 18px rgba(28, 24, 18, .035);
}
.category-nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
}
.category-nav a {
  border-radius: 999px;
  margin: 8px 0;
}
.category-nav a:hover {
  background: var(--mm-primary-soft);
}

.home-hero-wrap {
  background:
    linear-gradient(180deg, rgba(20,58,44,.04), transparent 70%),
    radial-gradient(circle at 14% 20%, rgba(184,137,58,.16), transparent 16rem);
}
.hero-market {
  min-height: 470px;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 55px rgba(20, 58, 44, .22);
}
.hero-market::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 34px solid rgba(255,255,255,.07);
  border-radius: 50%;
  inset-inline-end: -88px;
  bottom: -90px;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 12px;
  color: #f0e5cd;
  margin-bottom: 18px;
}
.hero-search {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 150px auto;
  gap: 8px;
  background: rgba(255,253,250,.98);
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}
.hero-search-main {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mm-bg);
  border-radius: 7px;
  padding: 0 14px;
  color: var(--mm-primary);
}
.hero-search input,
.hero-search select {
  min-height: 50px;
  border: 0;
  background: var(--mm-bg);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--mm-ink);
  font-weight: 600;
  width: 100%;
}
.hero-search-main input {
  padding: 0;
  outline: 0;
}
.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #eadfc9;
  background: rgba(0,0,0,.13);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}
.hero-side {
  display: grid;
  gap: 16px;
  grid-template-rows: 1fr 1fr 1fr;
}
.stat-feature {
  background: linear-gradient(135deg, #fffdfa, #f3e4d2);
}
.stat-feature i {
  color: var(--mm-accent);
  font-size: 30px;
}
.trust-card {
  background: var(--mm-primary-deep);
  color: #fffdfa;
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--mm-shadow);
}
.trust-card p {
  color: #eadfc9;
  margin: 8px 0 0;
  line-height: 1.8;
}
.location-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  background: rgba(255,253,250,.76);
  border: 1px solid var(--mm-line);
  border-radius: 8px;
  padding: 10px;
}
.location-title {
  color: var(--mm-primary-deep);
  font-weight: 800;
  white-space: nowrap;
}
.location-strip a {
  background: var(--mm-surface);
  border: 1px solid var(--mm-line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--mm-ink-soft);
  white-space: nowrap;
  font-weight: 600;
}

.section-kicker {
  display: block;
  color: var(--mm-accent);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.category-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 142px;
}
.category-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--mm-accent-soft);
}
.category-card.is-primary .category-icon {
  background: rgba(255,255,255,.14);
}

.listing-card {
  background: #fffdfa;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(28,24,18,.10);
  border-color: #d2c5ad;
}
.listing-media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--mm-surface-alt);
}
.listing-media img {
  transition: transform .22s ease;
}
.listing-card:hover .listing-media img {
  transform: scale(1.035);
}
.listing-ribbon {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  background: var(--mm-primary-deep);
  color: #fffdfa;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}
.listing-time {
  color: var(--mm-ink-faint);
  font-size: 12px;
  white-space: nowrap;
}
.listing-title {
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--mm-ink-faint);
  font-size: 12px;
}

.company-cover {
  position: relative;
  min-height: 116px;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.10) 0 2px, transparent 2px 22px);
}
.company-badge {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.14);
  margin-bottom: 12px;
}

.trust-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--mm-line);
  border: 1px solid var(--mm-line);
  border-radius: 8px;
  overflow: hidden;
  margin: 42px 0 10px;
}
.trust-band > div {
  background: var(--mm-surface);
  padding: 20px;
}
.trust-band i {
  color: var(--mm-accent);
  font-size: 24px;
  display: block;
  margin-bottom: 10px;
}
.trust-band strong {
  display: block;
  color: var(--mm-primary-deep);
  margin-bottom: 5px;
}
.trust-band span {
  color: var(--mm-ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 1199px) {
  .hero-search { grid-template-columns: 1fr 1fr; }
  .hero-search-main { grid-column: 1 / -1; }
  .category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .search-shell.mobile-search {
    grid-template-columns: minmax(0, 1fr) 150px auto;
  }
  .hero-side { grid-template-rows: auto; }
  .trust-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .utility-strip .container {
    justify-content: center !important;
  }
  .utility-controls {
    width: 100%;
    justify-content: center;
  }
  .hero-market { min-height: auto; }
  .hero-search { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-band { grid-template-columns: 1fr; }
}

@media (max-width: 575px) {
  .logo-title { font-size: 19px; }
  .header-actions .btn {
    padding-inline: 10px;
  }
  .search-shell.mobile-search {
    grid-template-columns: 1fr;
  }
  .hero-search input,
  .hero-search select {
    min-height: 46px;
  }
}
