/* ================== VARIÁVEIS GLOBAIS ================== */
:root{
  --lilas: #b49cc6;
  --lilas-dark: #aa88c4;
  --accent: #e1306c;
  --wa: #25D366;
  --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 10px;
  --header-height: 95px; /* ajuste global do topo (header) */
  --sidebar-width: 240px;
}

/* ================== RESET / BASE ================== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: #fbf8f7;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ================== HEADER (LOGO FIXA) ================== */
header.logo-topo {
  background: var(--lilas);
  color: #fff;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 1.4rem;
  font-weight: 700;
  z-index: 1400;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  user-select: none;
}

.logo-topo {
  display: flex;
  flex-direction: column; /* força os filhos a ficarem em coluna */
  align-items: center;    /* centraliza tudo horizontalmente */
}

.logo-topo img {
  display: block;
  margin: 0 auto;
  max-width: 150px; /* ajuste do tamanho da logo */
}

#btnTopo {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--lilas);  /* sua cor lilás */
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  opacity: 0.6;
  z-index: 1000;
}

#btnTopo:hover {
  background-color: var(--lilas-dark);
  opacity: 1;
}


/* ================== LAYOUT PRINCIPAL ================== */
/* main-content envolve sidebar + main area */
#main-content {
  display: flex;
  width: 100%;
  margin-top: var(--header-height); /* empurra conteúdo abaixo do header fixo */
  gap: 16px;
}

/* SIDEBAR (desktop) */
nav#sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  padding: 18px;
  background: var(--lilas);
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1500; /* Aumente o z-index para garantir que a sidebar não seja sobreposta */
  overflow-y: auto; /* Adiciona o scroll vertical se necessário */
  height: calc(100vh - var(--header-height)); /* Garante que a sidebar ocupe toda a altura disponível */
}

/* SIDEBAR (desktop) */
nav#sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  padding: 18px;
  background: var(--lilas);
  box-shadow: 2px 0 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1500;
  overflow-y: auto;
  height: calc(100vh - var(--header-height));
}

/* Custom Scrollbar */
nav#sidebar::-webkit-scrollbar {
  width: 3px;  /* Largura do scrollbar */
}

nav#sidebar::-webkit-scrollbar-thumb {
  background: #7a52b8;  /* Cor do thumb (parte do scroll) */
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.1);  /* Um contorno suave */
}

nav#sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);  /* Cor do fundo do track */
  border-radius: 10px;
}

nav#sidebar .cat-btn {
  background: var(--lilas-dark);
  border: none;
  color: #f0e9ff;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: transform .16s ease, background .16s;
}

nav#sidebar .cat-btn:hover {
  transform: translateY(-2px);
}

nav#sidebar .cat-btn.active {
  background: #7a52b8;
  box-shadow: 0 0 8px var(--lilas-dark);
}


/* MOBILE: botao hamburguer visível apenas em telas pequenas */
#hambutton {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--lilas-dark);
  color: #f0e9ff;
  border: none;
  font-size: 22px;
  z-index: 1500;
  cursor: pointer;
}

/* Painel mobile (aside com id mobilePanel) */
#mobilePanel, .mobile-menu-panel {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width); /* igual sidebar desktop */
  height: calc(100vh - var(--header-height));
  background: var(--lilas);
  padding: 18px;
  box-shadow: 2px 0 12px rgba(0,0,0,0.06); /* igual sidebar desktop */
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-110%);
  transition: transform .32s cubic-bezier(.2,.9,.2,1);
  z-index: 1300;
}

#mobilePanel.open, .mobile-menu-panel.open { transform: translateX(0); }
#mobilePanel .cat-btn,
.mobile-menu-panel .cat-btn {
  background: var(--lilas-dark);
  border: none;
  color: #f0e9ff;
  padding: 10px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: transform .16s ease, background .16s;
  margin-bottom: 6px; /* já tinha no seu CSS */
}

#mobilePanel .cat-btn:hover,
.mobile-menu-panel .cat-btn:hover {
  transform: translateY(-2px);
}

#mobilePanel .cat-btn.active,
.mobile-menu-panel .cat-btn.active {
  background: #7a52b8;
  box-shadow: 0 0 8px var(--lilas-dark);
}

/* ===================== BANNER =================================*/


.carousel-container {
    position: relative;
    width: 100%;
    max-width: auto; /* limite opcional */
    margin: auto;
    overflow: hidden;
    line-height: 0; /* 🔹 remove espaço em branco */
  }

  .carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
  }

  .carousel-item {
    flex: 0 0 33.33%; /* 3 itens no desktop */
    padding: 5px;
    box-sizing: border-box;
  }

  .carousel-item img {
    width: 100%;
    height: 160px; /* 🔹 altura fixa */
    object-fit: cover; /* corta sem distorcer */
    border-radius: 15px;
    display: block; /* 🔹 elimina espaço embaixo */
  }

