/* =========================================================
   SOUGUY — Design system mobile-first
   « Mon marché, dans ma poche »
   ========================================================= */

:root {
  --bg: #f7f5f2;
  --bg-warm: #fff8f3;
  --surface: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --orange-soft: #fff7ed;
  --navy: #1c1917;
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --warn: #a16207;
  --warn-bg: #fefce8;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(28, 25, 23, 0.05), 0 8px 24px rgba(28, 25, 23, 0.04);
  --shadow-hover: 0 4px 16px rgba(28, 25, 23, 0.1);
  --header: 56px;
  --nav-h: 64px;
  --touch: 44px;
  --container: min(1120px, calc(100% - 28px));
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
main { min-height: 50vh; padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px); }

.container { width: var(--container); margin-inline: auto; }
.muted { color: var(--muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--touch); padding: 10px 16px;
  border: 0; border-radius: var(--radius-sm);
  font-weight: 650; cursor: pointer;
  transition: background .15s, transform .12s, box-shadow .15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--line-strong); background: var(--bg); }
.btn-dark { background: var(--navy); color: #fff; }
.btn.full { width: 100%; }
.btn-lg { min-height: 52px; font-size: 16px; padding: 12px 20px; border-radius: 12px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg, #ea580c, #f97316);
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}
.logo-text { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.topbar {
  display: none;
  background: var(--navy); color: #d6d3d1; font-size: 13px;
}
.topbar-inner {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 34px; width: var(--container); margin-inline: auto;
}
.topbar-phone { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }

.header-main { background: var(--surface); }
.header-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 10px 0 8px;
  width: var(--container);
  margin-inline: auto;
}
.header-actions {
  display: none;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--touch); height: var(--touch);
  border-radius: 12px; color: var(--ink);
}
.icon-btn:hover { background: var(--bg); }
.icon-btn .hide-sm { display: none; }

/* Search — hero of the product */
.search-wrap { grid-column: 1 / -1; }
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 14px;
  min-height: 48px;
  color: var(--ink); /* ne pas hériter du blanc du hero */
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
.search input {
  flex: 1; border: 0; background: transparent; outline: none;
  min-width: 0; font-size: 16px; /* avoid iOS zoom */
  color: var(--ink);
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--orange);
}
.search input::placeholder {
  color: var(--muted);
  opacity: 1;
  -webkit-text-fill-color: var(--muted);
}
.search button {
  background: var(--orange); color: #fff; border: 0;
  border-radius: var(--radius-pill);
  min-height: 40px; padding: 0 16px; font-weight: 700;
  flex-shrink: 0;
}
.search-hint {
  display: none;
  margin: 6px 4px 0;
  font-size: 12px;
  color: var(--muted);
}

.cat-nav {
  border-top: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav-inner {
  display: flex; gap: 4px;
  width: var(--container); margin-inline: auto;
  padding: 8px 0 10px;
}
.cat-link {
  white-space: nowrap; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius-pill);
  color: var(--muted); min-height: 36px;
  display: inline-flex; align-items: center;
}
.cat-link:hover, .cat-link.active {
  background: var(--orange-soft); color: var(--orange-dark);
}

/* ---------- Mobile bottom nav ---------- */
.mobile-nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 4px 0 var(--safe-bottom);
  height: calc(var(--nav-h) + var(--safe-bottom));
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 10px; font-weight: 600; color: var(--muted);
  min-height: 52px; padding: 4px 2px;
}
.mobile-nav-item.active { color: var(--orange); }
.mobile-nav-item.publish-nav {
  color: var(--orange);
}
.mobile-nav-item.publish-nav .pub-fab {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.4);
  margin-top: -18px;
}

