:root {
  --page: #f7f5f2;
  --ink: #251f21;
  --ink-2: #6f6668;
  --hairline: #e5e0db;
  --green: #178a50;
  --purple: #7c3aed;
  --red: #b3261e;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body { background: var(--page); color: var(--ink); font-family: -apple-system, "Segoe UI", Tahoma, Arial, sans-serif; font-size: 15px; line-height: 1.6; }

.site-head { max-width: 680px; margin: 0 auto; padding: 20px 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.brand-name { font-size: 24px; line-height: 28px; font-weight: 600; }
.brand-sub { font-size: 12px; letter-spacing: 0.25em; font-weight: 600; background: linear-gradient(90deg, #178a50, #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.owner { font-size: 12px; color: var(--ink-2); }
h1 { font-size: 22px; line-height: 1.4; margin: 20px 0 16px; font-weight: 600; }
.hero { width: 100%; border-radius: 16px; display: block; background: #fff; }

main { max-width: 680px; margin: 0 auto; padding: 16px; }
.card { background: #fff; border: 1px solid var(--hairline); border-radius: 16px; padding: 20px 16px; margin-bottom: 16px; }
.label { color: var(--ink-2); font-size: 12px; margin: 0 0 4px; }
h2 { font-size: 19px; margin: 0 0 12px; }
.steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.caption { color: var(--ink-2); font-size: 12px; }
footer { color: var(--ink-2); font-size: 12px; padding: 8px 4px 96px; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cat { min-height: 44px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.cat[aria-pressed="true"] { border-color: var(--purple); color: var(--purple); font-weight: 600; }

.list { display: grid; }
.item { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; justify-content: space-between; padding: 14px 0; border-top: 1px solid var(--hairline); }
.open { display: flex; align-items: center; gap: 12px; flex: 1 1 0; min-width: 0; padding: 0; border: none; background: none; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: #f0ece8; }
.info { flex: 1 1 0; min-width: 0; display: grid; }
.cat-label { color: var(--ink-2); font-size: 12px; }
.name { font-weight: 600; text-align: start; unicode-bidi: plaintext; font-size: 14px; line-height: 20px; }
.price { font-weight: 600; color: var(--green); }
.price.big { font-size: 18px; }
.out { color: var(--red); font-size: 12px; font-weight: 600; }
.buy { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 520px) { .item { flex-wrap: wrap; } .item .open { flex-basis: 100%; } .item .buy { flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between; } }

.add { min-height: 44px; padding: 0 14px; border: none; border-radius: 10px; background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.stepped { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.in { color: var(--green); font-size: 12px; font-weight: 700; }
.step { display: inline-flex; align-items: center; gap: 4px; }
.step button { width: 44px; height: 44px; border: 1px solid var(--hairline); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; font-size: 20px; cursor: pointer; }
.step span { min-width: 28px; text-align: center; font-weight: 600; }

.cartcard { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--ink); color: #fff; }
.cartcard-info { font-size: 14px; }
.cartcard-info b { color: #7ef0b2; }
.cartcard-btn { min-height: 48px; padding: 0 18px; border: none; border-radius: 10px; background: var(--green); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }

.dialog { border: none; border-radius: 18px; padding: 20px; width: min(680px, calc(100vw - 24px)); max-height: 88vh; overflow-y: auto; overflow-x: clip; background: var(--page); color: var(--ink); }
.dialog::backdrop { background: rgba(20, 16, 18, 0.55); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.dialog-title { font-size: 21px; font-weight: 600; }
.dialog-close { width: 44px; height: 44px; border: 1px solid var(--hairline); border-radius: 50%; background: #fff; color: var(--ink); font: inherit; font-size: 18px; cursor: pointer; margin-inline-start: auto; }
@media (max-width: 600px) { .dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; margin: 0; padding: 16px; } }

.p-num { display: none; }
.p-img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 16px; background: #fff; display: block; }
.p-price-row { margin-top: 14px; }
.p-name { font-size: 20px; font-weight: 700; text-align: start; unicode-bidi: plaintext; margin: 6px 0 8px; }
.wa-link { color: var(--purple); font-size: 14px; text-decoration: none; }
.facts { margin: 14px 0; display: grid; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.facts dt { color: var(--ink-2); font-size: 13px; }
.facts dd { margin: 0; font-size: 14px; text-align: end; }
.modal-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: start; margin-top: 8px; }
.sugg { width: 100%; max-width: 100%; min-width: 0; margin-top: 8px; }
.sugg-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.sugg-strip { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.sugg-item { flex: 0 0 120px; display: grid; gap: 4px; justify-items: start; padding: 8px; border: 1px solid var(--hairline); border-radius: 12px; background: #fff; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.sugg-item img { width: 104px; height: 104px; border-radius: 8px; object-fit: cover; background: #f0ece8; }
.sugg-name { font-size: 12px; line-height: 16px; font-weight: 600; unicode-bidi: plaintext; text-align: start; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sugg-item .price { font-size: 13px; }

.cart { margin-bottom: 16px; }
.cart-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--hairline); }
.cart-info { flex: 1 1 0; min-width: 0; }
.cart-unit { color: var(--ink-2); font-size: 12px; margin-top: 2px; }
.cart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 8px; }
.remove { min-height: 44px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 8px; background: #fff; color: var(--red); font: inherit; font-size: 13px; cursor: pointer; }
.cart-line { color: var(--green); white-space: nowrap; padding-top: 2px; }
.cart-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hairline); }
.fee b { color: var(--purple); }
.total { font-weight: 600; }
.total b { color: var(--green); }

.form { display: grid; gap: 12px; margin: 16px 0; }
.form label { display: grid; gap: 4px; color: var(--ink-2); font-size: 12px; }
.form input, .form textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--hairline); border-radius: 4px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.form input:focus, .form textarea:focus { outline: 2px solid #7c3aed33; border-color: var(--purple); }
.btn { min-height: 48px; padding: 0 20px; border: 1px solid var(--hairline); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.btn.primary { background: var(--ink); color: #fff; border: none; width: 100%; }
.btn.primary:disabled { opacity: 0.6; cursor: default; }
.note { background: #fff; border: 1px solid var(--hairline); border-radius: 12px; padding: 12px 14px; margin-top: 14px; font-size: 14px; }
.note p { margin: 6px 0 0; }
.note.ok { border-color: var(--green); }
.note.err { border-color: var(--red); }
.note.err b { color: var(--red); }
