:root {
  --bg: var(--tg-theme-bg-color, #ffffff);
  --text: var(--tg-theme-text-color, #1b1b1b);
  --hint: var(--tg-theme-hint-color, #8a8a8a);
  --accent: var(--tg-theme-button-color, #d8462f);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --card: var(--tg-theme-secondary-bg-color, #f4f4f5);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); padding-bottom: 24px; }
.banner { background: #fff3cd; color: #6b5200; padding: 10px 16px; font-size: 14px; }
.cats { position: sticky; top: 0; z-index: 2; display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: var(--bg); scrollbar-width: none; }
.cats button { flex: none; border: 0; border-radius: 16px; padding: 7px 12px; background: var(--card); color: var(--text); font-size: 14px; }
.cats button.active { background: var(--accent); color: var(--accent-text); }
.section-title { margin: 14px 12px 6px; font-size: 18px; }
.grid { padding: 0 8px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.item { background: var(--card); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.item img, .item .nophoto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e6e6e6; }
.item .nophoto { display: flex; align-items: center; justify-content: center; font-size: 34px; }
.item .info { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item .name { font-size: 14px; line-height: 1.25; }
.item .price { font-weight: 600; font-size: 14px; margin-top: auto; }
.item .add { border: 0; border-radius: 10px; padding: 8px; background: var(--accent); color: var(--accent-text); font-size: 14px; }
.counter { display: flex; align-items: center; justify-content: space-between; background: var(--accent); color: var(--accent-text); border-radius: 10px; }
.counter button { border: 0; background: transparent; color: inherit; font-size: 18px; padding: 6px 12px; }
.sheet { position: fixed; inset: 0; z-index: 5; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; }
.sheet[hidden] { display: none; }
.sheet-body { background: var(--bg); width: 100%; max-height: 88vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 16px; }
.sheet-photo { width: 100%; border-radius: 12px; max-height: 220px; object-fit: cover; }
.sheet-photo[src=""] { display: none; }
.opt-group { margin: 12px 0; }
.opt-group h3 { font-size: 15px; margin: 0 0 6px; color: var(--hint); font-weight: 500; }
.opt { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--card); margin-bottom: 6px; }
.opt.selected { outline: 2px solid var(--accent); }
.qty-row { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 14px 0; font-size: 20px; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); font-size: 22px; }
.primary { width: 100%; border: 0; border-radius: 12px; padding: 14px; background: var(--accent); color: var(--accent-text); font-size: 16px; font-weight: 600; }
.cart-line { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--card); }
.cart-line .title { flex: 1; font-size: 14px; }
.cart-line .sum { font-weight: 600; font-size: 14px; white-space: nowrap; }
.note { color: var(--hint); font-size: 13px; }
.error { color: #c62828; font-size: 14px; }
