:root {
  --main: #0C1501;
  --accent: #C8A45A;
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1d1d1b;
  --muted: #6d6a63;
  --line: #e6e1d6;
  --ok: #2e7d32;
  --bad: #c62828;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; }

.hero {
  background: var(--main); color: #fff; padding: 28px 20px 22px;
}
.hero .wrap { max-width: 1180px; margin: 0 auto; }
.hero h1 { margin: 0; font-size: 30px; letter-spacing: .5px; font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
.hero h1 span { color: var(--accent); }
.hero p { margin: 4px 0 0; opacity: .85; }
.hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 14px; opacity: .85; }
.banner { background: var(--accent); color: #1d1d1b; padding: 10px 20px; text-align: center; font-weight: 600; }
.closed { background: var(--bad); color: #fff; padding: 12px 20px; text-align: center; font-weight: 600; }

.layout { max-width: 1180px; margin: 0 auto; padding: 0 16px 120px; display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.typebar { display: flex; gap: 8px; margin: 18px 0 6px; }
.typebar button {
  flex: 1; padding: 12px; border-radius: 999px; border: 2px solid var(--main); background: #fff; color: var(--main);
  font-weight: 600; cursor: pointer;
}
.typebar button.on { background: var(--main); color: #fff; }
.typebar button:disabled { opacity: .4; cursor: not-allowed; }

.cats {
  position: sticky; top: 0; z-index: 5; background: var(--bg); display: flex; gap: 8px; overflow-x: auto;
  padding: 12px 0; scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  white-space: nowrap; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  text-decoration: none; font-size: 14px; font-weight: 600;
}
.cats a.on { background: var(--accent); border-color: var(--accent); }

.search { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; margin-top: 6px; }

section.cat h2 { font-family: Georgia, serif; margin: 26px 0 4px; font-size: 24px; }
section.cat .cdesc { color: var(--muted); margin: 0 0 10px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.item {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 14px;
  display: flex; gap: 12px; cursor: pointer; transition: box-shadow .15s;
}
.item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.item .txt { flex: 1; min-width: 0; }
.item h3 { margin: 0 0 2px; font-size: 16px; }
.item p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.item .price { font-weight: 700; }
.item img { width: 86px; height: 86px; object-fit: cover; border-radius: 10px; flex: none; }
.item .add {
  align-self: flex-end; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--main); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer; flex: none;
}
.item.sold { opacity: .5; cursor: default; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: #f1ebde; color: #6b5527; margin-right: 4px; font-weight: 600; }

.cart {
  position: sticky; top: 16px; align-self: start; background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  padding: 16px; margin-top: 18px; max-height: calc(100vh - 32px); overflow: auto;
}
.cart h2 { margin: 0 0 10px; font-size: 20px; }
.cart .empty { color: var(--muted); }
.cline { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.cline .opts { color: var(--muted); font-size: 13px; }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.sumrow { display: flex; justify-content: space-between; padding: 4px 0; }
.sumrow.total { font-weight: 700; font-size: 18px; border-top: 2px solid var(--text); margin-top: 6px; padding-top: 8px; }
.btn {
  display: block; width: 100%; padding: 14px; border: none; border-radius: 12px; background: var(--main); color: #fff;
  font-weight: 700; font-size: 17px; cursor: pointer; margin-top: 12px;
}
.btn.accent { background: var(--accent); color: #1d1d1b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

.mobilebar { display: none; }
@media (max-width: 900px) {
  .cart { display: none; }
  .cart.open { display: block; position: fixed; inset: auto 0 0 0; top: 10vh; max-height: none; z-index: 30; border-radius: 18px 18px 0 0; margin: 0; }
  .mobilebar {
    display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20;
  }
  .mobilebar button { margin: 0; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
}
.closex { display: none; float: right; border: none; background: none; font-size: 26px; cursor: pointer; line-height: 1; }
@media (max-width: 900px) { .cart.open .closex { display: block; } }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 700px) { .overlay { align-items: center; } }
.modal {
  background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 20px;
}
@media (min-width: 700px) { .modal { border-radius: 18px; } }
.modal h2 { margin: 0 0 4px; }
.modal .x { float: right; border: none; background: none; font-size: 28px; cursor: pointer; line-height: 1; }
.modal img.big { width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; margin: 10px 0; }
.group { margin: 16px 0; }
.group h4 { margin: 0 0 6px; display: flex; justify-content: space-between; }
.group h4 small { font-weight: 400; color: var(--muted); }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.opt input { width: 20px; height: 20px; accent-color: var(--main); }
.opt span { flex: 1; }
.opt.dis { opacity: .4; }

label.f { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 14px; }
input.i, select.i, textarea.i { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid #cfc8b8; background: #fff; }
textarea.i { min-height: 70px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 110px 1fr; gap: 10px; }
.pay { display: grid; gap: 8px; }
.pay label { display: flex; gap: 10px; align-items: center; padding: 12px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; }
.pay label.on { border-color: var(--main); }
.error { background: #fdecea; color: var(--bad); padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.okmsg { background: #e8f5e9; color: var(--ok); padding: 10px 12px; border-radius: 10px; margin: 10px 0; }
.discount { display: flex; gap: 8px; }
.discount button { padding: 0 16px; border-radius: 10px; border: 1px solid var(--main); background: #fff; cursor: pointer; font-weight: 600; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 16px 120px; }

/* statuspagina */
.statuswrap { max-width: 640px; margin: 0 auto; padding: 20px 16px 60px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-top: 16px; }
.steps { display: flex; justify-content: space-between; margin: 18px 0 4px; position: relative; }
.steps::before { content: ""; position: absolute; top: 14px; left: 14px; right: 14px; height: 3px; background: var(--line); }
.step { position: relative; text-align: center; flex: 1; font-size: 12px; color: var(--muted); }
.step i { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--line); margin: 0 auto 6px; font-style: normal; line-height: 30px; color: #fff; font-weight: 700; }
.step.done i { background: var(--ok); }
.step.done { color: var(--text); }
.big { font-size: 26px; font-weight: 700; margin: 4px 0; }
.spinner { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--main); border-radius: 50%; animation: spin 1s linear infinite; margin: 10px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
