body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  color: #000;
}
body p, h1 {
  padding-left: 5px;
  padding-right: 5px;
}

header {
  background-color: #ffcc00;
  color: #000;
  padding: 0px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 100px;
  margin-right: 10px;
}

.btn_pesquisa {
  width: 80px;
  height: 30px;
  font-size: 20px;
  background-color: #eaeaea;
  color: #000;
  border-radius: 5px;
  border: none;
}
.btn_pesquisa:hover {
  cursor: pointer;
}

.div_pesquisa {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.input_pesquisa {
  width: 700px;
  height: 15px;
  margin-left: 10vw;
  color: #333;
  background-color: #ffffff;
  border: 1px solid #ccc;
}

.sugestoes {
  top: 100%;
  position: absolute;
  background-color: #ffffff;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  width: 70%;
  margin-left: 10vw;   
  z-index: 10;
  margin-top: 5px;
  border-radius: 5px;
  opacity: 0;
  box-sizing: border-box;
}

.sugestao-item {
  padding: 8px 10px;
  cursor: pointer;
  color: #000;
}

.sugestao-item:hover {
  background-color: #e6e6e6;
}
#divCabeça {
      display: flex;
      flex-direction: column;
      height: 10vh;
    }

    .mini-menu {
      margin-left: 10vw;
      display: flex;
      justify-content: center;
      gap: 10px;
    }

    .mini-menu-btn {
      position: relative;
      padding: 8px 16px;
      background-color: transparent;
      color: black;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      font-size: 18px;
      font-weight: 700;
      transition: background-color 0.3s;
      overflow: hidden;
      height: 40px;
      /* importante para segurar ::after dentro */
    }

    .mini-menu-btn::after {
      content: '';
      position: absolute;
      bottom: 4px;
      /* sobe um pouco para não grudar na borda arredondada */
      left: 50%;
      width: 0%;
      height: 2px;
      /* 👈 grossura definida aqui */
      background-color: black;
      transform: translateX(-50%);
      transition: width 0.4s ease;
    }

    .mini-menu-btn:hover::after {
      width: 100%;
    }

    .mini-menu-categorias {
  position: relative;
  display: inline-block;
}

.dropdown-categorias {
  position: absolute;
  top: 100%; /* logo abaixo do botão */
  left: 0;
  background-color: #ffffff;
  min-width: 160px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
  overflow: hidden;

  max-height: 0;
  transition: max-height 0.4s ease;
  z-index: 100; /* garante que fica acima de outros elementos */
  display: flex;
  flex-direction: column;
}

.dropdown-categorias a {
  color: black;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.dropdown-categorias a:hover {
  background-color: #ffea00;
}
.mini-menu-categorias:hover .dropdown-categorias {
  max-height: 500px;
}

.mini-menu-categorias:hover .dropdown-categorias a {
  opacity: 1;
}
nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 15px;
}

nav a {
  position: relative;
  text-decoration: none;
  color: #222;
  font-weight: bold;
  padding: 8px;
  border-radius: 2px;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background-color: #000;
  transform: translateX(-50%);
  transform-origin: center;
  transition: width 0.3s ease;
}

nav a:hover {
  color: #000;
}

nav a:hover::after {
  width: 100%;
}

.banner {
  background-color: #e6e6e6;
  padding: 40px 20px;
  text-align: center;
}

.banner h2 {
  color: #222;
  font-size: 36px;
  margin-bottom: 10px;
}

.banner p {
  font-size: 18px;
  color: #555;
}

.produtos, .sobre, .contato {
  padding: 40px 20px;
}

.produtos h3, .sobre h3, .contato h3 {
  color: #000;
  text-align: center;
  margin-bottom: 30px;
}

.sobre p {
  text-align: left;
  max-width: 800px;
  margin: 0 auto;
}

.lista-produtos {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.area-central {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: nowrap;
}

.produto {
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 10px;
  width: 300px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  height: 350px; /* Altura fixa para manter padrão */
  justify-content: space-between;
}

.produto-img-container {
  position: relative;
  width: 100%;
}

.produto img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.preco {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: #ffcc00;
  color: #000;
  font-weight: bold;
  padding: 12px 16px;
  font-size: 18px;
  border: none;
}

.info-produto {
  text-align: center;
  margin-top: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-produto h4 {
  color: #000;
  margin-top: 0;
  font-size: 16px;
  line-height: 1.2;
  min-height: 42px;
  /* Truncamento de texto longo */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Máximo de 2 linhas */
  -webkit-box-orient: vertical;
}

.info-produto .botao-container {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.info-produto .botao-container button {
  background-color: #ffcc00;
  border: none;
  margin-top: -20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 16px;
  width: 140px;
  height: 40px;
}

.info-produto .botao-container button:hover {
  background-color: #e6b800;
}

form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input, textarea {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  color: #000;
}

button[type="submit"] {
  background-color: #ffcc00;
  color: #000;
  border: none;
  border-radius: 5px;
  padding: 10px;
  font-weight: bold;
  cursor: pointer;
}

footer {
  background-color: #e6e6e6;
  text-align: center;
  padding: 20px;
  color: #333;
  margin-top: 40px;
}

.produto-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.produto-link:hover {
  transform: scale(1.01);
  transition: transform 0.2s ease-in-out;
}

/* --------- RESPONSIVO --------- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    overflow-x: hidden;
  }

  header {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 10px;
  }

  .logo img {
    height: 60px;
  }
  #divCabeça{
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
 .div_pesquisa {
  position: static;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

  .input_pesquisa {
    margin-left: 0%;
    width: 70%;
    height: 32px;
    box-sizing: border-box;
  }

  .btn_pesquisa {
    width: 26%;
    margin: 0;
  }

  .sugestoes {
    position: absolute;
    top: 30px;
    left: -25px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border: 1px solid #ccc;
    background-color: white;
    z-index: 1000;
    border-radius: 5px;
    margin-top: 4px;
  }
  .mini-menu{
    width: 90vw;
    position: static;
    margin-right: 12vw;
    margin-left: 5vw;
  }
  .mini-menu button{
    padding: 0;
    width: auto;
    font-size: 16px;
  }
  #btn-todos{
    padding-left: 30px;
  }
  nav ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    padding: 0;
    gap: 10px;
  }

  nav ul li {
    text-align: center;
  }

  nav a {
    font-size: 15px;
    padding: 8px;
  }

  .banner h2 {
    font-size: 22px;
  }

  .banner p {
    font-size: 14px;
  }

  .area-central {
    flex-direction: column;
    align-items: center;
  }

  .produto {
    min-width: 90%;
    max-width: 90%;
    max-width: 320px;
    margin: 0 auto;
    height: 350px; /* Altura padrão no mobile */
  }

  .produto img {
    max-height: 180px;
  }

  .preco {
    font-size: 16px;
    padding: 10px 14px;
  }

  .info-produto {
    max-height: 150px;
    position: relative;
  }

  .info-produto button{
    position: absolute;
    top: 50%;
  }

  .info-produto p {
    font-size: 12px;
    -webkit-line-clamp: 5;
  }
  .info-produto h4 {
  font-size: 12px;
  min-height: 42px;

  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

  form {
    width: 90%;
    max-width: 100%;
  }

  input,
  textarea {
    font-size: 16px;
  }

  button[type="submit"] {
    font-size: 16px;
    padding: 10px;
  }

  footer {
    font-size: 14px;
  }
}
