/* ===== Correção aplicada: mantém estrutura original, remove propriedades que
   vinham gerando erros/avisos no validador (grid, gap, margin-inline, etc.)
   Substituí por alternativas compatíveis (flex + margens). ===== */

/* box-sizing global (evita surpresas no dimensionamento) */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* container */
.cta-consulta {
  text-align: center;
  padding: 40px 20px;
  margin: 40px auto;
  max-width: 800px;
  background: #f9f9f9;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* título e parágrafo */
.cta-consulta h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: #004d40;
}

.cta-consulta p {
  font-size: 1.05rem;
  margin-bottom: 24px;
  color: #333;
  line-height: 1.6;
  /* substituído margin-inline (alguns editores reclamavam) */
  margin-left: 0;
  margin-right: 0;
}

/* botões (container) */
/* removido `gap` e adicionado fallback por margin para compatibilidade */
.cta-botoes {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* spacing fallback para quando o container estiver em coluna */
.cta-botoes > * {
  margin-bottom: 12px;
}
.cta-botoes > *:last-child {
  margin-bottom: 0;
}

/* estilo base do botão */
.btn {
  display: inline-block;
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  transition: background 0.18s ease, transform 0.18s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,0.03);
}

/* hover / focus */
.btn:hover,
.btn:focus {
  transform: translateY(-3px);
  text-decoration: none;
}

/* note: :focus-visible é moderno, mantive mas não é obrigatório */
.btn:focus-visible {
  outline: 3px solid rgba(0,77,64,0.12);
  outline-offset: 3px;
}

/* WhatsApp */
.btn-whatsapp {
  background: #25D366;
  color: #ffffff;
  border-color: rgba(0,0,0,0.04);
}

.btn-whatsapp:hover {
  background: #1ebe5b;
}

/* Instagram */
.btn-instagram {
  background: #6c3cfc;
  color: #ffffff;
  border-color: rgba(0,0,0,0.04);
}

.btn-instagram:hover {
  background: #ff8a00;
}

/* Responsivo:
   - em telas maiores, os botões ficam em linha (mais agradável em desktop)
   - em telas pequenas, ficam empilhados (melhor para toque)
*/
@media (min-width: 601px) {
  .cta-botoes {
    flex-direction: row;
    justify-content: center;
  }

  /* substituição do gap por margin lateral entre botões */
  .cta-botoes > * {
    margin: 0 6px;
  }

  .btn {
    width: auto;
    min-width: 220px;
  }
}

@media (max-width: 600px) {
  .btn {
    max-width: 100%;
  }
}

/* === 3 produtos por linha no mobile (max-width 768px) === */
@media (max-width: 768px) {
  /* containers comuns de listagem / vitrine */
  .vitrine .listagem-linha > ul,
  .vitrine .listagem-linha ul,
  .listagem .listagem-linha > ul,
  .listagem-linha > ul,
  .products,
  .product-list,
  .product-grid,
  .produtos-lista {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    margin: 0 -6px !important;
    padding: 0 !important;
  }

  /* itens da lista: 3 por linha */
  .vitrine .listagem-linha > ul > li,
  .vitrine .listagem-linha ul li,
  .listagem .listagem-linha > ul > li,
  .products > li,
  .product-grid .product,
  .product-list .product,
  .produtos-lista > li {
    width: calc(33.333% - 12px) !important;
    margin: 6px !important;
    box-sizing: border-box !important;
    float: none !important;
    display: block !important;
  }

  /* garante que o card interno ocupe toda largura do item */
  .vitrine .listagem-linha li .produto,
  .vitrine .listagem-linha li .box-produto,
  .product-grid .product .card,
  .products .product .card,
  .produtos-lista li .produto {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* imagens responsivas */
  .vitrine .listagem-linha li img,
  .products img,
  .product-grid img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* === Overrides para carrosséis JS comuns === */
  /* Slick */
  .slick-slider .slick-list,
  .slick-slider .slick-track { display: flex !important; }
  .slick-slider .slick-slide { width: 33.333% !important; display: block !important; }

  /* Owl */
  .owl-carousel .owl-stage-outer,
  .owl-carousel .owl-stage { display: flex !important; }
  .owl-carousel .owl-item { width: 33.333% !important; display: block !important; }
}

/* ===== Substituição do bloco .produtos-grid (evita uso de CSS Grid que vinha dando erro) ===== */
/* Mantém a ideia original (grade de produtos), mas com Flexbox puro — não usa grid-template-columns nem gap */
.produtos-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;      /* ajuda a igualar alturas entre cards */
  margin: 0 -7.5px;          /* compensação da margin interna dos itens */
}

/* Cada card dentro da grid */
.produtos-grid .produto-card,
.produtos-grid > .produto-card {
  box-sizing: border-box;
  padding: 10px;
  margin: 7.5px;               /* espaçamento efetivo entre cards (soma = 15px) */
  border: 1px solid #ddd;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;

  /* largura responsiva: base 150px, tenta ocupar até 1fr, limita por max-width */
  flex: 1 0 150px;
  max-width: calc(33.333% - 15px); /* 3 por linha (considerando margin) */
  min-width: 150px;

  /* altura padronizada para equalizar cards */
  min-height: 320px;
}

/* imagens dentro do card (mantém proporção e não estoura) */
.produtos-grid .produto-card img {
  width: 100%;
  height: auto;
  display: block;
  max-height: 150px;
  object-fit: contain;
}

/* ajustes para desktop: 4 por linha quando houver espaço */
@media (min-width: 992px) {
  .produtos-grid .produto-card {
    max-width: calc(25% - 15px); /* 4 por linha no desktop */
  }
}

/* ajustes para telas muito estreitas: 2 por linha */
@media (max-width: 420px) {
  .produtos-grid .produto-card {
    max-width: calc(50% - 15px); /* 2 por linha em celulares pequenos */
  }
}

/* ajustes de caracteres na descrição do produto: 2 por linha */
.nome-produto {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* número de linhas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

