/* =========================================================
   Point do Açaí — Cardápio e pedidos (mobile first)
   ========================================================= */

:root {
  --roxo-950: #2a0b38;
  --roxo-800: #4a1660;
  --roxo-700: #5c1d77;
  --roxo-300: #b892c9;
  --roxo-100: #eadcf1;
  --roxo-50: #f7f1fa;
  --verde: #1f7342;
  --verde-50: #e7f4ec;
  --vermelho: #b3261e;
  --vermelho-50: #fcebea;
  --ambar: #7a4206;
  --ambar-50: #fff0db;
  --texto: #1d1424;
  --texto-2: #5f5566;
  --borda: #ece6ef;
  --borda-forte: #d6cbdc;
  --fundo: #faf8fb;
  --branco: #fff;
  --raio: 16px;
  --raio-p: 12px;
  --sombra: 0 1px 2px rgb(42 11 56 / 0.05), 0 4px 16px rgb(42 11 56 / 0.06);
  --sombra-alta: 0 2px 4px rgb(42 11 56 / 0.06), 0 10px 28px rgb(42 11 56 / 0.12);
  --seguro-baixo: env(safe-area-inset-bottom, 0px);
  --altura-barra: 76px;
  --rapido: 160ms;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--texto);
  background: var(--fundo);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; min-height: 100dvh; }
body:has(dialog[open]) { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
img, svg { display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9b4fc0; outline-offset: 2px; }

.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pular {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 16px;
  background: var(--roxo-800); color: #fff; border-radius: var(--raio-p); font-weight: 700;
}
.pular:focus { top: 12px; }

.ico { width: 22px; height: 22px; flex: none; }
.ico--p { width: 16px; height: 16px; }
.ico--g { width: 48px; height: 48px; }

/* ---------------- Cabeçalho ---------------- */

.pagina { max-width: 1180px; margin: 0 auto; }
body.tem-barra .pagina { padding-bottom: calc(var(--altura-barra) + var(--seguro-baixo) + 12px); }

.capa { position: relative; height: 172px; background: var(--roxo-800); overflow: hidden; }
.capa__img { width: 100%; height: 100%; object-fit: cover; }
.capa__acoes {
  position: absolute; inset: calc(10px + env(safe-area-inset-top, 0px)) 12px auto;
  display: flex; justify-content: space-between;
}

.btn-redondo {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.94); color: var(--roxo-800);
  box-shadow: 0 2px 8px rgb(42 11 56 / 0.18); text-decoration: none;
  transition: transform var(--rapido) ease;
}
.btn-redondo:active { transform: scale(0.94); }
.btn-redondo--claro { background: var(--roxo-50); box-shadow: none; }

.loja {
  position: relative; margin: -32px 12px 0; padding: 14px 16px 12px;
  display: grid; grid-template-columns: 72px 1fr; column-gap: 14px; row-gap: 12px; align-items: start;
  background: var(--branco); border-radius: 20px; box-shadow: var(--sombra);
}
.loja__logo {
  width: 72px; height: 72px; margin-top: -34px; border-radius: 18px; object-fit: cover;
  border: 3px solid var(--branco); background: var(--branco); box-shadow: var(--sombra);
}
.loja__nome { font-size: 1.35rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.cabecalho > .loja .loja__nome { grid-column: 1 / -1; }
.loja__categoria { font-size: 0.875rem; color: var(--texto-2); margin-top: 2px; }

.status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; font-size: 0.875rem; }
.status__ponto { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status--aberto { color: var(--verde); }
.status--fechado { color: var(--vermelho); }
.status span:not(.status__ponto) { color: var(--texto-2); }

.loja__infos {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 12px 0 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; border-top: 1px solid var(--borda);
}
.loja__infos li { display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--texto-2); line-height: 1.25; }
.loja__infos .ico { width: 20px; height: 20px; color: var(--roxo-700); }
.loja__infos strong { display: block; color: var(--texto); font-weight: 700; }

.loja__horarios { grid-column: 1 / -1; font-size: 0.875rem; }
.loja__horarios summary {
  cursor: pointer; color: var(--roxo-800); font-weight: 600; min-height: 36px;
  display: flex; align-items: center;
}
.loja__horarios ul { list-style: none; margin: 4px 0 6px; padding: 0; }
.loja__horarios li { display: flex; justify-content: space-between; padding: 4px 0; color: var(--texto-2); text-transform: capitalize; }

