/* ---------------------------------------------------------------- fonte ---
   Proxima Nova é comercial e não pode ser distribuída junto do projeto. Ela
   vem primeiro na pilha: se estiver instalada na máquina ou vier de um kit da
   Adobe, é ela que aparece. Sem ela, cai na Mulish — desenho humanista de
   altura-x alta, o parente livre mais próximo — servida daqui mesmo, para o
   sistema continuar sem depender de CDN e funcionar offline.
   Arquivo único e variável: cobre os pesos 400 a 800. */
@font-face {
  font-family: 'Mulish';
  src: url('/fonts/mulish-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Mulish';
  src: url('/fonts/mulish-latin-ext.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --accent: #c92222;        /* vermelho do logo */
  --accent-ink: #fff;
  --accent-dark: #a81b1b;   /* vermelho do toldo, para fundos e realces */
  --bg: #f6f6f7;
  --surface: #fff;
  --line: #e9dccd;          /* linha quente, derivada do creme */
  --ink: #241a15;           /* preto quente, não azulado */
  --muted: #7b6a5e;
  --ok: #16a34a;
  --warn: #ea580c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
  --max: 720px;
  --font: 'Proxima Nova', 'Proxima Nova Regular', Mulish, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
/* Ícones SVG: herdam a cor de quem os contém e não encolhem dentro de flex. */
.ic { display: inline-block; flex: none; vertical-align: -.18em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.strike { text-decoration: line-through; opacity: .5; }
.row { display: flex; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.center { text-align: center; }

/* ------------------------------------------------------------- header --- */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 20px 0 14px;
}
.hero-inner { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 60px; height: 60px; border-radius: 16px; object-fit: cover;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 24px; flex: none;
}
.hero h1 { margin: 0; font-size: 23px; letter-spacing: -.01em; }
.hero p { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
#storeMeta .ic { margin-right: 3px; opacity: .75; }
#storeMeta .sep { margin: 0 5px; opacity: .5; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: #e9f7ef; color: var(--ok);
}
.badge.closed { background: #fdecec; color: #c62828; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.notice {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #fff7ed; color: #9a3412; font-size: 16px; border: 1px solid #fed7aa;
}

/* --------------------------------------------------------------- tabs --- */
.tabs {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.tabs-inner { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px; max-width: var(--max); margin: 0 auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap; font-size: 16px; font-weight: 500;
}
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ------------------------------------------------------------ produtos --- */
.section { padding: 22px 0 4px; }
.section h2 { margin: 0 0 2px; font-size: 19px; }
.section .sub { color: var(--muted); font-size: 16px; margin-bottom: 12px; }

.card {
  width: 100%; text-align: left; display: flex; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px; transition: border-color .15s, transform .05s;
}
.card:active { transform: scale(.995); }
.card:hover { border-color: #d3d3d9; }
.card h3 { margin: 0; font-size: 17px; font-weight: 600; }
.card .desc {
  color: var(--muted); font-size: 15px; margin: 3px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .price { font-weight: 700; font-size: 17px; margin-top: 6px; }
.card .price small { font-weight: 500; color: var(--muted); }
.card .thumb { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; flex: none; background: #f0f0f3; }
.card.off { opacity: .5; }

.pill { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, #fff); padding: 2px 7px; border-radius: 6px; }

/* -------------------------------------------------------------- modal --- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(15,15,20,.45); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) { .sheet-backdrop { align-items: center; } }
.sheet {
  background: var(--surface); width: 100%; max-width: var(--max);
  border-radius: 18px 18px 0 0; max-height: 92vh; display: flex; flex-direction: column;
  animation: up .22s ease-out;
}
@media (min-width: 640px) { .sheet { border-radius: 18px; max-height: 88vh; } }
@keyframes up { from { transform: translateY(24px); opacity: .6 } to { transform: none; opacity: 1 } }
.sheet-head {
  padding: 16px; border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-body { padding: 16px; overflow-y: auto; flex: 1; }
.sheet-foot { padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.x { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); padding: 0 4px; }

/* ------------------------------------------------------------- inputs --- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=number], input[type=password],
input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--surface); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
textarea { resize: vertical; min-height: 68px; }

.opt {
  display: flex; align-items: center; gap: 11px; padding: 12px;
  border: 1px solid var(--line); border-radius: 11px; margin-bottom: 8px; cursor: pointer;
}
.opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, #fff); }
.opt input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.opt .name { font-size: 16px; font-weight: 500; }
.opt .sub { font-size: 14.5px; color: var(--muted); }
.opt .val { margin-left: auto; font-size: 15px; font-weight: 600; white-space: nowrap; }
.opt input:disabled ~ * { opacity: .45; }

.group-title { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; }
.group-title h3 { margin: 0; font-size: 17px; }
.req { font-size: 13px; font-weight: 700; background: var(--ink); color: #fff; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; }
.req.optional { background: #eee; color: var(--muted); }

/* ------------------------------------------------------------ botoes ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 18px; border-radius: 12px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 17px; width: 100%;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.wa { background: #25d366; color: #073; }
.btn.sm { padding: 8px 14px; font-size: 16px; width: auto; }

.stepper { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.stepper button { width: 34px; height: 34px; border: 0; background: none; font-size: 21px; border-radius: 8px; color: var(--accent); }
.stepper button:disabled { color: #ccc; }
.stepper span { min-width: 26px; text-align: center; font-weight: 600; }

/* ------------------------------------------------------------- cart ----- */
.cartbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(0,0,0,.07);
}
.cartbar .inner { max-width: var(--max); margin: 0 auto; }

.line { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line .qty { font-weight: 700; color: var(--accent); flex: none; }
.line .info { flex: 1; min-width: 0; }
.line .info b { font-size: 16.5px; font-weight: 600; }
.line .info p { margin: 2px 0 0; font-size: 15px; color: var(--muted); }
.line .money { font-weight: 600; white-space: nowrap; }
.link { background: none; border: 0; color: var(--muted); font-size: 15px; padding: 4px 0; text-decoration: underline; }

.totals { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; font-size: 16px; }
.totals .big { font-size: 20px; font-weight: 700; padding-top: 8px; }

.alert { background: #fdecec; color: #b3261e; padding: 11px 13px; border-radius: 10px; font-size: 16px; margin-bottom: 12px; }
.info-box { background: #eff6ff; color: #1e40af; padding: 11px 13px; border-radius: 10px; font-size: 16px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { padding: 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 16px; }
.seg button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, #fff); color: var(--accent); }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { font-size: 40px; margin-bottom: 8px; }

/* ------------------------------------------------------------ status ---- */
.steps { display: grid; gap: 0; margin: 20px 0; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); flex: none; display: grid; place-items: center; font-size: 15px; color: var(--muted); }
.step .bar { width: 2px; background: var(--line); margin: 0 12px; height: 26px; }
.step.done .mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.done .label { color: var(--ink); font-weight: 600; }
.step.now .mark { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.step.now .label { color: var(--accent); font-weight: 700; }
.step .label { color: var(--muted); font-size: 17px; padding-top: 2px; }
.bar.done { background: var(--ok); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 16px; z-index: 80; box-shadow: var(--shadow); animation: up .2s;
}

/* ------------------------------------------------------------- busca ----- */
.searchbar { padding: 10px 16px 0; }
.searchbar input {
  width: 100%; padding: 10px 12px 10px 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6f7a' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center / 16px;
  -webkit-appearance: none;
}
.searchbar input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* -------------------------------------------- adicionar em um toque ------ */
.card { cursor: pointer; }
.quickadd {
  flex: none; width: 38px; height: 38px; border-radius: 11px; align-self: center;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff);
  color: var(--accent); font-size: 23px; line-height: 1; font-weight: 500;
}
.quickadd:active { transform: scale(.92); }

/* ------------------------------------------------------ repetir pedido --- */
.repeat { margin-top: 18px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* ------------------------------------------------------- agendamento ----- */
.slots { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.slots::-webkit-scrollbar { display: none; }
.slot {
  flex: none; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 16px; font-weight: 600;
}
.slot[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--accent); }

/* ------------------------------------------------------------ Pix -------- */
.pixbox { background: #f6f6f8; border-radius: 12px; padding: 14px; text-align: center; }
.pixbox .code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px;
  max-height: 76px; overflow-y: auto; text-align: left; margin-bottom: 10px;
}
.pixbox svg { width: 168px; height: auto; margin: 0 auto 10px; border-radius: 8px; }

/* ------------------------------------------------------------- pontos --- */
.pontos { margin-top: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 7%, #fff), var(--surface)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.premio-opt .val { color: var(--accent); font-weight: 700; }
.premio-opt.bloqueado { opacity: .5; }

.field .small.ok { color: var(--ok); display: block; margin-top: 5px; }
.field .small.aviso { color: var(--warn); display: block; margin-top: 5px; }
.field .small.muted { display: block; margin-top: 5px; }
