/* Search dropdown */
#search-ajax {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-height: 500px;
  overflow-y: auto;
  z-index: 9999;
  margin-top: 8px;
  display: none;
}

.HeaderSearchField_search__UTzvi {
  position: relative;
}

.search-results-dropdown {
  padding: 8px 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  gap: 12px;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: #f5f5f5;
}

.search-result-image {
  width: 80px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}

.search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-category {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

/* Dark theme */
[data-theme="dark"] #search-ajax {
  background: #1a1a1a;
  border-color: #333;
}

[data-theme="dark"] .search-result-item {
  color: #e0e0e0;
}

[data-theme="dark"] .search-result-item:hover {
  background: #2a2a2a;
}

[data-theme="dark"] .search-result-title {
  color: #fff;
}

[data-theme="dark"] .search-result-category {
  color: #999;
}

/* Mobile */
@media (max-width: 768px) {
  #search-ajax {
    max-height: 400px;
  }
  
  .search-result-image {
    width: 60px;
    height: 36px;
  }
  
  .search-result-title {
    font-size: 13px;
  }
  
  .search-result-category {
    font-size: 11px;
  }
}

/* Scrollbar */
#search-ajax::-webkit-scrollbar {
  width: 8px;
}

#search-ajax::-webkit-scrollbar-track {
  background: transparent;
}

#search-ajax::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

#search-ajax::-webkit-scrollbar-thumb:hover {
  background: #999;
}

[data-theme="dark"] #search-ajax::-webkit-scrollbar-thumb {
  background: #444;
}

[data-theme="dark"] #search-ajax::-webkit-scrollbar-thumb:hover {
  background: #666;
}
