/* Cardapio web Cotto (cardapio.cottosistemas.com.br) - celular primeiro. */

@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fontes/Inter-Regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fontes/Inter-SemiBold.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/fontes/Inter-Bold.woff2) format("woff2"); }

:root {
  --fundo: #ffffff;
  --fundo-2: #f6f6f6;
  --texto: #141414;
  --texto-2: #6b6b6b;
  --linha: #ececec;
  --forte: #141414;
  --sobre-forte: #ffffff;
  --verde: #16a34a;
  --vermelho: #e0364f;
  --amarelo: #f59e0b;
  --raio: 12px;
  --sombra: 0 10px 30px rgba(0, 0, 0, .12);
  --topo: 0px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topo) + 8px); }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font: 400 15px/1.4 Inter, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.travado { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--forte); outline-offset: 2px; }

.app { max-width: 760px; margin: 0 auto; padding-bottom: 96px; }

/* ---------- topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: var(--fundo);
  border-bottom: 1px solid var(--linha);
}
.topo-linha {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; min-height: 64px;
}
.marca { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.logo {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--forte) center/cover no-repeat; color: var(--sobre-forte);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
  overflow: hidden;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.nome-loja {
  margin: 0; font-size: 17px; font-weight: 700; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.busca { flex: 1; min-width: 0; }
.busca input {
  width: 100%; height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--linha); background: var(--fundo-2); outline: none;
}
.busca input:focus { border-color: var(--forte); background: var(--fundo); }
.app.buscando .marca { display: none; }

.icone-botao {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: transparent;
}
.icone-botao:hover { background: var(--fundo-2); }
.icone-botao svg, .barra-sacola svg, .botao svg, .linha-acao svg { width: 22px; height: 22px; }

.abas {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding: 0 12px; scroll-behavior: smooth;
}
.abas::-webkit-scrollbar { display: none; }
.aba {
  flex: none; border: 0; background: none; padding: 12px 8px 11px;
  font-weight: 600; font-size: 14px; color: var(--texto-2);
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.aba[aria-current="true"] { color: var(--texto); border-bottom-color: var(--forte); }

/* ---------- loja ---------- */
.loja-info { padding: 14px 16px 4px; color: var(--texto-2); font-size: 13px; }
.loja-info p { margin: 2px 0; }
.selo {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #e8f7ee; color: #166534;
}
.selo::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.selo.fechado { background: #fdecef; color: #9f1239; }
.faixa {
  margin: 12px 16px 0; padding: 12px 14px; border-radius: var(--raio);
  background: var(--fundo-2); font-size: 14px; display: flex; gap: 10px; align-items: center;
}
.faixa button { margin-left: auto; }

/* ---------- lista ---------- */
.secao { padding: 8px 0 4px; }
.secao h2 { margin: 18px 16px 6px; font-size: 18px; font-weight: 700; }
.cartao {
  display: flex; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px; border: 0; border-bottom: 1px solid var(--linha);
  background: none; align-items: flex-start;
}
.cartao:hover { background: #fafafa; }
.foto {
  position: relative; flex: none; width: 96px; height: 96px; border-radius: 10px;
  background: var(--fundo-2); overflow: hidden; display: grid; place-items: center;
  color: #c4c4c4;
}
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto svg { width: 34px; height: 34px; }
.foto .pct {
  position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--forte); color: var(--sobre-forte); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.cartao-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cartao-nome { font-weight: 700; font-size: 15px; line-height: 1.25; }
.cartao-desc {
  color: var(--texto-2); font-size: 13px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.preco { font-weight: 600; font-size: 14px; margin-top: 6px; }
.preco s { color: var(--texto-2); font-weight: 400; }
.preco .promo { color: var(--verde); font-weight: 700; }
.vazio { padding: 48px 24px; text-align: center; color: var(--texto-2); }
.vazio strong { display: block; color: var(--texto); font-size: 17px; margin-bottom: 6px; }

.carregando { padding: 16px; display: grid; gap: 14px; }
.esqueleto { height: 96px; border-radius: var(--raio); background: linear-gradient(90deg, #f2f2f2, #fafafa, #f2f2f2); background-size: 200% 100%; animation: brilho 1.2s infinite linear; }
@keyframes brilho { to { background-position: -200% 0; } }

/* ---------- barra da sacola ---------- */
.barra-sacola {
  position: fixed; z-index: 25; left: 50%; transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: min(728px, calc(100% - 24px)); height: 56px; border: 0; border-radius: 14px;
  background: var(--forte); color: var(--sobre-forte); box-shadow: var(--sombra);
  display: flex; align-items: center; gap: 12px; padding: 0 18px; font-weight: 600;
}
.barra-qtd {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-size: 13px;
}
.barra-texto { flex: 1; text-align: left; }

/* ---------- botoes e campos ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 18px; border-radius: var(--raio); border: 0;
  background: var(--forte); color: var(--sobre-forte); font-weight: 700; font-size: 15px;
  width: 100%;
}
.botao:disabled { opacity: .45; cursor: not-allowed; }
.botao.claro { background: var(--fundo-2); color: var(--texto); }
.botao.pequeno { height: 44px; width: auto; font-size: 13px; letter-spacing: .02em; }
.botao .valor { margin-left: auto; }

.qtd { display: inline-flex; align-items: center; gap: 14px; }
.qtd button {
  width: 34px; height: 34px; border-radius: 50%; border: 0; background: none;
  display: grid; place-items: center; font-size: 22px; line-height: 1;
}
.qtd button:hover { background: var(--fundo-2); }
.qtd button svg { width: 20px; height: 20px; }
.qtd output { min-width: 18px; text-align: center; font-weight: 600; font-size: 16px; }

.campo { display: grid; gap: 6px; margin-bottom: 12px; }
.campo > span { font-size: 13px; font-weight: 600; }
.campo input:not([type="radio"]), .campo select, .campo textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #dcdcdc; background: var(--fundo); outline: none;
}
.campo textarea { min-height: 72px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { border-color: var(--forte); }
.campo .ajuda { font-size: 12px; color: var(--texto-2); font-weight: 400; }
.duas { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.erro { color: var(--vermelho); font-size: 13px; margin: 6px 0 10px; }

.alternar {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--fundo-2); border-radius: var(--raio); margin-bottom: 16px;
}
.alternar button {
  height: 40px; border: 0; border-radius: 9px; background: none; font-weight: 600; color: var(--texto-2);
}
.alternar button[aria-pressed="true"] { background: var(--fundo); color: var(--texto); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

.opcoes { display: grid; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; min-width: 0; }
.opcao {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid #dcdcdc; border-radius: 10px; font-weight: 600;
}
.opcao:has(input:checked) { border-color: var(--forte); background: #fafafa; }
.opcao input { accent-color: var(--forte); width: 18px; height: 18px; margin: 0; }

/* ---------- produto (dialogo) ---------- */
.produto {
  width: min(520px, 100%); max-height: 100%; margin: auto auto 0; padding: 0; border: 0;
  border-radius: 18px 18px 0 0; background: var(--fundo); color: var(--texto);
}
.produto::backdrop { background: rgba(0, 0, 0, .45); }
@media (min-width: 600px) { .produto { margin: auto; border-radius: 18px; max-height: 92vh; } }
.produto-corpo { display: flex; flex-direction: column; max-height: 92vh; }
.produto-rolagem { overflow-y: auto; }
.produto-foto { position: relative; aspect-ratio: 4 / 3; background: var(--fundo-2); display: grid; place-items: center; color: #c4c4c4; }
.produto-foto img { width: 100%; height: 100%; object-fit: cover; }
.produto-foto > svg { width: 56px; height: 56px; }
.produto-fechar {
  position: absolute; right: 12px; top: 12px; background: rgba(255,255,255,.92);
}
.produto-texto { padding: 16px; }
.produto-texto h2 { margin: 0 0 6px; font-size: 20px; }
.produto-texto p { margin: 0 0 10px; color: var(--texto-2); font-size: 14px; }
.produto-texto .campo { margin: 16px 0 4px; }
.produto-rodape {
  display: flex; gap: 12px; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--linha);
}
.produto-rodape .botao { flex: 1; }

/* ---------- sabores da pizza ---------- */
.sabores-topo {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin: 18px 0 10px; padding: 12px 14px; border-radius: 10px; background: var(--fundo-2);
}
.sabores-topo strong { display: block; font-size: 15px; }
.sabores-topo .ajuda { display: block; font-size: 12px; color: var(--texto-2); margin-top: 2px; }
.contador {
  flex: none; min-width: 44px; padding: 4px 10px; border-radius: 999px; text-align: center;
  background: var(--forte); color: var(--sobre-forte); font-size: 13px; font-weight: 700;
}
.contador.completo { background: var(--verde); }
.sabores-busca {
  width: 100%; height: 42px; padding: 0 12px; margin-bottom: 8px;
  border: 1px solid #dcdcdc; border-radius: 10px; background: var(--fundo); outline: none;
}
.sabores-busca:focus { border-color: var(--forte); }
.sabores { display: grid; }
.sabor {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--linha); cursor: pointer;
}
.sabor:has(input:checked) .sabor-nome { color: var(--verde); }
.sabor.travado { opacity: .45; cursor: default; }
.sabor-foto {
  width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--fundo-2);
  display: grid; place-items: center; color: #c4c4c4;
}
.sabor-foto img { width: 100%; height: 100%; object-fit: cover; }
.sabor-foto svg { width: 22px; height: 22px; }
.sabor-texto { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sabor-nome { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.sabor-ing { font-size: 12.5px; color: var(--texto-2); line-height: 1.35; }
.sabor-preco { font-size: 13px; font-weight: 600; }
.sabor input { accent-color: var(--verde); width: 22px; height: 22px; margin: 0; }

/* ---------- sacola (painel lateral) ---------- */
.veu { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); }
.sacola {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0;
  width: min(440px, 100%); background: var(--fundo);
  display: flex; flex-direction: column; box-shadow: var(--sombra);
  transform: translateX(100%); transition: transform .22s ease;
}
.sacola.aberta { transform: none; }
@media (prefers-reduced-motion: reduce) { .sacola { transition: none; } }
.sacola-topo {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-height: 60px;
  border-bottom: 1px solid var(--linha);
}
.sacola-topo h2 { flex: 1; margin: 0; font-size: 18px; text-align: center; padding-right: 40px; }
.sacola-rolagem { flex: 1; overflow-y: auto; padding: 4px 16px 16px; }
.sacola-rodape { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); }

.item { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--linha); }
.item .foto { width: 56px; height: 56px; border-radius: 8px; grid-row: span 2; }
.item .foto svg { width: 22px; height: 22px; }
.item-nome { font-size: 15px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.item-obs { grid-column: 2 / 4; font-size: 12px; color: var(--texto-2); margin-top: -2px; }
.lixeira { width: 34px; height: 34px; border: 0; background: none; color: var(--vermelho); display: grid; place-items: center; border-radius: 50%; }
.lixeira:hover { background: #fdecef; }
.lixeira svg { width: 20px; height: 20px; }
.item-linha { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; }
.item-preco { font-weight: 700; font-size: 15px; }

.cupom { border-bottom: 1px solid var(--linha); padding: 6px 0 14px; }
.cupom summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; font-size: 14px; color: var(--texto-2); cursor: pointer;
}
.cupom summary::-webkit-details-marker { display: none; }
.cupom summary::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-right: 4px; }
.cupom[open] summary::after { transform: rotate(-135deg); }
.cupom-linha { display: flex; gap: 8px; border: 1px solid #dcdcdc; border-radius: 10px; padding: 5px 5px 5px 12px; }
.cupom-linha input { flex: 1; min-width: 0; border: 0; outline: none; text-transform: uppercase; }
.cupom-linha .botao { height: 40px; padding: 0 16px; }
.cupom-ok { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #e8f7ee; color: #166534; font-size: 14px; font-weight: 600; }
.cupom-ok svg { flex: none; width: 20px; height: 20px; }
.item .pct { display: none; }
.cupom-ok button { margin-left: auto; border: 0; background: none; color: inherit; text-decoration: underline; font-size: 13px; }

.resumo { margin: 14px 0 0; display: grid; gap: 6px; font-size: 14px; }
.resumo div { display: flex; justify-content: space-between; color: var(--texto-2); }
.resumo .desconto { color: var(--verde); }
.resumo .total { color: var(--texto); font-size: 18px; font-weight: 700; margin-top: 4px; }

.linha-acao {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; margin: 0 0 12px;
  border: 1px dashed #c9c9c9; border-radius: 10px; background: none; text-align: left; font-weight: 600;
}
.linha-acao small { display: block; font-weight: 400; color: var(--texto-2); }
.linha-acao.ok { border-style: solid; border-color: var(--verde); color: #166534; background: #f2fbf5; }

.status { text-align: center; padding: 28px 8px 8px; }
.status-icone { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--fundo-2); }
.status-icone svg { width: 38px; height: 38px; }
.status-icone.ok { background: #e8f7ee; color: var(--verde); }
.status-icone.ruim { background: #fdecef; color: var(--vermelho); }
.status-icone.espera { color: var(--amarelo); }
.status-icone.espera svg { animation: girar 2.4s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .status-icone.espera svg { animation: none; } }
.status h3 { margin: 0 0 6px; font-size: 20px; }
.status p { margin: 0 auto; color: var(--texto-2); max-width: 32ch; }
.status-numero { margin-top: 10px; font-size: 12px; color: var(--texto-2); }

.aviso-flutuante {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  top: calc(12px + env(safe-area-inset-top)); max-width: calc(100% - 32px);
  padding: 12px 16px; border-radius: 12px; background: #222; color: #fff; font-size: 14px;
  box-shadow: var(--sombra);
}

@media (min-width: 760px) {
  .topo-linha { padding: 14px 20px; }
  .cartao { padding: 16px 20px; }
  .foto { width: 110px; height: 110px; }
}
