/* ============================================================
   VITORGURTE — Experiência mobile "app-like"
   Bottom nav fixa + drawer de categorias, no padrão do mobile da
   Mais Rações, recolorido para o design Vitorgurte (azul Nestlé).
   Carregado depois de styles.css/shop.css no (vg)/layout.tsx.
   ============================================================ */

/* ---------- Bottom navigation (só no mobile/tablet) ---------- */
.bottom-nav { display: none; }

@media (max-width: 920px) {
  /* abre espaço para a barra não cobrir o conteúdo / rodapé */
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

  .bottom-nav {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 20px rgba(0, 87, 184, .08);
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    animation: bn-slide-up .3s ease;
  }
}

@keyframes bn-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.bn-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 56px;
  max-width: 520px;
  margin: 0 auto;
}

.bn-item {
  position: relative;
  flex: 1;
  min-width: 56px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: 0;
  color: var(--muted-2);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color .15s;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item span {
  font-family: var(--ff-display);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
}
.bn-item.active { color: var(--blue); }
.bn-item.active svg { stroke-width: 2.4; }
.bn-item.active span { font-weight: 700; }

/* traço superior do item ativo */
.bn-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--blue);
}

/* ícone do item com badge (carrinho) */
.bn-ic { position: relative; display: grid; place-items: center; }
.bn-badge {
  position: absolute;
  top: -7px; right: -10px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1a1500;
  font-family: var(--ff-display);
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(255, 209, 0, .55);
}

/* ---------- Drawer de categorias (reusa .drawer/.scrim do styles.css) ---------- */
.cat-drawer-list { display: flex; flex-direction: column; }

.cat-drawer-all {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 14.5px;
  color: var(--blue-700);
}
.cat-drawer-all svg { width: 20px; height: 20px; color: var(--blue); }

.cat-drawer-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 4px;
  border-top: 1px solid var(--line-2);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  transition: color .15s;
}
.cat-drawer-row:hover { color: var(--blue); }
.cat-drawer-thumb {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.cat-drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-drawer-row .chev { margin-left: auto; color: var(--muted-2); }
.cat-drawer-row .chev svg { width: 16px; height: 16px; }

.cat-drawer-links {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-drawer-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
}
.cat-drawer-links a:hover { color: var(--blue); }
.cat-drawer-links a svg { width: 18px; height: 18px; }
.cat-drawer-links a.wa { color: var(--green); }

/* ---------- Grid de produtos: 2 colunas no celular (padrão Mais Rações) ----------
   O shop.css cai para 1 coluna abaixo de 460px; aqui mantemos 2 colunas
   (com um card mais compacto) para a loja parecer um app de compras no mobile. */
@media (max-width: 460px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pcard-body { padding: 11px 12px 13px; }
  .pcard-name { font-size: 13.5px; }
  .pcard-price .now { font-size: 18px; }
  .pcard-price .now small { font-size: 11px; }
  .pcard-add { width: 38px; height: 38px; border-radius: 10px; }
  .pcard-add svg { width: 18px; height: 18px; }
  .pcard-fav { width: 30px; height: 30px; }
  .pcard-foot { gap: 8px; margin-top: 10px; }
}

/* ---------- iOS: evita o zoom automático ao focar campos ----------
   No Safari mobile, todo input/select/textarea com fonte < 16px dispara um
   zoom ao receber foco (e muitas vezes não volta, "quebrando" o layout).
   Forçar 16px no mobile elimina esse zoom em todos os campos (busca, filtros,
   cupom, checkout, login, newsletter). */
@media (max-width: 920px) {
  input, select, textarea { font-size: 16px !important; }
}