/* Botões */
.prev, .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.2); /* transparente e elegante */
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 12px 20px; /* retângulo horizontal */
  cursor: pointer;
  border-radius: 8px; /* cantos levemente arredondados */
  z-index: 10;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.prev:active, .next:active {
  background: rgba(0, 0, 0, 0.5); /* mesma cor normal do botão */
  transform: translateY(-50%) scale(1); /* remove aumento se houver */
}


.prev { left: 10px; }
.next { right: 10px; }


  /* Responsivo */
  @media (max-width: 900px) {
    .carousel-item { flex: 0 0 50%; } /* tablet: 2 */
    .carousel-item img { height: 200px; }
  }
  @media (max-width: 600px) {
    .carousel-item { flex: 0 0 100%; } /* celular: 1 */
    .carousel-item img { height: 180px; }
      .modal-box {
      max-width: 95%;
      padding: 16px;
    }
  }

/* ================== ÁREA PRINCIPAL (MAIN) ================== */
main {
  flex: 1 1 auto;
  margin-left: var(--sidebar-width);
  padding: 22px;
  min-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

/* header interno (filtros/ordenacao) */
header.page-head {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.filtro-ordenacao { display:flex; gap:10px; align-items:center; font-size:14px; margin-top: auto; }
.filtro-ordenacao select { padding:6px 10px; border-radius:8px; border:2px solid #ddd; }

/* ================== TABS / CATEGORIAS ================== */
.conteudo-categorias { margin-top: 6px; }
.categoria { min-height: 50vh;  /* garante que o sentinel NÃO aparece na tela assim que cria */display: none; }
.categoria.active { display: block; }

/* ================== GRID DE PRODUTOS (CONSOLIDADO) ================== */
/* IMPORTANT: apenas um bloco .produtos — 2 col (mobile) -> 5 col (desktop) */
.produtos {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* mobile padrão */
  gap: 16px;
  margin-top: 10px;
  align-items: stretch;
}

/* tablets */
@media (min-width: 600px) {
  .produtos { grid-template-columns: repeat(3, 1fr); }
}

/* laptops */
@media (min-width: 900px) {
  .produtos { grid-template-columns: repeat(4, 1fr); }
}

/* desktop grande (pedido: 5 colunas) */
@media (min-width: 1200px) {
  .produtos { grid-template-columns: repeat(5, 1fr); }
}

/* ================== CARTÃO DE PRODUTO ================== */
/* Container do card */
.produto {
    position: relative;
    border: 1px solid #d6cbcb;
    border-radius: 8px;
    overflow: hidden;
    padding-bottom: 8px;
    background: #fff;
    padding-bottom: 30px; /* espaço para o badge não encostar no preço */
}
.produto:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0,0,0,0.12); }

/* ===== Estrutura geral do card ===== */
.produto {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

/* ===== Imagem ===== */
.produto img {
    width: 100%;        /* ocupa toda a largura do card */
    height: 200px;      /* altura fixa */
    object-fit: cover;  /* corta ou ajusta a imagem mantendo proporção */
    border-radius: 8px; /* opcional, para bordas arredondadas */
}

/* ===== Estrela (superior esquerdo) ===== */
.produto .fav-container {
    position: absolute;
    top: 0.5px;
    left: 90px;
	 display: flex;
	 font-size: 26px;
    z-index: 5;
}

/* ===== Botões de ação (superior direito) ===== */
.produto .actions-right {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 3;
}


/* ===== Botões genéricos ===== */
.produto .fav-btn,
.produto .wa-btn,
.produto .share-btn {
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.produto .fav-btn:hover,
.produto .wa-btn:hover,
.produto .share-btn:hover {
    background: rgba(255, 255, 255, 1);
}



/* Barra de ações no canto superior direito */
.produto .action-buttons {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 2;
}


/* ====== DESCRIÇÃO E PREÇO ====== */
.descricao {
    font-weight: bold;
    margin-top: 8px;
}

.preco {
    color: #6c3483; /* lilás */
    font-size: 14px;
    margin: 4px 0;
}

/* descrição e preços */
.produto .descricao {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: #222;
  min-height: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.precos {
  font-weight: 700;
  color: #b22222;
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* views badge (canto superior esquerdo) */
.views-badge {
  position: absolute;
  top: 10px;
  left: 2px;
  background: rgba(255,255,255,0.92);
  padding: 5px 5px;
  border-radius: 999px;
  font-size: 11px;
  color: #222;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  z-index: 3;
}

/* favorito (estrela) */
.fav-btn {
  position: absolute;
  top: 6px;
  right: 2px;
   background: transparent;

  padding: 5px;
  border: none;
   font-size: 55px;
    cursor: pointer;
  z-index: 20;
}

.fav-btn svg {
  width: 18px;
  height: 18px;
  width: 32px;  /* largura da estrela */
  height: 32px; /* altura da estrela */
  fill: #a64ac9; /* lilás */
}

.fav-star {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  padding: 6px;
  font-size: 18px;
  cursor: pointer;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  transition: transform .14s ease;
}
.fav-star:hover { transform: scale(1.15); }

/* ações (whatsapp, compartilhar) */
.btn-wa, .btn-share {
  background: #25D366; /* WhatsApp verde */
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.3s;
}

.btn-wa:hover {
  background: #1ebe5d;
}

.btn-share {
  background: #e1306c; /* Rosa do Instagram */
}

.btn-share:hover {
  background: #b32354;
}

/* alternância de cor opcional (mantida do seu CSS anterior) */
.produtos .produto:nth-child(odd)  { background-color: #fff; }
.produtos .produto:nth-child(even) { background-color: rgba(180,156,198,0.06); }

/* ================== MODAL ================== */
/* Fundo do modal */
/* Fundo do modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
}
.modal.open { display: flex; }
@keyframes modalFade { from { opacity: 0 } to { opacity: 1 } }

/* Caixa do modal */
.modal-box {
  background: #fff;
  border-radius: 20px;
    max-width: 90vw;   /* se adapta melhor ao tamanho real */
  width: auto;       /* NÃO fixa largura */
   height: auto;
  padding: 20px;
  position: relative;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: slideUp 0.35s ease;
}

.modal-img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: contain;
    max-height: 80vh; /* impede de estourar a tela */
}


/* Texto */
.modal-meta {
  text-align: center;
  width: 100%;
}
.modal-meta .ref {
  font-size: 14px;
  color: #777;
  margin-bottom: 4px;
}
.modal-meta .price {
  font-size: 22px;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}

.modal-actions button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border-radius: 10px;
    margin-top: 10px;
}

.modal-actions .btn-wa,
.modal-actions .btn-share {
  flex: 1 1 140px;
  max-width: 240px;
  display: flex;
  justify-content: center;
}


/* BADGES DO MODAL */
#modal-ref-badge,
#modal-estoque {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
  background: #4a4a4a;
  color: #fff;
}

#modal-estoque {
  left: auto;
  right: 14px;
  background: #ffb300;
  color: #212121;
}

/* estilos internos do modal */
#modalRef { font-weight: 700; font-size: 1.25rem; color: #222; }
#modalPrice { font-weight: 700; color: #b22222; font-size: 1.1rem; }



/* =======================================
   RESPONSIVIDADE
======================================= */
@media (max-width: 480px) {

  .modal-box {
    width: fit-content !important;
    max-width: 92vw !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .modal-meta {
    width: 100%;
    padding: 14px;
    box-sizing: border-box;
  }

  .btn-wa, 
  .btn-share {
    width: 100%;
    justify-content: center;
  }

  /* Tirar posicionamento absoluto dos badges */
  #modal-ref-badge,
  #modal-estoque {
    position: static !important;
    font-size: 11px;
    margin-top: 10px;
  }

  /* Garantir layout correto dos badges juntos */
  .modal-badges {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 10px;
  }
}



.preco {
  background: #f4f0fa;
  border: 1px solid var(--lilas-dark);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  font-weight: 600;
  color: #000000;
  font-size: 0.9rem;
  line-height: 1.2;
  user-select: none;
}
.preco div {
  margin-bottom: 4px;
}
.preco div:last-child {
  margin-bottom: 0;
}


/* Botão fechar */
.close-x {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #eee;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}
.close-x:hover {
  background: #ddd;
}

/* Navegação entre produtos */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
}
.modal-nav:hover {
  background: rgba(0,0,0,0.7);
}
.modal-nav.left { left: -50px; }
.modal-nav.right { right: -50px; }

/* Animações */
@keyframes fadeIn {
  from {opacity: 0;} to {opacity: 1;}
}
@keyframes slideUp {
  from {transform: translateY(40px); opacity: 0;}
  to {transform: translateY(0); opacity: 1;}
}

/* ================== RODAPÉ / OUTROS ================== */
footer {
  text-align: center;
  padding: 14px 0;
  background: #fff;
  font-size: 0.85rem;
  color: #555;
  margin-top: auto;
}

/* ================== RESPONSIVO (OVERALL) ================== */
@media (max-width: 1024px) {
  main { margin-left: var(--sidebar-width); padding: 16px; }
}

/* pequeno: esconde sidebar e ativa menu mobile */
@media (max-width: 768px) {
  nav#sidebar { display: none; }
  main { margin-left: 0; padding: 12px; }

  /* mostra hamburger */
  #hambutton { display: block; }

  /* mobile panel (usar transform/open para mostrar) */
  #mobilePanel { transform: translateX(-110%); }
  #mobilePanel.open { transform: translateX(0); }

  /* reduzir gap */
  .produtos { gap: 12px; }
}

.card {
    position: relative;
}

/* ====== BOTÕES DE AÇÃO ====== */
.card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.card-actions a,
.card-actions button {
    background: --lilas-dark;
    color: #fff;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.card-actions svg {
    margin-right: 4px;
}


/* ====== FORÇAR 2 COL/ MOBILE e 5 COL/ DESKTOP (override localizado) ====== */
#conteudoCategorias .categoria,
#conteudoCategorias .categoria.active {
  width: 100%;
}

/* Garanta que o elemento que contém os cards (.produtos) seja grid */
#conteudoCategorias .categoria .produtos,
#conteudoCategorias .produtos {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important; /* mobile padrão 2 col */
  gap: 12px !important;
  width: 100%;
}

