/* =====================================================================
   Design system escuro — inspirado no mockup enviado pelo usuário
   (fundo quase preto, cards com "vidro" translúcido, laranja quente
   como cor de ação, cantos bem arredondados, navegação inferior fixa).
   ===================================================================== */

:root {
  --bg: #120d0a;
  --bg-soft: #1a1310;
  --surface: #1e1611;
  --surface-2: #271c15;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #f6efe6;
  --text-dim: #b9a999;
  --text-faint: #8a7b6d;

  --accent: #ff9a2e;
  --accent-strong: #ff8100;
  --accent-soft: rgba(255, 154, 46, 0.16);

  --success: #34d17c;
  --success-bg: rgba(52, 209, 124, 0.14);
  --error: #ff5a5a;
  --error-bg: rgba(255, 90, 90, 0.14);
  --pending: #ffc247;
  --pending-bg: rgba(255, 194, 71, 0.14);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at top, #241a14 0%, var(--bg) 55%);
  color: var(--text);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------------
   Casco do "app" — conteúdo centralizado em largura de celular, com
   espaço reservado embaixo para a barra de navegação fixa.
   --------------------------------------------------------------------- */
.app-shell {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 96px;
}

/* ---------------------------------------------------------------------
   Topo
   --------------------------------------------------------------------- */
header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 8px;
}

header.topbar .greeting-block { flex: 1; min-width: 0; }
header.topbar .greeting {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0 0 2px;
}
header.topbar h1.page-title {
  font-size: 1.5rem;
  margin: 0;
  line-height: 1.2;
}
header.topbar h1.page-title .accent { color: var(--accent); }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.icon-btn.avatar {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}
.icon-btn img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.icon-btn svg { width: 100%; height: 100%; }
.icon-btn.avatar { padding: 0; overflow: hidden; }

.cart-icon-btn { position: relative; }
.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a0f00;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions .signout {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-align: center;
  display: block;
  margin-top: 4px;
}

main {
  padding: 8px 20px 24px;
}

main.plain { max-width: 460px; margin: 0 auto; padding: 24px 20px 40px; }

.app-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-faint);
  line-height: 1.6;
}
.app-footer a { color: var(--text-dim); text-decoration: underline; }

h1 { font-size: 1.35rem; margin: 4px 0 14px; }
h2 { font-size: 1.05rem; margin: 22px 0 10px; }
h2.section-title { display: flex; align-items: baseline; justify-content: space-between; }
h2.section-title a.view-all { font-size: 0.78rem; color: var(--accent); font-weight: 600; }

p { color: var(--text-dim); line-height: 1.5; }

