* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', sans-serif;
  }
  
  body {
    background-color: #f5f7fa;
    color: #333;
  
  }
  
  header {
    text-align: center;
    margin-bottom: 30px;
  }
  
  h1 {
    color: #2c3e50;
  }
  
  .section-title {
    margin-top: 30px;
    font-size: 1.5rem;
    color: #34495e;
    border-left: 5px solid #3498db;
    padding-left: 10px;
  }
  
  .grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-top: 15px;
  }
  
  .card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
  }
  
  .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
  }
  
  .card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    padding: 10px;
    background-color: #f0f0f0;
  }
  
  .card .description {
    padding: 10px;
    text-align: center;
    font-weight: 500;
    color: #555;
  }

  /* new */

  .controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
  }
  
  #search-input {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    min-width: 220px;
  }
  
  button.filter-btn {
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
  }
  
  button.filter-btn:hover,
  button.filter-btn.active {
    background-color: #2c80b4;
  }
  
  .modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
  }
  
  .modal img {
    max-width: 80%;
    max-height: 60vh;
    border-radius: 12px;
  }
  
  .modal p {
    color: #fff;
    margin-top: 10px;
    font-size: 1.2rem;
    text-align: center;
  }
  
  #modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
  }
  
  .hidden {
    display: none;
  }
  
  #filter-buttons {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  #filter-buttons::-webkit-scrollbar {
    height: 8px;
  }
  
  #filter-buttons::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 10px;
  }
/*   
  .pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  } */
  
  .pagination {
    flex-wrap: wrap; /* permite quebrar linha em telas pequenas */
    overflow-x: auto;
    padding: 10px;
    gap: 10px;
    justify-content: center;
    flex: 1;
  }
  .page-btn {
    padding: 8px 14px;
    background-color: #e0e0e0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
  }
  
  .page-btn.active {
    background-color: #3498db;
    color: white;
  }
  
  #container {
    padding: 20px;
    width: 100%;
    overflow-x: hidden; /* evita overflow horizontal */
  }

  .page-btn, .pagination span {
    min-width: 40px;
    text-align: center;
  }

  .pagination {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
  }
  .pagination::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
  
  .page-btn,
  .pagination span,
  .pagination .nav-btn {
    min-width: 44px;
    height: 44px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    background: #e9e9e9;
    color: #333;
    flex-shrink: 0;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  .page-btn.active {
    background: #007bff;
    color: #fff;
  }
  
  .page-btn:hover,
  .pagination .nav-btn:hover {
    background: #cce5ff;
  }

  #sinais {
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
  }
  
  