/**
 * Camadas globais de z-index - Loja Virtual
 * Garante que header/dropdowns fiquem sempre acima de cards e badges.
 * Modais ficam acima de tudo (20000+).
 *
 * Hierarquia:
 * - Modais: 20000+
 * - Header / dropdowns: 2000+
 * - Cards / badges: 1-10
 */

/* ========== Header e dropdowns (abaixo dos modais) ========== */
.base-topo,
.base-topo .barra,
.base-topo .areaTopo {
  position: relative;
  z-index: 2000;
}

/* Dropdowns do header (favoritos, carrinho, conta) */
.areaTopo .itemCarrinho.sub ul,
.areaTopo .itemCarrinho.sub .subFav,
.areaTopo .itemCesta .itemCarrinho.sub ul {
  position: absolute;
  z-index: 2100;
}

/* Menu de categorias no topo (se existir) */
.base-menu-topo {
  position: relative;
  z-index: 1999;
}

/* ========== Modal - acima de tudo ========== */
#fundo_preto {
  display: none; /* Oculto por padrão - abrirModal() exibe via jQuery */
  position: fixed !important;
  inset: 0;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.55) !important;
  z-index: 20000 !important;
}

.window {
  z-index: 20001 !important;
}

/* Travar scroll quando modal aberto */
body.modal-open {
  overflow: hidden !important;
}

/* ========== Cards e badges sempre abaixo ========== */
.shop-products,
.shop-products .product-card,
.product-card,
.product-grid {
  position: relative;
  z-index: 1;
}

/* Badge do card - apenas dentro do card, não sobrepor dropdowns */
.shop-products .product-card__badge,
.product-card__badge,
.product-card__badge--promocao {
  z-index: 5;
}

/* Conteúdo principal - abaixo do header */
.loja-main {
  position: relative;
  z-index: 1;
}
