* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.6;
  background-color: #fff;
  color: #000;
  max-width: 100%;
}

.botao-voltar {
  margin-top: 30px;
  margin-left: 90px;
  margin-bottom: 10px;
}

.botao-voltar a {
  color: black;
  font-size: 24px;
  text-decoration: none;
}

.btn-add {
 position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #008000;
    color: white;
    font-size: 32px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
    z-index: 1000;
}

.acoes button {
  margin: 0 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  margin-top: 20px;
}

.produtos-section {
  padding: clamp(20px, 5vw, 60px) 20px;
  max-width: 1200px;
  margin: auto;
}

.titulo {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: bold;
  margin-bottom: 50px;
  margin-top: 10px;
  text-align: left;
  color: #333;
}

.container {
  display: flex;
  margin-top: auto;
  gap: 40px;
  flex-wrap: wrap;
}
.container h2{
  margin-top: 20px;
}

.categorias {
  flex: 1;
  min-width: 290px;
  border-left: 8px solid #ffcc00;
  padding-left: 20px;
  height: 370px;
}

.categorias h2 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: bold;
  margin-bottom: 30px;
  color: #333;
}

.categorias ul {
  list-style: none;
}

.categoria-titulo {
  margin-top: 20px;
  font-size: 1.25rem;
  padding-bottom: 5px;
  border-bottom: 1px solid #ccc;
  color: #555;
}

.subcategorias li {
  text-decoration: none;
  font-size: 0.875rem;
  color: gray;
  margin-left: 15px;
  margin-top: 8px;
  cursor: pointer;
  transition: color 0.3s;
}

.subcategorias li:hover {
  color: #ff9900;
}

.subcategorias li a {
  text-decoration: none;
  color: gray;         
  transition: color 0.3s;
}

.subcategorias li a:hover {
  color: #ff9900;        
}


.produtos-grid {
  flex: 3;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.produto-card {
  background: #fff;
  border-radius: 18px;
  padding: 19px;
  text-align: center;
  box-shadow: 0px 10px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.produto-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);
}

.produto-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 15px;
}

.nome-produto {
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.preco-produto {
  font-size: 1.125rem;
  font-weight: bold;
  color: #ff3300;
  margin-bottom: 15px;
}

.btn-comprar {
  background-color: #ffcc00;
  border: none;
  padding: 10px 0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  color: black;
  transition: background-color 0.3s, transform 0.3s;
  width: 100%;
  max-width: 100%;
}

.btn-comprar:hover {
  background-color: #e6b800;
  transform: scale(1.05);
}

.scroll-top {
 position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #f7be00;
    color: white;
    font-size: 24px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

#nome_produto, #preco_produto{
  height: 40px;
  width: 330px;
  padding: 13px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 23px;
  margin-bottom: 26px;
}/* Para tablets e laptops menores (≤ 1024px) */
@media (max-width: 1024px) {
  .botao-voltar {
    margin-left: 30px;
    margin-top: 25px;
    margin-bottom: 10px;
  }

  .botao-voltar a {
    font-size: 20px;
  }

  .produtos-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* Para tablets em modo retrato e celulares grandes (≤ 768px) */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .categorias {
    width: 100%;
    border-left: none;
    border-top: 8px solid #ffcc00;
    padding-top: 20px;
    margin-bottom: 30px;
    height: auto;
  }

  .titulo {
    font-size: clamp(1.2rem, 3vw, 1.75rem);
    margin-top: -60px;
  }

  .produtos-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .botao-voltar {
    margin-left: 20px;
    margin-top: 20px;
    margin-bottom: 10px;
  }

  .botao-voltar a {
    font-size: 18px;
  }

  #nome_produto, #preco_produto {
    width: 100%;
    max-width: 100%;
  }

  .btn-add {
    top: auto;
    bottom: 90px;
    right: 20px;
  }
}

/* Para celulares pequenos (≤ 480px) */
@media (max-width: 480px) {
  .produtos-grid {
    grid-template-columns: 1fr;
  }

  .produto-card img {
    height: 160px;
  }

  .btn-comprar {
    padding: 8px 12px;
    font-size: 0.75rem;
  }

  .titulo {
    font-size: 1.2rem;
  }

  .categorias h2 {
    font-size: 1rem;
  }

  .nome-produto {
    font-size: 0.875rem;
  }

  .preco-produto {
    font-size: 1rem;
  }

  .botao-voltar {
    margin-left: 15px;
    margin-top: 15px;
    margin-bottom: 10px;
  }

  .botao-voltar a {
    font-size: 16px;
  }

  .btn-add {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .scroll-top {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
