* { box-sizing: border-box; font-family: Arial, sans-serif; }

:root{
  --bg: #f4f4f4;
  --card: #ffffff;
  --text: #222;
  --muted: #666;
  --brandDark: #0f0f10;   /* combina com a logo */
  --accent: #c62828;      /* vermelho (apetite/CTA) */
  --gold: #d7b55a;        /* se quiser usar em detalhes */
  --line: #e6e6e6;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.topbar{
  background: #B11217;
  padding: 24px 14px 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.brand{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 10px;
}

.brand-logo{
  width: 230px;       /* aumenta o tamanho */
  max-width: 85vw;    /* permite crescer mais no celular */
  height: auto;
  display: block;

  /* animação leve ao abrir */
  animation: logoIn 3500ms ease-out both;
}

.brand-sub{
  color: rgba(255,255,255,.95);
  font-size: 16px;      /* era 14px */
  font-weight: 700;     /* negrito */
  letter-spacing: .3px;
}

/* Animação sutil */
@keyframes logoIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

main { padding: 12px; padding-bottom: 160px; }

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.card h2 { margin: 0 0 10px; }

input[type="text"], textarea {
  width: 100%;
  padding: 11px 12px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
}

input[type="text"]:focus, textarea:focus{
  border-color: rgba(177,18,23,.45);
  box-shadow: 0 0 0 3px rgba(177,18,23,.12);
}

textarea { resize: vertical; }

.hint { margin: 0 0 10px; color: var(--muted); font-size: 14px; }

/* Produto */
.produto {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.produto:last-child { border-bottom: none; }

.produto-info { flex: 1; min-width: 0; }

.produto-topo {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.produto-nome { font-weight: 700; }
.produto-preco { font-weight: 700; color: var(--accent); }

.produto-desc {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.25;
}

/* Quantidade */
.qtd {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 6px 8px;
}

.qtd-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  font-size: 20px;
  cursor: pointer;
  background: #eee;
  color: #333;
}

.qtd-btn:active { transform: scale(0.98); }

.qtd-valor {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
}

/* Pagamento */
.pag {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.pag:last-child { border-bottom: none; }

/* Footer */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  box-shadow: 0 -8px 20px rgba(0,0,0,.08);
  align-items: stretch;
}

.totais { flex: 1; }

.total-linha {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 2px 0;
  color: #444;
}

.total-final {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed #ddd;
  font-size: 16px;
  color: #111;
}

#enviar {
  width: 160px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
}

#enviar:active { transform: scale(0.99); }

/* MODAL / BOTTOM SHEET */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding: 12px;
}

.hidden{ display:none; }

