/* SPINNER */
/* SPINNER */
@keyframes spin {
  0% { transform: rotate(0deg); }
 100% { transform: rotate(360deg); }
}

#preloaderLoja {
  position: fixed;
  inset: 0; 
  background: rgba(255,255,255,1);
  z-index: 99999; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  flex-direction: column; 
  gap: 12px;
  transition: opacity 0.3s ease;
}
#preloaderLoja.hidden {
  opacity: 0;
  pointer-events: none;
}



/* CARDS IGUAIS */
.card-shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.ticket-promo {position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%); color: white; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 0 8px 8px 8px; box-shadow: 0 2px 8px rgba(220,38,38,.4); z-index: 10;}



/* NOVO CSS MODAL */ 

/* ===== MODAL VISUALIZAR PRODUTO #modalProduto ===== */
#modalProduto {
  position: fixed; 
  inset: 0; 
  background: rgba(0,0,0,.65); 
  z-index: 10001;
  display: flex; 
  align-items: center; 
  justify-content: center;
  opacity: 0; 
  pointer-events: none; 
  transition: opacity .25s ease;
  padding: 16px;
}
#modalProduto.show{ 
  opacity: 1; 
  pointer-events: all; 
}

#modalProduto > div {
  background: white; 
  border-radius: 16px; 
  width: 100%; 
  max-width: 340px; /* DIMINUIU DE 380 */
  max-height: 75vh; /* DIMINUIU DE 90vh */
  overflow-y: auto; 
  transform: scale(0.95);
  transition: transform .25s ease; 
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
#modalProduto.show > div{ 
  transform: scale(1); 
}

#modalProduto .modal-img-wrap{ 
  position: relative; 
  background: #f5f5f5; 
  border-radius: 16px 16px 0 0; 
}
#modalProduto .modal-img-wrap img{ 
  width: 100%; 
  height: 240px; /* DIMINUIU DE 320 */
  object-fit: cover; 
  object-position: center; 
  border-radius: 16px 16px 0 0; 
}
#modalProduto .modal-close{ 
  position: absolute; 
  top: 8px; 
  right: 8px; 
  background: rgba(0,0,0,.5); 
  color: white; 
  border-radius: 50%; 
  width: 30px; 
  height: 30px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 16px; 
  border: none; 
  z-index: 2; 
}
#modalProduto .modal-body{ 
  padding: 12px; 
}
#modalProduto .preco-info{ 
  display: flex; 
  justify-content: space-between; 
  background: #F9FAFB; 
  padding: 10px; 
  border-radius: 10px; 
  margin: 10px 0; 
  border: 1px solid #eee; 
}
#modalProduto .btn-encomendar-modal{ 
  background: #25D366; 
  color: white; 
  width: 100%; 
  padding: 12px; 
  border-radius: 10px; 
  font-weight: 700; 
  font-size: 13px; 
  border: none; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 6px; 
}
#modalProduto .btn-add-carrinho-modal{ 
  background: #FF6B00; /* USEI A COR DIRETA */
  color: white; 
  width: 100%; 
  padding: 12px; 
  border-radius: 10px; 
  font-weight: 700; 
  font-size: 13px; 
  border: none; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 6px; 
  margin-top: 8px; 
}
#modalProduto .btn-add-carrinho-modal:active{ 
  transform: scale(0.97); 
}
#modalProduto .ticket-promo { 
  position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%); color: white; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 0 8px 8px 8px; box-shadow: 0 2px 8px rgba(220,38,38,.4); z-index: 10;
}

/* TICKET PROMOÇÃO MODERNO */
.ticket-promo { position: absolute; top: 8px; left: 8px; background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%); color: white; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 0 8px 8px 8px; box-shadow: 0 2px 8px rgba(220,38,38,.4); z-index: 10; }


/* FIX: SWAL FICAR POR CIMA DO MODAL */
.swal2-container { z-index: 10000!important; }


/* FORÇAR SWAL FICAR POR CIMA DE TUDO */
.swal2-container.swal-tela-cheia { 
  z-index: 999999 !important; 
}