/* ---------- Hero / Accueil ---------- */
.home-hero {
  background: linear-gradient(165deg, #1c1917 0%, #292524 55%, #431407 100%);
  color: #fff;
  padding: 28px 0 32px;
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: "";
  position: absolute; inset: auto -20% -40% 40%;
  height: 180px;
  background: radial-gradient(circle, rgba(234,88,12,0.35), transparent 70%);
  pointer-events: none;
}
.home-hero .container { position: relative; z-index: 1; }
.home-brand {
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 850; letter-spacing: -0.04em;
  margin: 0 0 6px; line-height: 1.05;
}
.home-brand span { color: #fdba74; }
.home-lead {
  margin: 0 0 18px; font-size: 16px; color: #e7e5e4; max-width: 28ch;
}
.home-search .search {
  background: #fff; border-color: transparent;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}
.home-chips {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.home-chips a {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 7px 12px; border-radius: var(--radius-pill);
}
.home-chips a:hover { background: rgba(255,255,255,0.18); }

/* ---------- Sections ---------- */
.section { margin: 28px auto; width: var(--container); }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.02em; }
.section-head a { color: var(--orange); font-weight: 650; font-size: 14px; white-space: nowrap; }

/* ---------- Categories ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.cat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  min-height: 110px;
}
.cat-tile:active { transform: scale(0.98); }
.cat-icon-wrap {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.cat-icon-wrap::before {
  content: ''; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0 3px, transparent 3px 9px);
}
.cat-icon-wrap svg { position: relative; z-index: 1; color: #fff; width: 24px; height: 24px; }
.cat-tile-name { font-weight: 700; font-size: 13px; line-height: 1.2; }
.cat-tile-count { font-size: 11px; color: var(--muted); }

/* ---------- Promo strip ---------- */
.promo-strip {
  display: grid; gap: 10px;
  width: var(--container); margin: 20px auto;
}
.promo-card {
  border-radius: var(--radius);
  padding: 18px 16px;
  color: #fff; min-height: 88px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  box-shadow: var(--shadow);
}
.promo-card h3 { margin: 0; font-size: 17px; }
.promo-card p { margin: 0; font-size: 13px; opacity: 0.9; }
.promo-blue { background: linear-gradient(135deg, #0e7490, #0284c7); }
.promo-orange { background: linear-gradient(135deg, #c2410c, #ea580c); }
.promo-dark { background: linear-gradient(135deg, #1c1917, #44403c); }

/* ---------- Listing cards ---------- */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.listing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .15s;
}
.listing-card:hover { box-shadow: var(--shadow-hover); }
.thumb {
  display: block; aspect-ratio: 1 / 1;
  background: #e7e5e4; overflow: hidden; position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 10px; }
.price {
  margin: 0; font-weight: 800; color: var(--orange);
  font-size: 15px; letter-spacing: -0.02em;
}
.title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-weight: 650; font-size: 13px;
  margin: 4px 0; min-height: 2.5em; line-height: 1.25;
}
.meta { margin: 0; font-size: 11px; color: var(--muted); }
.meta.loc {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap; margin-top: 6px;
}
.card-seller {
  font-size: 11px; font-weight: 650; color: var(--muted);
  margin: 2px 0 0; display: flex; align-items: center; gap: 4px;
}
.chip {
  position: absolute; left: 8px; top: 8px;
  background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 4px 8px; border-radius: var(--radius-pill);
  z-index: 2;
}
.chip-pro { display: none !important; }
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  color: var(--muted);
}
.fav.on { color: #e11d48; }
.fav:active { transform: scale(0.94); }

/* ---------- Empty states ---------- */
.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  grid-column: 1 / -1;
}
.empty-state-icon {
  width: 56px; height: 56px; margin: 0 auto 12px;
  border-radius: 50%; background: var(--orange-soft); color: var(--orange);
  display: grid; place-items: center; font-size: 22px;
}
.empty-state h2 { margin: 0 0 8px; font-size: 18px; }
.empty-state p { margin: 0 0 18px; color: var(--muted); font-size: 14px; max-width: 32ch; margin-inline: auto; }

/* ---------- Shops / projects / cities ---------- */
.shop-row, .project-grid, .city-grid { display: grid; gap: 10px; }
.shop-row, .project-grid { grid-template-columns: 1fr; }
.shop-card, .project-card, .city-chip {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.shop-card img, .project-card img {
  aspect-ratio: 16/10; object-fit: cover; width: 100%; background: #e7e5e4;
}
.shop-card > div, .project-card > div { padding: 12px; }
.city-grid { grid-template-columns: repeat(2, 1fr); }
.city-chip {
  padding: 14px; display: flex; flex-direction: column; gap: 4px; font-weight: 700;
}
.city-chip span { font-weight: 500; color: var(--muted); font-size: 12px; }

.subcat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.subcat-pills a, .subcat-pills button {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 8px 14px;
  font-size: 13px; font-weight: 600; min-height: 40px;
}
.subcat-pills a.active, .subcat-pills a:hover,
.subcat-pills button.active {
  border-color: var(--orange); color: var(--orange); background: var(--orange-soft);
}

/* ---------- Detail page ---------- */
.page { padding: 16px 0 32px; }
.page h1 { margin: 0 0 8px; font-size: 22px; letter-spacing: -0.02em; }
.narrow { max-width: 560px; }
.crumbs {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  color: var(--muted); font-size: 12px; margin-bottom: 12px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--orange); }

.detail-grid { display: grid; gap: 16px; }
.detail-photo-box {
  border-radius: var(--radius); overflow: hidden;
  background: #e7e5e4; border: 1px solid var(--line);
  aspect-ratio: 4/3;
}
.detail-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button {
  border: 2px solid transparent; padding: 0; border-radius: 10px;
  overflow: hidden; width: 64px; height: 64px; flex-shrink: 0; background: #e7e5e4;
}
.thumbs button.on { border-color: var(--orange); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.detail-info-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: var(--surface); margin: 12px 0;
}
.detail-info-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.detail-info-table tr:last-child td { border-bottom: 0; }
.detail-info-table td:first-child { color: var(--muted); font-weight: 600; width: 38%; }
.detail-info-table td:last-child { font-weight: 700; }
.price.xl { font-size: 26px; color: var(--orange); }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-top: 12px;
}
.desc { white-space: pre-wrap; font-size: 15px; line-height: 1.55; margin: 0; color: #44403c; }

.seller-box {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
  display: grid; gap: 10px;
}
.seller-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 6px; margin: 0; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.contact-box {
  background: var(--orange-soft); border: 1px solid #fdba74;
  border-radius: var(--radius); padding: 14px;
}
.contact-box h3 { margin: 0 0 10px; font-size: 16px; }
.action-bar {
  position: sticky; bottom: calc(var(--nav-h) + var(--safe-bottom));
  z-index: 30; display: grid; grid-template-columns: auto 1fr;
  gap: 8px; padding: 10px 0; background: linear-gradient(transparent, var(--bg) 30%);
}
.verified-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--ok);
  background: var(--ok-bg); padding: 3px 8px; border-radius: var(--radius-pill);
}

/* ---------- Forms ---------- */
.publish, .contact-form, .auth-form {
  display: grid; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  margin-top: 12px;
}
.publish label, .contact-form label, .auth-form label,
.filters label, .sort {
  display: grid; gap: 6px; font-size: 13px; font-weight: 650;
}
.publish input, .publish select, .publish textarea,
.contact-form input, .contact-form textarea,
.auth-form input, .auth-form select,
.filters input, .filters select, .sort select, .msg-form textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 12px; background: #fff; font-size: 16px;
  min-height: var(--touch);
}
.publish textarea, .contact-form textarea, .msg-form textarea {
  min-height: 120px; resize: vertical;
}
.publish input:focus, .publish select:focus, .publish textarea:focus,
.contact-form input:focus, .contact-form textarea:focus,
.auth-form input:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.12);
}
.form-step {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--orange); margin: 4px 0 0;
}
.error-banner {
  background: var(--bad-bg); color: var(--bad);
  border: 1px solid #fecaca; border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 12px;
}
.success-banner {
  background: var(--ok-bg); color: var(--ok);
  border: 1px solid #86efac; border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 12px;
}

/* ---------- Browse / filters ---------- */
.browse { display: grid; gap: 16px; }
.filters {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  display: grid; gap: 12px;
}
.filters-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  font-weight: 700; min-height: var(--touch);
}
.filters-panel[hidden] { display: none !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.browse-head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  gap: 10px; align-items: flex-start; margin-bottom: 12px;
}

