/* RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  background: #f8f8f8;
  color: #111;
  line-height: 1.5;
  min-height: 100vh;
  text-align: center;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  background-image: url("../imgs/background.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  
  filter: blur(8px) brightness(0.95);
  background-color: #f8f8f8;
  
  z-index: -1;
}

/* LAYOUT PRINCIPAL */
main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* SEÇÕES DO CARDÁPIO */
.menu {
  margin-bottom: 3rem;
  overflow: hidden;
  position: relative;
}

.menu h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  color: #7f4600;
}

/* CARROSSEL WRAPPER */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

/* CARDS */
.cards {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  /* Removido: grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); */
  gap: 1.5rem;
  justify-content: flex-start;
  padding: 0.5rem 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.cards::-webkit-scrollbar {
  display: none;
}

/* Base (Smartphone - 1 card por tela) */
.card {
  min-width: calc(100% - 1.5rem); /* 100% da área visível menos o gap (1.5rem) */
  scroll-snap-align: start;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 18px rgba(127, 70, 0, 0.2);
  border-color: #F4A261;
}

.card img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: #7f4600;
}

.card p {
  margin-bottom: 0.5rem;
}

.card .ingredients {
  font-size: 0.9rem;
  color: #555;
}

/* CARD ACTIONS */
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  justify-content: center;
}

.card-actions input[type="number"] {
  width: 60px;
  padding: 0.3rem;
  border: 2px solid #633502;
  border-radius: 6px;
}

.card-actions button {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 6px;
  background: #3F6C3A;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.3s ease;
}

.card-actions button:hover {
  background: #2d5029;
}

/* BOTÕES DO CARROSSEL */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s, opacity 0.3s;
  opacity: 1;
}

.carousel-btn:hover {
  background: #7f4600;
}

.carousel-btn.left-btn {
  left: 0;
}

.carousel-btn.right-btn {
  right: 0;
}

.carousel-btn.hidden {
  opacity: 0;
  pointer-events: none; /* Impede clique */
}


/* INDICADORES DE NAVEGAÇÃO (BOLINHAS) */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dot.active {
    background-color: #F4A261; /* Cor da bolinha ativa */
    transform: scale(1.2);
}

/* BOTÕES FLUTUANTES - AJUSTADOS PARA FICAREM MAIS BAIXOS */
.cart-btn,
.whatsapp-float {
  position: fixed;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

/* CARRINHO */
.cart-btn {
  bottom: 10px; /* Mais baixo */
  right: 10px;
  background-color: #fd1010;
  width: 60px;
  height: 60px;
  font-size: 24px;
  border: none;
  border-radius: 50%;
}

.cart-btn:hover {
  transform: scale(1.1);
  background-color: #ffbb00;
  opacity: 0.9;
}

/* CONTADOR DO CARRINHO */
#cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #3F6C3A;
  color: #fff;
  width: 20px;
  height: 20px;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* WHATSAPP */
.whatsapp-float {
  bottom: 80px; /* Posicionado acima do carrinho */
  right: 10px; /* Ajustado para 10px */
  background-color: #25d366;
  width: 60px;
  height: 60px;
  font-size: 28px;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: #1ebe57;
}

/* MODAL DO CARRINHO */
.cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 950;
  text-align: center;
}

.cart-modal.active {
  display: flex;
}

.cart-content {
  display: inline-block;
  vertical-align: middle;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  padding: 1.5rem;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
}

.cart-modal::before {
  content: "";
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.cart-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.cart-content h2 {
  margin-bottom: 1rem;
  color: #7f4600;
}

#cart-items {
  list-style: none;
  margin-bottom: 1rem;
}

#cart-items li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  align-items: center;
  padding: 0.5rem;
  background: #f9f9f9;
  border-radius: 6px;
}

#cart-items li span {
  font-weight: bold;
  color: #3F6C3A;
}

#cart-items li button {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

#cart-items li button:hover {
  background: #c0392b;
}

.cart-content .btn {
  width: 100%;
  padding: 0.7rem;
  background: #19ca28;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cart-content .btn:hover {
  background: #108d00;
}

.cart-content .btn-close {
  background: #7c4d14;
}

.cart-content .btn-close:hover {
  background: #633502;
}

/* RESPONSIVO */

/* Tablet (>= 768px): 2 cards por tela */
@media (min-width: 768px) {
  /* Ajuste para exibir 2 cards */
  .card {
    min-width: calc(50% - 0.75rem); /* 50% da área visível menos metade do gap (1.5rem/2) */
  }

  .card img {
    height: 220px;
  }
}

