/* =====================================================================
   LOJA DO CLIENTE - identidade "Brasa"
   Fundo creme quente e cartões brancos: a cor forte fica nas fotos dos
   pratos e no botão de ação (que fica isolado e fácil de achar).
   ===================================================================== */
:root {
  --accent: #ffb627;
  --font-display: "Bricolage Grotesque", "DM Sans", system-ui, sans-serif;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent), 0 8px 24px color-mix(in srgb, var(--text) 8%, transparent);
  --shadow-lg: 0 18px 50px color-mix(in srgb, var(--text) 18%, transparent);
  --r-lg: 22px;
}
body { font-size: 15px; }
h1, h2, h3, .display { font-family: var(--font-display); letter-spacing: -0.02em; }
.wrap { max-width: 1120px; margin: 0 auto; padding-bottom: 170px; }

/* ---------- topo ---------- */
.hero {
  position: relative; height: 190px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--accent) 85%, transparent), transparent 60%),
    radial-gradient(90% 120% at 10% 100%, color-mix(in srgb, var(--primary) 90%, transparent), transparent 70%),
    linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 60%, #3a1205));
}
@media (min-width: 900px) { .hero { height: 240px; border-radius: 0 0 32px 32px; } }
.hero.has-cover { background-size: cover; background-position: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 45%, rgba(0,0,0,.15)); }
.hero-pattern { position: absolute; inset: 0; opacity: .14; font-size: 46px; line-height: 1; display: flex; flex-wrap: wrap; gap: 28px; padding: 16px; transform: rotate(-12deg) scale(1.3); pointer-events: none; }
.hero-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; gap: 8px; padding: 14px 16px; justify-content: flex-end; }
.glass { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.22); backdrop-filter: blur(10px); color: #fff; font-size: 17px; }
.glass:hover { background: rgba(255,255,255,.34); }

.brand {
  position: relative; z-index: 3; margin: -70px 16px 0; background: var(--surface); border-radius: var(--r-lg);
  padding: 18px; box-shadow: var(--shadow-lg);
}
@media (min-width: 900px) { .brand { margin: -90px 24px 0; padding: 22px 26px; } }
.brand-top { display: flex; gap: 14px; align-items: center; }
.brand .logo, .brand .logo-initials { width: 74px; height: 74px; border-radius: 20px; border: 3px solid var(--surface); box-shadow: var(--shadow); margin-top: -46px; font-family: var(--font-display); font-size: 26px; }
.brand h1 { margin: 0; font-size: 24px; line-height: 1.1; }
.brand .slogan { color: var(--muted); font-size: 14px; margin-top: 2px; }
.pill-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.pill-status.on { background: color-mix(in srgb, var(--ok) 14%, transparent); color: color-mix(in srgb, var(--ok) 80%, var(--text)); }
.pill-status.off { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.pill-status .dot { animation: blink 2s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }
.greet { margin-top: 14px; font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.addr {
  margin-top: 12px; width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-size: 14px;
}
.addr .ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--primary) 12%, transparent); flex: none; }
.addr span.t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr small { display: block; color: var(--muted); font-size: 12px; }

