/* ===================================================
   Farm2Market — Styles
   =================================================== */
:root {
  --green-900: #103a24;
  --green-800: #14532d;
  --green-700: #1b7a3d;
  --green-600: #249a50;
  --green-500: #2e9e54;
  --green-100: #e3f4e8;
  --green-50: #f1f9f3;
  --gold: #f2b705;
  --gold-soft: #fff6da;
  --ink: #16261d;
  --muted: #607068;
  --line: #e2eae4;
  --bg: #ffffff;
  --bg-alt: #f6f9f6;
  --shadow-sm: 0 2px 8px rgba(16, 58, 36, .06);
  --shadow-md: 0 12px 32px rgba(16, 58, 36, .10);
  --shadow-lg: 0 24px 60px rgba(16, 58, 36, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
[hidden] { display: none !important; }

.container { width: min(1140px, 92vw); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px;
  font-weight: 700; font-size: .9rem; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--green-700); color: #fff; box-shadow: 0 6px 18px rgba(27, 122, 61, .28); }
.btn-primary:hover { background: var(--green-800); box-shadow: 0 10px 24px rgba(27, 122, 61, .36); }
.btn-outline { background: #fff; color: var(--green-800); border: 1.5px solid var(--green-700); }
.btn-outline:hover { background: var(--green-50); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-light { background: #fff; color: var(--green-800); padding: 15px 26px; }
.text-link { background: none; border: 0; color: var(--green-700); font-weight: 700; padding: 0; }
.text-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.2rem; letter-spacing: -.4px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--green-100); color: var(--green-700); display: grid; place-items: center; }
.brand-mark svg { width: 24px; height: 24px; }
.brand-text span { color: var(--green-600); }
.main-nav { display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; }
.nav-link { font-size: .82rem; font-weight: 700; color: var(--muted); text-decoration: none; padding: 7px 13px; border-radius: 999px; white-space: nowrap; transition: .15s; }
.nav-link:hover, .nav-link.active { color: var(--green-800); background: #fff; box-shadow: var(--shadow-sm); }
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.header-actions .btn-ghost svg { stroke: var(--green-700); }
.header-actions .btn { padding: 10px 13px; font-size: .82rem; }
.header-actions #postBtnTop { padding-inline: 16px; }
.menu-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 8px; }
.menu-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .2s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(145deg, #f4fbf5 0%, #ffffff 55%, #fffaf0 100%); }
.hero-shape { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; }
.shape-a { width: 420px; height: 420px; background: #dff3e4; top: -180px; right: -80px; }
.shape-b { width: 300px; height: 300px; background: #fff1c9; bottom: -160px; left: -60px; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; padding: 88px 0 92px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--green-100); color: var(--green-800); font-size: .76rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 7px 14px; border-radius: 999px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); box-shadow: 0 0 0 4px rgba(46,158,84,.18); }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -1.8px; margin: 22px 0 18px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--green-600); }
.hero-sub { color: var(--muted); font-size: 1.05rem; max-width: 520px; margin: 0 0 28px; }
.hero-search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 7px 7px 18px; max-width: 540px; box-shadow: var(--shadow-sm); }
.hero-search:focus-within { border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(46,158,84,.10); }
.search-icon { color: var(--muted); }
.search-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.hero-search input { flex: 1; border: 0; outline: 0; font-size: .95rem; background: transparent; min-width: 0; }
.hero-stats { display: flex; gap: 36px; margin-top: 34px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; color: var(--green-800); letter-spacing: -.5px; }
.hero-stats span { font-size: .78rem; color: var(--muted); }

/* Hero visual */
.hero-card { position: relative; height: 400px; }
.hero-illustration { position: absolute; inset: 40px 0 0; border-radius: 140px 140px 24px 24px; overflow: hidden; background: linear-gradient(180deg, #bfe6ff 0%, #e8f7d8 45%, #8cc45f 46%, #6faa43 100%); box-shadow: var(--shadow-lg); }
.sun { position: absolute; top: 36px; right: 52px; width: 58px; height: 58px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 14px rgba(242,183,5,.18); }
.field { position: absolute; bottom: 0; height: 54%; border-radius: 50% 50% 0 0; }
.field-1 { left: -20%; width: 80%; background: #5a9937; transform: rotate(-8deg); }
.field-2 { left: 30%; width: 80%; background: #4d8930; transform: rotate(10deg); }
.field-3 { left: -10%; width: 120%; height: 30%; background: #3f7728; border-radius: 50% 50% 0 0; }
.sprout { position: absolute; font-size: 34px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.15)); }
.s1 { bottom: 24%; left: 20%; } .s2 { bottom: 32%; left: 55%; font-size: 42px; } .s3 { bottom: 14%; left: 76%; }
.price-card-float { position: absolute; z-index: 2; top: 0; left: -30px; width: 250px; background: #fff; border-radius: 18px; padding: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.float-top { display: flex; align-items: center; gap: 10px; }
.prod-emoji { font-size: 28px; }
.float-top strong { display: block; font-size: .95rem; }
.float-top small { color: var(--muted); font-size: .7rem; }
.trend { margin-left: auto; font-size: .7rem; font-weight: 800; padding: 4px 7px; border-radius: 6px; }
.trend.up { color: var(--green-700); background: var(--green-100); }
.trend.down { color: #b4482f; background: #fdece7; }
.float-price { font-size: 1.5rem; font-weight: 800; color: var(--green-800); margin: 12px 0 2px; }
.float-price small { font-size: .75rem; font-weight: 600; color: var(--muted); }
.float-chart { width: 100%; height: 54px; }
.mini-badge { position: absolute; z-index: 2; bottom: 26px; right: -14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font-size: .78rem; font-weight: 700; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 8px; }
.mini-badge span { width: 20px; height: 20px; border-radius: 50%; background: var(--green-600); color: #fff; display: grid; place-items: center; font-size: .72rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-head.center { justify-content: center; text-align: center; }
.kicker { color: var(--green-600); font-weight: 800; font-size: .76rem; letter-spacing: 1.2px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -1px; margin: 8px 0 10px; }
.section-head p { color: var(--muted); max-width: 560px; margin: 0; }
.section-head.center p { margin-inline: auto; }

/* ---------- Price grid ---------- */
.region-filter { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 520px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; transition: .15s; }
.chip:hover { border-color: var(--green-500); color: var(--green-700); }
.chip.active { background: var(--green-800); border-color: var(--green-800); color: #fff; }
.price-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card-top { display: flex; align-items: center; gap: 9px; }
.crop-thumb { position: relative; width: 46px; height: 46px; flex-shrink: 0; }
.crop-thumb-inner { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--green-50); }
.crop-thumb-inner img { width: 100%; height: 100%; object-fit: cover; }
.crop-thumb-fallback { font-size: 24px; }
.crop-photo-edit { position: absolute; right: -6px; bottom: -6px; z-index: 2; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: var(--green-800); font-size: 10px; display: grid; place-items: center; opacity: 0; transition: opacity .15s; }
.price-card:hover .crop-photo-edit, .crop-photo-edit:focus { opacity: 1; }
@media (hover: none) { .crop-photo-edit { opacity: 1; } }
.price-card-top strong { font-size: .88rem; display: block; line-height: 1.2; }
.price-card-top small { color: var(--muted); font-size: .68rem; }
.price-card .trend { margin: 12px 0 0; display: inline-block; }
.price-card-price { font-size: 1.35rem; font-weight: 800; color: var(--ink); margin-top: 8px; letter-spacing: -.4px; }
.price-card-price small { font-size: .68rem; color: var(--muted); font-weight: 600; }
.spark { width: 100%; height: 34px; margin-top: 6px; }
.price-foot { display: flex; justify-content: space-between; align-items: center; font-size: .66rem; color: var(--muted); margin-top: 4px; }
.price-note { font-size: .78rem; color: var(--muted); margin-top: 20px; text-align: center; }

/* ---------- Toolbar / listings ---------- */
.toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 7px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding: 3px 2px 9px; scrollbar-width: thin; scrollbar-color: var(--green-100) transparent; scroll-snap-type: x proximity; }
.filter-chips .chip { flex: 0 0 auto; scroll-snap-align: start; }
.sort-select { font-size: .82rem; color: var(--muted); font-weight: 600; flex-shrink: 0; margin-left: auto; }
.sort-select select { margin-left: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-weight: 600; color: var(--ink); background: #fff; outline: 0; }
.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.listing-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; }
.listing-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.listing-visual { height: 180px; display: grid; place-items: center; font-size: 56px; position: relative; overflow: hidden; }
.listing-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.listing-card:hover .listing-visual img { transform: scale(1.06); }
.listing-visual::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.06)); }
.img-fallback { grid-area: 1 / 1; }
.badge-region { position: absolute; top: 12px; right: 12px; z-index: 1; background: rgba(255,255,255,.92); border-radius: 999px; padding: 5px 10px; font-size: .68rem; font-weight: 800; color: var(--green-800); display: flex; align-items: center; gap: 4px; }
.badge-region svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.badge-fresh { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--gold); color: #5a4300; border-radius: 999px; padding: 5px 10px; font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.listing-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.listing-title { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.listing-title h3 { margin: 0; font-size: 1.05rem; }
.listing-price { font-weight: 800; color: var(--green-700); font-size: 1.05rem; white-space: nowrap; }
.listing-price small { font-size: .68rem; color: var(--muted); font-weight: 600; }
.listing-qty { font-size: .78rem; color: var(--muted); margin: 4px 0 12px; }
.listing-note { font-size: .8rem; color: var(--muted); background: var(--bg-alt); border-radius: 8px; padding: 8px 10px; margin-bottom: 14px; min-height: 34px; }
.listing-farmer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: #fff; flex-shrink: 0; }
.listing-farmer .who { font-size: .8rem; font-weight: 700; line-height: 1.2; }
.listing-farmer .who small { display: block; color: var(--muted); font-size: .68rem; font-weight: 500; }
.rating { margin-left: auto; font-size: .72rem; font-weight: 800; color: #9a6b00; background: var(--gold-soft); padding: 4px 8px; border-radius: 8px; }
.contact-btn { width: 100%; margin-top: 14px; border: 1.5px solid var(--green-700); background: #fff; color: var(--green-800); border-radius: 10px; padding: 10px; font-weight: 800; font-size: .82rem; transition: .15s; }
.contact-btn:hover { background: var(--green-700); color: #fff; }
.show-more-btn { display: block; width: 100%; margin: 14px auto 0; border: 1.5px solid var(--green-700); background: #fff; color: var(--green-800); border-radius: 12px; padding: 12px; font-weight: 800; font-size: .84rem; cursor: pointer; }
.show-more-btn:hover { background: var(--green-50); }
.show-more-btn[hidden] { display: none; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state span { font-size: 44px; }
.empty-state h3 { margin: 12px 0 4px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

/* ---------- People ---------- */
.segmented { display: flex; gap: 3px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.segmented button { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 9px 16px; font-weight: 700; font-size: .82rem; color: var(--muted); white-space: nowrap; transition: .15s; }
.segmented button:hover { color: var(--green-700); }
.segmented button.active { background: var(--green-800); color: #fff; box-shadow: var(--shadow-sm); }
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.person-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.person-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.person-avatar { width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; color: #fff; box-shadow: 0 6px 14px rgba(0,0,0,.12); }
.person-card h3 { margin: 0 0 2px; font-size: .95rem; }
.person-role { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--green-600); }
.person-meta { font-size: .76rem; color: var(--muted); margin: 10px 0 14px; min-height: 34px; }
.verified { display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700; color: var(--green-700); background: var(--green-100); border-radius: 999px; padding: 5px 10px; }
.verified::before { content: '✓'; width: 14px; height: 14px; background: var(--green-600); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: .6rem; }

/* ---------- Steps ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px 28px; box-shadow: var(--shadow-sm); }
.step-num { position: absolute; top: 20px; right: 22px; font-size: 2.6rem; font-weight: 800; color: var(--green-100); line-height: 1; }
.step-icon { font-size: 34px; }
.step h3 { margin: 14px 0 8px; font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .88rem; margin: 0; }

/* ---------- CTA / Footer ---------- */
.cta-band { background: linear-gradient(120deg, var(--green-800), var(--green-600)); color: #fff; padding: 54px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-inner h2 { margin: 0 0 6px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -.6px; }
.cta-inner p { margin: 0; opacity: .82; }
.site-footer { background: var(--green-900); color: #cfe0d4; padding: 44px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { background: rgba(255,255,255,.12); color: #a9e5bd; }
.site-footer p { font-size: .8rem; margin: 10px 0 0; }
.footer-links { display: flex; gap: 18px; align-items: center; }
.footer-link { border: 0; background: none; padding: 4px 0; color: #cfe0d4; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: color .15s, text-decoration-color .15s; }
.footer-link:hover, .footer-link:focus-visible { color: #fff; text-decoration-color: currentColor; outline: 0; }
.footer-note { opacity: .6; text-align: right; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10, 30, 18, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal { background: #fff; width: min(620px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 22px; padding: 28px; box-shadow: var(--shadow-lg); animation: pop .22s ease; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0 } to { transform: none; opacity: 1 } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.modal-head h3 { margin: 4px 0 0; font-size: 1.5rem; }
.icon-btn { border: 0; background: var(--bg-alt); width: 34px; height: 34px; border-radius: 50%; font-weight: 700; color: var(--muted); }
.icon-btn:hover { background: var(--green-100); color: var(--green-800); }
.modal form label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 14px; color: var(--ink); }
.modal input, .modal select, .modal textarea { display: block; width: 100%; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: 0; font-weight: 500; resize: vertical; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(46,158,84,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#customCrop { margin-top: 8px; }
.upload-zone { position: relative; border: 1.5px dashed var(--line); border-radius: 12px; padding: 18px; text-align: center; margin: -6px 0 12px; transition: .15s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--green-500); background: var(--green-50); }
.upload-zone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-copy { font-size: .84rem; font-weight: 700; color: var(--green-800); pointer-events: none; }
.upload-copy span { font-size: 1.4rem; display: block; margin-bottom: 4px; }
.upload-copy small { display: block; color: var(--muted); font-size: .72rem; font-weight: 500; margin-top: 4px; }
.upload-preview { display: flex; align-items: center; gap: 12px; background: var(--bg-alt); border-radius: 10px; padding: 10px; margin-bottom: 12px; }
.upload-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.upload-preview button { border: 0; background: #fff; color: #a33a22; border-radius: 8px; padding: 8px 12px; font-size: .76rem; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* ---------- Legal / contact modal ---------- */
.info-tabs { margin-bottom: 18px; }
.info-panel { font-size: .88rem; line-height: 1.65; color: var(--muted); }
.info-panel h4 { margin: 18px 0 4px; font-size: .92rem; color: var(--ink); }
.info-panel h4:first-of-type { margin-top: 4px; }
.info-panel p { margin: 0 0 10px; }
.info-panel strong { color: var(--ink); }
.contact-block { display: grid; gap: 8px; margin: 16px 0; }
.contact-block a { display: block; background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 16px; font-weight: 700; color: var(--green-800); text-decoration: none; word-break: break-word; }
.contact-block a:hover { border-color: var(--green-500); background: var(--green-50); }
.contact-hint { font-size: .8rem; opacity: .8; }

/* ---------- Toast ---------- */
.toast { position: fixed; z-index: 200; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--green-900); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: toastIn .3s ease; max-width: 92vw; }
@keyframes toastIn { from { transform: translate(-50%, 20px); opacity: 0 } to { transform: translate(-50%, 0); opacity: 1 } }
.toast-check { background: var(--green-500); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; flex-shrink: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .people-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { gap: 30px; }
}
@media (max-width: 820px) {
  .main-nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 4vw 16px; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md); }
  .main-nav.open { display: flex; }
  .main-nav .nav-link { padding: 12px 14px; border-radius: 10px; font-size: .9rem; }
  .main-nav .nav-link:hover, .main-nav .nav-link.active { background: var(--green-50); box-shadow: none; }
  .menu-toggle { display: block; }
  .header-actions .btn-primary { display: none; }
  .hero-inner { grid-template-columns: 1fr; padding: 56px 0 70px; }
  .hero-card { max-width: 420px; margin: 20px auto 0; width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .region-filter { justify-content: flex-start; }
  .toolbar { gap: 8px; }
  .filter-chips { width: 100%; order: 2; }
  .sort-select { order: 1; }
  .steps-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
  .price-grid, .listing-grid, .people-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .header-actions .btn-ghost { display: none; }
  .hero-search { padding-left: 14px; }
  .hero-search .btn { padding: 10px 14px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-note { text-align: center; }
}

/* ===================================================
   Accounts / sandbox additions
   =================================================== */

/* ---------- Header user area ---------- */
.user-area { display: flex; align-items: center; }
.login-link { font-weight: 800; color: var(--green-700); }
.user-chip { display: flex; align-items: center; gap: 8px; background: var(--green-50); border: 1px solid var(--green-100); border-radius: 999px; padding: 4px 6px 4px 4px; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800; }
.user-name { font-size: .8rem; font-weight: 800; color: var(--green-800); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn { border: 0; background: transparent; color: var(--muted); font-size: 1rem; width: 26px; height: 26px; border-radius: 50%; }
.logout-btn:hover { background: var(--green-100); color: var(--green-800); }
.user-chip-main { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; }

/* ---------- Profile & settings ---------- */
.profile-modal { max-width: 560px; }
.profile-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 5px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; margin: 14px 0 18px; }
.profile-tab { border: 0; background: transparent; color: var(--muted); border-radius: 8px; padding: 9px 4px; font-size: .74rem; font-weight: 700; white-space: nowrap; transition: .15s; }
.profile-tab:hover { color: var(--green-700); }
.profile-tab.active { background: #fff; color: var(--green-800); box-shadow: var(--shadow-sm); }
.profile-panel { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.profile-summary { display: flex; align-items: center; gap: 12px; background: var(--bg-alt); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.profile-avatar { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--green-700); color: #fff; display: grid; place-items: center; font-weight: 800; }
.profile-summary > div:first-of-type strong { display: block; font-size: .95rem; }
.profile-summary > div:first-of-type small { color: var(--muted); text-transform: capitalize; }
.profile-stats { display: flex; gap: 16px; margin-left: auto; }
.profile-stats div { text-align: center; }
.profile-stats strong { display: block; font-size: .95rem; color: var(--green-800); }
.profile-stats small { color: var(--muted); font-size: .66rem; }
.profile-panel label { display: block; }
.setting-row { display: flex !important; align-items: center; gap: 12px; background: var(--bg-alt); border-radius: 10px; padding: 12px; margin-bottom: 9px; cursor: pointer; }
.setting-row input { width: 18px; height: 18px; accent-color: var(--green-700); }
.setting-row strong { display: block; font-size: .85rem; }
.setting-row small { color: var(--muted); font-size: .74rem; }
.listing-actions .order-btn { grid-column: 1 / -1; margin-top: 0; border-radius: 10px; padding: 10px 6px; font-size: .78rem; font-weight: 800; border: 1.5px solid var(--green-700); background: var(--green-700); color: #fff; }
.listing-actions .order-btn:hover { background: var(--green-800); }

/* ---------- Orders ---------- */
.order-modal { max-width: 500px; }
.order-summary { display: flex; gap: 12px; align-items: center; background: var(--bg-alt); padding: 12px; border-radius: 10px; margin-bottom: 16px; }
.order-summary img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; background: #fff; }
.order-summary strong { display: block; font-size: .92rem; }
.order-summary small { color: var(--muted); font-size: .75rem; }
.order-total-row { display: flex; justify-content: space-between; align-items: center; background: var(--green-50); border-radius: 10px; padding: 12px; margin: 12px 0; font-size: .85rem; }
.order-total-row strong { font-size: 1.1rem; color: var(--green-800); }
.order-section-title { font-size: .8rem; color: var(--green-800); margin: 14px 0 8px; display: flex; align-items: center; gap: 8px; }
.order-section-title span { background: var(--green-100); border-radius: 999px; padding: 1px 7px; font-size: .7rem; }
.order-row { display: flex; gap: 11px; align-items: flex-start; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 9px; flex-wrap: wrap; }
.order-img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--bg-alt); flex-shrink: 0; }
.order-info { flex: 1; min-width: 140px; }
.order-info strong { display: block; font-size: .86rem; }
.order-info small { display: block; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.order-status { display: inline-block; margin-top: 6px; border-radius: 999px; padding: 2px 9px; font-size: .68rem; font-weight: 800; }
.status-pending { background: #fff3d6; color: #8a6100; }
.status-accepted { background: var(--green-100); color: var(--green-800); }
.status-completed { background: #d8f3e2; color: #1b6b3a; }
.status-declined, .status-cancelled { background: #fde3dd; color: #a33a22; }
.order-actions { display: flex; gap: 5px; flex-wrap: wrap; width: 100%; }
.order-actions button { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 6px 9px; font-size: .7rem; font-weight: 700; color: var(--green-800); }
.order-actions .order-action-accept { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.order-actions .order-action-decline, .order-actions .order-action-cancel { color: #a33a22; }
.order-actions button:hover { filter: brightness(.95); }
.my-listings-note { color: var(--muted); font-size: .78rem; margin-bottom: 12px; }
.my-listing-row { display: flex; align-items: center; gap: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 9px; }
.my-listing-img { width: 48px; height: 48px; flex-shrink: 0; object-fit: cover; border-radius: 8px; background: var(--bg-alt); }
.my-listing-info { flex: 1; min-width: 0; }
.my-listing-info strong { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-listing-info small { color: var(--muted); font-size: .72rem; }
.my-listing-actions { display: flex; gap: 5px; flex-shrink: 0; }
.my-listing-actions button { border: 1px solid var(--line); border-radius: 7px; background: #fff; padding: 6px 8px; font-size: .7rem; font-weight: 700; color: var(--green-800); }
.my-listing-actions .my-delete-btn { color: #a33a22; }
.my-listing-actions button:hover { background: var(--green-100); }
.my-listing-actions .my-delete-btn:hover { background: #a33a22; color: #fff; border-color: #a33a22; }
.listing-card.spotlight { outline: 3px solid var(--green-700); outline-offset: 3px; }
@media (max-width: 560px) {
  .profile-stats { width: 100%; margin-left: 0; justify-content: space-between; }
  .profile-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
  .profile-tabs::-webkit-scrollbar { display: none; }
  .profile-tab { flex: 0 0 auto; min-width: 96px; }
  .my-listing-actions { flex-direction: column; }
}

/* ---------- Auth modal ---------- */
.auth-modal { max-width: 430px; }
.auth-intro { color: var(--muted); font-size: .83rem; margin: -8px 0 16px; }
.auth-tabs { margin-bottom: 18px; width: 100%; }
.auth-tabs button { padding: 10px 12px; font-size: .84rem; flex: 1; }
.auth-modal form label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 12px; }
.auth-modal input, .auth-modal select { display: block; width: 100%; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: 0; background: #fff; }
.auth-modal input:focus, .auth-modal select:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(46,158,84,.1); }
.phone-verify-row { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.phone-verify-row input { flex: 1; min-width: 0; margin: 0; }
.send-code-btn { display: none; flex: 0 0 auto; border: 1.5px solid var(--green-700); background: #fff; color: var(--green-800); border-radius: 10px; padding: 11px 12px; font-size: .76rem; font-weight: 800; white-space: nowrap; cursor: pointer; transition: .15s; }
.auth-modal.register .send-code-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 96px; }
.send-code-btn:hover:not(:disabled) { background: var(--green-700); color: #fff; }
.send-code-btn:disabled { opacity: .6; cursor: default; }
.verify-field input { letter-spacing: .35em; font-weight: 800; text-align: center; font-size: 1rem; }
.verify-hint { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-800); font-size: .76rem; font-weight: 600; border-radius: 8px; padding: 9px 11px; margin: -4px 0 12px; }
.verify-hint.demo { background: var(--gold-soft); border-color: #f5dd97; color: #6b5000; }
.auth-error { background: #fdece7; color: #a33a22; font-size: .78rem; font-weight: 600; border-radius: 8px; padding: 9px 12px; margin: 0 0 12px; }
.auth-modal.register .auth-only-register { display: block; }
.auth-modal:not(.register) .auth-only-register { display: none; }

/* ---------- Payment mode badge ---------- */
.pay-mode-badge { display: block; width: fit-content; margin: 14px auto 0; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 5px 11px; background: var(--green-100); color: var(--green-800); }

/* ===================================================
   Backend / mobile / MoMo additions
   =================================================== */

/* ---------- Listing action buttons ---------- */
.listing-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.listing-actions .contact-btn, .listing-actions .pay-btn { margin-top: 0; border-radius: 10px; padding: 10px 6px; font-size: .78rem; font-weight: 800; }
.pay-btn { border: 1.5px solid var(--green-700); background: var(--green-700); color: #fff; transition: .15s; }
.pay-btn:hover { background: var(--green-800); }
.listing-actions .owner-edit-btn, .listing-actions .owner-delete-btn { margin-top: 0; border-radius: 10px; padding: 10px 6px; font-size: .78rem; font-weight: 800; }
.owner-edit-btn { border: 1.5px solid var(--green-700); background: #fff; color: var(--green-800); }
.owner-edit-btn:hover { background: var(--green-700); color: #fff; }
.owner-delete-btn { border: 1.5px solid #d98b7a; background: #fff; color: #a33a22; }
.owner-delete-btn:hover { background: #a33a22; color: #fff; }

/* ---------- Sync status ---------- */
.sync-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #b9c3bb; }
.sync-pill.online .sync-dot { background: var(--green-500); box-shadow: 0 0 0 4px rgba(46,158,84,.16); }
.sync-pill.online { color: var(--green-700); }
.sync-pill.offline .sync-dot { background: var(--gold); box-shadow: 0 0 0 4px rgba(242,183,5,.18); }
.sync-pill.offline { color: #8a6600; }

/* ---------- Activity list ---------- */
.activity-list { display: grid; gap: 12px; }
.activity-item { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow-sm); }
.activity-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; background: var(--green-100); flex-shrink: 0; }
.activity-main { flex: 1; min-width: 0; }
.activity-main strong { display: block; font-size: .92rem; }
.activity-main small { color: var(--muted); font-size: .75rem; }
.activity-amount { text-align: right; font-weight: 800; color: var(--green-800); white-space: nowrap; }
.activity-amount small { display: block; font-size: .66rem; font-weight: 700; color: var(--green-600); background: var(--green-100); border-radius: 6px; padding: 3px 7px; margin-top: 4px; }
.activity-amount small.pending { color: #8a6600; background: var(--gold-soft); }
.activity-amount small.failed { color: #a33a22; background: #fdece7; }

/* ---------- Payment modal ---------- */
.pay-modal { max-width: 480px; }
.pay-summary { background: var(--green-50); border: 1px solid var(--green-100); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.pay-summary .pay-emoji { font-size: 30px; }
.pay-summary strong { display: block; font-size: .95rem; }
.pay-summary small { color: var(--muted); font-size: .75rem; }
.pay-summary .pay-qty { margin-left: auto; font-weight: 800; color: var(--green-800); font-size: .85rem; white-space: nowrap; }
.pay-networks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.network-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; background: #fff; transition: .15s; }
.network-card:hover { border-color: var(--green-500); }
.network-card.active { border-color: var(--green-700); background: var(--green-50); box-shadow: 0 0 0 3px rgba(46,158,84,.1); }
.network-badge { width: 34px; height: 34px; border-radius: 8px; margin: 0 auto 6px; display: grid; place-items: center; font-size: .68rem; font-weight: 900; }
.network-card span { font-size: .68rem; font-weight: 700; color: var(--muted); }
.network-card.active span { color: var(--green-800); }
.pay-label { display: block; font-size: .8rem; font-weight: 700; }
.pay-label input { display: block; width: 100%; margin-top: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px; outline: 0; }
.pay-label input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(46,158,84,.1); }
.pay-total-row { display: flex; justify-content: space-between; align-items: center; background: var(--bg-alt); border-radius: 10px; padding: 12px 14px; margin: 16px 0 8px; font-size: .85rem; font-weight: 700; }
.pay-total-row strong { font-size: 1.2rem; color: var(--green-800); }
.demo-note { font-size: .72rem; color: #8a6600; background: var(--gold-soft); border-radius: 8px; padding: 8px 10px; margin: 0 0 14px; }
.pay-full { width: 100%; margin-top: 8px; }
.prompt-phone { text-align: center; padding: 12px 0 6px; }
.prompt-icon { font-size: 48px; }
.prompt-phone h4, .pay-success h4 { margin: 10px 0 6px; font-size: 1.2rem; }
.prompt-phone p, .pay-success p { color: var(--muted); font-size: .86rem; margin: 0; }
.prompt-waiting { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .8rem; color: var(--muted); margin: 20px 0 8px; }
.waiting-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); animation: blink 1s infinite alternate; }
@keyframes blink { from { opacity: .25 } to { opacity: 1 } }
.pay-success { text-align: center; }
.success-ring { width: 60px; height: 60px; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-size: 1.6rem; font-weight: 800; display: grid; place-items: center; margin: 6px auto 14px; }
.receipt { text-align: left; background: var(--bg-alt); border: 1px dashed var(--line); border-radius: 10px; padding: 14px; margin: 18px 0 10px; font-size: .8rem; }
.receipt div { display: flex; justify-content: space-between; padding: 4px 0; }
.receipt div span { color: var(--muted); }
.receipt div strong { font-weight: 700; }

/* ---------- Mobile bottom nav ---------- */
.bottom-nav { display: none; }

/* ---------- Mobile-first refinements ---------- */
@media (max-width: 820px) {
  body { padding-bottom: 72px; }
  .bottom-nav {
    position: fixed; z-index: 60; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-around;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 8px 6px max(8px, env(safe-area-inset-bottom));
    box-shadow: 0 -6px 24px rgba(16,58,36,.08);
  }
  .bottom-link { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; color: var(--muted); font-size: .64rem; font-weight: 700; }
  .bottom-link span { font-size: 1.25rem; line-height: 1; }
  .bottom-link.active { color: var(--green-700); }
  .bottom-post { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--green-700); color: #fff; font-size: 1.7rem; font-weight: 400; line-height: 1; box-shadow: 0 8px 20px rgba(27,122,61,.35); margin-top: -22px; }
  .section { padding: 58px 0; }
  .hero-inner { padding: 46px 0 56px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); letter-spacing: -1px; }
  .hero-card { height: 330px; }
  .price-card-float { left: 0; width: 220px; }
  .mini-badge { right: 0; }
  .activity-item { padding: 14px; gap: 12px; }
  .pay-networks { gap: 6px; }
}
@media (max-width: 560px) {
  .hero-stats { gap: 16px; }
  .hero-stats strong { font-size: 1.25rem; }
  .hero-search .btn { font-size: .8rem; }
  .activity-amount { font-size: .95rem; }
  .bottom-link small { font-size: .6rem; }
}

/* ---------- Messages ---------- */
.messages-btn { position: relative; padding: 10px; }
.unread-badge {
  position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #e2603f; color: #fff; font-size: .64rem;
  font-weight: 800; font-style: normal; display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff;
}
.bottom-link .unread-badge { top: -5px; right: 12px; }
.chat-backdrop { position: fixed; inset: 0; z-index: 110; background: rgba(10, 30, 18, .45); animation: fade .18s ease; }
.chat-drawer {
  position: fixed; z-index: 111; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw); background: #fff; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.chat-head h3 { margin: 0; font-size: 1.2rem; }
.chat-tabs { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-tab { flex: 1; border: 0; background: var(--bg-alt); color: var(--muted); border-radius: 999px; padding: 9px; font-size: .78rem; font-weight: 700; }
.chat-tab.active { background: var(--green-100); color: var(--green-800); }
.chat-tab span { background: var(--green-700); color: #fff; border-radius: 9px; padding: 1px 6px; margin-left: 4px; font-size: .68rem; }
.chat-body { flex: 1; overflow-y: auto; padding: 12px; }
.chat-empty { text-align: center; color: var(--muted); padding: 46px 20px; font-size: .86rem; }
.chat-empty strong { display: block; color: var(--ink); font-size: 1rem; margin-bottom: 6px; }
.chat-empty button { margin-top: 14px; }
.conv-item {
  width: 100%; display: flex; gap: 6px; align-items: center;
  border-bottom: 1px solid var(--line); background: #fff; padding: 13px 6px;
}
.conv-item:hover { background: var(--bg-alt); }
.conv-open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: transparent; padding: 0; color: inherit; font: inherit; }
.conv-delete { flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #a33a22; font-size: .8rem; }
.conv-delete:hover { background: #a33a22; color: #fff; border-color: #a33a22; }
.thread-delete { flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #a33a22; font-size: .8rem; }
.thread-delete:hover { background: #a33a22; color: #fff; border-color: #a33a22; }
.conv-avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; font-weight: 800; font-size: .8rem; }
.conv-main { flex: 1; min-width: 0; }
.conv-top, .conv-bottom { display: flex; justify-content: space-between; gap: 8px; }
.conv-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-time, .conv-crop { color: var(--muted); font-size: .68rem; flex-shrink: 0; }
.conv-preview { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.conv-unread { background: var(--green-700); color: #fff; border-radius: 9px; padding: 1px 6px; font-size: .68rem; font-weight: 800; flex-shrink: 0; }
.sms-item { border: 1px solid var(--line); border-radius: 10px; padding: 11px; margin-bottom: 9px; background: var(--bg-alt); font-size: .78rem; }
.sms-item strong { display: block; color: var(--green-800); font-size: .74rem; margin-bottom: 3px; }
.sms-item small { color: var(--muted); }
.sms-item p { margin: 5px 0 0; }
.thread { position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column; }
.thread-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.thread-back { border: 0; background: var(--bg-alt); border-radius: 50%; width: 32px; height: 32px; font-size: 1rem; }
.thread-head strong { display: block; font-size: .9rem; }
.thread-head small { color: var(--muted); font-size: .72rem; }
.thread-head > div { flex: 1; min-width: 0; }
.thread-messages { flex: 1; overflow-y: auto; padding: 16px; background: var(--bg-alt); display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 80%; align-self: flex-start; background: #fff; border-radius: 14px 14px 14px 4px; padding: 10px 13px; font-size: .86rem; box-shadow: var(--shadow-sm); overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--green-700); color: #fff; border-radius: 14px 14px 4px 14px; }
.msg img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin-bottom: 6px; cursor: zoom-in; }
.msg small { display: block; opacity: .65; font-size: .64rem; margin-top: 4px; }
.chat-attach-preview { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-alt); border-top: 1px solid var(--line); }
.chat-attach-preview img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; }
.chat-attach-preview button { border: 0; background: #fff; color: #a33a22; border-radius: 8px; padding: 7px 10px; font-size: .74rem; font-weight: 700; }
.thread-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-attach { flex-shrink: 0; width: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; font-size: 1.05rem; }
.chat-attach:hover { background: var(--green-50); }
.thread-compose input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 11px 14px; font-size: .86rem; }
.thread-compose input:focus { outline: 2px solid var(--green-100); border-color: var(--green-600); }
.thread-compose .btn { padding: 10px 18px; }

@media (max-width: 820px) {
  .bottom-nav { justify-content: space-between; }
  .bottom-link { min-width: 44px; flex: 1; }
  .bottom-link span { position: relative; }
  .chat-drawer { width: 100vw; }
}

/* ---------- Compact phone layout ---------- */
@media (max-width: 560px) {
  .section { padding: 36px 0; }
  .section-head { margin-bottom: 18px; gap: 12px; }
  .section-head h2 { font-size: 1.55rem; margin: 6px 0; }
  .section-head p { font-size: .82rem; }

  .hero-inner { padding: 30px 0 34px; gap: 20px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.35rem); margin: 14px 0 12px; }
  .hero-sub { font-size: .9rem; margin-bottom: 20px; }
  .hero-stats { margin-top: 20px; gap: 16px; }
  .hero-card { height: 230px; max-width: 300px; margin-top: 8px; }
  .hero-illustration { inset: 24px 0 0; border-radius: 110px 110px 20px 20px; }
  .price-card-float { width: 190px; padding: 12px; }
  .float-price { font-size: 1.2rem; margin: 8px 0 0; }
  .float-chart { height: 36px; }
  .mini-badge { bottom: 14px; right: 0; padding: 7px 10px; font-size: .68rem; }

  .price-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .price-card { padding: 11px 10px; }
  .price-card-top { gap: 7px; }
  .crop-thumb { width: 34px; height: 34px; }
  .crop-thumb-fallback { font-size: 18px; }
  .price-card-top strong { font-size: .78rem; }
  .price-card-top small { font-size: .6rem; }
  .price-card .trend { margin-top: 8px; font-size: .62rem; padding: 2px 5px; }
  .price-card-price { font-size: 1.08rem; margin-top: 5px; }
  .spark { height: 22px; margin-top: 4px; }
  .price-foot { font-size: .58rem; }
  .price-note { margin-top: 12px; font-size: .72rem; }

  .listing-grid { gap: 12px; }
  .listing-visual { height: 140px; }
  .listing-body { padding: 12px 14px 14px; }
  .listing-title h3, .listing-price { font-size: .95rem; }
  .listing-qty { margin: 3px 0 8px; }
  .listing-note { font-size: .74rem; min-height: 0; padding: 7px 9px; margin-bottom: 10px; }
  .listing-farmer { padding-top: 9px; }
  .listing-actions { margin-top: 10px; }

  .people-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .person-card { padding: 14px 8px; }
  .person-avatar { width: 46px; height: 46px; font-size: 1rem; margin-bottom: 8px; }
  .person-card h3 { font-size: .82rem; }
  .person-role { font-size: .6rem; letter-spacing: .3px; }
  .person-meta { font-size: .68rem; min-height: 0; margin: 7px 0 9px; }
  .verified { font-size: .62rem; padding: 3px 7px; }

  .step { padding: 18px 16px; }
  .step-num { top: 12px; right: 14px; font-size: 2rem; }
  .activity-list { gap: 9px; }
  .activity-item { padding: 11px 12px; gap: 10px; }
  .activity-icon { width: 38px; height: 38px; font-size: 1rem; }
  .cta-band { padding: 38px 0; }

  .info-tabs { overflow-x: auto; scrollbar-width: none; }
  .info-tabs::-webkit-scrollbar { display: none; }
  .info-tabs button { flex: 0 0 auto; min-width: 84px; }
}
