/* Container geral */
.gridprod {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

h1{
  margin-bottom: 30px;
}

/* Card do produto */
.produto {
  display: flex;
  flex-direction: row;
  background-color: #fde7d4ab;
  color: #333;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px #ece2d1;
  align-items: center;
  gap: 1.5rem;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  height: 200px;
  margin-bottom: 15px;
}

.produto:hover {
  transform: translateY(-8px);
  background-color: #fff5e9;
}

/* Imagem do produto */
.produto img {
  height: 150px;
  width: auto;
  border-radius: 6px;
  object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(204, 153, 255, 0.2);
}

/* Título e preço */
.titulo {
  display: flex;
  flex-direction: column;
  min-width: 160px;
  color: #cd8df4;
  font-family: 'Montserrat', sans-serif;
}

.titulo p:first-child {
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.3rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.titulo p:last-child {
  font-weight: 700;
  font-size: 1rem;
  color: #555;
  margin: 0;
}

/* Descrição */
.descricao {
  flex: 1 1 auto;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3; /* limita a 3 linhas */
  -webkit-box-orient: vertical;
  white-space: normal;
}

/* Link que envolve o produto */
a > .produto {
  color: inherit;
}

/* Responsividade */
@media (max-width: 768px) {
  .produto {
    flex-direction: column;
    align-items: center; /* centraliza conteúdo horizontalmente */
    height: auto; /* deixa o card ajustar altura conforme o conteúdo */
    text-align: center; /* centraliza textos também */
  }

  .produto img {
    height: 120px;
    width: auto;
    margin-bottom: 0.8rem;
  }

  .titulo {
    min-width: auto;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .produto {
    padding: 0.8rem 1rem;
  }

  .titulo p:first-child {
    font-size: 1rem;
  }

  .titulo p:last-child {
    font-size: 0.9rem;
  }

  .descricao {
    font-size: 0.9rem;
  }
}