/* Desktop (>= 1024px): 3 cards por tela (Opcional, mas melhora o aproveitamento) */
@media (min-width: 1024px) {
  .card {
    min-width: calc(33.333% - 1rem); /* 33.333% da área visível menos 2/3 do gap */
  }
}

/* Smartphone (<= 768px - Ajustes gerais para tela pequena) */
@media (max-width: 768px) {
  /* Adicionado: Ajusta o MAIN para que o conteúdo não fique escondido atrás do NAV FIXO */
  main {
      padding-top: 60px; /* Adiciona o espaço equivalente à altura da nav fixa (cerca de 60px) */
      margin-top: 0; /* Remove a margem superior que pode estar causando a barra branca */
  }

  /* Removido o conflito de grid */
  .cards {
    /* grid-template-columns: repeat(2, 1fr); <--- Removido */
    gap: 1rem;
    justify-items: center;
  }

  .cart-btn {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }

  .whatsapp-float {
    width: 60px;
    height: 60px;
    font-size: 26px;
  }
}

@media (max-width: 480px) {
  main {
    margin-top: 1rem;
    padding-top: 0.5rem;
    /* Reduzindo o padding para não sobrar espaço demais no final da página */
    padding-bottom: 100px; 
  }

  /* Ajustes mantidos para telas muito pequenas, mas o card agora é 100% da largura */
  .cards {
    /* grid-template-columns: repeat(2, 1fr); <--- Removido */
    gap: 0.8rem;
  }

  .card {
    padding: 0.5rem;
  }

  .card img {
    height: 180px;
  }

  .cart-btn {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }

  .whatsapp-float {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  #cart-count {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
}

/* MENU DE NAVEGAÇÃO */
.menu-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  z-index: 1200;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
}

.logo {
  font-weight: bold;
  font-size: 1.2rem;
  color: #7f4600;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  z-index: 1100;
}

.nav-links li a {
  text-decoration: none;
  color: #111;
  font-weight: bold;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}

.nav-links li a.active {
  background: #CDB82B;
  color: #633502;
}

.nav-links li a:hover {
  background: #FEDC63;
  color: #633502;
}

/* HAMBURGER ICON */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 1300;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #7f4600;
  border-radius: 2px;
  transition: all 0.3s ease; /* Adicionada transição para o efeito X */
}

@media (max-width: 768px) {
  /* REESCRITO: Menu de Navegação para Mobile (Esquerda e Transição) */
  .nav-links {
    position: fixed;
    top: 60px;
    left: -200px; /* Esconde para a esquerda (tamanho do menu é 200px) */
    flex-direction: column;
    background: #fff;
    width: 200px;
    height: calc(100vh - 60px);
    padding-top: 1rem;
    gap: 1rem;
    transition: left 0.3s ease; /* Transição para o lado esquerdo */
    box-shadow: 2px 0 8px rgba(0,0,0,0.1); /* Sombra para a direita */
    z-index: 1100;
  }

  .nav-links.active {
    left: 0; /* Mostra o menu deslizando da esquerda */
  }

  .hamburger {
    display: flex;
  }

  /* EFEITO HAMBURGER PARA "X" */
  .hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* HORÁRIO */
.horario {
  text-align: center;
  margin: 3rem 0;
  padding: 1.5rem;
  background: #fedc63;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.horario:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background: #ffd966;
}

.horario h2 {
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  color: #7f4600;
  margin-bottom: 1rem;
}

.horario p {
  margin: 0.3rem 0;
  font-size: 1.1rem;
  color: #333;
  font-weight: 500;
}

.horario:hover p {
  color: #3F6C3A;
}

/* RODAPÉ */
.footer {
  background-color: #111;
  color: #f0f0f0;
  padding: 40px 20px;
  text-align: center;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  max-width: 1200px;
  margin: 0 auto 20px auto;
}

.footer-section {
  margin: 20px;
  min-width: 200px;
}

.footer-section h3 {
  margin-bottom: 15px;
  color: #F4A261;
  font-size: 1.2rem;
}

.footer-section a {
  display: block;
  color: #f0f0f0;
  text-decoration: none;
  margin: 5px 0;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #F4A261;
}

.footer-section p {
  margin: 5px 0;
}

.footer-copy {
  border-top: 1px solid #333;
  padding-top: 15px;
  font-size: 0.9rem;
  color: #999;
}

/* Ícones */
.footer-section i {
  margin-right: 8px;
  color: #F4A261;
}

/* Responsivo */
@media screen and (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
  }
}

/* PIX AREA */
#pix-area {
  margin-top: 1rem;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  border: 2px dashed #F4A261;
}

#pix-info {
  margin-bottom: 1rem;
}

#pix-info p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: #333;
}

#pix-qrcode {
  margin: 1rem auto;
  display: block;
  border: 2px solid #F4A261;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}