: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; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.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; }
.status-toggle { 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; }
.browse-controls { display: grid; gap: 9px; }
.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-card { position: relative; min-height: 360px; }
.item-img { position: absolute; inset: 0; height: 100%; 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; object-position: center; }
.item-body { position: absolute; left: 0; right: 0; bottom: 0; max-height: 58%; overflow: auto; padding: 14px; display: grid; gap: 9px; background: rgba(255,253,248,.94); border-top: 1px solid rgba(229,215,196,.92); box-shadow: 0 -14px 34px rgba(40, 26, 16, .12); }
.item-title-row { align-items: flex-start; }
.item-title-row > div { min-width: 0; }
.item-title-row h3 { overflow-wrap: anywhere; }
.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; }
.option-summary { display: grid; gap: 4px; border: 1px solid #eadfce; border-radius: 11px; background: #fffaf1; padding: 8px 9px; color: var(--muted); }
.option-picker { display: grid; gap: 8px; border: 1px solid #eadfce; border-radius: 12px; background: #fffaf1; padding: 10px; }
.option-choice { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; border: 1px solid rgba(229,215,196,.8); border-radius: 10px; background: #fff; padding: 9px 10px; }
.option-choice input { margin-right: 6px; }
.addon-choice { grid-template-columns: 1fr auto 72px; }
.addon-qty { width: 72px; border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: #fff; }
.status-panel { max-width: 620px; padding: 12px; margin-top: 12px; }
.status-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }
.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); }
.status-order { display: grid; gap: 7px; padding: 8px 0; border-bottom: 1px solid rgba(6,118,71,.18); }
.status-order:last-child { border-bottom: 0; }
.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); }
.option-modal-card { width: min(430px, 100%); }
.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) {
  .hero-inner { gap: 8px; }
  .search-row { grid-template-columns: 1fr; }
  .top-row { align-items: flex-start; }
  .top-actions { width: 100%; justify-content: stretch; }
  .top-actions .btn, .top-actions .cart-btn { flex: 1; }
  .browse-controls { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .browse-controls::-webkit-scrollbar { display: none; }
  .chips { overflow: visible; flex: 0 0 auto; }
  .chip { padding: 7px 10px; font-size: 12px; }
  .filter-bar { display: flex; gap: 7px; flex: 0 0 auto; }
  .filter-select, .filter-input { width: auto; min-width: 112px; max-width: 132px; padding: 7px 9px; border-radius: 999px; font-size: 12px; }
  .filter-input { min-width: 92px; max-width: 100px; }
  .grid { grid-template-columns: 1fr; }
  .item-card { min-height: 340px; }
  .status-form { grid-template-columns: 1fr; }
  .addon-choice { grid-template-columns: 1fr; }
}
