/* Fixed brand palette — the real printed menu is cream paper with black ink and
   this red, so the page always looks like it regardless of device dark mode. */
:root{
  --paper:#faf7f2;
  --paper-2:#f1ebe0;
  --ink:#202020;
  --muted:#776f5f;
  --line:#e2dac9;
  --red:#a01b14;
  --red-dark:#6e120d;
  --red-tint:#f4dcda;
  --focus:#a01b14;
  --shadow: 0 10px 30px -12px rgba(27,24,21,0.35);
  --item-size: 15.5px;

  --font-display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-body: var(--font-mono);
}

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  background:var(--paper);
  color:var(--ink);
  font-family: var(--font-body);
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
::selection{ background:var(--red); color:var(--paper); }

.mono{ font-family: var(--font-mono); }
.display{
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--red);
  text-wrap: balance;
}
a{color:inherit;}
button{font:inherit;color:inherit;}

.rule{ border:none; border-top:2px solid var(--red); position:relative; margin:6px 0 0; }
.rule::after{
  content:""; position:absolute; left:0; right:0; top:4px; height:1px; background:var(--red); opacity:.55;
}
.rule-thin{ border:none; border-top:1px solid var(--line); margin:0; }

/* ---------- top bar ---------- */
.topbar{
  position:sticky; top:0; z-index:40;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.brandrow{
  display:flex; align-items:baseline; justify-content:space-between;
  padding:14px clamp(14px,4vw,40px) 6px;
  gap:12px;
}
.brand{
  display:flex; align-items:center; gap:10px;
}
.brand .mark{ color:var(--red); display:inline-flex; align-items:center; }
.brand .mark svg{ display:block; height:clamp(34px,10vw,46px); width:auto; }
.brand .sub{
  font-family: var(--font-mono);
  font-size:11px; letter-spacing:.1em; color:var(--muted); text-transform:uppercase;
}
.allergy{
  font-size:11px; color:var(--muted); max-width:260px; line-height:1.4; text-align:right;
  font-family: var(--font-mono);
}
@media (max-width:640px){ .allergy{display:none;} }

nav.catnav{
  display:flex; gap:2px; overflow-x:auto; scrollbar-width:none;
  padding:0 clamp(10px,4vw,36px) 0;
  border-top:1px solid var(--line);
  -webkit-overflow-scrolling:touch;
}
nav.catnav::-webkit-scrollbar{display:none;}
nav.catnav a{
  flex:0 0 auto; text-decoration:none; white-space:nowrap;
  padding:10px 12px 9px; font-size:12.5px; letter-spacing:.03em;
  text-transform:uppercase; font-weight:700; color:var(--muted);
  border-bottom:3px solid transparent; transition:color .15s, border-color .15s;
}
nav.catnav a:hover{ color:var(--ink); }
nav.catnav a.active{ color:var(--red); border-color:var(--red); }
nav.catnav a:focus-visible{ outline:2px solid var(--focus); outline-offset:-2px; }

/* ---------- hero ---------- */
.hero{
  padding:28px clamp(14px,4vw,40px) 8px;
  max-width:920px;
}
.hero h1{
  margin:0 0 4px; font-size:clamp(30px,6vw,48px); line-height:.95;
}
.hero p{
  margin:0; color:var(--muted); font-size:14.5px; max-width:56ch; line-height:1.5;
}

main{ max-width:920px; margin:0 auto; padding:0 clamp(14px,4vw,40px) 12px; }

section.cat{ padding-top:38px; scroll-margin-top:96px; }
section.cat h2{ margin:0; font-size:clamp(24px,4.5vw,32px); }
section.cat > .rule{ margin-bottom:18px; }

.group + .group{ margin-top:26px; }
.group h3{
  margin:0 0 10px; font-size:13px; letter-spacing:.09em; text-transform:uppercase;
  color:var(--red); font-family: var(--font-display); font-weight:600;
}
.group h3 .vol{
  color:var(--red); font-family:var(--font-mono); font-weight:400;
  font-size:0.72em; text-transform:none; letter-spacing:0;
}

.item{
  border-bottom:1px solid var(--line);
  padding:13px 0;
}
.item-row{
  display:flex; flex-direction:column; gap:8px;
}
.item-top{
  display:flex; justify-content:space-between; align-items:baseline; gap:10px;
}
.item-name{
  font-family:var(--font-mono); font-weight:700; text-transform:uppercase; letter-spacing:0;
  color:var(--ink); font-size:var(--item-size); line-height:1.3; flex:1; min-width:0;
}
.item-bottom{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
}
.item-weight{
  display:block; font-family:var(--font-mono); font-weight:400;
  font-size:calc(var(--item-size) * 0.72); color:var(--red);
  flex:1; min-width:0;
}
.item-price{
  font-family:var(--font-mono); font-weight:700; text-transform:uppercase; letter-spacing:0;
  color:var(--ink); font-variant-numeric:tabular-nums; font-size:var(--item-size);
  white-space:nowrap; text-align:right; flex-shrink:0;
}
.item-actions{ display:flex; align-items:center; gap:8px; flex-shrink:0; margin-left:auto; }
.iconbtn{
  width:40px; height:40px; border-radius:50%; padding:0; margin:0; line-height:1;
  border:1.5px solid var(--line); background:var(--paper);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; transition:border-color .15s, background .15s, transform .1s;
  flex-shrink:0; -webkit-tap-highlight-color:transparent;
}
.iconbtn:hover{ border-color:var(--red); }
.iconbtn:active{ transform:scale(.92); }
.iconbtn:focus-visible{ outline:2px solid var(--focus); outline-offset:2px; }
.iconbtn svg{ display:block; flex-shrink:0; }
.iconbtn.add{ color:var(--red); }
.iconbtn.add svg{ width:16px; height:16px; }
.iconbtn.toggle svg{ width:13px; height:13px; transition:transform .18s; }
.iconbtn.toggle.open svg{ transform:rotate(180deg); }

.stepper{
  display:flex; align-items:center; gap:2px;
  border:1.5px solid var(--red); border-radius:999px; padding:2px;
  background:var(--red-tint); height:40px;
}
.stepper button{
  width:32px; height:32px; border-radius:50%; border:none; background:transparent; padding:0; margin:0; line-height:1;
  color:var(--red-dark); font-weight:800; font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; -webkit-tap-highlight-color:transparent;
}
.stepper button:hover{ background:rgba(179,33,38,.15); }
.stepper span{ min-width:18px; text-align:center; font-weight:700; font-family:var(--font-mono); font-size:14px; }

.details{
  display:none; margin-top:2px; padding-top:10px; border-top:1px dashed var(--line);
  gap:12px;
}
.details.open{ display:flex; }
.swatch{
  width:64px; height:64px; border-radius:8px; border:1px solid var(--line);
  background:
    repeating-linear-gradient(45deg, var(--red-tint) 0 6px, transparent 6px 12px),
    var(--paper-2);
  display:flex; align-items:center; justify-content:center;
  color:var(--red-dark); font-weight:600; font-size:17px; font-family:var(--font-display); letter-spacing:.06em;
  flex-shrink:0;
}
.details-text{ font-size:13.5px; line-height:1.5; color:var(--ink); min-width:0; }
.details-text .cap{
  display:block; font-size:0.72em; letter-spacing:0; text-transform:none;
  color:var(--red); margin-top:6px; font-family:var(--font-mono); font-weight:400;
}

footer.pagefoot{
  /* bottom padding is tuned so the icon+link row's vertical center lines up
     exactly with the fixed "Мой список" button's center at max scroll:
     fab center-from-bottom = 16 + (14+14+22)/2 = 41px; row height = 26px (line-height below);
     41 - 26/2 = 28px */
  max-width:920px; margin:0 auto;
  padding:14px clamp(14px,4vw,40px) calc(28px + env(safe-area-inset-bottom));
  color:var(--muted); font-size:12px; font-family:var(--font-mono);
  display:flex; align-items:center; gap:10px;
}
.foot-mark{ display:flex; align-items:center; flex-shrink:0; }
.foot-mark svg{ display:block; height:26px; width:auto; fill:currentColor; }
.foot-link{
  display:block; font-size:17px; line-height:26px; font-weight:700;
  color:var(--muted); text-decoration:none; border-bottom:1px solid transparent;
  transition:color .15s, border-color .15s;
}
.foot-link:hover, .foot-link:focus-visible{ color:var(--red); border-color:var(--red); }
.foot-link:focus-visible{ outline:2px solid var(--focus); outline-offset:2px; }

/* ---------- floating wishlist button ---------- */
.fab{
  position:fixed; right:16px; z-index:50;
  bottom:calc(16px + env(safe-area-inset-bottom));
  background:var(--red); color:#fff;
  border:none; border-radius:999px; padding:14px 20px 14px 18px;
  display:flex; align-items:center; gap:10px;
  font-family: var(--font-body);
  font-weight:700; letter-spacing:.02em; text-transform:uppercase; font-size:13px;
  cursor:pointer; box-shadow:var(--shadow);
  transition:transform .15s; -webkit-tap-highlight-color:transparent;
}
.fab:hover{ transform:translateY(-2px); }
.fab:active{ transform:translateY(0) scale(.97); }
.fab .badge{
  background:#fff; color:var(--red-dark); border-radius:999px;
  min-width:22px; height:22px; padding:0 6px; display:flex; align-items:center; justify-content:center;
  font-size:12px; font-family:var(--font-mono); font-weight:700;
}
.fab:focus-visible{ outline:2px solid var(--focus); outline-offset:3px; }

/* ---------- wishlist panel ---------- */
.overlay{
  position:fixed; inset:0; background:rgba(15,12,9,.45); z-index:60;
  opacity:0; pointer-events:none; transition:opacity .2s;
}
.overlay.show{ opacity:1; pointer-events:auto; }

.panel{
  position:fixed; left:0; right:0; bottom:0; top:auto;
  height:min(86vh,100%); width:100%; max-width:520px; margin:0 auto;
  background:var(--paper); z-index:61; box-shadow:var(--shadow);
  display:flex; flex-direction:column;
  border-top-left-radius:18px; border-top-right-radius:18px;
  transform:translateY(100%); transition:transform .25s ease;
  padding-bottom:env(safe-area-inset-bottom);
}
.panel.show{ transform:translateY(0); }
@media (prefers-reduced-motion: reduce){
  .panel, .overlay, .iconbtn.toggle svg, .fab{ transition:none; }
}
@media (min-width:640px){
  .panel{ right:18px; left:auto; bottom:18px; height:min(640px,86vh); }
}

.grabber{
  width:40px; height:4px; border-radius:999px; background:var(--line);
  margin:10px auto 0; flex-shrink:0;
}
@media (min-width:640px){ .grabber{ display:none; } }
.panel-head{
  padding:14px 20px 12px; border-bottom:1px solid var(--line); flex-shrink:0; position:relative;
}
.panel-head h2{ margin:0; font-size:26px; }
.panel-head .rule{ margin:6px 0 0; }
.panel-sub{ font-size:12px; color:var(--muted); margin-top:8px; font-family:var(--font-mono); }

.panel-body{ flex:1; overflow-y:auto; padding:6px 20px 10px; }
.empty-note{ padding:40px 6px; text-align:center; color:var(--muted); font-size:14px; line-height:1.6; }

.cart-cat{
  font-family: var(--font-display); font-size:13px; letter-spacing:.09em; text-transform:uppercase;
  color:var(--red); font-weight:600; margin:18px 0 2px;
}
.cart-cat:first-child{ margin-top:2px; }
.cart-sub{
  font-family: var(--font-display); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--red); font-weight:600; opacity:.8; margin:10px 0 2px;
}