/* ---------- Messages / profile ---------- */
.msg-list { display: grid; gap: 8px; }
.msg-row {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  display: flex; justify-content: space-between; gap: 12px;
  min-height: var(--touch);
}
.msg-row:hover { border-color: #fdba74; }
.msg-row p {
  margin: 4px 0 0; color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.profile-head {
  display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 12px; margin-bottom: 20px;
}
.profile-nav {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px;
}
.profile-nav a {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; font-weight: 700;
  text-align: center; min-height: var(--touch);
}
.profile-nav a:hover { border-color: var(--orange); color: var(--orange); }
.status-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-warn { background: var(--warn-bg); color: var(--warn); }
.status-bad { background: var(--bad-bg); color: var(--bad); }
.status-muted { background: var(--bg); color: var(--muted); }

/* ---------- Offers / CTA ---------- */
.app-cta {
  background: var(--navy); color: #fff;
  padding: 36px 0; margin-top: 12px;
}
.app-cta .container { width: var(--container); margin-inline: auto; }
.offers-grid {
  display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px;
}
.offer-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 16px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy); color: #d6d3d1;
  padding: 32px 0 calc(24px + var(--nav-h) + var(--safe-bottom));
  margin-top: 8px;
}
.footer-grid {
  display: grid; gap: 20px;
  width: var(--container); margin-inline: auto;
}
.footer .logo-text { color: #fff; }
.footer-grid h4 { margin: 0 0 8px; color: #fff; font-size: 14px; }
.footer-grid a, .footer-grid p { display: block; margin: 6px 0; color: #a8a29e; font-size: 14px; }
.footer-grid a:hover { color: #fdba74; }
.footer-phone { font-size: 18px !important; font-weight: 800; color: #fff !important; }
.ar-tagline { font-size: 15px; color: #fdba74 !important; margin-top: 10px; }
.footer-bottom {
  width: var(--container); margin: 24px auto 0; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: #78716c;
}

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 11px; font-weight: 700; color: var(--orange); margin: 0 0 4px;
}
.shop-mini { color: #0284c7; font-weight: 650; }

/* ---------- Admin (basic polish) ---------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line);
}

/* =========================================================
   TABLET+
   ========================================================= */
@media (min-width: 640px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .listing-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .thumb { aspect-ratio: 4/3; }
  .shop-row, .project-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(3, 1fr); }
  .promo-strip { grid-template-columns: repeat(3, 1fr); }
  .offers-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-nav { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 900px) {
  main { padding-bottom: 40px; }
  .mobile-nav { display: none; }
  .footer { padding-bottom: 32px; }
  .topbar { display: block; }
  .header-row {
    grid-template-columns: auto 1fr auto;
    gap: 20px; min-height: var(--header); padding: 8px 0;
  }
  .search-wrap { grid-column: auto; }
  .header-actions { display: flex; }
  .header-actions .btn { min-height: 42px; }
  .icon-btn { width: auto; padding: 0 10px; gap: 6px; }
  .icon-btn .hide-sm { display: inline; font-size: 13px; font-weight: 600; }
  .search { min-height: 44px; }
  .search-hint { display: block; }
  .home-hero { padding: 40px 0 48px; }
  .home-lead { font-size: 18px; max-width: 36ch; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .cat-tile { min-height: 128px; padding: 18px 12px; }
  .cat-icon-wrap { width: 64px; height: 64px; }
  .cat-icon-wrap svg { width: 28px; height: 28px; }
  .listing-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .shop-row { grid-template-columns: repeat(3, 1fr); }
  .project-grid { grid-template-columns: repeat(4, 1fr); }
  .city-grid { grid-template-columns: repeat(6, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .browse { grid-template-columns: 260px 1fr; align-items: start; }
  .filters { position: sticky; top: 80px; }
  .filters-toggle { display: none; }
  .filters-panel[hidden] { display: grid !important; }
  .detail-grid { grid-template-columns: 1.55fr 0.85fr; gap: 20px; align-items: start; }
  .seller-box { position: sticky; top: 80px; }
  .action-bar { display: none; }
  .section-head h2 { font-size: 22px; }
}

@media (min-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