/* Desktop grande: 5 colunas */
@media (min-width: 1200px) {
  #conteudoCategorias .categoria .produtos,
  #conteudoCategorias .produtos {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

/* Certifica que cada card ocupa a célula do grid (remove larguras fixas conflitantes) */
#conteudoCategorias .produto,
#conteudoCategorias .categoria .produto {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

/* Garante que imagem e conteúdos internos também se ajustem */
#conteudoCategorias .produto img,
#conteudoCategorias .produto .descricao,
#conteudoCategorias .produto .precos,
#conteudoCategorias .produto .actions {
  width: 100% !important;
  box-sizing: border-box;
}

/* Força layout de produtos: 2 col mobile, 5 col desktop */
#conteudoCategorias .categoria.active {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 12px !important;
}

/* Desktop ≥ 1200px: 5 colunas */
@media (min-width: 1200px) {
  #conteudoCategorias .categoria.active {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

/* Cada card ocupa a célula */
#conteudoCategorias .categoria.active .produto {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

/* Sidebar estilo fixo igual ao desktop */
.sidebar {
  background: var(--lilas-dark);
  color: white;
  width: 250px; /* mesma largura do desktop */
  padding: 15px;
  box-shadow: var(--card-shadow);
  height: 100vh;
  overflow-y: auto;
}

/* Garantir mesmo estilo no mobile */
@media (max-width: 768px) {
  .sidebar {
    position: fixed; /* Fixa na lateral */
    left: 0;
    top: 0;
    height: 100%;
    width: 220px; /* ligeiramente menor no mobile */
    z-index: 999;
  }
}

/* Sidebar Desktop */
#sidebar .cat-btn {
    padding: 8px 12px;  /* Antes podia ser 12px 20px */
    font-size: 14px;    /* Ajuste se quiser diminuir o tamanho da fonte */
    margin-bottom: -1px; /* Reduz o espaçamento entre botões */
}