.ribbon {
  margin: 14px 16px 0; padding: 12px 16px; border-radius: 16px; display: flex; gap: 12px; align-items: center; font-size: 14px;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--accent) 80%, var(--text));
}
@media (min-width: 900px) { .ribbon { margin: 14px 24px 0; } }
.ribbon .big { font-size: 22px; }
.closed-banner {
  margin: 14px 16px 0; padding: 14px 16px; border-radius: 16px; font-size: 14px;
  background: color-mix(in srgb, var(--danger) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

/* ---------- categorias em pílula ---------- */
.cat-nav {
  position: sticky; top: 0; z-index: 20; margin-top: 16px; padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
}
.cat-nav.stuck { box-shadow: 0 6px 18px color-mix(in srgb, var(--text) 8%, transparent); }
.cat-row { display: flex; gap: 8px; align-items: center; padding: 0 16px; }
@media (min-width: 900px) { .cat-row { padding: 0 24px; } }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; flex: 1; scroll-behavior: smooth; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs button, .search-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap;
  transition: background .15s, color .15s, transform .1s;
}
.cat-tabs button:active { transform: scale(.96); }
.cat-tabs button.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.search-btn { padding: 9px 12px; }
.search-box { padding: 4px 16px 0; }
.search-box .input { border-radius: 99px; padding: 12px 18px; background: var(--surface); }

/* ---------- seções ---------- */
.section { padding: 22px 16px 4px; scroll-margin-top: 70px; }
@media (min-width: 900px) { .section { padding: 28px 24px 4px; } }
.sec-h { display: flex; align-items: baseline; gap: 4px 10px; margin: 0 0 14px; flex-wrap: wrap; }
.sec-h h2 { margin: 0; font-size: 22px; }
.sec-h .sub { color: var(--muted); font-size: 13px; }

/* Top 5 com número grande (ranking real dos pedidos) */
.rank-row { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rank-row::-webkit-scrollbar { display: none; }
.rank { flex: none; display: flex; align-items: flex-start; gap: 4px; scroll-snap-align: start; text-align: left; position: relative; }
.rank .n {
  flex: none; height: 150px; display: flex; align-items: flex-end; padding-bottom: 2px;
  font-family: var(--font-display); font-weight: 800; font-size: 104px; line-height: .8; letter-spacing: -4px;
  color: var(--primary); text-shadow: 3px 3px 0 color-mix(in srgb, var(--accent) 70%, transparent);
}
.rank .c { position: relative; z-index: 1; width: 140px; flex: none; }
.rank img { width: 140px; height: 150px; object-fit: cover; border-radius: 20px; box-shadow: var(--shadow); background: var(--surface); }
.rank .nm { font-weight: 700; font-size: 14px; margin-top: 8px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank .pr { font-size: 14px; color: var(--muted); margin-top: 2px; }

/* Destaque de combo com preço "de / por" (só quando a economia é real) */
.deal-row { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .deal-row { grid-template-columns: 1fr 1fr; } }
.deal {
  display: flex; gap: 14px; align-items: stretch; text-align: left; border-radius: var(--r-lg); overflow: hidden; width: 100%;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow);
}
.deal img { width: 42%; max-width: 190px; aspect-ratio: 1; object-fit: cover; }
.deal .in { padding: 16px 16px 16px 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.deal .tag { align-self: flex-start; background: var(--accent); color: #2a1a12; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 8px; }
.deal h3 { margin: 0; font-size: 20px; line-height: 1.15; }
.deal .d { font-size: 13px; opacity: .75; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.deal .pp { display: flex; align-items: baseline; gap: 8px; }
.deal .pp b { font-family: var(--font-display); font-size: 24px; }
.deal .pp s { opacity: .6; font-size: 14px; }

/* Grade de produtos com foto grande */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  position: relative; display: flex; flex-direction: column; text-align: left; width: 100%;
  background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); } .card:hover img { transform: scale(1.04); } }
.card .ph { position: relative; aspect-ratio: 1 / .86; overflow: hidden; background: var(--bg); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card .body { padding: 11px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .nm { font-weight: 700; font-size: 15px; line-height: 1.22; font-family: var(--font-display); }
.card .ds { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .pr { margin-top: auto; padding-top: 6px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.card .pr b { font-size: 17px; font-weight: 700; }
.card .pr s { color: var(--muted); font-size: 12.5px; }
.card .pr small { color: var(--muted); font-size: 12px; }
.add-fab {
  position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 22px; font-weight: 600; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 45%, transparent);
}
.card.off { opacity: .55; }
.card.off .add-fab { display: none; }
.badges { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; z-index: 1; }
.bdg { font-size: 11.5px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: var(--accent); color: #2a1a12; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.bdg.dark { background: rgba(20,12,8,.78); color: #fff; backdrop-filter: blur(6px); }
.bdg.off { background: var(--danger); color: #fff; }
.bdg.save { background: var(--ok); color: #fff; }

/* ---------- barra da sacola + navegação ---------- */
.cart-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 86px; width: min(560px, calc(100% - 24px)); z-index: 30;
  background: var(--primary); color: #fff; border-radius: 18px; padding: 12px 16px 13px; text-align: left;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--primary) 45%, transparent); animation: up .25s ease-out;
}
.cart-bar .r { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.cart-bar .count { background: rgba(255,255,255,.24); border-radius: 9px; padding: 2px 9px; font-size: 13px; }
.cart-bar .lbl { flex: 1; }
.cart-bar .goal { font-size: 12.5px; opacity: .95; margin-top: 7px; display: flex; gap: 8px; align-items: center; }
.cart-bar .track { flex: 1; height: 6px; border-radius: 9px; background: rgba(255,255,255,.28); overflow: hidden; }
.cart-bar .track i { display: block; height: 100%; background: #fff; border-radius: 9px; transition: width .4s ease; }
.cart-bar.bump { animation: bump .35s ease; }
@keyframes bump { 40% { transform: translateX(-50%) scale(1.04); } }

.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; width: min(560px, calc(100% - 24px)); z-index: 30;
  background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 22px; display: flex; padding: 6px; box-shadow: var(--shadow-lg);
}
.bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; padding: 7px 0; border-radius: 16px; color: var(--muted); position: relative; }
.bottom-nav button svg { width: 22px; height: 22px; }
.bottom-nav button.active { color: var(--text); background: color-mix(in srgb, var(--accent) 28%, transparent); }
.bottom-nav .pill { position: absolute; top: 3px; right: calc(50% - 22px); background: var(--primary); color: #fff; font-size: 10px; border-radius: 99px; padding: 0 6px; }

/* ---------- janela do produto ---------- */
.modal { background: var(--surface); }
.prod-img { width: 100%; height: 280px; object-fit: cover; background: var(--bg); }
.prod-top { position: relative; }
.prod-top .icon-btn { position: absolute; top: 14px; left: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.prod-head h2 { font-size: 24px; margin: 0 0 6px; }
.group-h { background: var(--bg); margin: 8px -18px 0; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; }
.group-h b { font-size: 15px; font-family: var(--font-display); }
.group-h small { display: block; color: var(--muted); font-size: 12.5px; }
.req { font-size: 11px; background: var(--text); color: var(--bg); padding: 3px 9px; border-radius: 7px; font-weight: 800; }
.req.done { background: var(--ok); color: #fff; }
.opt { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt .on { flex: 1; font-size: 14.5px; }
.opt .op { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.opt.off { opacity: .4; pointer-events: none; }
.mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--text) 30%, transparent); flex: none; display: grid; place-items: center; transition: .12s; }
.mark.sq { border-radius: 7px; }
.opt.sel .mark { background: var(--primary); border-color: var(--primary); }
.opt.sel .mark::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 800; }
.qty { background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.qty button { color: var(--text); }

/* "combina com" e sugestões da sacola */
.pair { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.pair::-webkit-scrollbar { display: none; }
.pair-it { flex: none; width: 128px; text-align: left; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); position: relative; }
.pair-it img { width: 100%; height: 82px; object-fit: cover; }
.pair-it .t { padding: 7px 9px 9px; font-size: 12.5px; font-weight: 600; line-height: 1.2; }
.pair-it .t span { display: block; color: var(--muted); font-weight: 500; margin-top: 2px; }
.pair-it .plus { position: absolute; right: 6px; top: 56px; width: 26px; height: 26px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }

/* ---------- sacola / checkout ---------- */
.goal-box { background: var(--bg); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
.goal-box .track { height: 8px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 8px; }
.goal-box .track i { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--accent), var(--primary)); transition: width .4s; }
.goal-box.done { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 58px; height: 58px; border-radius: 14px; object-fit: cover; flex: none; }
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-opts { font-size: 12.5px; color: var(--muted); }
.sum-line { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; gap: 10px; }
.sum-line.total { font-weight: 800; font-size: 18px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; font-family: var(--font-display); }
.seg { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; margin-bottom: 14px; }
.seg button { flex: 1; padding: 10px; border-radius: 11px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pay-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.pay-opts button { padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 600; text-align: left; background: var(--surface); }
.pay-opts button.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.h-sub { font-size: 15px; font-weight: 700; margin: 18px 0 10px; font-family: var(--font-display); }
.coupon-row { display: flex; gap: 8px; }
.input { background: var(--surface); }

/* ---------- acompanhamento ---------- */
.steps { list-style: none; padding: 0; margin: 10px 0; }
.steps li { display: flex; gap: 12px; padding-bottom: 18px; position: relative; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: 10px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .b { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; background: var(--surface); }
.steps li.done { color: var(--text); }
.steps li.done .b { background: var(--ok); border-color: var(--ok); }
.steps li.now { color: var(--text); }
.steps li.now .b { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 18%, transparent); }
.steps li.done::before { background: var(--ok); }

/* ---------- outras abas ---------- */
.page { padding: 20px 16px; max-width: 720px; margin: 0 auto; }
.page h2 { margin: 6px 0 16px; font-size: 26px; }
.coupon-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px; margin-bottom: 12px;
  background: var(--surface); box-shadow: var(--shadow); border-left: 6px solid var(--accent);
}
.coupon-card .code { font-weight: 800; font-size: 17px; letter-spacing: 1px; font-family: var(--font-display); }
.order-card { background: var(--surface); border-radius: 18px; padding: 15px; margin-bottom: 12px; cursor: pointer; box-shadow: var(--shadow); }
.order-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.info-list { font-size: 14px; }
.info-list h4 { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.info-list .hr { display: flex; justify-content: space-between; padding: 4px 0; }
.info-list .hr.today { color: var(--primary); font-weight: 700; }
.foot-credit { text-align: center; font-size: 12.5px; color: var(--muted); padding: 34px 16px 0; }
.toast { bottom: 170px; }
