.galeria-produto {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.imagem-destaque img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.imagens-secundarias {
  display: flex;
  gap: 10px;
}

.imagens-secundarias img {
  width: 33%;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

/* Modal de imagem ampliada */
/* Modal base */
#modalImagem {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  box-sizing: border-box;
  overflow: hidden; /* ✅ evita conflito com botões */
}


/* Galeria dentro do modal */
#modalGaleria {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  scroll-behavior: smooth;
  max-width: 100%;
  max-height: 100%;
}

/* Imagens no modal */
#modalGaleria img {
  scroll-snap-align: center;
  flex-shrink: 0;
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.navegacao-modal {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 10000;
  padding: 10px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.navegacao-modal:hover {
  opacity: 1;
}

#btnAnterior { left: 20px; }
#btnProximo { right: 20px; }

/* Imagens no modal — para telas menores */
@media (max-width: 900px) {
  #modalGaleria img {
    width: 90vw; /* ✅ largura fixa para mobile e tablet */
  }
}
