:root {
  --bg: #0e0e11;
  --surface: #1a1a20;
  --surface-2: #202027;
  --border: #2a2a33;
  --primary: #FF8C00;
  --primary-hover: #ff9e2e;
  --primary-soft: rgba(255, 140, 0, .14);
  --on-primary: #1a1200;
  --text: #ececf1;
  --text-2: #b6b6c0;
  --text-3: #7d7d8a;
  --success: #57c98a;
  --error: #ff6b6b;
  --radius: 14px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .5);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  font-family: Roboto, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(1000px 520px at 88% -12%, rgba(255, 140, 0, .07), transparent 62%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--primary); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }

main.wrap { flex: 1 0 auto; width: 100%; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 60;
  background: var(--primary); color: var(--on-primary);
  padding: 8px 14px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { left: 12px; }

.loja-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 14, 17, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.loja-head__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 12px; padding-bottom: 12px;
}
.loja-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.loja-brand__mark {
  width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center;
  border-radius: 12px; background: var(--primary); color: var(--on-primary);
}
.loja-brand__name {
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.loja-brand__sub { font-size: .78rem; color: var(--text-3); white-space: nowrap; }

.btn-cart {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .88rem; font-weight: 500;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.btn-cart:hover { border-color: var(--primary); background: var(--surface); }
.badge-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  font-size: .72rem; font-weight: 700; display: grid; place-items: center;
}

.loja-aviso {
  margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius);
  background: var(--primary-soft); border: 1px solid rgba(255, 140, 0, .28);
  font-size: .86rem; color: var(--text-2);
}

.filtros { display: grid; gap: 12px; margin: 22px 0 6px; }

.busca {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-3);
}
.busca:focus-within { border-color: var(--primary); }
.busca input {
  flex: 1; border: 0; outline: 0; background: transparent;
  color: var(--text); font-size: .92rem;
}
.busca input::placeholder { color: var(--text-3); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chips::-webkit-scrollbar { height: 0; }
.chip {
  flex: 0 0 auto; height: 34px; padding: 0 15px; border-radius: 999px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); font-size: .82rem; white-space: nowrap;
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--border-strong, #3a3a46); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--primary); border-color: var(--primary);
  color: var(--on-primary); font-weight: 600;
}

.grid {
  display: grid; gap: 16px; margin: 16px 0 40px;
  grid-template-columns: repeat(auto-fill, minmax(216px, 1fr));
}

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: #34343f; }

.card__img {
  position: relative; aspect-ratio: 4 / 3; background: var(--surface-2);
  overflow: hidden;
}
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__img--sem {
  display: grid; place-items: center; height: 100%; color: var(--text-3);
  font-size: .78rem; text-align: center; padding: 12px;
}
.card__tag {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(14, 14, 17, .82); color: var(--text-2);
  font-size: .7rem; font-weight: 500; backdrop-filter: blur(4px);
}
.card__esgotado {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(14, 14, 17, .62); color: var(--text);
  font-size: .82rem; font-weight: 600; letter-spacing: .3px;
  text-transform: uppercase;
}

.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.card__title { font-size: .95rem; font-weight: 600; line-height: 1.35; }
.card__desc {
  font-size: .8rem; color: var(--text-3); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: auto; padding-top: 10px;
}
.card__price { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.card__price--consulta { font-size: .86rem; font-weight: 500; color: var(--text-2); }

.btn-add {
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--primary); border: 0; color: var(--on-primary);
  font-size: .82rem; font-weight: 600;
  transition: background .16s var(--ease), opacity .16s var(--ease);
}
.btn-add:hover:not(:disabled) { background: var(--primary-hover); }
.btn-add:disabled { background: var(--surface-2); color: var(--text-3); cursor: not-allowed; }

.status { margin: 22px 0; color: var(--text-3); font-size: .88rem; }
.status:empty { display: none; }

.vazio { text-align: center; padding: 56px 18px 70px; color: var(--text-3); }
.vazio__icon {
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 22px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-3);
}
.vazio h2 { font-size: 1.05rem; color: var(--text); margin-bottom: 6px; }
.vazio p { font-size: .86rem; }
.vazio .btn-sec { margin-top: 16px; display: inline-block; padding: 0 18px; }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, .58); backdrop-filter: blur(2px);
  animation: fade .16s var(--ease);
}

.drawer {
  position: fixed; z-index: 50; right: 0; top: 0; bottom: 0;
  width: min(400px, 100%); display: flex; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: slide .2s var(--ease);
}
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.drawer__head h2 { font-size: 1rem; font-weight: 600; }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 18px; }
.drawer__foot {
  padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  display: grid; gap: 10px;
}