/* ---------------------------------------------------------------------
   Busca
   --------------------------------------------------------------------- */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
}
.search-box .search-icon { color: var(--text-faint); }
.search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  flex: 1;
  padding: 0;
}
.search-box input::placeholder { color: var(--text-faint); }
.search-box input:focus { outline: none; }
.search-box .filter-icon {
  color: var(--text-faint);
  border-left: 1px solid var(--border-strong);
  padding-left: 12px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------
   Chips de categoria
   --------------------------------------------------------------------- */
.chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.chip .chip-icon { font-size: 1rem; line-height: 1; }
.chip.active { background: var(--accent); color: #1a0f00; border-color: var(--accent); }

/* ---------------------------------------------------------------------
   Banner de promoção
   --------------------------------------------------------------------- */
.promo-banner {
  background: linear-gradient(135deg, #3a2412 0%, #201309 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 6px 0 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 12px;
}
.promo-banner .promo-banner-text { flex: 1; min-width: 0; }
.promo-banner .promo-banner-img {
  width: 108px;
  height: 108px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--surface-2) center/cover no-repeat;
}
.promo-banner .badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.promo-banner h3 { margin: 0 0 4px; font-size: 1.2rem; line-height: 1.25; }
.promo-banner p { margin: 0 0 14px; font-size: 0.85rem; }
.promo-banner .btn { margin-top: 0; }
.promo-carousel { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.promo-carousel::-webkit-scrollbar { display: none; }
.promo-carousel .promo-banner { min-width: 100%; margin: 6px 0; scroll-snap-align: start; }
.promo-carousel { scroll-snap-type: x mandatory; }

/* ---------------------------------------------------------------------
   Cards de produto — grade "Populares" (estilo mockup) e lista do
   cardápio completo.
   --------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

.product-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: block;
  color: var(--text);
  position: relative;
}
.product-tile .thumb {
  width: 100%;
  aspect-ratio: 1.1;
  border-radius: var(--radius-sm);
  background: var(--surface-2) center/cover no-repeat;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 1.6rem;
}
.product-tile .name { font-weight: 700; font-size: 0.92rem; margin-bottom: 4px; display: block; }

/* Selos dietéticos/nutricionais (glúten, lactose, alto em sódio/açúcar
   etc.) — minimalista: só o ícone e o nome pequeno embaixo, sem fundo/
   pílula colorida, tanto no card curto quanto na lista completa e na
   tela do produto. */
.diet-icons { display: flex; flex-wrap: wrap; gap: 7px; margin: 4px 0; }
.diet-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  width: 38px;
  cursor: default;
}
.diet-icon-glyph { font-size: 0.9rem; line-height: 1; opacity: 0.9; }
.diet-icon-label {
  font-size: 0.52rem;
  line-height: 1.05;
  color: var(--text-faint);
  text-align: center;
}
.product-tile .row-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.product-tile .price { font-weight: 700; color: var(--text); }
.product-tile .add-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a0f00;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fav-btn.is-favorite { color: var(--error); }
.badge-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  background: var(--error);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  max-width: calc(100% - 44px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-tag.info { background: var(--accent); color: #1a0f00; }
.product-tile.is-out-of-stock .thumb, .product-list-item.is-out-of-stock .thumb { opacity: .45; }
.product-tile.is-out-of-stock .name { color: var(--text-faint); }

/* Lista do cardápio completo (agrupada por categoria) */
.product-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
}
.product-list-item .thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--surface-2) center/cover no-repeat;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
}
.product-list-item .info { flex: 1; min-width: 0; }
.product-list-item .info strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.product-list-item .info small { color: var(--text-faint); display: block; font-size: 0.78rem; margin-bottom: 6px; }
.product-list-item .qty-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* ---------------------------------------------------------------------
   Stepper de quantidade / toggle de adicional
   --------------------------------------------------------------------- */
.qty-controls button.step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}
.qty-controls button.step.primary { background: var(--accent); border-color: var(--accent); color: #1a0f00; }
.qty-controls span.qty-value { min-width: 20px; text-align: center; font-weight: 700; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .label { font-size: 0.92rem; }
.toggle-row .delta { color: var(--text-faint); font-size: 0.78rem; margin-left: 6px; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 999px; transition: 0.15s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 2px; top: 2px;
  background: var(--text-faint); border-radius: 50%; transition: 0.15s;
}
.switch input:checked + .slider { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(20px); background: #1a0f00; }

.size-options { display: flex; gap: 10px; margin: 10px 0 18px; }
.size-options label {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text-dim);
  font-size: 0.85rem; font-weight: 600; cursor: pointer; margin: 0;
}
.size-options input { display: none; }
.size-options input:checked + span { color: inherit; }
.size-options label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: #1a0f00; }

/* ---------------------------------------------------------------------
   Botões / formulários genéricos
   --------------------------------------------------------------------- */
label { display: block; margin: 14px 0 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 120px; }

button, .btn {
  display: inline-block;
  margin-top: 16px;
  padding: 13px 20px;
  background: var(--accent);
  color: #1a0f00;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
button.secondary, .btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
button.danger, .btn.danger { background: var(--error); color: #fff; }
button.block, .btn.block { display: block; width: 100%; }
button:hover, .btn:hover { opacity: .92; }
button:disabled { opacity: .45; cursor: not-allowed; }

.method-fields, .conditional { display: none; }
.method-fields.active, .conditional.active { display: block; }

/* ---------------------------------------------------------------------
   Minha conta (conta/perfil.php) — troca de unidade, senha, foto e
   montador de avatar em um acordeão: cada seção só mostra os campos
   depois de tocada, pra tela não abrir tudo de uma vez.
   --------------------------------------------------------------------- */
.profile-avatar-big {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px auto 14px;
  flex-shrink: 0;
}
.profile-avatar-big img, .profile-avatar-big svg { width: 100%; height: 100%; object-fit: cover; }

.account-accordion {
  margin-top: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}
.account-item + .account-item { border-top: 1px solid var(--border); }
.account-item-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin: 0;
  border: none;
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
}
.account-item-icon { font-size: 1.15rem; width: 24px; text-align: center; flex-shrink: 0; }
.account-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.account-item-text small { color: var(--text-faint); font-size: 0.76rem; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-item-chevron { color: var(--text-faint); font-size: 1.1rem; flex-shrink: 0; transition: transform .15s ease; }
.account-item-header[aria-expanded="true"] .account-item-chevron { transform: rotate(90deg); color: var(--accent); }
.account-item-body { display: none; padding: 2px 16px 20px; }
.account-item-body.open { display: block; }
.account-item-body form { margin: 0; }
.account-item-body p:first-child { margin-top: 4px; }

/* ---------------------------------------------------------------------
   Retirada no balcão (pedido.php) — código + QR gerados na criação do
   pedido; o admin lê/digita no painel (admin/retirada.php) pra
   confirmar automaticamente, sem precisar mudar status na mão.
   --------------------------------------------------------------------- */
.pickup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin: 14px 0;
  text-align: center;
}
.pickup-code {
  font-family: 'Courier New', monospace;
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin: 8px 0 14px;
}
.pickup-qr {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  display: inline-block;
  max-width: 200px;
  width: 100%;
}
.pickup-qr svg { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------------
   Cupom fiscal (pedido.php) — aviso curto + link pro recibo em
   cupom_fiscal.php, assim que a NFC-e é autorizada.
   --------------------------------------------------------------------- */
.fiscal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 14px 0;
}
.fiscal-badge { font-size: 0.85rem; color: var(--text-faint); }

.panel { border-radius: var(--radius-md); padding: 14px 16px; margin: 14px 0; border: 1px solid var(--border); }
.panel.success { background: var(--success-bg); color: var(--success); border-color: rgba(52,209,124,0.3); }
.panel.error { background: var(--error-bg); color: var(--error); border-color: rgba(255,90,90,0.3); }
.panel.pending { background: var(--pending-bg); color: var(--pending); border-color: rgba(255,194,71,0.3); }

table { width: 100%; border-collapse: collapse; margin: 12px 0; }
td, th { text-align: left; padding: 8px 4px; border-bottom: 1px solid var(--border); font-size: 0.88rem; }

.badge {
  display: inline-block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 9px;
  border-radius: 999px;
  font-weight: 700;
}
.badge.mock { background: var(--pending-bg); color: var(--pending); }
.badge.sandbox { background: rgba(120,150,255,0.16); color: #9db2ff; }
.badge.production { background: var(--error-bg); color: var(--error); }

.price { font-weight: 700; color: var(--text); }

/* ---------------------------------------------------------------------
   Painel admin — linha de lista genérica (produtos/categorias/pedidos).
   Mantido separado de .product-list-item (site do cliente) porque o
   admin usa uma estrutura de filhos diferente (img direta, não .thumb).
   --------------------------------------------------------------------- */
.product-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.product-card img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); flex-shrink: 0; }
.product-card .info { flex: 1; min-width: 200px; }
.product-card > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.product-card > div:last-child .btn { margin: 0; }

/* ---------------------------------------------------------------------
   Tela de entrada (splash) — logo + boas-vindas + Entrar/Cadastrar.
   Mesma "moldura de celular" do resto do site, então funciona igual no
   computador (card centralizado) e no celular (tela cheia).
   --------------------------------------------------------------------- */
.landing-hero {
  text-align: center;
  padding: 56px 4px 12px;
}
.landing-hero .logo-badge {
  width: 168px;
  height: 168px;
  margin: 0 auto 26px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.landing-hero .logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.landing-hero h1 { font-size: 1.55rem; margin: 0 0 8px; }
.landing-hero h1 .accent { color: var(--accent); }
.landing-hero p.subtitle { margin: 0 0 6px; font-size: 0.95rem; }

.landing-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 34px; }
.landing-actions .btn { margin: 0; padding: 16px 20px; font-size: 1rem; }
.landing-actions .btn.secondary { background: transparent; border: 1px solid var(--border-strong); }

.landing-footnote {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 22px;
}

/* ---------------------------------------------------------------------
   Lista de lojas (index.php)
   --------------------------------------------------------------------- */
.store-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
}
.store-card:hover { border-color: var(--accent); }
.store-card small { color: var(--text-faint); }

/* ---------------------------------------------------------------------
   Carrinho fixo / resumo
   --------------------------------------------------------------------- */
.cart-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 84px;
  width: calc(100% - 40px);
  max-width: 420px;
  background: var(--accent);
  color: #1a0f00;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  z-index: 20;
}
.cart-bar a.btn { margin: 0; background: #1a0f00; color: var(--accent); padding: 9px 16px; }

.qr-img { max-width: 220px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; background: #fff; }
.copy-box { word-break: break-all; background: var(--surface-2); border: 1px dashed var(--border-strong); padding: 10px; border-radius: var(--radius-sm); font-size: 0.8rem; color: var(--text-dim); }

footer.site-footer { text-align: center; color: var(--text-faint); font-size: 0.78rem; margin: 24px 0 8px; }

pre {
  background: #0d0906;
  color: #d8c9b8;
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

/* ---------------------------------------------------------------------
   Barra de navegação inferior (Home / Ofertas / Pedidos / Favoritos)
   --------------------------------------------------------------------- */
nav.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 460px;
  background: rgba(24, 17, 13, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
}
nav.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-faint);
  font-size: 0.68rem;
  font-weight: 600;
  flex: 1;
  text-decoration: none;
}
nav.bottom-nav a .nav-icon { font-size: 1.15rem; line-height: 1; }
nav.bottom-nav a.active { color: var(--accent); }

/* ---------------------------------------------------------------------
   Página de produto
   --------------------------------------------------------------------- */
.product-hero {
  margin: -8px -20px 0;
  aspect-ratio: 1.05;
  background: var(--surface) center/cover no-repeat;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px;
  position: relative;
}
.product-hero .icon-btn { background: rgba(0,0,0,0.4); border-color: transparent; }
.product-detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: -28px;
  position: relative;
  padding: 20px;
}
.product-detail-card .rating { color: var(--accent); font-size: 0.85rem; font-weight: 700; }
.product-detail-card h1 { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.product-detail-card h1 .price { color: var(--accent); white-space: nowrap; }

.sticky-add-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 84px;
  width: calc(100% - 40px);
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 20;
}
.sticky-add-bar .btn { margin: 0; flex: 1; }

