:root {
  --vermelho: #c62828;
  --amarelo: #fbc02d;
  --marrom: #4e342e;
  --bege: #fff8e1;
  --preto: #222;
}

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BASE */
body {
  font-family: "Roboto Slab", serif;
  background: var(--bege);
  color: var(--preto);
}

/* HEADER */
.header {
  height: 320px;

  background-image: url("./assets/16625.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
}

header,
.container,
.filtros {
  position: relative;
  z-index: 1;
}

.header-overlay {
  position: absolute;
  inset: 0;

  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.45));

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;
  padding: 20px;
}

.header-overlay h1 {
  font-size: 2.8rem;
  color: #ffffff;

  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.header-overlay p {
  color: #ffffff;
  margin-top: 8px;

  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
}

/* CONTAINER */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.filtros {
  background: white;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;

  display: flex;
  flex-direction: column;
  gap: 15px;

  border: 1px solid #e0d6c3;
}

/* TÍTULO */
.filtros-titulo {
  font-size: 1.2rem;
  color: var(--vermelho);
}

.busca-principal {
  width: 100%;
  margin-bottom: 20px;

  background: white;
  padding: 20px;
  border-radius: 12px;

  border: 1px solid #e0d6c3;
}

.busca-principal input {
  width: 100%;

  padding: 14px;
  border-radius: 8px;
  border: 1px solid #ddd;

  font-size: 1rem;
}
/* GRID DOS SELECTS */
.filtros-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* INPUTS E SELECTS */
input,
select {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;

  font-size: 0.9rem;

  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--vermelho);
  box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.15);
}

/* BUSCA DE TAG */
.busca-tags {
  position: relative;
}

#input-tag {
  width: 100%;
}

/* SUGESTÕES */
.sugestoes {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  background: white;
  border: 1px solid #ddd;
  border-radius: 0 0 8px 8px;

  max-height: 200px;
  overflow-y: auto;

  z-index: 5;
}

/* TAGS SELECIONADAS */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* TAG */
.tag {
  display: flex;
  align-items: center;
  gap: 6px;

  background: var(--vermelho);
  color: white;

  padding: 6px 12px;
  border-radius: 20px;

  font-size: 0.8rem;
}

/* BOTÃO REMOVER TAG */
.tag-remove {
  background: none;
  border: none;
  color: white;

  cursor: pointer;
  font-size: 14px;
}

.tag-remove:hover {
  opacity: 0.7;
}

/* BOTÃO LIMPAR */
.btn-limpar {
  align-self: flex-end;

  background: transparent;
  border: 1px solid var(--vermelho);
  color: var(--vermelho);

  padding: 8px 14px;
  border-radius: 6px;

  cursor: pointer;
  font-size: 0.85rem;

  transition: all 0.2s ease;
}

.btn-limpar:hover {
  background: var(--vermelho);
  color: white;
}

/* GRID */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* CARD */
.bar-card {
  background: var(--bege);
  border: 2px solid #e0d6c3;
  border-radius: 8px;
  overflow: hidden;
}

.bar-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.bar-card-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-card h3 {
  color: var(--vermelho);
}

.bar-card p {
  color: var(--marrom);
}

.bar-card button {
  margin-top: 10px;
  width: 100%;
  border: none;
  background: var(--vermelho);
  color: white;
  cursor: pointer;
  padding: 10px;
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.6);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 9999; /* 🔥 resolve sobreposição */
}

.modal-content {
  background: white;
  width: 90%;
  max-width: 500px;

  border-radius: 16px;
  overflow: hidden;

  position: relative; /* importante pro botão */
  animation: fadeIn 0.2s ease;
}

.modal-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.modal-body {
  padding: 20px;
}

.modal-body h2 {
  margin-bottom: 5px;
}

.modal-prato {
  font-weight: 600;
  color: #c0392b;
  margin-bottom: 10px;
}

.modal-descricao {
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.modal-info p {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.modal-horarios {
  margin-top: 15px;
}

.modal-horarios h4 {
  margin-bottom: 5px;
}

/* 🔥 BOTÃO DE FECHAR (FIXO E VISÍVEL) */
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;

  background: rgba(0, 0, 0, 0.7);
  color: white;

  border: none;
  border-radius: 50%;

  width: 32px;
  height: 32px;

  font-size: 18px;
  cursor: pointer;

  z-index: 10000; /* acima de tudo */
}

/* animação leve */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================= */
/* RESPONSIVIDADE */
/* ========================= */

/* TABLET */
@media (max-width: 900px) {
  .header {
    height: 220px;
  }

  .header-overlay h1 {
    font-size: 2rem;
  }

  .container {
    padding: 15px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

/* MOBILE */
@media (max-width: 600px) {
  .header {
    height: 220px;
  }

  /* FILTROS */
  .filtros {
    flex-direction: column;
  }

  input,
  select {
    width: 100%;
  }

  /* GRID */
  .grid {
    grid-template-columns: 1fr;
  }

  /* CARD */
  .bar-card img {
    height: 180px;
  }

  .bar-card h3 {
    font-size: 1rem;
  }

  .bar-card p {
    font-size: 0.85rem;
  }

  /* MODAL */
  .modal-content {
    max-width: 100%;
    border-radius: 10px;
  }

  .modal-img {
    height: 160px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-body h2 {
    font-size: 1.2rem;
  }

  .modal-descricao {
    font-size: 0.9rem;
  }

  .modal-horarios {
    font-size: 0.85rem;
  }
}
/* ========================= */
/* FOOTER */
/* ========================= */

.footer {
  background: var(--marrom);
  color: #fff;
  margin-top: 40px;
  padding: 25px 20px;
}

.footer-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 10px;
  opacity: 0.9;
}

.footer-copy {
  margin-top: 10px;
  font-size: 0.8rem;
  opacity: 0.7;
}

.footer-links {
  margin: 15px 0;
}

.footer-links a {
  color: var(--amarelo);
  text-decoration: none;
  font-weight: 600;
  margin: 0 10px;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--marrom);
}

.empty-state h3 {
  color: var(--vermelho);
  margin-bottom: 10px;
}

.empty-state p {
  font-size: 0.9rem;
  opacity: 0.8;
}

.busca-tags {
  position: relative;
  width: 100%;
}

#input-tag {
  width: 100%;
}

.sugestoes {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;

  background: white;
  border: 1px solid #ccc;
  border-top: none;

  max-height: 200px;
  overflow-y: auto;

  z-index: 10;
}

.sugestao-item {
  padding: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.sugestao-item:hover {
  background: var(--bege);
}
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: flex;
  align-items: center;
  gap: 6px;

  background: #c0392b;
  color: white;

  padding: 6px 10px;
  border-radius: 20px;

  font-size: 0.85rem;
}

.tag-remove {
  background: none;
  border: none;
  color: white;

  cursor: pointer;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.tag-remove:hover {
  opacity: 0.7;
}

.tag.active {
  background: #c0392b;
  color: white;
}