/* Sidebar Mobile */
#mobilePanel .cat-btn {
    padding: 8px 10px;  /* Menor que no desktop */
    font-size: 14px;
    margin-bottom: -1px;
}

/* Ajuste opcional: rolagem no mobile se ainda faltar espaço */
#mobilePanel {
    overflow-y: auto;   /* Permite rolar a lista se não couber na tela */
    max-height: 100vh;  /* Limita à altura da tela */
}

/* Container fixo para redes sociais */
.social-fixed {
  position: fixed;
  bottom: 85px; /* mesma altura do botão antigo */
  right: 27px;
  display: flex;
  flex-direction: column;
  gap: 12px; /* espaço entre os botões */
  z-index: 1000;
}

/* Estilo base para todos os botões sociais */
.btn-social {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-social:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}

.btn-social img {
  width: 28px;
  height: 28px;
}

/* WhatsApp */
.btn-wa-fixed:hover {
  background-color: #25D366 !important; /* mantém verde */
  transform: scale(1.1);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}


/* Instagram */
.btn-ig {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

.btn-ig-fixed img, 
.btn-ig-fixed svg {
  background: transparent !important;
  border-radius: 50%; /* mantém redondinho igual ao do WhatsApp */
  width: 28px;
  height: 28px;
  display: block;
}

/* WhatsApp */
.btn-wa {
  background-color: #25D366; /* verde padrão */
}

.btn-wa:hover {
  background-color: #20b955; /* tom mais escuro no hover */
  transform: scale(1.1);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}

/* Instagram */
.btn-ig {
  background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF, #515BD4);
}

.btn-ig img, 
.btn-ig svg {
  background: transparent !important;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: block;
}



/* ==== Fundo escurecido ==== */
.bf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none; /* escondido inicialmente */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ==== Container do popup ==== */
.bf-popup {
    position: relative;
    background: white;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0,0,0,0.4);
    animation: bf-fade-in .25s ease-out;
}