/* ---------------------------------------------------------------------
   Responsivo — em telas largas, mantém a "moldura de celular" só que
   maior, sem esticar os cards horizontalmente até o infinito.
   --------------------------------------------------------------------- */
@media (min-width: 480px) {
  .app-shell { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* =====================================================================
   Painel admin — mesmo sistema visual escuro do site do cliente (só
   muda a largura do "casco", já que é usado em telas maiores/desktop
   além do celular). Todo componente genérico (.btn, .panel, .product-
   card, input/select/textarea, table, .badge, .chip) já vem pronto do
   tema acima — o bloco abaixo só ajusta o que é específico do admin.
   ===================================================================== */
/* O admin só deve parecer "app de celular" (casco estreito, moldura
   com borda lateral, cards empilhados) quando REALMENTE está sendo
   acessado de um celular — a partir daqui, ADMIN_MOBILE_BP (700px) é
   esse limite. Acima disso (navegador normal, desktop/notebook/tablet),
   o admin usa formato de painel comum: largura cheia, sem moldura. */
.admin-shell {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding-bottom: 40px;
  border-left: none;
  border-right: none;
}
.admin-topbar {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  row-gap: 10px;
}
.admin-brand {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-brand .accent { color: var(--accent); }
.admin-user-tag {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  text-align: right;
  margin-right: 4px;
}
.admin-user-tag small { color: var(--text-faint); font-size: 0.7rem; }
.admin-store-nav { padding: 12px 24px 6px; margin: 0; }
.admin-shell main {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 16px 24px 40px;
}
.admin-shell h1 { font-size: 1.3rem; }

/* ---- Só abaixo daqui é que entra o formato "celular" ---- */
@media (max-width: 700px) {
  .admin-shell { padding-bottom: 24px; }
  .admin-topbar { padding: 14px 16px; }
  .admin-store-nav { padding: 10px 16px 4px; }
  .admin-shell main { padding: 8px 16px 32px; }

  /* Lista de lojas/produtos/gerentes no admin costuma ter várias ações
     (Editar/Apagar/Config...) — em tela de celular, empilha em vez de
     estourar a largura do card. */
  .admin-shell .product-card { flex-wrap: wrap; }
  .admin-shell .product-card > div:last-child { flex-wrap: wrap; width: 100%; }
  .admin-shell .product-card > div:last-child .btn { flex: 1; min-width: 90px; text-align: center; }
}

/* ---------------------------------------------------------------------
   Jogo do Café do João — a área do canvas fica com moldura própria e
   canto bem arredondado (o desenho do jogo já é colorido sozinho, aqui
   só encaixa ele no "app shell" escuro do resto do site).
   --------------------------------------------------------------------- */
.game-shell { padding-bottom: 8px; }
.game-canvas-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-strong);
  line-height: 0;
}
.game-canvas-wrap canvas {
  display: block;
  width: 100%;
  touch-action: manipulation;
  cursor: pointer;
}
