/* Delivery público */
body.delivery { background: #F7F6FC; }
.dl-topo-acoes { display: flex; gap: 8px; align-items: center; }
.dl-cab { background: linear-gradient(140deg, var(--navy) 0%, #2B2466 100%); color: #D8D4F7; padding: 34px 0 30px; }
.dl-cab h1 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 6px; }
.dl-cab p { margin: 0; color: #C9C5F0; }
.dl-busca { display: flex; gap: 10px; margin-top: 18px; max-width: 640px; }
.dl-busca input { border: 0; padding: 14px 16px; font-size: 1rem; box-shadow: var(--shadow); }
.dl-loja-cab { display: flex; gap: 18px; align-items: center; }
.dl-loja-ico { width: 74px; height: 74px; border-radius: 20px; display: grid; place-items: center; font-size: 2.3rem; background: rgba(255, 255, 255, .12); flex: none; }
.dl-info { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dl-info span { background: rgba(255, 255, 255, .1); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 600; }
.dl-info .fechada { background: #B91C1C; }
.dl-info .aberta { background: #16A34A; }

.dl-corpo { padding-top: 24px; padding-bottom: 70px; }
.dl-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.dl-chips button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 15px; font: 600 .9rem Inter, system-ui, sans-serif; color: var(--text); cursor: pointer; white-space: nowrap; }
.dl-chips button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.dl-lojas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 26px; }
.dl-loja { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-decoration: none !important; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.dl-loja:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dl-loja .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; color: #fff; flex: none; }
.dl-loja b { display: block; }
.dl-loja small { color: var(--muted); }
.dl-secao { font-size: 1.15rem; margin: 18px 0 12px; }

.dl-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.dl-prod { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column;
  font: inherit; color: inherit; transition: transform .15s, box-shadow .15s; }
.dl-prod:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(20, 18, 42, .1); }
.dl-prod .foto { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 3.2rem; background: linear-gradient(135deg, #F1EEFF, #E7F6F6); overflow: hidden; }
.dl-prod .foto img { width: 100%; height: 100%; object-fit: cover; }
.dl-prod .txt { padding: 12px 14px 14px; display: grid; gap: 4px; flex: 1; }
.dl-prod b { color: var(--ink); line-height: 1.3; }
.dl-prod .loja { font-size: .82rem; color: var(--muted); }
.dl-prod .preco { font-weight: 800; color: var(--primary); font-size: 1.05rem; margin-top: auto; }
.dl-prod.esgotado { opacity: .55; }
.dl-prod .tag { position: absolute; }

/* detalhe do produto */
.dl-det { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dl-det .foto { border-radius: 16px; aspect-ratio: 1; display: grid; place-items: center; font-size: 6rem; background: linear-gradient(135deg, #F1EEFF, #E7F6F6); overflow: hidden; }
.dl-det .foto img { width: 100%; height: 100%; object-fit: cover; }
.dl-det h2 { margin: 0 0 6px; font-size: 1.4rem; }
.dl-det .preco { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 8px 0 14px; }
.dl-loja-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; margin-bottom: 14px; background: #FAFAFE; }
.dl-loja-card .nome { display: flex; gap: 10px; align-items: center; }
.dl-loja-card .nome span.ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 1.1rem; }
.qtd { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.qtd button { width: 40px; height: 42px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--primary); font-weight: 800; }
.qtd span { min-width: 36px; text-align: center; font-weight: 800; }

/* carrinho */
.dl-carrinho { position: fixed; inset: 0 0 0 auto; width: min(420px, 100%); background: #fff; z-index: 190; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .2s; }
.dl-carrinho.aberto { transform: none; }
.dl-carrinho-topo { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dl-carrinho-itens { flex: 1; overflow-y: auto; padding: 14px 20px; display: grid; gap: 12px; align-content: start; }
.dl-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; border-bottom: 1px solid #F0EEF8; padding-bottom: 12px; }
.dl-item small { color: var(--muted); grid-column: 1 / -1; }
.dl-carrinho-pe { border-top: 1px solid var(--line); padding: 16px 20px; display: grid; gap: 8px; }
.dl-carrinho-pe .linha, .resumo-ped .linha { display: flex; justify-content: space-between; }
.dl-carrinho-pe .total, .resumo-ped .total { font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.dl-sombra { position: fixed; inset: 0; background: rgba(20, 18, 42, .4); z-index: 180; display: none; }
.dl-sombra.on { display: block; }
.opcoes-pag { display: grid; gap: 8px; }
.opcoes-pag label { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 600; }
.opcoes-pag label:has(input:checked) { border-color: var(--primary); background: rgba(91, 63, 214, .05); }
.opcoes-pag input { width: 18px; height: 18px; accent-color: var(--primary); }

body.delivery .toasts { top: 78px; bottom: auto; }   /* não cobre o botão do carrinho */

/* acompanhamento */
.etapas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 18px 0; }
.etapas div { text-align: center; font-size: .78rem; font-weight: 700; color: var(--muted); }
.etapas div::before { content: ""; display: block; height: 6px; border-radius: 6px; background: var(--line); margin-bottom: 8px; }
.etapas div.feito { color: var(--ink); }
.etapas div.feito::before { background: var(--ok); }
.cartao-ped { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }

@media (max-width: 700px) {
  .dl-det { grid-template-columns: 1fr; }
  .dl-det .foto { aspect-ratio: 16 / 9; font-size: 4rem; }
  .dl-grade { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dl-prod .foto { font-size: 2.4rem; }
  .esconde-celular { display: none; }
  .etapas div { font-size: .68rem; }
}
