/* ================================
   ML Bottom Bar – Layout base
   ================================ */

/* Paleta padrão (caso não venha nada do JS) */
:root {
  --mlbb-bg: #153e62;          /* fundo barra */
  --mlbb-bg-dark: #0f2d48;     /* toque/active */
  --mlbb-text: #ffffff;        /* texto/ícones */
  --mlbb-muted: rgba(255,255,255,.7);
  --mlbb-badge: #ED7C34;       /* badge carrinho */
}

/* Barra fixa no rodapé (mobile) */
#ml-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100000;

  display: grid; /* o JS pode sobrescrever para grid também */
  grid-template-columns: repeat(4, 1fr);

  background: var(--mlbb-bg);
  color: var(--mlbb-text);
  border-top: 1px solid rgba(255,255,255,.08);

  /* suporte a iPhones com notch */
  padding-bottom: max(8px, env(safe-area-inset-bottom));

  box-shadow: 0 -4px 12px rgba(0,0,0,.24);
}

/* Itens (botões/links) */
#ml-bottom-bar .mlbn-item {
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--mlbb-text);
  text-decoration: none;

  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;

  padding: 10px 4px 8px;

  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.1;
}

/* Ícones */
#ml-bottom-bar .mlbn-item i {
  font-size: 22px;
  line-height: 1;
}

/* Rótulo abaixo do ícone */
#ml-bottom-bar .mlbn-item span {
  opacity: .9;
}

/* Estado active (toque) */
#ml-bottom-bar .mlbn-item:active {
  background: var(--mlbb-bg-dark);
}

/* Hover / focus */
#ml-bottom-bar .mlbn-item:hover span,
#ml-bottom-bar .mlbn-item:focus span {
  opacity: 1;
}

/* Carrinho com badge */
#ml-bottom-bar .mlbn-cart {
  position: relative;
}

/* Badge do carrinho */
#ml-bottom-bar .mlbn-badge {
  position: absolute;
  top: 6px;
  right: 18px;

  min-width: 16px;
  height: 16px;
  padding: 0 4px;

  background: var(--mlbb-badge);
  color: #fff;

  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 10px;
  line-height: 16px;

  border-radius: 10px;
  text-align: center;
}

/* Não cobrir conteúdo da página (âncoras etc.) */
@media (max-width: 767px) {
  html,
  body {
    scroll-padding-bottom: 72px;
  }

  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}

/* Se o tema tiver mini-cart lateral, garantimos que ele fique acima da barra */
.elbzotech-mini-cart-side-global {
  z-index: 100001 !important;
}
