:root {
  --bg: #faf6ee;
  --surface: #fffdf8;
  --card: #fff;
  --line: #e5d7c4;
  --text: #33251c;
  --muted: #77685d;
  --green: #226d4b;
  --gold: #bf8945;
  --danger: #b42318;
  --shadow: 0 16px 38px rgba(58, 39, 23, .1);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { max-width: 1320px; margin: 0 auto; padding: 14px; padding-bottom: 110px; }
.hero { position: sticky; top: 0; z-index: 5; background: rgba(250,246,238,.94); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 12px 0; }
.hero-inner { max-width: 1320px; margin: 0 auto; padding: 0 14px; display: grid; gap: 12px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo { width: 46px; height: 46px; border-radius: 14px; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 900; font-size: 22px; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(21px, 5vw, 34px); line-height: 1.05; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.search { border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: #fff; color: var(--text); outline: none; width: 100%; }
.cart-btn, .btn { border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 13px; padding: 12px 14px; font-weight: 900; }
.cart-btn { background: var(--green); border-color: var(--green); color: #fff; white-space: nowrap; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chip { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 9px 12px; background: #fff; color: var(--muted); font-weight: 900; }
.chip.active { background: var(--green); border-color: var(--green); color: #fff; }
.filter-bar { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 9px; }
.filter-select, .filter-input { border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #fff; color: var(--text); outline: none; width: 100%; }
.section { margin-top: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px; }
.vendor-card, .item-card, .panel { border: 1px solid var(--line); background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.vendor-card { padding: 14px; display: grid; gap: 10px; }
.vendor-head { display: flex; gap: 11px; align-items: center; }
.vendor-logo { width: 54px; height: 54px; border-radius: 14px; background: #f1e5d7; display: grid; place-items: center; font-weight: 900; color: var(--green); overflow: hidden; }
.vendor-logo img { width: 100%; height: 100%; object-fit: cover; }
.badge { display: inline-flex; width: fit-content; border-radius: 999px; padding: 5px 9px; font-size: 12px; font-weight: 900; background: #edf8f0; color: var(--green); }
.badge.warn { background: #fff7e6; color: #9a5a00; }
.badge.danger { background: #fff0ee; color: var(--danger); }
.item-img { height: 170px; background: linear-gradient(135deg, #f3eadf, #fffaf1); display: grid; place-items: center; color: var(--muted); font-weight: 900; }
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.item-body { padding: 13px; display: grid; gap: 9px; }
.split { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.price { font-size: 18px; font-weight: 950; color: var(--green); white-space: nowrap; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 11px; padding: 4px 7px; border-radius: 999px; background: #f4ecdf; color: var(--muted); font-weight: 800; }
.basket-drawer { position: fixed; right: 14px; bottom: 14px; width: min(440px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(33, 20, 12, .22); padding: 14px; z-index: 10; display: none; }
.basket-drawer.open { display: block; }
.basket-line { display: grid; gap: 7px; border-bottom: 1px solid #eadfce; padding: 10px 0; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 900; }
.form-grid { display: grid; gap: 9px; margin-top: 12px; }
.input, .textarea { border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: #fff; width: 100%; outline: none; }
.textarea { resize: vertical; min-height: 74px; }
.notice { margin-top: 12px; border: 1px solid #b8dfc2; background: #eef8f0; color: #067647; border-radius: 12px; padding: 11px; font-weight: 800; }
.notice.error { background: #fff2f0; border-color: #efb4aa; color: var(--danger); }
.empty { border: 1px dashed var(--line); background: rgba(255,255,255,.55); border-radius: 16px; padding: 22px; color: var(--muted); }
.modal { position: fixed; inset: 0; background: rgba(26,18,12,.48); z-index: 20; display: none; place-items: center; padding: 18px; }
.modal.open { display: grid; }
.modal-card { width: min(680px, 100%); max-height: 90vh; overflow: auto; background: var(--surface); border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.modal-img { height: 280px; background: #f3eadf; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: 16px; display: grid; gap: 12px; }
@media (max-width: 640px) {
  .search-row { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .item-img { height: 190px; }
}
