:root {
  --primaria: #57a04d;
  --secundaria: #ffffff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--secundaria);
  color: #333;
}

.header {
  text-align: center;
  padding: 20px;
  background: #57a04de9;
  color: white;
}

.logo {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  background: white;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nome-loja {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5em;
  margin: 10px 0;
}

.carrinho-icon {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  color: var(--primaria);
  border: 2px solid var(--primaria);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
}

#contador-carrinho {
  position: absolute;
  bottom: -5px;
  right: -5px;
  background: red;
  color: white;
  font-size: 12px;
  width: 18px;
  height: 18px;
  text-align: center;
  border-radius: 50%;
}


.nav {
  margin-top: 10px;
}

.nav a {
  margin: 0 10px;
  color: white;
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover {
  text-decoration: underline;
}

.carrossel {
  position: relative;
  width: 100%;
  max-width: 900px; /* Aumentado para preencher mais lateralmente */
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
  margin: 0 auto;
  padding: 0; /* Adiciona espaço interno nas laterais */
}



.slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bolinhas {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
}

.bolinha {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 3px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
}

.bolinha.active {
  background: var(--primaria);
}

.produtos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: white;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  min-height: 400px; /* Garante altura padrão */
  height: 100%;
  overflow: hidden;
}

.card .imagem-produto {
  height: 200px;
  overflow: hidden;
  border-radius: 6px;
}

.card h3 {
  font-size: 1.1em;
  margin: 10px 0 5px;
  min-height: 40px; /* Padroniza altura dos títulos */
}

.card p {
  font-size: 0.9em;
  color: #666;
  flex-grow: 1; /* Ocupa o espaço para alinhar o botão */
}

.card .preco {
  font-weight: bold;
  margin: 10px 0 5px;
  display: block;
}

.card button.adicionar {
  background-color: var(--primaria);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  align-self: flex-start;
}

.card button.adicionar:hover {
  background-color: #5e7554;
}


.produtos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  padding: 20px;
}

.imagem-produto {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
}

.imagem-produto .img1,
.imagem-produto .img2 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s;
}

.imagem-produto .img2 {
  opacity: 0;
}

.imagem-produto:hover .img1 {
  opacity: 0;
}

.imagem-produto:hover .img2 {
  opacity: 1;
}

.card h3 {
  font-size: 1.1em;
  margin: 10px 0 5px;
}

.card p {
  font-size: 0.9em;
  color: #666;
}

.card .preco {
  font-weight: bold;
  display: block;
  margin: 10px 0;
}

.card button.adicionar {
  background-color: var(--primaria);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.card button.adicionar:hover {
  background-color: #5e7554;
}


.faq {
  padding: 20px;
}

.faq-item {
  margin-bottom: 10px;
  border: 1px solid var(--primaria);
  border-radius: 8px;
  overflow: hidden;
}

.faq-toggle {
  width: 100%;
  background: var(--primaria);
  color: white;
  border: none;
  padding: 15px;
  text-align: left;
  font-size: 1.4em;
  font-family: 'Great Vibes', cursive;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
}

.faq-text {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  background: #f9f9f9;
  color: #444;
  line-height: 1.6;
  opacity: 0;
}

.faq-text.open {
  max-height: 1000px;
  padding: 15px;
  opacity: 1;
}


footer {
  text-align: center;
  background: var(--primaria);
  color: white;
  padding: 15px;
  font-weight: 300;
}

footer > p > a{
    text-decoration: none;
    color: #fff;
}

footer > p > a:hover{
    text-decoration: underline;
}

.carrinho-container {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 300px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 20px;
  display: none;
  z-index: 999;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.carrinho-container h2 {
  margin-bottom: 10px;
}

.carrinho-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.carrinho-container ul li {
  font-size: 0.95em;
  margin-bottom: 8px;
}

.carrinho-container button {
  background: var(--primaria);
  color: white;
  padding: 10px;
  border: none;
  width: 100%;
  margin-top: 10px;
  border-radius: 5px;
  cursor: pointer;
}

/* Formulário de Finalizar Compra */
#formulario-compra {
  position: fixed;
  top: 100px;
  right: 20px;
  width: 320px;
  background: var(--secundaria);
  border: 2px solid var(--primaria);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.15);
  z-index: 1000;
  font-family: 'Poppins', sans-serif;
}

#formulario-compra h2 {
  color: var(--primaria);
  margin-bottom: 15px;
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
}

#dados-compra label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #444;
  margin-top: 12px;
}

#dados-compra input[type="text"],
#dados-compra select {
  width: 100%;
  padding: 8px 10px;
  border: 1.8px solid var(--primaria);
  border-radius: 6px;
  font-size: 1rem;
  color: #333;
  transition: border-color 0.3s ease;
}

#dados-compra input[type="text"]:focus,
#dados-compra select:focus {
  outline: none;
  border-color: #3a7d30;
  box-shadow: 0 0 5px rgba(87, 160, 77, 0.7);
}

#dados-compra button[type="submit"] {
  margin-top: 20px;
  width: 100%;
  background-color: var(--primaria);
  color: var(--secundaria);
  border: none;
  padding: 12px 0;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#dados-compra button[type="submit"]:hover {
  background-color: #3a7d30;
}

/* Para garantir que no mobile o formulário fique responsivo */
@media (max-width: 400px) {
  #formulario-compra {
    width: 90%;
    right: 5%;
    top: 80px;
    padding: 15px;
  }
}

/* Botão fechar (x) no canto do título */
.carrinho-container h2,
#formulario-compra h2 {
  position: relative;
  padding-right: 80%;
}

.carrinho-container h2 .fechar,
#formulario-compra h2 .fechar {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--primaria);
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  padding: 0 6px;
  user-select: none;
}

/* Botão remover item no carrinho */
/* Botão remover item no carrinho */
#itens-carrinho li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#itens-carrinho li button.remover {
  background: transparent;
  border: none;
  color: red;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.1rem;
  user-select: none;
  padding: 0 4px;
}

.produtos {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* padrão: PC */
  gap: 20px;
  padding: 20px;
}

@media (max-width: 991px) {
  .produtos {
    grid-template-columns: repeat(3, 1fr); /* Tablet */
  }
}

@media (max-width: 600px) {
  .produtos {
    grid-template-columns: repeat(2, 1fr); /* Celular */
  }
}

#formulario-compra {
  max-height: 90vh; /* Não ultrapassa 90% da altura da tela */
  overflow-y: auto; /* Ativa rolagem se passar do limite */
  scrollbar-width: thin;
  scrollbar-color: var(--primaria) #eee;
}

/* Scroll estilizado para WebKit (Chrome, Edge, etc) */
#formulario-compra::-webkit-scrollbar {
  width: 6px;
}

#formulario-compra::-webkit-scrollbar-thumb {
  background-color: var(--primaria);
  border-radius: 4px;
}

#formulario-compra::-webkit-scrollbar-track {
  background-color: #eee;
}

.resumo-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.resumo-conteudo {
  background: white;
  padding: 25px;
  border-radius: 12px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease-in-out;
}

.resumo-conteudo h2 {
  margin-bottom: 15px;
  color: var(--primaria);
  font-size: 1.4em;
}

#resumo-texto {
  font-size: 1em;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.6;
  white-space: pre-line;
}

.resumo-botoes button {
  background: var(--primaria);
  color: white;
  border: none;
  padding: 10px 16px;
  margin: 0 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.resumo-botoes button:hover {
  background: #3a7d30;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