.cart-row{
  --ci-size: 14.5px;
  display:flex; align-items:center; gap:10px; padding:12px 0;
  border-bottom:1px dashed var(--line);
}
.cart-row .ci-name{
  font-family:var(--font-mono); font-weight:700; text-transform:uppercase; letter-spacing:0;
  color:var(--ink); font-size:var(--ci-size);
}
.cart-row .ci-price{
  font-family:var(--font-mono); font-weight:400; font-size:calc(var(--ci-size) * 0.72); color:var(--red);
}
.cart-row .ci-main{ flex:1; min-width:0; }
.cart-row .ci-sum{
  font-family:var(--font-mono); font-weight:700; text-transform:uppercase; letter-spacing:0;
  color:var(--ink); font-variant-numeric:tabular-nums;
  min-width:64px; text-align:right; font-size:13.5px;
}
.cart-row .rm{
  width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:transparent;
  color:var(--muted); cursor:pointer; flex-shrink:0; -webkit-tap-highlight-color:transparent;
}
.cart-row .rm:hover{ border-color:var(--red); color:var(--red); }

.panel-foot{
  border-top:2px solid var(--red); padding:14px 20px 18px; flex-shrink:0; background:var(--paper);
}
.total-row{
  display:flex; justify-content:space-between; align-items:baseline; margin-bottom:12px;
}
.total-row .label{ font-family:var(--font-mono); font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.total-row .amount{
  font-size:24px; font-weight:700; font-family:var(--font-mono); text-transform:uppercase; letter-spacing:0;
  color:var(--ink); font-variant-numeric:tabular-nums;
}
.panel-actions{ display:flex; gap:8px; }
.btn{
  flex:1; border:1.5px solid var(--line); background:transparent; border-radius:10px;
  padding:11px 10px; font-family:var(--font-body); font-weight:700; font-size:13px; cursor:pointer;
  text-transform:uppercase; letter-spacing:.02em;
}
.btn:hover{ border-color:var(--red); }
.btn:focus-visible{ outline:2px solid var(--focus); outline-offset:2px; }

.panel-close{
  position:absolute; top:12px; right:14px; width:36px; height:36px; border-radius:50%;
  border:1px solid var(--line); background:transparent; cursor:pointer; display:flex; align-items:center; justify-content:center;
  -webkit-tap-highlight-color:transparent;
}
.panel-close:hover{ border-color:var(--red); color:var(--red); }

@media (max-width:640px){
  :root{ --item-size: 14.5px; }
}
