/* Pedido rápido (pedir.php) e acompanhamento (acompanhar.php). Pensado primeiro para o celular. */
@font-face { font-family: "Big Shoulders Display"; src: url("/assets/fonts/bigShoulders.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/assets/fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --fundo: #1a0b1f;
  --superficie: #2a1230;
  --superficie2: #3b1d44;
  --linha: rgba(247, 237, 226, 0.1);
  --texto: #f7ede2;
  --fraco: #c9b8ae;
  --acento: #d8232a;
  --acentoEscuro: #a8171d;
  --verde: #17803f;
  --raio: 12px;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --corpo: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 7.5rem; }
html.pdTravado { overflow: hidden; }
body.pd { margin: 0; background: var(--fundo); color: var(--texto); font: 400 1rem/1.45 var(--corpo); -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body.pdComBarra { padding-bottom: 5.5rem; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: 0.01em; }
p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--texto); outline-offset: 2px; }
.pdFraco { color: var(--fraco); font-size: 0.92rem; }
.pdEscondido { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pdIsca { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Topo */
.pdTopo { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 1rem; padding-top: max(0.6rem, env(safe-area-inset-top)); background: var(--fundo); border-bottom: 1px solid var(--linha); }
.pdMarca { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.35rem; }
.pdMarca img { width: 36px; height: 36px; border-radius: 50%; }
.pdSelo { font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.pdSelo.aberto { background: rgba(31, 157, 85, 0.18); color: #7ee2a8; }
.pdSelo.fechado { background: rgba(216, 35, 42, 0.18); color: #ff9da1; }
.pdAviso { margin: 0.75rem 1rem 0; padding: 0.75rem 1rem; border-radius: var(--raio); background: var(--superficie); font-size: 0.92rem; }
.pdAviso span { color: var(--fraco); }

/* Último pedido */
.pdUltimo { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin: 0.75rem 1rem 0; padding: 0.7rem 1rem; border-radius: var(--raio); background: var(--superficie); font-size: 0.92rem; }
.pdUltimo span { flex: 1 1 auto; }
.pdUltimo a, .pdUltimo button { background: none; border: 1px solid var(--linha); border-radius: 999px; padding: 0.35rem 0.85rem; font-weight: 600; font-size: 0.88rem; text-decoration: none; cursor: pointer; }

/* Categorias */
.pdCats { position: sticky; top: 3.45rem; z-index: 15; display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.65rem 1rem; background: var(--fundo); scrollbar-width: none; }
.pdCats::-webkit-scrollbar { display: none; }
.pdCats a { flex: none; padding: 0.45rem 1rem; border-radius: 999px; background: var(--superficie); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.pdCats a.ativo { background: var(--texto); color: var(--fundo); }

/* Lista */
.pdConteudo { width: min(100%, 40rem); margin-inline: auto; padding: 0.25rem 1rem 2rem; }
.pdCategoria { padding-top: 0.75rem; }
.pdCategoria h2 { font-size: 1.7rem; margin: 0.5rem 0 0.5rem; }
.pdCategoria ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.pdItem { position: relative; width: 100%; display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem; background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--raio); text-align: left; cursor: pointer; transition: transform 120ms ease; }
.pdItem:active { transform: scale(0.98); }
.pdItem img { width: 80px; height: 80px; flex: none; border-radius: 9px; object-fit: cover; background: var(--superficie2); }
.pdItemTexto { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.15rem; }
.pdItemTexto strong { font-size: 1.02rem; }
.pdItemTexto .pdFraco { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.85rem; }
.pdPreco { font-size: 0.9rem; color: var(--fraco); }
.pdPreco b { color: var(--texto); font-size: 1rem; }
.pdMais { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--acento); color: #fff; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.pdQtdNoCarrinho { position: absolute; top: 0.35rem; left: 0.35rem; min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem; display: grid; place-items: center; border-radius: 999px; background: var(--acento); color: #fff; font-size: 0.8rem; font-weight: 700; }
.pdRodape { margin-top: 2rem; text-align: center; }

/* Botões */
.pdBotao { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 3.25rem; padding: 0.75rem 1.25rem; border: 0; border-radius: var(--raio); background: var(--acento); color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; }
.pdBotao:active { background: var(--acentoEscuro); }
.pdBotao:disabled { opacity: 0.5; cursor: not-allowed; }
.pdBotaoLargo { width: 100%; }
.pdBotaoContorno { background: transparent; border: 1px solid var(--linha); color: var(--texto); }
.pdBotaoWhats { background: var(--verde); }
.pdEnviando { opacity: 0.7; pointer-events: none; }
.pdEnviando::after { content: ""; width: 1rem; height: 1rem; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: pdGira 0.7s linear infinite; }
@keyframes pdGira { to { transform: rotate(360deg); } }
.pdLink { background: none; border: 0; padding: 0.6rem 0; color: #ff9da1; font-weight: 600; cursor: pointer; }

/* Barra fixa do pedido */
.pdBarra { position: fixed; inset: auto 0 0 0; z-index: 30; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--fundo) 70%, transparent); }
.pdBarra .pdBotao { width: min(100%, 38rem); margin-inline: auto; display: flex; justify-content: space-between; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7); }
.pdBarra span:first-child { font-weight: 500; opacity: 0.9; }

/* Folhas (dialog) */
.pdFolha { padding: 0; border: 0; margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; background: var(--superficie); color: var(--texto); border-radius: 18px 18px 0 0; overflow: hidden; }
.pdFolha::backdrop { background: rgba(10, 3, 12, 0.7); }
.pdFolha[open] { animation: pdSobe 200ms ease-out; }
@keyframes pdSobe { from { transform: translateY(30%); opacity: 0.4; } }
.pdFolhaInterna { display: flex; flex-direction: column; max-height: 92dvh; }
.pdFolhaTopo { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1rem 0.5rem; }
.pdFolhaTopo h2 { font-size: 1.7rem; }
.pdFechar { width: 2.5rem; height: 2.5rem; flex: none; border: 0; border-radius: 50%; background: var(--superficie2); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.pdFolhaCorpo { flex: 1 1 auto; overflow-y: auto; padding: 0.25rem 1rem 1rem; overscroll-behavior: contain; }
.pdFolhaBase { display: flex; gap: 0.75rem; align-items: center; padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); background: var(--superficie); }
.pdFpFoto { width: 100%; height: 11rem; object-fit: cover; border-radius: var(--raio); margin-bottom: 0.75rem; }
@media (min-width: 40em) {
  .pdFolha { margin: auto; max-width: 34rem; border-radius: 18px; max-height: 88dvh; }
  .pdFolhaInterna { max-height: 88dvh; }
}

/* Opções */
.pdGrupo { border: 0; margin: 1rem 0 0; padding: 0; }
.pdGrupo legend { padding: 0; margin-bottom: 0.35rem; font-weight: 700; font-size: 1.02rem; }
.pdGrupo legend small { font-weight: 400; color: var(--fraco); font-size: 0.85rem; margin-left: 0.3rem; }
.pdOpcao { display: flex; align-items: center; gap: 0.75rem; min-height: 3rem; padding: 0.45rem 0.25rem; border-bottom: 1px solid var(--linha); cursor: pointer; }
.pdOpcao:last-child { border-bottom: 0; }
.pdOpcao input { width: 1.35rem; height: 1.35rem; flex: none; accent-color: var(--acento); }
.pdOpcao span { flex: 1 1 auto; }
.pdOpcao b { font-weight: 600; color: var(--fraco); font-size: 0.92rem; }
.pdEscolhas { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pdEscolhas label { flex: 1 1 8rem; position: relative; cursor: pointer; }
.pdEscolhas input { position: absolute; opacity: 0; inset: 0; }
.pdEscolhas span { display: grid; place-items: center; min-height: 3rem; padding: 0.5rem; border: 1px solid var(--linha); border-radius: var(--raio); font-weight: 600; text-align: center; }
.pdEscolhas input:checked + span { border-color: var(--acento); background: rgba(216, 35, 42, 0.16); }
.pdEscolhas input:focus-visible + span { outline: 3px solid var(--texto); outline-offset: 2px; }

/* Campos */
.pdCampo { display: grid; gap: 0.3rem; margin-top: 0.85rem; }
.pdCampo label { font-weight: 600; font-size: 0.92rem; }
.pdCampo input, .pdObs textarea { width: 100%; min-height: 3rem; padding: 0.7rem 0.85rem; border: 1px solid var(--linha); border-radius: 10px; background: var(--fundo); font-size: 1rem; }
.pdCampo input:focus, .pdObs textarea:focus { outline: none; border-color: var(--texto); }
.pdDuplo { display: grid; gap: 0 0.75rem; grid-template-columns: 1fr 1fr; }
.pdDuplo > * { min-width: 0; }
.pdObs { margin-top: 1rem; }
.pdObs summary { cursor: pointer; font-weight: 600; padding: 0.4rem 0; }
.pdObs textarea { margin-top: 0.4rem; resize: vertical; }

/* Quantidade */
.pdQtd { display: flex; align-items: center; border: 1px solid var(--linha); border-radius: var(--raio); flex: none; }
.pdQtd button { width: 3rem; height: 3.25rem; border: 0; background: none; font-size: 1.4rem; cursor: pointer; }
.pdQtd span { min-width: 1.75rem; text-align: center; font-weight: 700; }
.pdQtdPequena button { width: 2.5rem; height: 2.5rem; }

/* Itens do pedido e totais */
.pdLinhaItem { display: flex; gap: 0.75rem; align-items: center; justify-content: space-between; padding: 0.7rem 0; border-bottom: 1px solid var(--linha); }
.pdLinhaItem > div:first-child { display: grid; gap: 0.1rem; min-width: 0; }
.pdLinhaItem small { color: var(--fraco); font-size: 0.85rem; }
.pdLinhaItem b { font-size: 0.95rem; }
.pdTotais { margin-top: 1rem; padding-top: 0.5rem; border-top: 1px solid var(--linha); }
.pdLinha { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.pdTotal { font-size: 1.15rem; padding-top: 0.4rem; }
.pdErro { margin: 0 1rem 0.5rem; padding: 0.6rem 0.85rem; border-radius: 10px; background: rgba(216, 35, 42, 0.18); color: #ffc2c4; font-size: 0.92rem; }
.pdTotais .pdErro { margin: 0.5rem 0 0; }
.pdLembrete { margin-top: 0.75rem; font-size: 0.82rem; }

/* Sucesso */
.pdSucesso { display: grid; gap: 0.85rem; text-align: center; padding: 1.75rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom)); }
.pdSucesso h2 { font-size: 2rem; }
.pdOk { width: 4rem; height: 4rem; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--verde); color: #fff; font-size: 2rem; font-weight: 700; }

/* Aviso rápido */
.pdToast { position: fixed; left: 50%; bottom: 6rem; z-index: 40; transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; padding: 0.6rem 1rem; border-radius: 999px; background: var(--texto); color: var(--fundo); font-weight: 600; font-size: 0.92rem; white-space: nowrap; transition: opacity 160ms, transform 160ms; }
.pdToast.ativo { opacity: 1; transform: translate(-50%, 0); }

/* Acompanhar */
.pdCartao { margin-top: 1rem; padding: 1.25rem; border-radius: var(--raio); background: var(--superficie); display: grid; gap: 0.6rem; }
.pdCartao h1 { font-size: 2.2rem; }
.pdCartao h2 { font-size: 1.5rem; }
.pdEtapas { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0; }
.pdEtapas li { position: relative; padding: 0.45rem 0 0.45rem 2rem; color: var(--fraco); }
.pdEtapas li::before { content: ""; position: absolute; left: 0.35rem; top: 0.7rem; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 2px solid var(--fraco); }
.pdEtapas li::after { content: ""; position: absolute; left: 0.74rem; top: 1.6rem; bottom: -0.7rem; width: 2px; background: var(--linha); }
.pdEtapas li:last-child::after { display: none; }
.pdEtapas li.feita { color: var(--texto); }
.pdEtapas li.feita::before { background: var(--verde); border-color: var(--verde); }
.pdEtapas li.atual { color: var(--texto); font-weight: 700; }
.pdEtapas li.atual::before { background: var(--acento); border-color: var(--acento); box-shadow: 0 0 0 4px rgba(216, 35, 42, 0.25); }
.pdResumo { list-style: none; margin: 0; padding: 0; }
.pdResumo li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px solid var(--linha); }
.pdResumo small { display: block; color: var(--fraco); font-size: 0.85rem; }
.pdAcoes { display: grid; gap: 0.6rem; margin-top: 1rem; }
.pdAcompanhar .pdConteudo { padding-bottom: 3rem; }

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