* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.header { 
  height: 100px; 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  background: #fff; 
  border-bottom: 2px solid #fff; 
}

.logo { 
  max-height: 150px; 
}

.menu { 
  display: flex; 
  align-items: center; 
  gap: 40px; 
}

.menu-link { 
  color: #000; 
  text-decoration: none; 
  font-weight: bold; 
  font-size: 12px; 
}

.banner img { 
  width: 100%; 
  height: auto; 
  display: block; 
}

.container { 
  padding: 20px; 
  max-width: 1200px; 
  margin: 0 auto; 
}

.section-title { 
  width: 100%; 
  background-color: #000; 
  color: #fff; 
  font-size: 26px; 
  text-align: center; 
  padding: 15px; 
  margin: 30px 0; 
  text-transform: uppercase; 
  border-radius: 4px;
}

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

.card { 
  border: 1px solid #eee; 
  padding: 15px; 
  text-align: center; 
  border-radius: 8px; 
  transition: transform 0.2s; 
  background: #fff;
}

.card:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

.card img { 
  width: 100%; 
  height: 180px; 
  object-fit: contain; 
  margin-bottom: 10px; 
}

.codigo-produto { 
  font-weight: bold; 
  color: #333; 
  font-size: 14px; 
}

.descricao-produto { 
  font-size: 13px; 
  color: #666; 
  margin-top: 5px; 
  min-height: 40px; 
}

.search-box { 
  margin: 30px 0; 
  text-align: center; 
}

.search-box input { 
  width: 90%; 
  max-width: 500px; 
  padding: 15px 25px; 
  border: 2px solid #000; 
  border-radius: 30px; 
  outline: none; 
  font-size: 16px;
}

html {
  scroll-behavior: smooth;
}

/* Botão Flutuante */
.back-to-top {
  display: none; 
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #000;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 9999; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

/* Seta para cima (Desenho) */
.arrow-up {
  display: inline-block;
  width: 0; 
  height: 0; 
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid white;
  margin-bottom: 2px;
}

.back-to-top:hover {
  background-color: #808080;
  transform: scale(1.1);
}

/* Espaço para o conteúdo não bater no rodapé */
body {
  padding-bottom: 60px;
}

.footer {
  width: 100%;
  background-color: #f8f8f8; 
  color: #666; 
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid #eee;
  font-size: 14px;
  margin-top: 40px;
}

/* Estilo do botão de impressão */
.print-btn {
  background-color: #000;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: background 0.3s;
}

.print-btn:hover {
  background-color: #808080;
}

/* Container do Contador */
.counter-container {
  margin-top: 15px;
  font-size: 15px;
  color: #666;
  font-weight: 500;
}

/* Número do Contador com destaque */
.counter-number {
  font-size: 22px;
  font-weight: bold;
  color: #000;
  margin-left: 0px;
  vertical-align: middle;
}

/* Responsivo para Mobile e Tablet */
@media (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .section-title { font-size: 18px; }
  .menu { gap: 15px; }
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Regras para a Impressão (PDF) */
@media print {
  .search-box, 
  .print-btn, 
  .counter-container,
  .back-to-top,
  .footer, 
  #noResults,
  .menu-link { 
    display: none !important; 
  }

  .header {
    display: flex !important;
    justify-content: center !important; 
    height: auto !important;
    padding: 10px 0;
    border-bottom: 1px solid #000;
  }

  .logo {
    max-height: 60px !important;
  }

  .grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 10px !important; 
  }

  .card {
    break-inside: avoid;
    padding: 10px !important;
    border: 1px solid #eee !important;
  }

  .card img {
    height: 120px !important; 
  }

  .descricao-produto {
    font-size: 11px !important; 
    min-height: auto !important;
  }

  .container {
    padding: 0;
    margin: 0;
    max-width: 100%;
  }

  .section-title {
    background-color: #000 !important;
    -webkit-print-color-adjust: exact; 
    print-color-adjust: exact;
    color: white !important;
    font-size: 18px !important;
    padding: 8px;
    margin: 15px 0;
  }
}