:root{--cor:#1f2937;--fg:#fff;--bg:#0e0e10}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font:16px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}
:root{--h:56px;--topo:calc(var(--h) + env(safe-area-inset-top))}
.barra{position:fixed;inset:0 0 auto 0;z-index:10;max-width:460px;margin:0 auto;background:#0e0e10;border-bottom:3px solid var(--cor)}
.topo{display:flex;align-items:center;gap:8px;height:var(--topo);padding:env(safe-area-inset-top) 10px 0 14px}
.nome-loja{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1.05rem}
.filtro-btn{display:flex;align-items:center;gap:4px;font:inherit;font-size:.9rem;font-weight:600;height:40px;padding:0 12px;border-radius:999px;border:1px solid #fff5;background:#ffffff14;color:#fff;cursor:pointer}
.filtro-btn[aria-expanded=true] svg{transform:rotate(180deg)}
.filtro{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:6px;padding:12px 14px 14px;background:#0e0e10;border-bottom:1px solid #ffffff26;box-shadow:0 12px 24px #0009}
.filtro[hidden]{display:none}
.linha{display:flex;flex-wrap:wrap;gap:6px}
.chip{flex:none;font:inherit;font-size:.85rem;min-height:40px;min-width:42px;padding:0 12px;border-radius:999px;border:1px solid #fff5;background:#ffffff14;color:#fff;cursor:pointer}
.chip.on{background:var(--cor);color:var(--cor-fg,#fff);border-color:#fff}
.feed{position:relative;margin-top:var(--topo);height:calc(100dvh - var(--topo));overflow-y:auto;scroll-snap-type:y mandatory;max-width:460px;margin:0 auto;overscroll-behavior:contain}
.peca{position:relative;height:100%;scroll-snap-align:start;scroll-snap-stop:always;background:#000}
.peca[hidden]{display:none}
.fotos{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.fotos::-webkit-scrollbar{display:none}
.fotos img,.semfoto{flex:none;width:100%;height:100%;object-fit:cover;scroll-snap-align:center}
.semfoto{display:grid;place-items:center;color:#888}
.contador{position:absolute;top:12px;right:14px;background:#0008;border-radius:999px;padding:2px 10px;font-size:.8rem}
.selo{position:absolute;top:12px;left:14px;background:var(--cor);color:var(--cor-fg,#fff);border:1px solid #fff8;border-radius:999px;padding:2px 10px;font-size:.8rem;font-weight:600}
.info{position:absolute;inset:auto 0 0 0;padding:56px 16px calc(18px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#000e 30%);pointer-events:none}
.info h2{margin:2px 0;font-size:1.35rem;line-height:1.2}
.marca{margin:0;font-size:.8rem;opacity:.8;text-transform:uppercase;letter-spacing:.04em}
.preco{margin:2px 0 10px;font-size:1.25rem;font-weight:700}
.tams{display:flex;flex-wrap:wrap;gap:6px;pointer-events:auto}
.tam{font:inherit;font-weight:600;min-width:44px;height:44px;padding:0 10px;border:1px solid #fffa;border-radius:10px;background:#0008;color:#fff;cursor:pointer}
.tam[aria-pressed=true]{background:#fff;color:#000;border-color:#fff}
.tam.esgot{opacity:.45;text-decoration:line-through;cursor:not-allowed}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.aviso{min-height:1.3em;margin:6px 0 0;font-size:.85rem;color:#ffd7a8}
.acoes{display:flex;gap:8px;pointer-events:auto}
.acoes>button{flex:1}
.btn-add,.btn-so{font:inherit;font-weight:700;min-height:48px;padding:0 14px;border-radius:12px;cursor:pointer;border:1px solid #fff}
.btn-add{background:var(--cor);color:var(--cor-fg,#fff)}
.btn-so{background:#fff;color:#111}
.btn-add:disabled{opacity:.5;cursor:not-allowed}
.topo{display:flex;align-items:center;justify-content:space-between}
.sacola-btn{position:relative;width:44px;height:44px;flex:none;display:grid;place-items:center;border-radius:999px;border:1px solid #fff5;background:#ffffff14;color:#fff;cursor:pointer}
.badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#fff;color:#111;font-size:.75rem;font-weight:700;display:grid;place-items:center}
.badge[hidden]{display:none}
.toast{position:fixed;left:50%;bottom:calc(110px + env(safe-area-inset-bottom));transform:translate(-50%,8px);z-index:40;background:#fff;color:#111;font-weight:700;padding:10px 18px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s}
.toast.on{opacity:1;transform:translate(-50%,0)}
.folha{position:fixed;inset:0;z-index:30;display:flex;align-items:flex-end;justify-content:center}
.folha[hidden]{display:none}
.folha-fundo{position:absolute;inset:0;background:#000a}
.folha-corpo{position:relative;width:100%;max-width:460px;max-height:90dvh;overflow-y:auto;background:#17171a;border-radius:18px 18px 0 0;padding:16px 16px calc(20px + env(safe-area-inset-bottom))}
.folha-topo{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
.folha-topo h2{margin:0;font-size:1.2rem}
.x{width:44px;height:44px;border:0;background:none;color:#fff;font-size:1.2rem;cursor:pointer}
.itens{list-style:none;margin:0;padding:0}
.item{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid #ffffff1f}
.item img{width:56px;height:56px;object-fit:cover;border-radius:8px;flex:none}
.item-corpo{flex:1;min-width:0}
.item-nome{margin:0;font-weight:600}
.item-sub{margin:2px 0 0;font-size:.85rem;opacity:.75}
.item-aviso{margin:4px 0 0;font-size:.85rem;color:#ffb4a8}
.item-esgot .item-nome{opacity:.6}
.qtd{display:flex;align-items:center;gap:10px;margin-top:6px}
.qb{width:40px;height:40px;border-radius:10px;border:1px solid #fff5;background:none;color:#fff;font-size:1.2rem;cursor:pointer}
.qb:disabled{opacity:.35;cursor:not-allowed}
.qn{min-width:1.5ch;text-align:center;font-weight:700}
.rm,.limpar{font:inherit;background:none;border:0;color:#ffb4a8;text-decoration:underline;cursor:pointer;min-height:40px;padding:0 6px}
.rm{margin-left:auto}
.limpar{display:block;margin:6px auto 0;color:#ffffffb3}
.total{display:flex;justify-content:space-between;font-size:1.15rem;margin:14px 0}
.campo{display:block;font-size:.9rem;margin-bottom:12px}
.campo input{display:block;width:100%;margin-top:4px;min-height:48px;padding:0 12px;border-radius:10px;border:1px solid #fff5;background:#0e0e10;color:#fff;font:inherit;font-size:1rem}
.entrega{border:0;padding:0;margin:0 0 12px;display:flex;flex-direction:column;gap:4px}
.entrega legend{font-size:.9rem;margin-bottom:4px;padding:0}
.entrega label{display:flex;align-items:center;gap:10px;min-height:44px}
.entrega input{width:20px;height:20px;accent-color:#fff}
.erro{min-height:1.3em;margin:0 0 8px;color:#ffb4a8;font-size:.9rem}
#sacola-cheia .btn-add,#unico .btn-add{width:100%}
.unico-resumo{margin:0 0 14px;opacity:.85}
#sacola-vazia{text-align:center;padding:24px 0}
:focus-visible{outline:3px solid #fff;outline-offset:2px}
.vazia{height:100%;display:grid;place-content:center;text-align:center;padding:24px}
@media (min-width:700px){body{background:#17171a}.feed{box-shadow:0 0 0 1px #ffffff14}}
@media (prefers-reduced-motion:reduce){.feed,.fotos{scroll-behavior:auto}.toast{transition:none}}
.logo-loja{width:36px;height:36px;border-radius:10px;object-fit:contain;background:#ffffff14;flex:none}
