.search-wrapper.show-clear .clear-search {
  display: inline;
}

.product-page {
  display: flex;
  flex: 1;
  padding: 1rem;
  gap: 1rem;
}

.sidebar {
  width: 250px;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  height: fit-content;
}

.sidebar h3 {
  margin-bottom: 0.5rem;
  color: #001f3f;
}

.sidebar label {
  display: block;
  margin-bottom: 0.3rem;
  cursor: pointer;
}

.produtos-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.produto-card {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  max-height: 250px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.produto-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.filtro-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: #007bff;
  color: white;
  padding: 15px;
  border-radius: 50%;
  font-size: 24px;
  text-decoration: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
}

.filtro-mobile-popup {
  display: none;
  position: fixed;
  top: 60px;
  left: 10px;
  right: 10px;
  background: white;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  z-index: 999;
  flex-direction: column;
  gap: 0.5rem;
}

.filtro-mobile-popup.active {
  display: flex;
}

.filtro-mobile-popup h4 {
  margin-top: 1rem;
}

.filtro-mobile-popup label {
  margin-bottom: 0.3rem;
}

.filtro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filtro-header i {
  font-size: 1.5rem;
  cursor: pointer;
}
.produto-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}

.produto-modal {
  background: white;
  max-width: 800px;
  width: 100%;
  border-radius: 10px;
  padding: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

.produto-modal-close {
  position: absolute;
  z-index: 2200;
  top: 0.5rem;
  right: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #333;
}

.produto-modal-imagem {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.produto-modal-imagem img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.produto-modal-thumbs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.produto-modal-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: border-color 0.2s;
}

.produto-modal-thumbs img.active {
  border-color: #007bff;
}

.produto-modal-conteudo {
  margin-top: 1rem;
}

.produto-modal-conteudo h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #001f3f;
}

.produto-modal-conteudo p {
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.produto-modal-conteudo .whatsapp-btn {
  margin-top: 1rem;
  display: inline-block;
  background-color: #25D366;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
}

.produto-modal-conteudo .whatsapp-btn:hover {
  background-color: #1ebe5d;
}
.produto-modal-conteudo .share-btn {
  margin-top: 1rem;
  display: inline-block;
  background-color: #007bff;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
  cursor: pointer;
}

.produto-modal-conteudo .share-btn:hover {
  background-color: #026ada;
}
.custom-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background: #333;
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  opacity: 0;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  z-index: 3000;
  pointer-events: none;
}
.custom-toast.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* CSS para mensagens de erro amigáveis no grid de produtos */

.produtos-grid > p,
#produtos-container > p {
  grid-column: 1 / -1;
  text-align: center;
  color: #555;
  font-size: 1.1rem;
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin: 1rem auto;
  max-width: 400px;
  max-height: 80px;
  animation: fadeInMensagem 0.3s ease-in-out;
}

@keyframes fadeInMensagem {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsividade */
@media (max-width: 768px) {

  .sidebar {
    display: none;
  }

  .filtro-mobile-toggle {
    display: flex;
  }
  #marca-filtros,
  #tag-filtros,
  #marca-filtros-mobile,
  #tag-filtros-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  #marca-filtros label,
  #tag-filtros label,
  #marca-filtros-mobile label,
  #tag-filtros-mobile label {
    display: flex;
    align-items: center;
    background-color: #f1f1f1;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
  }

  #marca-filtros input[type="checkbox"],
  #tag-filtros input[type="checkbox"],
  #marca-filtros-mobile input[type="checkbox"],
  #tag-filtros-mobile input[type="checkbox"] {
    margin-right: 6px;
  }
  .produto-modal {
    max-height: 90vh;
    overflow-y: auto;
  }
}
