:root {
  --primary-color: #d12f2f;
  --secondary-color: #ffcc29;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --text-color: #333;
  --text-light: #7f8c8d;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: #f8f9fa;
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

header {
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d12f2f; /* Laranja */
  height: 50px;
  padding: 0 15px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.form-inline {
  display: inline-block;
  margin: 0;
  padding: 0;
}

/* Nome centralizado e empurrado por espaços dos botões */
.restaurant-name {
  flex: 1;
  text-align: center;
  z-index: 1;
}

/* Botão hambúrguer à esquerda */
.hamburger-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
  z-index: 2;
}

.hamburger-btn span {
  display: block;
  height: 3px;
  background-color: white;
  border-radius: 2px;
  width: 100%;
}
.translate-inside-modal {
  margin-top: 20px;
  text-align: center;
}

.translate-inside-modal .goog-te-gadget {
  font-size: 0;
}

.translate-inside-modal .goog-te-combo {
  background-color: var(--light-color);
  border: 1px solid var(--primary-color);
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--dark-color);
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--primary-color);
}
.modal-logo {
  display: block;
  margin: 0 auto 20px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
}


.search-btn {
  padding: 0.5rem 0.8rem;
  font-size: 1.1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-right: 0.5rem;
}

.search-btn:hover {
  background: #3d8e99;
}
.search-container {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 0.5rem;
}
#clear-cache-btn {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: var(--dark-color);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  text-align: center;
}

#clear-cache-btn:hover {
  background-color: var(--primary-color); /* tom mais escuro do amarelo */
  transform: scale(1.03);
}

#search-input {
  padding: 0.3rem 0.5rem;
  border-radius: 20px;
  border: 1px solid var(--primary-color);
  outline: none;
  font-size: 0.9rem;
  width: 150px;
}

#search-clear-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0 6px;
}

.banner {
  width: 100%;
  height: auto;
  display: block;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 0.5rem;
}

.logo i {
  font-size: 2.5rem;
  color: var(--secondary-color);
}

.logo h1 {
  margin: 0;
  font-size: 2rem;
}

.slogan {
  font-style: italic;
  font-weight: 300;
  margin-top: 0;
  font-size: 1.2rem;
  color: var(--light-color);
}

.menu-categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 0.5rem 1rem 1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
  position: sticky;
  top: 50px; /* altura da topbar */
  z-index: 999;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto; 
}


.menu-categories::-webkit-scrollbar {
  height: 8px;
}

.menu-categories::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 10px;
}

.category-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 25px;
  background: var(--light-color);
  color: var(--dark-color);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.category-section {
  margin-bottom: 3rem;
}

.category-title {
  color: var(--primary-color);
  text-align: center;
  margin: 2rem 0 1rem;
  font-size: 1.8rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.category-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--secondary-color);
  margin: 0.5rem auto 0;
}

.items-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-top: 1.5rem;
}

/* Card padrão */
.card {
  display: flex;
  align-items: center; /* Centraliza imagem e conteúdo verticalmente */
  padding: 1rem;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.card-img-container {
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  overflow: hidden;
  border-radius: 12px;
  margin-right: 1rem; /* Espaço à direita da imagem */
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.card:hover img {
  transform: none;
}

.card-content {
  flex: 1;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--dark-color);
}
.card-content p {
  min-height: unset;
}


.card strong,
.card .preco {
  font-size: 1rem;
  color: var(--primary-color);
  font-weight: bold;
  display: block;
  margin-top: 0.5rem;
}
.col-preco {
  min-width: 200px; /* aumenta a largura mínima da coluna */
  white-space: nowrap; /* evita quebra de linha dentro da célula */
}
.subitens-lista {
  margin-top: 8px;
  border-left: 3px solid var(--primary-color);
  padding-left: 8px;
}
.subitem {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 4px 0;
}
.subitem-preco {
  color: var(--primary-color);
  font-weight: bold;
}

.card-horizontal {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 100px;
  max-height: auto;
}

.card-horizontal-img {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-horizontal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.card-horizontal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.card-horizontal-content h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.card-horizontal-content .descricao-lista {
  font-size: 0.75rem;
  max-height: 90px; /* Limita a altura do texto */
  overflow-y: auto;  /* Permite scroll se necessário */
  line-height: 1.3;
  padding-right: 4px;
}
.descricao-lista .preco {
  font-size: 0.75rem;  /* Reduz tamanho para igualar ao texto */
  font-weight: 600;    /* Fica levemente em destaque sem exagero */
  color: var(--primary-color);
}
.descricao-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin: 2px 0;
  color: var(--text-light);
}
.descricao-linha .preco {
  color: var(--primary-color);
  font-weight: bold;
  margin-left: 10px;
}

.descricao-lista {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.3;
  max-height: 90px;
  overflow-y: auto;
}
.descricao-lista div {
  margin: 2px 0;
  line-height: 1.3;
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  justify-content: space-between;
}

.descricao-lista .preco {
  color: var(--primary-color);
  font-weight: bold;
  margin-left: 5px;
}

/* Container de imagem do card-horizontal */
.card-horizontal-img {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-horizontal-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Loading e Erro */
.loading,
.error {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--text-light);
}

.loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.error i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #e74c3c;
}

.error button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  margin-top: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.error button:hover {
  background: #c0392b;
}

/* Footer */
footer {
  background: var(--dark-color);
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

footer p {
  margin: 0.5rem 0;
}

.social-icons {
  margin-top: 1rem;
}

.social-icons i {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin: 0 10px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.social-icons i:hover {
  color: var(--primary-color);
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.whatsapp-float img {
  width: 50px;
  height: 50px;
}

/* Responsividade */
@media (max-width: 768px) {
  .menu-categories {
    gap: 8px;
  }

  .category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  .items-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-content,
  .card-horizontal-content {
    padding: 1.2rem;
  }
}

@media (max-width: 600px) {
  .card, .card-horizontal {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .card-img-container,
  .card-horizontal-img {
    width: 90px;
    height: 90px;
    margin: 0.75rem;
    border-radius: 10px;
  }

  .card-img-container img,
  .card-horizontal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }

  .card-content,
  .card-horizontal-content {
    padding: 0.75rem 1rem 0.75rem 0;
    align-items: center;
  }

  .card h3,
  .card-horizontal-content h3 {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
  }

  .card p,
  .descricao-lista {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
  }

  .card strong,
  .card .preco {
    font-size: 0.9rem;
  }
  
}

@media (min-width: 768px) {
  .items-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
.image-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  animation: fadeIn 0.3s ease;
}

.image-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
  z-index: 2001;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
