/* 1. VARIÁVEIS CSS (Simplifica manutenção das cores e fontes) */
:root {
  /* Cores Principais */
  --color-cream: #e8e3cc;
  --color-red: #bd322c;
  --color-dark-red: #771213;
  --color-black: #1a1a1a;
  --color-gray: #4a4a4a;
  --color-white: #ffffff;

  /* Fontes Restritas pelo Brandbook */
  /* Genica One para Títulos em Caixa Alta. Caso não esteja globalmente instalada, usa fallback com uma vibe retro */
  --font-title: 'Genica One', 'Alfa Slab One', 'Arial Black', sans-serif;
  /* Raleway para textos com fluidez */
  --font-text: 'Raleway', sans-serif;

  /* Header Height */
  --header-height: 4.5rem;
}

/* 2. RESET BÁSICO */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Animação suave entre seções */
}

body {
  font-family: var(--font-text);
  background-color: var(--color-cream);
  color: var(--color-black);
  line-height: 1.6;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* 3. TIPOGRAFIA */
h1,
h2,
h3,
h4,
h5,
h6,
.logo {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 4. CLASSES REUTILIZÁVEIS E GRID SYSTEM */
.container {
  max-width: 1200px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.grid {
  display: grid;
  gap: 2rem;
}

.section {
  padding: 6rem 0 4rem;
}

.section-title {
  font-size: 2.5rem;
  color: var(--color-dark-red);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--color-gray);
  margin-bottom: 3rem;
  font-weight: 600;
}

.center {
  text-align: center;
}

/* Botões */
.button {
  display: inline-block;
  background-color: var(--color-red);
  color: var(--color-white);
  padding: 1rem 2rem;
  border-radius: 4px;
  font-weight: 700;
  font-family: var(--font-title);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 2px solid var(--color-red);
}

.button:hover {
  background-color: var(--color-dark-red);
  border-color: var(--color-dark-red);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(119, 18, 19, 0.4);
}

.button-outline {
  background-color: transparent;
  color: var(--color-dark-red);
  border-color: var(--color-dark-red);
}

.button-outline:hover {
  background-color: var(--color-dark-red);
  color: var(--color-cream);
}

/* Redes Sociais no Conteúdo */
.instagram-link {
  display: inline-block;
  color: var(--color-dark-red);
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.instagram-link svg {
  width: 40px;
  height: 40px;
}

.instagram-link:hover {
  color: var(--color-red);
  transform: translateY(-3px) scale(1.1);
}

/* 5. HEADER & NAVBAR */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: transparent;
  transition: all 0.4s ease;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Classe adicionada via JS ao dar scroll */
.scroll-header {
  background-color: rgba(232, 227, 204, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.navbar {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: height 0.4s ease;
}

.scroll-header .navbar {
  height: 3.5rem;
  /* Forçar uma redução na barra do menu global ao rolar */
}

.logo {
  font-size: 1.8rem;
  color: var(--color-dark-red);
  display: flex;
  align-items: center;
}

.logo span {
  color: var(--color-red);
}

.logo-img {
  max-height: 3.5rem;
  /* Ajuste de altura para caber perfeitamente na navbar */
  width: auto;
  transition: max-height 0.4s ease, transform 0.3s ease;
}

.scroll-header .logo-img {
  max-height: 2.2rem;
  /* Quando clica ou rola, o botão encolhe brutalmente pra não comer a tela */
}

.logo-img:hover {
  transform: scale(1.05);
  /* Pequeno efeito de zoom ao passar o mouse */
}

.nav-toggle,
.nav-close {
  font-size: 1.5rem;
  color: var(--color-dark-red);
  cursor: pointer;
  display: flex;
  padding: 0.5rem;
  /* Aumenta a area de clique tátil do menu hamburger */
}

/* Estilos de Menu Desktop vs Mobile */
@media screen and (max-width: 768px) {

  /* Retiramos a navbar muito grande ao manter o hamburger e compactar */
  .navbar {
    height: 3.5rem;
  }

  .scroll-header .navbar {
    height: 3rem;
    /* Fina assim que dá scroll */
  }

  .logo-img {
    max-height: 2.8rem;
  }

  .scroll-header .logo-img {
    max-height: 2rem;
  }

  /* Alterando para uma disposição horizontal fixada por baixo (overflow com scroll horizontal ou espremido lado a lado) */
  .nav-toggle,
  .nav-close {
    display: none;
    /* Aposentando o botão de hambúrguer para sempre exibir os links fáceis */
  }

  .nav-menu {
    position: absolute;
    bottom: -2.8rem;
    /* Logo abaixo do cabeçalho */
    left: 0;
    width: 100%;
    background-color: var(--color-dark-red);
    padding: 0.8rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Permitir um scroll suave para a direita se o celular for muito estreito */
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Some com o menu da tela de hamburguer tradicional para essa nova fita horizontal */
  .nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 1rem;
  }

  .nav-link {
    color: var(--color-cream);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-title);
  }

}

.nav-link.active-link {
  color: var(--color-red);
}

/* 6. HERO SECTION (HOME) */
.home {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

/* Efeito Quadriculado (Checkerboard) */
.bg-checkerboard {
  background-image: linear-gradient(rgba(232, 227, 204, 0.8), rgba(232, 227, 204, 0.9)),
    repeating-conic-gradient(var(--color-cream) 0% 25%, #dfd9c0 0% 50%);
  background-size: 100% 100%, 60px 60px;
}

/* Efeito Quadriculado Escuro (Para Rodapé) */
.bg-checkerboard-dark {
  background-image: linear-gradient(rgba(119, 18, 19, 0.95), rgba(119, 18, 19, 0.98)),
    repeating-conic-gradient(var(--color-dark-red) 0% 25%, #5a0d0e 0% 50%);
  background-size: 100% 100%, 60px 60px;
  color: var(--color-cream);
}

@media screen and (max-width: 768px) {
  .home {
    padding-top: 6rem;
    /* Adiciona respiro superior no mobile para não sobrepor com a navbar horizontal logo de cara */
  }

  .home-data {
    margin-top: 6rem;
    /* Empurra vigorosamente o texto para baixo para livrar a colisão com a barra horizontal */
  }
}

.home-data {
  text-align: center;
}

.home-title {
  font-size: 4rem;
  color: var(--color-dark-red);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 0px var(--color-cream), 4px 4px 0px var(--color-red);
}

.home-title span {
  font-size: 6rem;
  color: var(--color-red);
  display: block;
}

.home-description {
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1.2rem;
  color: var(--color-gray);
}

/* 7. ABOUT & LOCATION SECTIONS & CAROUSEL */
.about-container,
.location-container {
  grid-template-columns: 1fr;
  align-items: center;
}

.home-carousel-container {
  width: 100%;
  max-width: 600px;
  height: 400px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 4px solid var(--color-red);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  background-color: var(--color-dark-red);
}

.about-carousel-container {
  width: 100%;
  height: 400px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 4px solid var(--color-red);
  box-shadow: -15px 15px 0 0 var(--color-cream), -15px 15px 0 4px var(--color-red);
  background-color: var(--color-dark-red);
}

/* Nav setas para carrosséis */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(26, 26, 26, 0.5);
  color: white;
  border: none;
  font-size: 1.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 10;
  border-radius: 4px;
  transition: background 0.3s;
}

.carousel-btn:hover {
  background: rgba(189, 50, 44, 0.8);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-track {
  height: 100%;
  width: 100%;
  position: relative;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.carousel-slide.current-slide {
  opacity: 1;
}

.carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-description {
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* 8. MENU SECTION (AS 6 ILUSTRAÇÕES) */
.menu-container {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.menu-card {
  text-align: center;
  padding: 2rem;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-bottom: 5px solid var(--color-red);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.menu-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(119, 18, 19, 0.15);
}

.menu-img-wrapper {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
  width: 100%;
  height: 250px;
  /* Maior para dar destaque */
  overflow: hidden;
  border-radius: 8px;
  /* Formato retangular arrendondado em vez de círculo */
}

/* Placeholder para as ilustrações fornecidas */
.img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Para personagens na posição retrato */
  background-color: var(--color-cream);
  transition: transform 0.3s ease;
}

.menu-card:hover .img-placeholder {
  transform: scale(1.05);
}

.bg-cream {
  background-color: var(--color-cream);
}

.bg-crimson {
  background-color: #f7e8db;
}

.menu-title {
  font-size: 1.8rem;
  color: var(--color-dark-red);
  margin-bottom: 0.5rem;
}



.btn-saiba-mais {
  background-color: var(--color-cream);
  color: var(--color-dark-red);
  border: 2px solid var(--color-dark-red);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 1rem;
  display: inline-block;
}

.btn-saiba-mais:hover {
  background-color: var(--color-dark-red);
  color: var(--color-cream);
}

/* Ingredient Modal Centralizado */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.ingredient-modal {
  background-color: var(--color-white);
  border: 4px solid var(--color-cream);
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 400px;
  position: relative;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-overlay.show .ingredient-modal {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-red);
  cursor: pointer;
  background: none;
  border: none;
}

.modal-sandwich-name {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--color-dark-red);
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.modal-sandwich-ingredients {
  font-family: var(--font-text);
  color: var(--color-gray);
  font-size: 1.1rem;
  line-height: 1.8;
}

.menu-detail-optional {
  color: var(--color-gray);
  font-size: 0.95rem;
  font-style: italic;
  margin-top: 1rem;
}

/* 9. FOOTER SECTION */
.footer {
  background-color: var(--color-dark-red);
  color: var(--color-cream);
  padding: 5rem 0 2rem;
  margin-top: 4rem;
}

.footer-container {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  border-bottom: 1px solid rgba(232, 227, 204, 0.2);
  padding-bottom: 3rem;
  margin-bottom: 2rem;
}

.footer-logo {
  font-size: 2rem;
  color: var(--color-cream);
  display: block;
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--color-red);
}

.footer-logo-img {
  max-height: 4.5rem;
  /* Ajuste ligeiramente maior que o header por ser rodapé */
  width: auto;
  transition: transform 0.3s ease;
}

.footer-logo-img:hover {
  transform: scale(1.05);
}

.footer-description {
  opacity: 0.8;
}

.footer-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-cream);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links p,
.footer-link {
  opacity: 0.8;
  color: var(--color-cream);
  transition: opacity 0.3s ease, color 0.3s ease;
  display: inline-block;
}

.footer-link:hover {
  opacity: 1;
  color: var(--color-white);
  text-decoration: underline;
}

.footer-copy {
  text-align: center;
  opacity: 0.6;
  font-size: 0.9rem;
}

/* 10. MEDIA QUERIES (Responsividade) */
@media screen and (min-width: 768px) {

  .nav-toggle,
  .nav-close {
    display: none;
  }

  .nav-list {
    display: flex;
    column-gap: 3rem;
  }

  .nav-link {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-title);
    position: relative;
    transition: color 0.3s;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    background-color: var(--color-red);
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
  }

  .nav-link:hover::after,
  .nav-link.active-link::after {
    width: 100%;
  }

  .about-container,
  .location-container {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }

  /* Na seção about a img fica a esquerda e texto a dir (padrão do grid), 
     Na seção location invetemos a ordem visual */
  .location-container .about-data {
    order: -1;
  }

  .home-title {
    font-size: 5rem;
  }

  .home-title span {
    font-size: 8rem;
  }
}

/* 11. ANIMAÇÕES (Scroll Reveal Effect simulado com opacity+transform) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 12. FLOATING ACTION BUTTON (PEDIDOS) */
.floating-order-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.floating-btn {
  background-color: var(--color-red);
  color: var(--color-white);
  border: none;
  padding: 1rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-title);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(189, 50, 44, 0.5);
  transition: transform 0.3s ease, background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.floating-btn:hover {
  transform: scale(1.05);
  background-color: var(--color-dark-red);
}

.btn-icon {
  font-size: 1.3rem;
}

.order-menu {
  background-color: var(--color-white);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 220px;
  border: 4px solid var(--color-cream);

  /* Escondido por padrão, aparece ao clicar na action do JS */
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  /* Efeito "bounce" */
  pointer-events: none;
}

.order-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: all;
}

.order-menu-title {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin-bottom: 0.5rem;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}

.order-option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
  color: var(--color-black);
  text-decoration: none;
  background-color: var(--color-cream);
}

.order-option:hover {
  transform: translateX(-5px);
}

/* Novo estilo para imagens personalizadas / logotipos no menu */
.order-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Cores das marcas */
.order-option.ifood:hover {
  background-color: #ea1d2c;
  color: white;
}

.order-option.keeta:hover {
  background-color: #ea1d2c;
  color: white;
}

.order-option.retirada:hover {
  background-color: #ea1d2c;
  color: white;
}