.sheet{
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.sheet-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.sheet-title{
  font-weight: 800;
  font-size: 18px;
}

.sheet-sub{
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.close{
  border:none;
  background: #f1f1f1;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor:pointer;
  font-size: 16px;
}

.sheet-body{
  padding: 14px;
  max-height: 62vh;
  overflow:auto;
}

.sheet-block{
  margin-bottom: 12px;
}

.sheet-label{
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.sheet-value{
  font-size: 14px;
  color: #222;
  line-height: 1.25;
  word-break: break-word;
}

.itens{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.itemLinha{
  display:flex;
  justify-content:space-between;
  gap: 10px;
  padding: 8px 10px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 12px;
}

.itemNome{
  font-weight: 700;
  font-size: 14px;
}

.itemMeta{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.itemValor{
  font-weight: 800;
  color: #111;
  white-space: nowrap;
}

.sheet-totais{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #ddd;
}

.sheet-totais .linha{
  display:flex;
  justify-content:space-between;
  padding: 4px 0;
  font-size: 14px;
}

.sheet-totais .total{
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #ddd;
  font-size: 16px;
}

.sheet-actions{
  display:flex;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
}

.btn{
  flex:1;
  padding: 12px 12px;
  border:none;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 800;
  font-size: 15px;
}

.btn.ghost{
  background: #f1f1f1;
  color: #222;
}

.btn.primary{
  background: var(--accent);
  color: #fff;
}

/* =========================================================
   ✅ ADIÇÕES (mínimas para as novas funções)
   ========================================================= */

.overlay.hidden{ display:none; } /* reforço */

.produto-info{ cursor: pointer; }
.produto-info:active{ transform: scale(0.995); }

.field-hint{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(0,0,0,.55);
}

/* foto */
.photoModal{
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  align-self: center;
}
.photoHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.photoTitle{ font-weight: 900; font-size: 16px; }
.photoBody{ padding: 14px; }
.photoImg{
  width: 100%;
  height: auto;
  border-radius: 14px;
  display:block;
  background: #f2f2f2;
}
.photoDesc{ margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.25; }
.photoPrice{ margin-top: 10px; font-weight: 900; color: var(--accent); font-size: 16px; }

/* sucesso */
.successModal{
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  align-self: center;
  padding: 18px 16px 16px;
  text-align: center;
}
.successIcon{ display:flex; justify-content:center; margin-top: 6px; margin-bottom: 10px; }
.checkSvg{ width: 90px; height: 90px; }
.checkCircle{
  stroke: rgba(177,18,23,.25);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: circleDraw 650ms ease-out forwards;
}
.checkMark{
  stroke: #2e7d32;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: checkDraw 520ms ease-out 380ms forwards;
}
.successTitle{ font-weight: 900; font-size: 18px; margin-top: 4px; color: #111; }
.successText{ margin-top: 8px; color: rgba(0,0,0,.68); font-size: 14px; line-height: 1.35; }
.successBtn{
  margin-top: 14px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 12px 12px;
  font-weight: 900;
  cursor: pointer;
  background: #B11217;
  color: #fff;
}
.successBtn:active{ transform: scale(0.99); }
@keyframes circleDraw{ to { stroke-dashoffset: 0; } }
@keyframes checkDraw{ to { stroke-dashoffset: 0; } }

/* troco */
.cashModal{
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  align-self: center;
}
.cashHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.cashTitle{ font-weight: 900; font-size: 16px; }
.cashBody{ padding: 14px; }
.cashQuestion{ font-weight: 800; margin-bottom: 10px; }
.cashOptions{ display:flex; gap: 12px; margin-bottom: 12px; }
.cashOpt{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
  flex: 1;
  justify-content:center;
  font-weight: 700;
}
.trocoWrap{
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fbfbfb;
}
.trocoLabel{ font-size: 13px; color: rgba(0,0,0,.7); margin-bottom: 6px; font-weight: 700; }
#trocoValor{
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
}
#trocoValor:focus{
  border-color: rgba(177,18,23,.45);
  box-shadow: 0 0 0 3px rgba(177,18,23,.12);
}
.trocoHint{ margin-top: 6px; font-size: 12px; color: rgba(0,0,0,.55); }
.cashActions{ display:flex; gap: 10px; margin-top: 14px; }

/* último pedido */
.lastPedidoBar{
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.95);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.lastPedidoBar strong{ font-weight: 900; }

.hidden{ display: none !important; }

/* botão revisar embaixo */
footer{
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
footer .totais{ width: 100%; }
footer #enviar{
  width: 100%;
  display: block;
  padding: 14px 16px;
  min-height: 48px;
  line-height: 1.1;
  font-weight: 700;
  border-radius: 12px;
}

/* ✅ NOVO: retirada */
.pickupInfo{
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafafa;
}
.pickupTitle{
  font-weight: 900;
  margin-bottom: 6px;
}
.pickupAddr{
  color: rgba(0,0,0,.75);
  font-size: 14px;
  line-height: 1.25;
}
.pickupCopyBtn{
  margin-top: 10px;
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  background: #f1f1f1;
}
.pickupCopyBtn:active{ transform: scale(0.99); }

/* ✅ NOVO: repetir último pedido */
.repeatLastBtn{
  width: 100%;
  max-width: 520px;
  border: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
  background: rgba(255,255,255,.18);
  color: rgba(255,255,255,.95);
}
.repeatLastBtn:active{ transform: scale(0.99); }

/* ✅ NOVO: modal fechado */
.closedModal{
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  align-self: center;
  padding: 18px 16px 16px;
  text-align: center;
}
.closedTitle{
  font-weight: 900;
  font-size: 18px;
  color: #111;
}
.closedText{
  margin-top: 10px;
  color: rgba(0,0,0,.70);
  font-size: 14px;
  line-height: 1.35;
}

/* ✅ NOVO: modal de alerta (substitui window.alert) */
.alertModal{
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  align-self: center;
  padding: 18px 16px 16px;
  text-align: center;
}
.alertTitle{
  font-weight: 900;
  font-size: 18px;
  color: #111;
}
.alertText{
  margin-top: 10px;
  color: rgba(0,0,0,.70);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-line;
}

