/*
	Detalhes.css — página de detalhes do produto
	Corrigido: .exibir-produto tinha height:400px fixo + filhos com
	height:100% cada. Ao empilhar em coluna no mobile, isso somava
	800px de conteúdo dentro de uma caixa de 400px — cortando o texto.
	.imagem-principal e .informacoes tinham larguras fixas (400px / 390px)
	que não encolhiam, causando overflow horizontal em ecrãs pequenos.
*/

.container h2 {
  text-align: center;
  margin-bottom: 40px;
  margin-top: 40px;
  font-weight: bold;
  text-transform: uppercase;
  color: #006bbd;
}

.exibir-produto {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;   /* evita esticar os filhos com height:100% */
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;           /* permite quebrar antes do breakpoint, se faltar espaço */
}

.imagem-principal {
  width: 100%;
  max-width: 400px;          /* era "width: 400px" fixo — agora encolhe em ecrãs pequenos */
  flex: 1 1 320px;
  aspect-ratio: 1 / 1;       /* mantém proporção sem precisar de height fixo */
}

.imagens-exibir {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.informacoes {
  width: 100%;
  max-width: 390px;          /* era "width: 390px" fixo */
  margin-left: 0;            /* o espaçamento agora vem do "gap" do .exibir-produto */
  flex: 1 1 300px;
}

.nome {
  font-size: 14pt;
  color: #333;
}

/* span{
    font-size: 18pt;
    color: #333
} */

.buy_bt {
  display: inline-block;
  margin-left: 20px;
  width: 35%;
  min-width: 160px;          /* evita o botão ficar demasiado estreito */
  padding: 12px 18px;

  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  color: #fff;
  text-align: center;

  background: linear-gradient(135deg, #0072ce 0%, #005fa3 100%);
  border: none;
  border-radius: 8px;

  text-transform: uppercase;
  letter-spacing: 0.5px;

  box-shadow: 0 4px 12px rgba(0, 102, 189, 0.3);
  transition: all 0.3s ease;
}

.buy_bt:hover {
  cursor: pointer;
  background: linear-gradient(135deg, #005fa3 0%, #003f73 100%);
  box-shadow: 0 6px 18px rgba(0, 72, 135, 0.4);
  transform: translateY(-2px);
}

.buy_bt:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(0, 72, 135, 0.4);
}

/*=========================================================
	ALERTAS
===========================================================*/

.alert-box {
  max-width: 400px;
  margin: 15px auto;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  text-align: center;
  font-weight: 500;
  animation: fadeDown 0.35s ease;
}

.alert-error {
  background: #ffe1e1;
  color: #c0392b;
  border-left: 5px solid #c0392b;
}

.alert-success {
  background: #e2ffe8;
  color: #1e7e34;
  border-left: 5px solid #1e7e34;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/*=========================================================
	RESPONSIVIDADE
===========================================================*/

/* Tablet: ainda lado a lado, mas com espaço mais apertado */
@media screen and (max-width: 1024px) {
  .exibir-produto {
    gap: 30px;
  }

  .imagem-principal {
    max-width: 320px;
  }

  .informacoes {
    max-width: 350px;
  }
}

/* Mobile: empilha imagem e informações, cada uma a 100% de largura */
@media screen and (max-width: 600px) {
  .exibir-produto {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .imagem-principal,
  .informacoes {
    max-width: 100%;
    width: 100%;
  }

  .informacoes {
    padding: 0 15px;
    text-align: center;
  }

  .buy_bt {
    width: 100%;
    max-width: 280px;
    margin-left: 0;
    margin-top: 15px;
  }
}