:root {
  --red: #b7181e;
  --red-dark: #8e1116;
  --red-soft: #fbe9e8;
  --ink: #171313;
  --ink-2: #2a2322;
  --paper: #fffdf9;
  --cream: #f5efe6;
  --line: #e7ddd0;
  --muted: #6f625a;
  --wa: #1c9d50;
  --wa-dark: #157a3e;
  --ok: #1c7a45;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 19, 19, .14);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 118px; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); font-weight: 500; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #e2a23b; outline-offset: 2px; }

/* ---------- Topo ---------- */
.hero {
  background: var(--ink) radial-gradient(120% 140% at 100% 0%, #3b1517 0%, transparent 55%);
  color: #fff; padding: 22px 16px 26px;
}
.hero__inner { max-width: 760px; margin: 0 auto; display: flex; gap: 18px; align-items: center; }
.hero__logo { width: 112px; height: auto; flex: none; }
.hero h1 {
  font: 800 clamp(1.7rem, 6vw, 2.5rem)/.98 var(--display); text-transform: uppercase;
  letter-spacing: .01em; margin: 0 0 8px;
}
.hero p { margin: 0; color: #d9cfc7; font-size: .95rem; max-width: 46ch; }
.notice {
  max-width: 760px; margin: 18px auto 0; background: #3a2a12; color: #ffe7b3;
  border-radius: 10px; padding: 10px 14px; font-size: .9rem;
}

/* ---------- Navegação de categorias ---------- */
.catnav {
  position: sticky; top: 0; z-index: 20; background: var(--cream);
  border-bottom: 1px solid var(--line); padding: 10px 0 0;
}
.catnav__search {
  max-width: 760px; margin: 0 auto; padding: 0 16px; position: relative;
}
.catnav__search svg { position: absolute; left: 30px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.catnav__search input {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); padding: 0 16px 0 44px; font-size: 1rem;
}
.catnav__chips {
  position: relative; max-width: 760px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 16px 12px; scrollbar-width: none; scroll-snap-type: x proximity;
}
.catnav__chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start; text-decoration: none; color: var(--ink);
  font: 700 .95rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper);
  transition: background .15s, color .15s, border-color .15s;
}
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Lista de produtos ---------- */
.menu { max-width: 760px; margin: 0 auto; padding: 8px 16px calc(110px + var(--safe-b)); }
.cat { padding-top: 18px; }
/* A última categoria precisa conseguir subir até o topo ao tocar na aba */
.cat:last-of-type { min-height: calc(100dvh - 130px); }
.cat__title {
  font: 800 1.55rem/1 var(--display); text-transform: uppercase; letter-spacing: .02em;
  margin: 0 0 10px; display: flex; align-items: center; gap: 10px;
}
.cat__title::before { content: ""; width: 6px; height: 1.05em; background: var(--red); border-radius: 2px; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pitem {
  position: relative; display: flex; align-items: stretch; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.pitem__open {
  flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; text-align: left;
  background: none; border: 0; padding: 10px 4px 10px 10px;
}
.pitem__img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; background: var(--cream); flex: none; }
.pitem__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pitem__name { font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.pitem__desc {
  color: var(--muted); font-size: .86rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pitem__price { font-weight: 700; color: var(--red-dark); margin-top: 2px; }
.pitem__price small { font-weight: 500; color: var(--muted); margin-left: 1px; }
.pitem__add {
  align-self: center; margin-right: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--red); color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(183, 24, 30, .3); transition: transform .12s, background .15s;
}
.pitem__add:hover { background: var(--red-dark); }
.pitem__add:active { transform: scale(.92); }
.pitem__badge {
  position: absolute; top: 64px; left: 14px; background: var(--ink); color: #fff;
  font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; pointer-events: none;
}
.pitem.in-cart { border-color: #d9b8b5; box-shadow: inset 4px 0 0 var(--red); }
.empty-search { text-align: center; color: var(--muted); padding: 40px 10px; }

.foot {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  display: grid; gap: 4px; font-size: .88rem; color: var(--muted);
}
.foot strong { color: var(--ink); }
.foot a { color: var(--red-dark); }

/* ---------- Barra fixa ---------- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: linear-gradient(to top, var(--cream) 60%, rgba(245, 239, 230, 0));
  animation: rise .25s ease-out;
}
.cartbar__btn {
  max-width: 728px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 12px;
  background: var(--red); color: #fff; border: 0; border-radius: 16px; height: 60px; padding: 0 18px;
  box-shadow: var(--shadow); font-weight: 700; font-size: 1.05rem;
}
.cartbar__btn:active { transform: scale(.99); }
.cartbar__count {
  min-width: 32px; height: 32px; border-radius: 10px; background: rgba(0, 0, 0, .22);
  display: grid; place-items: center; font-size: .95rem; padding: 0 6px;
}
.cartbar__label { flex: 1; text-align: left; }
.cartbar__total { font-family: var(--display); font-size: 1.35rem; font-weight: 800; letter-spacing: .01em; }
.cartbar.bump .cartbar__btn { animation: bump .35s ease-out; }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes bump { 40% { transform: scale(1.03); } }

/* ---------- Folhas (dialog) ---------- */
.sheet {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100%; height: 100%; background: transparent; color: inherit;
}
.sheet::backdrop { background: rgba(23, 19, 19, .55); }
.sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.sheet__inner {
  position: relative; width: 100%; max-width: 560px; max-height: 92dvh;
  background: var(--paper); border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  overflow: hidden; animation: sheetIn .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet--tall .sheet__inner { height: 92dvh; }
@keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
.sheet__content { overflow-y: auto; padding: 16px 18px 18px; flex: 1; overscroll-behavior: contain; }
.sheet__footer {
  border-top: 1px solid var(--line); padding: 12px 18px calc(12px + var(--safe-b)); background: var(--paper);
}
.sheet__head {
  display: flex; align-items: center; gap: 8px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line);
}
.sheet__head h3 { flex: 1; margin: 0; font: 800 1.45rem/1 var(--display); text-transform: uppercase; }
.sheet__close, .sheet__back {
  border: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.sheet__close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.sheet__close--inline, .sheet__back { position: static; box-shadow: none; background: var(--cream); }

@media (min-width: 700px) {
  .sheet[open] { align-items: center; }
  .sheet__inner { border-radius: 20px; max-height: 88vh; }
  .sheet--tall .sheet__inner { height: min(820px, 88vh); }
}

/* Produto */
.ps__cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--cream); flex: none; }
.ps__name { font: 800 1.8rem/1.02 var(--display); text-transform: uppercase; margin: 0 0 6px; }
.ps__desc { color: var(--muted); margin: 0 0 8px; }
.ps__unitprice { font-weight: 700; color: var(--red-dark); margin: 0 0 16px; }
.qty { background: var(--cream); border-radius: var(--radius); padding: 14px; }
.qty__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.qty__label { font-weight: 700; }
.qty__mult { font-size: .9rem; color: var(--muted); }
.qty__mult b { color: var(--ink); }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stepper__btn {
  width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper);
  font-size: 1.7rem; line-height: 1; font-weight: 600; display: grid; place-items: center;
}
.stepper__btn:disabled { opacity: .35; cursor: default; }
.stepper__val { font: 800 2.1rem/1 var(--display); letter-spacing: .01em; text-align: center; flex: 1; }
.weights {
  position: relative; display: flex; gap: 8px; overflow-x: auto; margin: 14px -14px 0; padding: 2px 14px 4px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.weights::-webkit-scrollbar { display: none; }
.wchip {
  flex: none; scroll-snap-align: center; min-width: 66px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 12px; padding: 7px 10px 6px; text-align: center; line-height: 1.1;
}
.wchip b { display: block; font-size: .98rem; }
.wchip small { color: var(--muted); font-size: .76rem; }
.wchip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.wchip[aria-selected="true"] small { color: #d9cfc7; }
.note { margin-top: 14px; }
.note summary { cursor: pointer; color: var(--red-dark); font-weight: 600; padding: 4px 0; }
.note textarea, .field input, .field textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 12px; font-size: 1rem;
}
.note textarea { margin-top: 8px; resize: vertical; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  min-height: 52px; padding: 0 18px; font-weight: 700; font-size: 1.05rem; text-decoration: none;
}
.btn--block { width: 100%; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-dark); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); }
.btn--wa svg { fill: currentColor; stroke: none; width: 1.4em; height: 1.4em; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px dashed #cdbfae; }
.btn--sm { min-height: 44px; font-size: .9rem; padding: 0 12px; border-style: solid; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn__price { margin-left: auto; font-family: var(--display); font-size: 1.3rem; font-weight: 800; }
#psAdd { justify-content: space-between; }

/* Carrinho */
.clist { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.citem { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.citem img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.citem__name { font-weight: 700; line-height: 1.2; }
.citem__meta { font-size: .84rem; color: var(--muted); }
.citem__note { font-size: .82rem; color: var(--muted); font-style: italic; }
.citem__right { display: grid; justify-items: end; gap: 6px; }
.citem__price { font-weight: 700; white-space: nowrap; }
.mini { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.mini button { width: 34px; height: 34px; border: 0; background: none; font-size: 1.2rem; display: grid; place-items: center; }
.mini span { min-width: 58px; text-align: center; font-weight: 700; font-size: .9rem; }
.mini .rm { color: var(--red); }
.mini .rm svg { width: 1.05em; height: 1.05em; }
.hint { font-size: .82rem; color: var(--muted); margin: 14px 2px 0; }
.empty-cart { text-align: center; color: var(--muted); padding: 30px 0; }

/* Checkout */
.seg { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg legend, .pay legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.seg label, .pay__opts label { position: relative; }
.seg input, .pay__opts input { position: absolute; opacity: 0; inset: 0; }
.seg span {
  display: grid; place-items: center; height: 50px; border-radius: 12px; border: 1.5px solid var(--line);
  font-weight: 700; background: #fff; cursor: pointer;
}
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.seg input:focus-visible + span, .pay__opts input:focus-visible + span { outline: 3px solid #e2a23b; outline-offset: 2px; }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field small, .pay legend small { color: var(--muted); font-weight: 400; }
.field__err { display: block; color: var(--red); font-size: .84rem; font-style: normal; margin-top: 4px; }
.field__err:empty { display: none; }
.field.has-err input { border-color: var(--red); }
.row { display: flex; gap: 10px; align-items: flex-start; }
.row .field { margin-bottom: 12px; }
.row > .btn { margin: 25px 0 12px; }
.field--grow { flex: 1; }
.field--num { width: 92px; flex: none; }
.field--cep { width: 140px; flex: none; }
.freight { border-radius: 12px; font-size: .92rem; margin: 2px 0 16px; }
.freight:empty { display: none; }
.freight.is-ok { background: #e8f5ec; color: var(--ok); padding: 10px 12px; }
.freight.is-warn { background: #fff4dc; color: #7a5300; padding: 10px 12px; }
.freight.is-loading { color: var(--muted); }
.pickup { background: var(--cream); border-radius: 12px; padding: 12px; margin: 0 0 16px; font-size: .92rem; }
.pay { border: 0; padding: 0; margin: 0 0 14px; }
.pay__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pay__opts span {
  display: inline-block; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff;
  font-weight: 600; font-size: .92rem; cursor: pointer;
}
.pay__opts input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.field__err--block { margin-bottom: 8px; }

.summary dl { margin: 0 0 10px; display: grid; gap: 4px; }
.summary dl div { display: flex; justify-content: space-between; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; }
.summary__total dt { color: var(--ink); font-weight: 700; }
.summary__total dd { font: 800 1.5rem/1 var(--display); }

/* Confirmação */
.done { padding: 30px 22px calc(22px + var(--safe-b)); text-align: center; gap: 12px; }
.done h3 { font: 800 1.7rem/1.05 var(--display); text-transform: uppercase; margin: 0; }
.done p { margin: 0 0 6px; color: var(--muted); }
.done__icon { width: 64px; height: 64px; border-radius: 50%; background: #e8f5ec; color: var(--ok); display: grid; place-items: center; margin: 0 auto; }
.done__icon svg { width: 34px; height: 34px; stroke-width: 2.6; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; width: max-content; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 700px) {
  .hero { padding: 34px 16px 38px; }
  .hero__logo { width: 150px; }
  .plist { grid-template-columns: 1fr 1fr; }
  .pitem__desc { -webkit-line-clamp: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Acompanhar pedido ---------- */
.hero--slim { padding: 16px 16px 18px; }
.hero--slim .hero__logo { width: 84px; }
.hero--slim .hero__text p { margin: 0; color: #d9cfc7; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }
.hero--slim h1 { margin: 0; }
.track { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(32px + var(--safe-b)); display: grid; gap: 14px; }
.track__ok { background: #e8f5ec; color: var(--ok); font-weight: 700; padding: 12px 14px; border-radius: 12px; }
.track__status, .track__card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.track__status h2 { font: 800 1.7rem/1.05 var(--display); text-transform: uppercase; margin: 0 0 6px; }
.track__status p { margin: 0 0 14px; color: var(--muted); }
.track__status--frete_enviado { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.track__status--confirmado h2 { color: var(--ok); }
.track__status .btn { margin-top: 10px; }
.steps { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; gap: 4px; }
.steps li { flex: 1; font-size: .74rem; color: var(--muted); text-align: center; line-height: 1.2; }
.steps li span { display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 6px; }
.steps li.is-done span { background: var(--ink); }
.steps li.is-now span { background: var(--red); }
.steps li.is-now { color: var(--ink); font-weight: 700; }
.track__total { background: var(--cream); border-radius: 12px; padding: 12px 14px; margin: 10px 0 4px; }
.track__total div, .track__sum div { display: flex; justify-content: space-between; align-items: baseline; }
.track__total .big b, .track__sum .big dd { font: 800 1.6rem/1.1 var(--display); }
.track__total small { color: var(--muted); }
.track__card h3 { font: 800 1.15rem var(--display); text-transform: uppercase; margin: 0 0 10px; }
.track__card p { margin: 0 0 6px; }
.track__items { list-style: none; margin: 0 0 10px; padding: 0; }
.track__items li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.track__items small { display: block; color: var(--muted); font-style: italic; }
.track__sum { margin: 0; display: grid; gap: 4px; }
.track__sum dt { color: var(--muted); }
.track__sum dd { margin: 0; font-weight: 600; }
.track__cancel { text-align: center; }
.track__cancel button { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: .9rem; padding: 8px; }
.track__help { text-align: center; font-size: .9rem; color: var(--muted); margin: 0; }
.track__help a { color: var(--red-dark); font-weight: 600; }

/* Condomínio */
.check { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 12px; padding: 12px; margin: 0 0 12px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.check small { display: block; font-weight: 400; color: var(--muted); }
.freight.is-info { background: #eef3fb; color: #1f3f73; padding: 10px 12px; }
.lastorder { display: block; margin: 14px 0 0; background: var(--ink); color: #fff; text-decoration: none; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.done p + p { margin-top: -2px; }

/* Aviso de valor estimado */
.pricenote { display: flex; gap: 10px; align-items: flex-start; background: #fff4dc; color: #6b4700; border: 1px solid #f0d9a4; border-radius: 12px; padding: 12px; margin-top: 14px; }
.pricenote svg { width: 22px; height: 22px; margin-top: 1px; color: #b07a00; }
.pricenote p { margin: 0; font-size: .88rem; line-height: 1.4; }
.pricenote strong { color: #4a3100; }
.summary__note { margin: -4px 0 10px; font-size: .8rem; color: #8a5a00; text-align: right; }
.track__sum + .summary__note { text-align: left; margin: 10px 0 0; }
.qty__note { margin: 10px 0 0; font-size: .8rem; color: #8a5a00; }
.cartbar__total { display: grid; justify-items: end; line-height: 1; }
.cartbar__total small { font-family: var(--body); font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .8; margin-bottom: 2px; }
.track__sum .final dt { color: var(--ok); font-weight: 700; }
.track__sum .final dd { color: var(--ok); }
.track__sum dt small { font-weight: 400; color: var(--muted); }
.pitem__piece { align-self: flex-start; margin-top: 3px; font-size: .74rem; font-weight: 700; color: #6b4700; background: #fff1d1; border-radius: 999px; padding: 2px 8px; }
