* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: #f9f9f9;
  color: #333;
}

input, textarea, button, select {
  font-family: 'Poppins', sans-serif;
}

#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ff6b35;
  padding: 16px 52px 16px 32px; /* Top: 16, Right: 52 (32+20), Bottom: 16, Left: 32 */
  position: sticky;
  top: 15px;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(255, 107, 53, 0.2);
  max-width: 1200px;
  margin: 15px auto;
  border-radius: 25px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
}

#nav-carrinho {
  color: white;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
}

#nav-usuario {
  color: white;
  font-weight: 600;
  cursor: pointer;
}

#hero {
  position: relative;
  min-height: 400px; /* Aumentado para banners */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  max-width: 1200px;
  margin: 0 auto 60px auto;
  border-radius: 25px;
  overflow: hidden; /* Importante para o carrossel */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#carousel-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.banner-slide.ativo {
  opacity: 1;
}

/* Fallback gradiente se não houver banners */
#hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(135deg, #ff6b35, #f7c59f);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 10; /* Acima do carrossel */
  max-width: 800px;
}


.hero-content h1 {
  font-size: 2.8rem;
  color: white;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  color: white;
  margin-bottom: 32px;
}

.btn-primary {
  background: white;
  color: #ff6b35;
  border: none;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}

.btn-primary:hover { transform: scale(1.05); }

.btn-secondary {
  background: transparent;
  color: #ff6b35;
  border: 2px solid #ff6b35;
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  transition: background 0.2s;
}

.btn-secondary:hover { background: #fff3ee; }

#cardapio {
  padding: 60px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

#cardapio h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: #333;
}

#filtro-categorias {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.btn-categoria {
  padding: 8px 20px;
  border-radius: 20px;
  border: 2px solid #ff6b35;
  background: white;
  color: #ff6b35;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-categoria.ativo, .btn-categoria:hover {
  background: #ff6b35;
  color: white;
}

#lista-produtos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}

.card-produto {
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.2s;
}

.card-produto:hover { transform: translateY(-4px); }

.card-produto img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  background: #f5f5f5;
  padding: 6px;
  box-sizing: border-box;
}

.card-produto-info {
  padding: 12px;
}

.card-produto-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-produto-info p {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.card-produto-preco {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ff6b35;
}

.btn-carrinho-compacto {
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.btn-carrinho-compacto:hover { background: #e55a24; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.oculto { display: none !important; }

.modal-content {
  background: white;
  border-radius: 20px;
  padding: 32px;
  width: 90%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
}

.modal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #333;
}

.modal-content input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eee;
  border-radius: 10px;
  font-size: 1rem;
  margin-bottom: 14px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border 0.2s;
}

.modal-content input:focus { border-color: #ff6b35; }

.btn-fechar {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #666;
}

.item-carrinho {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.item-carrinho span { font-weight: 600; }

.btn-remover {
  background: none;
  border: none;
  color: #e74c3c;
  cursor: pointer;
  font-size: 1.1rem;
}

#total-carrinho {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: right;
  margin: 16px 0;
  color: #ff6b35;
}

footer {
  text-align: center;
  padding: 32px;
  background: #333;
  color: white;
  margin-top: 60px;
}

/* Estilos para a página de Autenticação (Login/Cadastro) */
.auth-section {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.auth-section h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.8em;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.auth-tabs button {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 1.1em;
    cursor: pointer;
    color: #555;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    flex-grow: 1;
    outline: none;
}

.auth-tabs button.active {
    color: #FF6347; /* Cor primária */
    border-bottom: 3px solid #FF6347;
    font-weight: bold;
}

.auth-tabs button:hover:not(.active) {
    color: #FF8C00; /* Um tom mais claro da cor primária */
}

.auth-form {
    text-align: left;
    margin-top: 20px;
}

.auth-form h3 {
    color: #444;
    margin-bottom: 20px;
    font-size: 1.5em;
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="tel"] {
    width: calc(100% - 20px); /* Ajusta para padding */
    padding: 12px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* Inclui padding e borda no width */
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus {
    border-color: #FF6347; /* Cor primária no foco */
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 99, 71, 0.2);
}

.auth-form .btn.primary {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    margin-top: 15px;
}

.hidden {
    display: none;
}

/* Personalização de Ingredientes */
.grupo-ingredientes {
  margin-bottom: 24px;
}

.grupo-ingredientes h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  border-bottom: 2px solid #f7c59f;
  display: inline-block;
  padding-bottom: 4px;
}

.lista-itens-ingredientes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ingrediente-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fffcf9;
  border: 1px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.ingrediente-item:hover {
  border-color: #ff6b35;
  background: #fffafa;
}

.ingrediente-info {
  display: flex;
  flex-direction: column;
}

.ingrediente-nome {
  font-weight: 500;
  color: #444;
}

.ingrediente-preco {
  font-size: 0.85rem;
  color: #ff6b35;
  font-weight: 600;
}

.checkbox-customizado {
  width: 22px;
  height: 22px;
  accent-color: #ff6b35;
  cursor: pointer;
}

/* --- RESPONSIVIDADE PARA DISPOSITIVOS MÓVEIS --- */
@media (max-width: 768px) {
  #navbar {

    margin: 10px;
    padding: 10px 15px;
    border-radius: 12px;
    top: 5px;
  }
  
  .nav-logo {
    font-size: 1.1rem;
  }
  
  .nav-links {
    gap: 10px;
    font-size: 0.8rem;
  }

  /* Esconder texto 'Cardápio' no mobile para dar espaço */
  .nav-links a[href*="cardapio"] {
    display: none;
  }


  #hero {
    margin: 10px 10px 30px 10px;
    border-radius: 16px;
    padding: 40px 15px;
    min-height: 250px; /* Reduzido para mobile */
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  #cardapio {
    padding: 20px 10px;
  }

  #lista-produtos {
    grid-template-columns: 1fr 1fr; /* Forçar 2 colunas */
    gap: 10px;
  }

  .card-produto img {
    height: 120px;
  }

  .card-produto-info {
    padding: 8px;
  }
  
  .card-produto-info h3 {
    font-size: 0.85rem;
    height: 38px;
    overflow: hidden;
  }

  .btn-categoria {
    padding: 6px 12px;
    font-size: 0.8rem;
    white-space: nowrap; /* Não quebrar texto do botão */
  }

  /* Categorias Deslizantes no Mobile */
  #filtro-categorias {
    display: flex !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    padding: 10px 5px !important;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Esconder scrollbar no Firefox */
  }
  
  #filtro-categorias::-webkit-scrollbar {
    display: none; /* Esconder scrollbar no Chrome/Safari */
  }


  /* Área do Cliente no Mobile */
  #pedidos-historico {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  .card-pedido {
    padding: 15px !important;
  }
}


#total-customizacao {
  text-align: right;
  padding-top: 15px;
  border-top: 2px dashed #eee;
  color: #ff6b35;
}