/* ============================================================
   bottom-nav.css — Barra de navegação fixa inferior (mobile)
   Presente nas páginas que NÃO são de detalhe. Só mobile (< 768px).
   Início · Buscar · Favoritos · Conta · Menu
   ============================================================ */

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--ecom-z-sticky);
  display: flex;
  align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
  background-color: var(--ecom-bg-surface);
  border-top: 1px solid var(--ecom-border-default);
  box-shadow: 0 -4px 12px -4px rgb(0 0 0 / 0.12);
}

.bottom-nav__item {
  position: relative;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ecom-space-1);
  min-height: 56px;
  padding: var(--ecom-space-2) var(--ecom-space-1);
  background-color: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ecom-text-secondary);
  font-family: var(--ecom-font-body);
  font-size: var(--ecom-text-xs);
  font-weight: var(--ecom-font-medium);
  line-height: var(--ecom-leading-tight);
  text-decoration: none;
  transition: color var(--ecom-duration-fast) var(--ecom-ease-default);
}

.bottom-nav__item svg {
  width: 1.5rem;
  height: 1.5rem;
}

.bottom-nav__item:hover {
  color: var(--ecom-text-primary);
}

.bottom-nav__item--active {
  color: var(--ecom-action-primary);
}

/* Contador de favoritos — reaproveita [data-role="wishlist-count"] */
.bottom-nav__badge {
  position: absolute;
  top: var(--ecom-space-1);
  inset-inline-start: 55%;
  min-width: 1.05rem;
  height: 1.05rem;
  padding: 0 0.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ecom-action-primary);
  color: var(--ecom-text-on-primary);
  border-radius: var(--ecom-radius-full);
  font-size: 0.625rem;
  font-weight: var(--ecom-font-bold);
  line-height: 1;
}

.bottom-nav__badge[hidden] {
  display: none;
}

/* Reserva espaço no fim da página para o conteúdo não ficar coberto */
@media (max-width: 767px) {
  body.has-bottom-nav {
    padding-bottom: 4.5rem;
  }
}

/* Some no desktop — barra é exclusiva do mobile */
@media (min-width: 768px) {
  .bottom-nav {
    display: none;
  }
}
