
body.body-no-scroll {
  position: fixed;
  overflow: hidden;
  width: 100%;
  left: 0;
  right: 0;
}
/* ============================================= */
/* ESTILOS DO MODAL E CARROSSEL                  */
/* ============================================= */

/* Fundo "fosco" quando o modal está aberto */
/* Fundo "fosco" quando o modal está aberto (sem alterações) */
.modal-carrossel::backdrop {
  background-color: rgba(0, 0, 0, 0.6);
  /* Um pouco mais escuro para dar contraste */
  backdrop-filter: blur(8px);
}

/* Estrutura principal do Modal (dialog) -- ALTERADO */
.modal-carrossel {
  position: fixed;
  width: 95%;
  /* Ocupa mais espaço na tela */
  max-width: 1400px;
  /* Aumenta o limite máximo */

  /* Tornando o container invisível */
  background-color: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  /* Remove o preenchimento interno */
  margin: auto;

  /* Adicionado para garantir que os botões não sejam cortados */
  overflow: visible;
}

/* Animação de entrada do modal (sem alterações) */
.modal-carrossel[open] {
  animation: slideUpFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Animação de SAÍDA do modal */
/* durante a animação de saída, bloqueia todas as interações */
.modal-carrossel.closing {
  animation: slideDownFadeOut 0.4s cubic-bezier(0.5, 0, 0.75, 0) forwards;
  pointer-events: none;
  /* evita cliques nos cards enquanto anima */
  user-select: none;
  touch-action: none;
}

/* estado definitivo após fechar (aplicado via JS como fallback) */
.modal-carrossel._hidden-after-close {
  display: none !important;
  visibility: hidden !important;
}

@keyframes slideDownFadeOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
}

/* Cabeçalho do Modal -- ALTERADO */
.modal-header {
  text-align: center;
  margin-bottom: 2.5rem;
  /* Aumenta o espaço para o carrossel */
}

.modal-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  /* Cor branca para legibilidade no fundo escuro */
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  /* Sombra para destacar */
}

/* Botão de Fechar (sem alterações, o estilo já se adapta bem) */
.modal-fechar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #e0e0e0;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.8rem;
  font-weight: 300;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
  /* Garante que fique sobre os cards */
}

.modal-fechar:hover {
  background: linear-gradient(to right, #a30d24, #d4203c);
  color: white;
  transform: scale(1.1) rotate(90deg);
}

/* Estrutura do Carrossel (sem alterações) */
.carrossel-container {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.carrossel-wrapper {
  overflow: hidden;
  width: 100%;
}

.carrossel-track {
  display: flex;
  gap: 20px;
  padding: 10px;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  touch-action: pan-y;
  /* Permite o scroll vertical, mas prioriza o horizontal do nosso JS */
}

/* Card individual dentro do carrossel */
.carrossel-item {
  /* A linha abaixo é a única alteração sugerida */
  flex: 0 0 calc((100% - 40px) / 3);
  /* Cálculo exato para 3 itens com 20px de gap */

  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carrossel-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.item-imagem {
  background-color: #fff;
  padding: 1rem;
}

.item-imagem img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: contain;
  /* Para não distorcer a imagem do produto */
}

.item-info {
  padding: 1rem 1.5rem 1.5rem;
  text-align: left;
}

.item-marca {
  font-size: 0.9rem;
  font-weight: 700;
  color: #d4203c;
  /* Cor primária vermelha */
  text-transform: uppercase;
  margin: 0 0 4px 0;
}

.item-nome {
  font-size: 1.2rem;
  font-weight: 600;
  color: #d4203c;
  margin: 0;
  line-height: 1.3;
}

/* Botões de Navegação (Setas) */
.carrossel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: white;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.carrossel-btn:hover {
  background: linear-gradient(to right, #a30d24, #d4203c);
  color: white;
  border-color: #a30d24;
  transform: translateY(-50%) scale(1.1);
}

.carrossel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.9);
}

.carrossel-btn.prev {
  left: -22px;
}

.carrossel-btn.next {
  right: -22px;
}

/* Paginação (Bolinhas) */
.carrossel-paginacao {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 2rem;
}

.paginacao-dot {
  width: 12px;
  height: 12px;
  cursor: pointer;
  background-color: #ccc;
  border: none;
  border-radius: 50%;
  transition: all 0.4s ease;
}

.paginacao-dot:hover {
  background-color: #aaa;
}

.paginacao-dot._active {
  background-color: #d4203c;
  transform: scale(1.3);
}

/* Media Query para telas menores */

/* ============================================= */
/* ESTILO DO BOTÃO DINÂMICO DENTRO DO CARD       */
/* ============================================= */

/* ============================================= */
/* CORREÇÃO PARA CONTEÚDO VAZADO DO LIGHTBOX     */
/* ============================================= */

/* ============================================= */
/* ESTILOS ESSENCIAIS DO LIGHTBOX E IMAGEM       */
/* ============================================= */

/* Contêiner do Lightbox (o overlay escuro) */
.lightbox-foto {
  display: none; /* Começa invisível por padrão (o JS muda para flex quando .visivel) */
  position: fixed; /* Fixa na tela, independente da rolagem */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8); /* Fundo escuro semitransparente */
  justify-content: center; /* Centraliza horizontalmente a imagem */
  align-items: center; /* Centraliza verticalmente a imagem */
  z-index: 1000; /* Garante que fique acima de tudo */
  opacity: 0; /* Começa transparente */
  transition: opacity 0.3s ease; /* Transição suave de opacidade */
}

/* Quando o lightbox está visível (classe adicionada pelo JS) */
.lightbox-foto.visivel {
  display: flex; /* Agora é visível e usa flexbox para centralizar */
  opacity: 1; /* Totalmente visível */
}

/* Imagem dentro do Lightbox */
.lightbox-foto img {
  max-width: 90%; /* Limita a largura máxima da imagem */
  max-height: 90%; /* Limita a altura máxima da imagem */
  object-fit: contain; /* Garante que a imagem se ajuste sem cortar */
  background-color: white; /* Fundo branco para a imagem (opcional, mas bom para fichas técnicas) */
  padding: 10px; /* Um pequeno respiro ao redor da imagem */
  border-radius: 8px; /* Cantos arredondados */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); /* Sombra para destacar */
}

/* Botão de Fechar do Lightbox (o "X") */
.lightbox-fechar {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: white;
  color: #333;
  border: none;
  border-radius: 50%; /* Botão circular */
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  display: flex; /* Para centralizar o "X" */
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.lightbox-fechar:hover {
  background-color: #a30d24; /* Cor do seu tema */
  color: white;
  transform: scale(1.05);
}

/* Correção para o conteúdo vazar antes de ser visível */
/* Isso foi adicionado anteriormente e é importante manter */
.lightbox-foto > * {
  visibility: hidden;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.lightbox-foto.visivel > * {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}
/* ============================================= */
/* ESTILO DO BOTÃO GLOBAL CENTRALIZADO           */
/* ============================================= */

/* Este container centraliza o botão e dá espaçamento */
.container-botao-global {
  text-align: center;
  margin-top: 2.5rem; /* Espaço entre o carrossel e o botão */
  margin-bottom: 2rem; /* Espaço entre o botão e a paginação */
}

/* Este é o estilo do botão em si */
.botao-ver-ficha-global {
  background: #a30d24; /* Cor vermelha principal */
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

  /* Importante: Começa escondido por padrão. O JS vai controlar quando ele aparece. */
  display: none;
}

.botao-ver-ficha-global:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