/* ==== Imagem ==== */
.bf-img {
    width: 90vw;
    max-width: 650px;
    border-radius: 12px;
    display: block;
}

/* ==== Botão fechar ==== */
.bf-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #000;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes bf-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.skeleton {
    animation: pulse 1.2s infinite ease-in-out;
}

.skeleton-img {
    width: 100%;
    height: 180px;
    background: #e3e3e3;
    border-radius: 10px;
}

.skeleton-line {
    height: 16px;
    margin-top: 10px;
    background: #e3e3e3;
    border-radius: 6px;
}

.skeleton-line.small {
    width: 70%;
}

@keyframes pulse {
    0% { opacity: .6; }
    50% { opacity: 1; }
    100% { opacity: .6; }
}


/* ------------------------------ */
/*         TOP BAR + SEARCH       */
/* ------------------------------ */

.top-bar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 20px !important;
  width: 100%;
  margin-bottom: 20px;
}

#searchBoxContainer {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 8px 14px;
  background: #fff;

  border: 1px solid #d4d4d4;
  border-radius: 10px;

  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

#searchBoxContainer:focus-within {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

#searchInput {
  padding: 10px 12px;
  font-size: 15px;
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
}

#searchInput::placeholder {
  color: #9e9e9e;
  font-weight: 400;
}

.filtro-ordenacao {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
}

.filtro-ordenacao select {
  padding: 8px;
  font-size: 16px;
}

/* ------------------------------ */
/*             MODAL              */
/* ------------------------------ */

#modalProduto.open {
  display: flex !important;
  justify-content: center;
  align-items: center;
}

#modalImg {
  width: 90%;
  max-width: 850px;
  border-radius: 12px;
  object-fit: contain;
}

@media (min-width: 1200px) {
  #modalImg {
    max-width: 600px;
  }
}

/* ------------------------------ */
/*          PREÇOS & BADGES       */
/* ------------------------------ */

.preco-item {
  margin-bottom: 6px;
}

.preco-de {
  color: #888;
  font-size: 0.8rem;
}

.preco-por {
  color: #d10000;
  font-size: 0.85rem;
  font-weight: bold;
}

.span-referencia {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 6px;
  z-index: 20;
  pointer-events: none;
}

.badge-estoque {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #ffb300;
  color: #212121;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  z-index: 20;
  pointer-events: none;
}

.modal-ref {
  font-size: 14px;
  font-weight: bold;
  margin-top: 8px;
}

/* Black Friday badge */

.badge-bf {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #000;
  color: #FFD700;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: bold;
  border-radius: 8px;
  z-index: 50;
}

.badge-container {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 60;
}



/* ------------------------------ */
/*         MOBILE RESPONSIVO      */
/* ------------------------------ */

@media (max-width: 280px) {

  /* TOP BAR */
  .top-bar {
    flex-direction: column !important;
    gap: 12px !important;
    align-items: stretch !important;
  }

  .filtro-ordenacao {
    width: 100%;
    justify-content: space-between;
  }

  #searchBoxContainer {
    width: 100%;
  }

  #searchInput {
    font-size: 14px;
  }

  /* BADGES */
  .span-referencia,
  .badge-estoque,
  .badge-ref {
    font-size: 10px;
    padding: 3px 6px;
    bottom: 5px;
    left: 5px;
    right: 5px;
  }

  .badge-bf {
    font-size: 11px;
    padding: 4px 8px;
    top: 8px;
    left: 8px;
  }

  .badge-container {
    bottom: 8px;
    left: 8px;
    gap: 4px;
  }

  .preco-de {
    font-size: 0.7rem;
  }

  .preco-por {
    font-size: 0.8rem;
  }

  /* MODAL */
  #modalImg {
    width: 95vw;
    max-width: none;
  }
}