.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; background: transparent; border: 1px solid transparent;
  color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.linha {
  display: grid; grid-template-columns: 54px 1fr auto; gap: 12px;
  align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.linha:last-child { border-bottom: 0; }
.linha__thumb {
  width: 54px; height: 54px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center;
  color: var(--text-3); font-size: .6rem; text-align: center;
}
.linha__thumb img { width: 100%; height: 100%; object-fit: cover; }
.linha__nome { font-size: .87rem; font-weight: 500; }
.linha__valor { font-size: .78rem; color: var(--text-3); }
.linha__dir { display: grid; gap: 6px; justify-items: end; }

.qtd { display: inline-flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 9px; }
.qtd button {
  width: 28px; height: 28px; border: 0; background: transparent;
  color: var(--text-2); font-size: 1rem; line-height: 1; border-radius: 8px;
}
.qtd button:hover:not(:disabled) { background: var(--surface); color: var(--text); }
.qtd button:disabled { opacity: .35; cursor: not-allowed; }
.qtd span { min-width: 22px; text-align: center; font-size: .82rem; font-variant-numeric: tabular-nums; }

.remover {
  border: 0; background: transparent; color: var(--text-3);
  font-size: .72rem; text-decoration: underline;
}
.remover:hover { color: var(--error); }

.totais { display: grid; gap: 4px; font-size: .88rem; color: var(--text-2); }
.totais__row { display: flex; justify-content: space-between; }
.totais__row--total {
  font-size: 1.02rem; font-weight: 700; color: var(--text);
  padding-top: 6px; border-top: 1px dashed var(--border);
}

.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; border-radius: 12px; border: 0;
  background: #25D366; color: #06301a;
  font-size: .92rem; font-weight: 700; text-decoration: none;
}
.btn-wa:hover { filter: brightness(1.06); }
.btn-wa[disabled], .btn-wa[aria-disabled="true"] {
  background: var(--surface-2); color: var(--text-3);
  cursor: not-allowed; filter: none; pointer-events: none;
}

.btn-sec {
  height: 42px; border-radius: 10px; background: transparent;
  border: 1px solid var(--border); color: var(--text-2);
  font-size: .84rem; font-weight: 500;
}
.btn-sec:hover { border-color: var(--primary); color: var(--text); }

.nota { font-size: .74rem; color: var(--text-3); text-align: center; }

.loja-foot {
  border-top: 1px solid var(--border);
  padding: 22px 0 34px; margin-top: 20px;
  font-size: .78rem; color: var(--text-3); text-align: center;
}

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 60; max-width: min(440px, calc(100% - 32px));
  padding: 11px 16px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-size: .84rem;
  animation: fade .16s var(--ease);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(18px); opacity: .6; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}

@media (max-width: 620px) {
  .drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%;
    max-height: 88vh; border-left: 0; border-top: 1px solid var(--border);
    border-radius: 18px 18px 0 0;
    animation: up .2s var(--ease);
  }
  @keyframes up { from { transform: translateY(24px); opacity: .7; } to { transform: none; opacity: 1; } }
  .grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .card__body { padding: 12px; }
  .card__desc { display: none; }
  .btn-cart span:not(.badge-count) { display: none; }
  .btn-cart { padding: 0 13px; }
}

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.loja-head__acoes { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.btn-admin {
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-2); font-size: .84rem; font-weight: 500;
  text-decoration: none;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.btn-admin:hover { border-color: var(--primary); color: var(--primary); }

.precos { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.precos__de {
  font-size: .76rem; color: var(--text-3); text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.precos__por {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.precos--promo .precos__por { color: var(--primary); }

.card__foot { align-items: flex-end; }

.card__tag--promo {
  background: var(--primary); color: var(--on-primary);
  font-weight: 700; letter-spacing: .02em;
}

.card__sem-texto {
  display: grid; justify-items: center; gap: 6px; line-height: 1.4;
}

.linha__info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

.linha__valor s { color: var(--text-3); margin-left: 4px; font-size: .72rem; }

.linha__sub { font-size: .88rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.totais__row--desconto { color: var(--success); }

.carrinho-vazio {
  display: grid; justify-items: center; gap: 8px;
  text-align: center; padding: 44px 14px; color: var(--text-3); font-size: .88rem;
}
.carrinho-vazio strong { color: var(--text); font-size: .96rem; }
.carrinho-vazio p { max-width: 260px; }
.carrinho-vazio__icon {
  width: 68px; height: 68px; margin-bottom: 4px; border-radius: 20px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-3);
}

@media (max-width: 620px) {
  .btn-admin { padding: 0 11px; }
  .btn-admin span { display: none; }
  .card__foot { align-items: center; }
  .precos__por { font-size: .98rem; }
  .btn-add { padding: 0 12px; }
}

@media (max-width: 380px) {
  .loja-brand__sub { display: none; }
}
