.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 20px;
  padding: 20px;
}

.item-card {
  background-color: #262b35;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  transition: transform 0.2s ease-in-out;
  cursor: pointer;
}

.item-card:hover {
  transform: scale(1.05);
}

.item-card img,
.item-card canvas {
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
  object-fit: contain;
  display: block;
}

.item-card span {
  color: #f9f9f9;
  font-weight: 500;
  font-size: 1rem;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

#loader {
  text-align: center;
  padding: 20px;
  color: #ccc;
  font-size: 1.1rem;
}

.filter-bar {
  padding: 20px;
  text-align: center;
  color: #f9f9f9;
}

.filter-bar select {
  padding: 6px 12px;
  font-size: 1rem;
  border-radius: 6px;
  background-color: #1e1e1e;
  color: #f9f9f9;
  border: 1px solid #555;
}

.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  margin-bottom: 16px;
}

.search-bar-container {
  display: flex;
  align-items: center;
  background-color: #262b35;
  border-radius: 16px;
  padding: 8px 12px;
  transition: border-radius 0.2s ease;
  z-index: 10;
}

.search-bar-container.active {
  border-radius: 16px 16px 0 0;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background-color: #262b35;
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: 0 0 16px 16px;
  z-index: 9;
  max-height: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: max-height 0.2s ease-out;
}

.autocomplete-list.visible {
  max-height: 200px;
  overflow-y: auto;
}

#searchInput {
  flex: 1;
  border: none;
  background: transparent;
  color: white;
  font-size: 16px;
  padding: 6px;
  outline: none;
}

.search-clear {
  color: #aaa;
  cursor: pointer;
  margin: 0 12px;
  font-size: 18px;
}

.search-sort {
  cursor: pointer;
  font-size: 20px;
  color: #aaa;
  padding: 10px;
}

.autocomplete-list li {
  padding: 10px 14px;
  cursor: pointer;
  color: #ddd;
}

.autocomplete-list li:hover {
  background-color: #394250;
}

.category-dropdown {
  position: absolute;
  top: 100%;
  right: 10px;
  background-color: #222;
  border: 1px solid #555;
  border-radius: 4px;
  max-height: 210px;
  overflow-y: auto;
  z-index: 1000;
  padding: 4px 0;
  width: 200px;
  font-family: 'Roboto', sans-serif;
}

.category-dropdown.hidden {
  display: none;
}

.category-dropdown li {
  padding: 10px;
  cursor: pointer;
  color: white;
}

.category-dropdown li:hover {
  background-color: #333;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 1.1rem;
  grid-column: 1 / -1;
}

.loader {
  display: none;
  text-align: center;
  padding: 20px;
  color: #888;
  grid-column: 1 / -1;
}
.filter-select {
  padding: 8px 14px;
  background-color: #1f2530;
  border: 1px solid #444;
  border-radius: 999px;
  color: white;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 32px;
  transition: border-color 0.2s ease;
}

.filter-select:focus {
  border-color: #88c;
  outline: none;
}

.container-tight {
  padding-top: 12px !important;
  margin-top: 0 !important;
  overflow: visible !important; 
}

.items-count {
  margin-bottom: 30px !important;
}


.ad-fixed {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 600px;
  z-index: 1000;
  border: 0px solid red;
  box-sizing: border-box;
}

.ad-left {
  left: 10px;
}

.ad-right {
  right: 10px;
}

@media (max-width: 1200px) {
  .ad-fixed {
    display: none;
  }
}