.faixa-fechado {
  display: flex; gap: 10px; align-items: flex-start; margin: 14px 12px 0; padding: 12px 14px;
  background: var(--vermelho-50); color: #6e1a14; border-radius: var(--raio-p); font-size: 0.875rem;
}

/* ---------------- Navegação de categorias ---------------- */

.nav-cat {
  position: sticky; top: 0; z-index: 20; margin-top: 12px;
  display: flex; align-items: center; gap: 4px; padding: 8px 0 8px 8px;
  background: rgb(250 248 251 / 0.96); border-bottom: 1px solid var(--borda);
  backdrop-filter: saturate(1.4) blur(8px);
}
.nav-cat__busca {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 0; border-radius: 50%; background: transparent; color: var(--roxo-800);
}
.nav-cat__lista {
  display: flex; gap: 8px; list-style: none; margin: 0; padding: 2px 12px 2px 2px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.nav-cat__lista::-webkit-scrollbar { display: none; }
.chip {
  min-height: 40px; padding: 0 16px; white-space: nowrap; border-radius: 999px;
  border: 1px solid var(--borda-forte); background: var(--branco); color: var(--texto-2);
  font-size: 0.9rem; font-weight: 600; transition: background var(--rapido), color var(--rapido), border-color var(--rapido);
}
.chip--ativo { background: var(--roxo-800); border-color: var(--roxo-800); color: #fff; }

/* ---------------- Seções e cards ---------------- */

.secao { padding: 22px 12px 4px; scroll-margin-top: 64px; }
.secao__titulo { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 12px; outline: none; }
.grade { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.card {
  display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 14px; height: 100%;
  padding: 12px; min-height: 132px; color: inherit; text-decoration: none;
  background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio);
  box-shadow: 0 1px 2px rgb(42 11 56 / 0.04);
  transition: transform var(--rapido) ease, box-shadow var(--rapido) ease, border-color var(--rapido) ease;
}
a.card:hover { border-color: var(--roxo-100); box-shadow: var(--sombra); }
a.card:active { transform: scale(0.985); }
.card__texto { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card__nome { font-size: 1rem; font-weight: 700; line-height: 1.25; }
.card__desc {
  font-size: 0.85rem; color: var(--texto-2); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__preco { margin-top: auto; padding-top: 6px; font-size: 0.8rem; color: var(--texto-2); }
.card__preco strong { font-size: 1.05rem; color: var(--texto); font-weight: 800; }
.card__indisponivel { margin-top: auto; font-size: 0.85rem; font-weight: 600; color: var(--texto-2); }
.card__midia { width: 108px; aspect-ratio: 1; border-radius: var(--raio-p); overflow: hidden; background: var(--roxo-50); align-self: start; }
.card--indisponivel { opacity: 0.6; }
.card--indisponivel .card__midia { filter: grayscale(0.8); }

.selo {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--ambar-50); color: var(--ambar);
  font-size: 0.72rem; font-weight: 700;
}

.foto { width: 100%; height: 100%; object-fit: cover; background: var(--roxo-50); }
.foto--vazia { display: grid; place-items: center; color: var(--roxo-100); }
.foto--vazia svg { width: 52%; height: auto; }

.vazio { text-align: center; padding: 40px 16px; color: var(--texto-2); display: grid; justify-items: center; gap: 8px; }
.vazio .ico--g { color: var(--roxo-300); }
.vazio h2, .vazio h3 { color: var(--texto); font-size: 1.05rem; }

/* ---------------- Botões ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 18px; border: 0; border-radius: 14px;
  font-size: 1rem; font-weight: 700; text-decoration: none; text-align: left;
  transition: background var(--rapido), transform var(--rapido);
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn--bloco { width: 100%; }
.btn--primario { background: var(--roxo-800); color: #fff; }
.btn--primario:hover:not(:disabled) { background: var(--roxo-700); }
.btn--primario[aria-disabled='true'] { background: #a993b4; }
.btn--secundario { justify-content: center; background: var(--roxo-50); color: var(--roxo-800); }
.btn--whats { justify-content: center; gap: 10px; background: var(--verde); color: #fff; }
.btn--whats:hover:not(:disabled) { background: #19603a; }
.btn:disabled { background: #cfc4d6; color: #fff; cursor: not-allowed; }

.btn-texto {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px;
  border: 0; background: none; color: var(--roxo-800); font-weight: 600; font-size: 0.875rem;
}
.btn-texto--perigo { color: var(--vermelho); }

.qtd { display: inline-flex; align-items: center; border: 1px solid var(--borda-forte); border-radius: 14px; background: var(--branco); flex: none; }
.qtd__btn { display: grid; place-items: center; width: 44px; height: 50px; border: 0; background: none; color: var(--roxo-800); }
.qtd__btn:disabled { color: #cbbfd2; cursor: not-allowed; }
.qtd__valor { min-width: 24px; text-align: center; font-weight: 700; }
.qtd--p { margin-left: auto; border-radius: 12px; }
.qtd--p .qtd__btn { width: 40px; height: 40px; }
.qtd--p .ico { width: 18px; height: 18px; }

.alerta {
  display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px;
  background: var(--vermelho-50); color: #6e1a14; border-radius: var(--raio-p); font-size: 0.85rem;
}
.alerta .ico { width: 18px; height: 18px; margin-top: 1px; }

/* ---------------- Barra fixa do carrinho ---------------- */

.barra-carrinho {
  position: fixed; inset: auto 0 0; z-index: 30;
  padding: 10px 12px calc(10px + var(--seguro-baixo));
  background: linear-gradient(to top, var(--fundo) 70%, rgb(250 248 251 / 0));
  animation: subir 200ms ease-out;
}
.barra-carrinho__btn {
  width: 100%; max-width: 760px; margin: 0 auto; min-height: 56px; padding: 0 16px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  border: 0; border-radius: 16px; background: var(--roxo-800); color: #fff;
  font-size: 1rem; font-weight: 700; box-shadow: var(--sombra-alta);
}
.barra-carrinho__qtd {
  min-width: 28px; height: 28px; padding: 0 6px; display: grid; place-items: center;
  border-radius: 8px; background: rgb(255 255 255 / 0.18); font-size: 0.9rem;
}
.barra-carrinho__texto { text-align: center; }

/* ---------------- Aviso (toast) ---------------- */

.aviso {
  position: fixed; left: 50%; bottom: calc(16px + var(--seguro-baixo)); z-index: 60;
  display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px); width: max-content;
  padding: 12px 16px; border-radius: 12px; background: var(--roxo-950); color: #fff; font-size: 0.9rem;
  opacity: 0; transform: translate(-50%, 12px); pointer-events: none;
  transition: opacity var(--rapido), transform var(--rapido);
}
.aviso:empty { display: none; }
.aviso--visivel { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
body.tem-barra > .aviso { bottom: calc(var(--altura-barra) + var(--seguro-baixo) + 12px); }
dialog .aviso { bottom: calc(96px + var(--seguro-baixo)); }
.aviso__acao { border: 0; background: none; color: #e2c7f0; font-weight: 700; min-height: 36px; padding: 0 4px; }

/* ---------------- Painéis (dialog) ---------------- */

.painel {
  width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0;
  border: 0; background: var(--branco); color: var(--texto); overflow: hidden;
}
.painel[open] { display: flex; flex-direction: column; }
.painel::backdrop { background: rgb(29 12 38 / 0.5); }
.painel[open] > .dlg { animation: subir 200ms ease-out; }

.dlg { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--branco); }
.dlg__cab {
  display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--borda); flex: none;
}
.dlg__titulo { font-size: 1.15rem; font-weight: 800; }
.dlg__sub { color: var(--texto-2); font-size: 0.875rem; }
.dlg__cab > .btn-redondo:last-child { margin-left: auto; }
.dlg__corpo { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.dlg__rodape {
  flex: none; padding: 12px 16px calc(12px + var(--seguro-baixo));
  border-top: 1px solid var(--borda); background: var(--branco);
  box-shadow: 0 -6px 16px rgb(42 11 56 / 0.05);
}
.dlg__fechar-flutuante { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; z-index: 3; }

/* Ficha do produto */
.ficha__midia { aspect-ratio: 4 / 3; max-height: 46vh; width: 100%; background: var(--roxo-50); overflow: hidden; }
.ficha__midia .foto--vazia svg { width: 32%; }
.ficha__info { padding: 18px 16px 16px; display: grid; gap: 8px; }
.ficha__nome { font-size: 1.4rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
.ficha__desc { color: var(--texto-2); font-size: 0.95rem; }
.ficha__preco { font-size: 0.9rem; color: var(--texto-2); }
.ficha__preco strong { font-size: 1.15rem; color: var(--texto); }

.grupo { border: 0; margin: 0; padding: 0; min-width: 0; scroll-margin-top: 0; }
.grupo__cab {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: #f3edf6; transition: background var(--rapido);
}
.grupo__titulo { font-weight: 800; font-size: 1rem; }
.grupo__regra { font-size: 0.8rem; color: var(--texto-2); margin-top: 2px; }
.grupo__selo {
  flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 8px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--branco); color: var(--texto-2);
}
.grupo__selo--obrig { background: var(--roxo-800); color: #fff; }
.grupo__selo--ok { background: var(--verde-50); color: var(--verde); }
.grupo--alerta[data-falta] .grupo__cab { background: var(--vermelho-50); }
.grupo--alerta[data-falta] .grupo__selo--obrig { background: var(--vermelho); }
.grupo--alerta[data-falta] .grupo__cab { animation: tremer 300ms ease-in-out; }

.opcao {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px;
  border-bottom: 1px solid var(--borda); cursor: pointer;
}
.opcao:last-child { border-bottom: 0; }
.opcao__texto { flex: 1; display: grid; gap: 2px; min-width: 0; }
.opcao__nome { font-size: 0.95rem; }
.opcao__preco { font-size: 0.85rem; color: var(--roxo-700); font-weight: 600; }
.opcao__input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.opcao__marca {
  width: 24px; height: 24px; flex: none; display: grid; place-items: center;
  border: 2px solid var(--borda-forte); border-radius: 7px; color: transparent; background: var(--branco);
  transition: background var(--rapido), border-color var(--rapido);
}
.opcao__marca--radio { border-radius: 50%; }
.opcao__input:checked + .opcao__marca { background: var(--roxo-800); border-color: var(--roxo-800); color: #fff; }
.opcao__input:focus-visible + .opcao__marca { outline: 3px solid #9b4fc0; outline-offset: 2px; }
.opcao--esgotada, .opcao--bloqueada { cursor: not-allowed; }
.opcao--esgotada .opcao__texto, .opcao--esgotada .opcao__marca { opacity: 0.45; }
.opcao--esgotada .opcao__preco { color: var(--texto-2); }
.opcao--bloqueada .opcao__texto, .opcao--bloqueada .opcao__marca { opacity: 0.4; }

.ficha__obs { padding: 16px; }
.campo__rotulo-linha { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.campo__contador { font-size: 0.8rem; color: var(--texto-2); }
.ficha__pendente { margin: 0 0 10px; font-size: 0.85rem; font-weight: 600; color: var(--vermelho); text-align: center; }
.ficha__pendente:empty { display: none; }
.ficha__acoes { display: flex; gap: 10px; }

/* Formulários */
.campo { margin-bottom: 12px; min-width: 0; }
.campo__rotulo { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.campo__rotulo-linha .campo__rotulo { margin: 0; }
.campo__input {
  width: 100%; min-height: 48px; padding: 12px 14px; font-size: 16px;
  border: 1.5px solid var(--borda-forte); border-radius: var(--raio-p); background: var(--branco);
  transition: border-color var(--rapido), box-shadow var(--rapido);
}
textarea.campo__input { resize: vertical; min-height: 72px; }
.campo__input:focus { outline: none; border-color: var(--roxo-700); box-shadow: 0 0 0 3px rgb(155 79 192 / 0.22); }
.campo__input[aria-invalid='true'] { border-color: var(--vermelho); }
.campo__erro { margin-top: 6px; font-size: 0.82rem; color: var(--vermelho); font-weight: 600; }
.campo__obrig { color: var(--vermelho); }
.campo__opc { color: var(--texto-2); font-weight: 400; font-size: 0.8rem; }
.campo__status { align-self: center; font-size: 0.82rem; color: var(--texto-2); margin-top: 14px; }
.campo-grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.campo-grade > .campo--curto { max-width: 140px; }
.campo-grade:has(.campo--curto) { grid-template-columns: 110px minmax(0, 1fr); }

/* Carrinho */
.carrinho .dlg__corpo { padding: 0 16px 16px; }
.itens { list-style: none; margin: 0; padding: 0; }
.item { padding: 14px 0 8px; border-bottom: 1px solid var(--borda); }
.item__topo { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.item__nome { font-size: 0.98rem; font-weight: 700; }
.item__subtotal { font-size: 0.98rem; white-space: nowrap; }
.item__detalhes { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.84rem; color: var(--texto-2); display: grid; gap: 2px; }
.item__detalhes span { color: var(--texto); font-weight: 600; }
.item__obs { font-style: italic; }
.item__unit { font-size: 0.8rem; color: var(--texto-2); margin-top: 4px; }
.item__acoes { display: flex; align-items: center; gap: 2px; margin-top: 4px; }
.carrinho__mais { margin-top: 8px; }

.valores { margin: 14px 0 0; padding: 14px 0 0; border-top: 1px solid var(--borda); display: grid; gap: 6px; }
.valores div { display: flex; justify-content: space-between; gap: 12px; font-size: 0.92rem; color: var(--texto-2); }
.valores dd { margin: 0; color: var(--texto); }
.valores__total { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--borda-forte); }
.valores .valores__total dt, .valores .valores__total dd { font-size: 1.1rem; font-weight: 800; color: var(--texto); }

/* Checkout */
.checkout__nota { padding: 12px 16px 0; font-size: 0.8rem; color: var(--texto-2); }
.bloco { border: 0; margin: 0; padding: 16px; border-bottom: 1px solid var(--borda); min-width: 0; }
.bloco__titulo { display: block; padding: 0; font-size: 1rem; font-weight: 800; margin-bottom: 12px; }
.bloco__dica { font-size: 0.82rem; color: var(--texto-2); margin: -6px 0 10px; }
.bloco--info { display: flex; gap: 12px; align-items: flex-start; margin: 16px; border: 0; border-radius: 14px; background: var(--roxo-50); font-size: 0.9rem; }
.bloco--info .ico { color: var(--roxo-800); }

.escolhas { display: grid; gap: 8px; }
.escolhas--lado { grid-template-columns: 1fr 1fr; }
.escolha { position: relative; display: block; cursor: pointer; }
.escolha input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.escolha__caixa {
  display: flex; align-items: center; gap: 10px; min-height: 56px; height: 100%; padding: 10px 12px;
  border: 1.5px solid var(--borda-forte); border-radius: 14px; background: var(--branco);
  transition: border-color var(--rapido), background var(--rapido);
}
.escolha__caixa .ico { color: var(--roxo-800); }
.escolha__caixa strong { display: block; font-size: 0.95rem; }
.escolha__caixa small { display: block; font-size: 0.78rem; color: var(--texto-2); }
.escolha input:checked + .escolha__caixa { border-color: var(--roxo-800); background: var(--roxo-50); box-shadow: inset 0 0 0 1px var(--roxo-800); }
.escolha input:focus-visible + .escolha__caixa { outline: 3px solid #9b4fc0; outline-offset: 2px; }
.escolha input[aria-invalid='true'] + .escolha__caixa { border-color: var(--vermelho); }
.escolha--linha .escolha__caixa::before {
  content: ''; width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 2px solid var(--borda-forte); background: var(--branco);
}
.escolha--linha input:checked + .escolha__caixa::before { border: 6px solid var(--roxo-800); }

.troco { margin-top: 12px; }
.caixa-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 0.95rem; }
.caixa-check input { width: 20px; height: 20px; accent-color: var(--roxo-800); }
.campo--troco { margin-top: 6px; max-width: 220px; }

.resumo-itens summary { cursor: pointer; color: var(--roxo-800); font-weight: 600; min-height: 40px; display: flex; align-items: center; font-size: 0.9rem; }
.resumo-itens ul { list-style: none; margin: 0 0 4px; padding: 0; }
.resumo-itens li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 0.875rem; color: var(--texto-2); }
.checkout .valores { margin-top: 6px; }
[data-bloqueios] { padding: 0 16px 16px; }
[data-bloqueios]:empty { display: none; }
.checkout__erro-geral { margin: 0 0 8px; text-align: center; color: var(--vermelho); font-weight: 600; font-size: 0.875rem; }
.checkout__erro-geral:empty { display: none; }
.checkout__total-rodape { margin-top: 8px; text-align: center; font-size: 0.85rem; color: var(--texto-2); }
.checkout__total-rodape strong { color: var(--texto); }

.confirmacao { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 32px 20px; text-align: center; outline: none; }
.confirmacao__icone { width: 76px; height: 76px; margin: 0 auto 4px; display: grid; place-items: center; border-radius: 50%; background: var(--verde-50); color: var(--verde); }
.confirmacao h3 { font-size: 1.25rem; font-weight: 800; }
.confirmacao p { color: var(--texto-2); margin-bottom: 8px; }

/* Busca */
.busca__cab { gap: 8px; padding-left: 12px; }
.busca__campo { position: relative; flex: 1; }
.busca__campo .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--texto-2); width: 20px; height: 20px; }
.busca__input {
  width: 100%; min-height: 46px; padding: 10px 12px 10px 40px; font-size: 16px;
  border: 1.5px solid var(--borda); border-radius: var(--raio-p); background: var(--fundo);
}
.busca__input:focus { outline: none; border-color: var(--roxo-700); background: var(--branco); }
.busca .dlg__corpo { padding: 12px; }
.busca__status { font-size: 0.875rem; color: var(--texto-2); margin: 4px 4px 12px; }

/* ---------------- Coluna lateral (desktop) ---------------- */

.lateral { display: none; }

/* ---------------- Tablet ---------------- */

@media (min-width: 640px) {
  .pagina { max-width: 860px; }
  .capa { height: 220px; }
  .loja { margin: -44px 20px 0; grid-template-columns: 88px 1fr; padding: 18px 20px 14px; }
  .loja__logo { width: 88px; height: 88px; margin-top: -48px; border-radius: 22px; }
  .loja__nome { font-size: 1.6rem; }
  .loja__infos { grid-template-columns: repeat(4, auto); justify-content: start; gap: 12px 24px; }
  .faixa-fechado { margin: 16px 20px 0; }
  .secao { padding: 26px 20px 4px; }
  .grade { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { grid-template-columns: minmax(0, 1fr) 104px; }
  .card__midia { width: 104px; }
  .grade--busca { grid-template-columns: 1fr; }
  .nav-cat { padding-left: 14px; }
}

/* Painéis viram modal centralizado */
@media (min-width: 720px) {
  .painel {
    width: min(580px, calc(100% - 48px)); height: auto; max-height: min(88vh, 860px);
    margin: auto; border-radius: 22px; box-shadow: var(--sombra-alta);
  }
  .painel--busca { margin-top: 8vh; max-height: 80vh; }
  .painel--busca[open] { min-height: 320px; }
  .dlg__cab { padding-top: 10px; }
  .dlg__fechar-flutuante { top: 12px; }
  .ficha__midia { aspect-ratio: 16 / 9; max-height: 300px; }
  .painel[open] > .dlg { animation-name: aparecer; }
}

/* ---------------- Desktop: carrinho lateral ---------------- */

@media (min-width: 1024px) {
  .pagina { max-width: 1180px; padding: 0 24px; }
  body.tem-barra .pagina { padding-bottom: 32px; }
  .barra-carrinho { display: none !important; }
  body.tem-barra > .aviso { bottom: 24px; }
  .cabecalho { padding-top: 16px; }
  .capa { height: 260px; border-radius: 24px; }
  .loja { margin: -56px 32px 0; }

  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; margin-top: 8px; }
  .nav-cat { margin-top: 16px; padding-left: 6px; }
  .secao { padding: 28px 4px 4px; scroll-margin-top: 72px; }
  .faixa-fechado { margin: 16px 0 0; }

  .lateral { display: block; position: sticky; top: 16px; margin-top: 24px; }
  .lateral__caixa {
    display: flex; max-height: calc(100vh - 32px); overflow: hidden;
    background: var(--branco); border: 1px solid var(--borda); border-radius: 20px; box-shadow: var(--sombra);
  }
  .lateral .dlg__cab { padding-top: 10px; }
  .lateral .dlg__rodape { box-shadow: none; padding-bottom: 14px; }
  .lateral .vazio { padding: 32px 12px; }
}

@media (min-width: 1240px) {
  .grade { gap: 14px; }
  .card { grid-template-columns: minmax(0, 1fr) 116px; }
  .card__midia { width: 116px; }
}

/* ---------------- Animações ---------------- */

@keyframes subir { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes aparecer { from { transform: scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tremer { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }

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