.swal2-container.swal-tela-cheia .swal2-popup {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.swal2-container.swal-tela-cheia .swal2-image {
  max-height: 80vh !important; /* REDUZIU A ALTURA */
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain !important;
}

.swal2-container.swal-tela-cheia .swal2-close {
  color: white !important;
  font-size: 2.5rem !important;
  z-index: 9999999 !important;
}


/* RECENTE */

/* TAG NOVO - FUNDO CINZA E LETRA BRANCA */
.tag-novo {
  background: rgba(0,0,0,0.6) !important; /* CINZENTO TRANSPARENTE */
  color: #fff !important; /* LETRA BRANCA */
  font-weight: 700;
  border-radius: 6px;
}

/* CORAÇÃO VERMELHO */
.btn-favorito { 
  color: #9CA3AF !important; /* CINZA NORMAL */
  transition: all 0.2s; 
} 
.btn-favorito.active { 
  color: #EF4444 !important; /* VERMELHO QUANDO ATIVO */
}
.btn-favorito.active i { 
  color: #EF4444 !important; /* GARANTE QUE O ICONE FICA VERMELHO */
}

/* RECENTE MODAL DETALHE INF*/
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.animate-fadeIn { animation: fadeIn 0.25s ease; }

/* RECENTE ESTILO CAMPO PESQUISAR */
/* CAMPO PESQUISA MODERNO */
#inputPesquisa_modal::placeholder {
  color: #9CA3AF;
  font-weight: 400;
}

#inputPesquisa_modal:hover {
  border-color: #9CA3AF;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#inputPesquisa_modal:focus {
  border-color: #FF6B00 !important;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15) !important;
  outline: none !important;
}

#inputPesquisa_modal:focus+#btnMicrofone_modal i,
.position-relative:focus-within .bi-search {
  color: #FF6B00 !important;
}

/* BOTÃO MICROFONE */
#btnMicrofone_modal:hover {
  background: #FFF7ED !important;
  color: #FF6B00 !important;
  transform: translateY(-50%) scale(1.05);
}

#btnMicrofone_modal:active {
  transform: translateY(-50%) scale(0.95);
}


/* CONTAINER DOS BOTÕES FLUTUANTES - DENTRO DO HTML APENAS */
.botoes-flutuantes-loja {
  position: fixed; 
  bottom: 20px; /* 20px do rodapé */
  right: 20px;
  z-index: 100; /* ABAIXEI: só precisa ficar acima do conteúdo. Antes 9999 tava tapando sheets */
  display: flex;
  flex-direction: column;
  gap: 12px; /* espaço entre carrinho e topo */
}

/* BOTÃO CARRINHO - FICA EM BAIXO */
#btnAbrirCarrinho {
  position: relative; /* não fixed solto */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: #FF6B00;
  border: 2px solid #FF6B00;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
#btnAbrirCarrinho:hover {
  transform: scale(1.1);
}

/* COUNT DO CARRINHO */
#countCarrinhoFloat {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* BOTÃO VOLTAR AO TOPO - FICA EM CIMA DO CARRINHO */
#btnVoltarTopo_modal {
  position: relative; /* MUDEI: era fixed. Agora segue o flex-col */
  bottom: 0; /* zera porque agora quem controla é o container */
  right: 0; /* zera */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C00 100%);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.4);
  z-index: 1; /* ABAIXEI: não precisa de 9999 */
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

#btnVoltarTopo_modal:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

/* TAB CARRINHO - ESSE SIM PRECISA FICAR TOPO */
#tab-carrinho {
  position: fixed;
  inset: 0;
  background: #F5F5F5;
  z-index: 9999; /* esse pode ficar alto porque é tela cheia */
}
#tab-carrinho.hidden { display: none; }

.bottom-sheet {
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 10000; /* sheets ficam acima de tudo */
}


/* FORÇAR SWAL FICAR NA FRENTE DE TUDO */
.swal2-container {
  z-index: 99999999 !important;
}

.swal-forcar-frente {
  z-index: 9999999 !important;
}
