* {
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #000000;
  margin: 0;
  padding: 0; /* Removido o padding aqui para evitar conflitos de rolagem */
  color: #222;
  overflow-x: hidden; /* Garante que não haja rolagem horizontal indesejada */
}

/* Classe para desabilitar a rolagem do body quando o menu/carrinho está aberto */
body.no-scroll {
  overflow: hidden;
}

/* HEADER */
header {
  background: #000000;
  border-bottom: 5px solid #ffcc00;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 20px;
  min-height: 160px;
  position: relative;
}

.header-centro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.logo {
  width: 180px;
  height: auto;
  margin: 0 auto 8px auto;
  object-fit: contain;
  display: block;
}

.titulo-centralizado {
  color: #ffcc00;
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 18px;
  text-align: center;
  width: 100%;
  letter-spacing: 1px;
  line-height: 1.1;
}

.header-direita {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 340px;
  margin-left: 30px;
}

.carrinho {
  background-color: #2a2a2a;
  border: 2px solid #ffcc00;
  border-radius: 8px;
  width: 340px;
  color: #fff;
  height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Continua hidden para não ter scroll no card pequeno */
  position: relative;
  transition: right 0.35s ease, top 0.35s ease;
  z-index: 999;
}

.carrinho h2 {
  text-align: center;
  margin: 0;
  padding: 12px 0 8px 0;
}

.carrinho-fechar {
  display: none;
}

#itens-carrinho {
  list-style: none;
  padding: 8px 16px;
  margin: 0;
  flex: 1;
  overflow-y: auto; /* Permite rolagem no conteúdo do carrinho */
}

#itens-carrinho li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #444;
  font-size: 1rem;
  gap: 12px;
}

.carrinho-produto-nome {
  flex: 1 1 0%;
  min-width: 0;
  overflow-wrap: break-word;
  white-space: normal;
  line-height: 1.4;
  word-break: break-word;
}
#mensagem-adicao {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4caf50;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  opacity: 0;
  transition: opacity 0.3s ease, top 0.3s ease;
  z-index: 9999;
}

#mensagem-adicao.mostrar {
  opacity: 1;
  top: 20px;
}


.btn-remover {
  background: #ff4d4d;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.btn-add,
.btn-add-fardo {
  background-color: #ffcc00;
  color: #222;
  border: none;
  padding: 10px 0;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.07);
  transition: background 0.2s, color 0.2s;
  text-transform: none;
}

.btn-add:hover,
.btn-add-fardo:hover {
  background-color: #e6b800;
  color: #111;
}

.btn-finalizar {
  background-color: #1a8917;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
  margin-bottom: 4px;
  transition: background 0.2s;
}
.btn-finalizar:disabled {
  background-color: #555;
  cursor: not-allowed;
}
.btn-finalizar:hover:not(:disabled) {
  background-color: #147312;
}

.btn-limpar-carrinho {
  background-color: #cc0000;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  font-size: 1rem;
  margin-top: 4px;
  transition: background 0.2s;
}
.btn-limpar-carrinho:hover {
  background-color: #a80000;
}

.quantidade-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.quantidade-container label {
  font-size: 0.95rem;
  color: #222;
  margin-right: 4px;
}

.quantidade-container input[type="number"] {
  width: 50px;
  padding: 5px;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  text-align: center;
}

.produto-card {
  background-color: #fff;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 10px;
}

.produto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.produto-card img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 6px;
  user-select: none;
}

.produto-info {
  width: 100%;
  text-align: center;
  margin-bottom: 12px;
  color: #222;
}

.produto-info h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
}

.produto-info p {
  margin: 2px 0;
  font-size: 1.1rem;
  color: #111;
  font-weight: 600;
}

.fardo-label {
  color: #ffcc00;
  font-size: 0.95rem;
  font-weight: bold;
  margin-left: 6px;
}

.secao-titulo {
  color: #ffcc00;
  font-size: 2rem;
  font-weight: bold;
  margin: 30px 0 10px 0;
  grid-column: 1 / -1;
  text-align: center;
   margin: 5px 0 18px 0;
}


.menu-carrinho-mobile {
  display: none;
  position: fixed;
  right: 16px;
  top: 16px;
  z-index: 1000;
  background: #2a2a2a;
  border: 2px solid #ffcc00;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 1.4rem;
  color: #ffcc00;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.07);
}

@media (max-width: 900px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    padding: 16px;
    min-height: auto;
  }
  .header-centro {
    min-width: unset;
    width: 100%;
    align-items: center;
    margin-bottom: 16px;
  }
  .header-direita {
    min-width: unset;
    width: 100%;
    align-items: center;
    margin-left: 0;
    margin-bottom: 16px;
  }
  .carrinho {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 700px) {
  .menu-carrinho-mobile {
    display: block;
  }
  .carrinho {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background: #222;
    z-index: 9998;
    overflow-y: auto; /* Permite rolagem no carrinho em mobile */
  }
  .carrinho.aberto {
    display: block;
  }
  .carrinho-fechar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px 0 16px;
    font-size: 2rem;
    color: #ffcc00;
    cursor: pointer;
    user-select: none;
  }
  /* Removido body.carrinho-aberto { overflow: hidden; } */
  /* Agora gerenciado via JS e body.no-scroll */
  .carrinho-footer {
    padding: 12px;
  }
  .btn-finalizar,
  .btn-limpar-carrinho {
    font-size: 1rem;
    padding: 12px;
  }
}

@media (max-width: 500px) {
  .produtos-grid {
    grid-template-columns: 1fr;
  }
}

.produtos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.menu-lateral-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  background-color: #2a2a2a;
  color: #ffcc00;
  border: 2px solid #ffcc00;
  border-radius: 6px;
  font-size: 1.6rem;
  padding: 6px 12px;
  cursor: pointer;
}

.menu-lateral {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100vh; /* Ocupa 100% da altura da viewport */
  background-color: #111;
  color: white;
  padding: 20px; /* Padding interno */
  transition: left 0.3s ease-in-out;
  z-index: 1099;
  box-shadow: 4px 0 10px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  box-sizing: border-box; /* Garante que padding não cause overflow */
}

.menu-lateral.aberto {
  left: 0;
}

.menu-lateral ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1; /* Permite que a ul ocupe o espaço restante */
  overflow-y: auto; /* Adiciona barra de rolagem vertical APENAS SE NECESSÁRIO */
  -webkit-overflow-scrolling: touch; /* Rolagem suave em iOS */
}

/* Estilização da barra de rolagem (opcional, para navegadores baseados em WebKit) */
.menu-lateral ul::-webkit-scrollbar {
  width: 8px; /* Largura da barra */
}

.menu-lateral ul::-webkit-scrollbar-track {
  background: #333; /* Cor do fundo da trilha */
}

.menu-lateral ul::-webkit-scrollbar-thumb {
  background-color: #ffcc00; /* Cor do "polegar" */
  border-radius: 4px; /* Borda arredondada do polegar */
  border: 2px solid #333; /* Borda em torno do polegar */
}


.menu-lateral li {
  margin-bottom: 16px;
}

.menu-lateral a {
  color: #ffcc00;
  text-decoration: none;
  font-size: 1.1rem;
  display: block; /* Para que o clique pegue em toda a área do li */
  padding: 4px 0; /* Para dar um pouco mais de área clicável */
}

.fechar-menu {
  font-size: 2rem;
  text-align: right;
  margin-bottom: 20px;
  cursor: pointer;
  color: #ffcc00;
  line-height: 1; /* Ajuda a centralizar o X verticalmente */
}