/* Search Results Dropdown Styles */
.search-section {
  position: relative;
}

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 500px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 8px;
}

/* Loading State */
.search-loading {
  padding: 30px;
  text-align: center;
  color: #666;
  font-size: 14px;
}

.search-loading i {
  margin-right: 8px;
  color: #0066cc;
}

/* No Results */
.search-no-results {
  padding: 40px 20px;
  text-align: center;
  color: #999;
}

.search-no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ddd;
}

.search-no-results p {
  margin: 0;
  font-size: 14px;
}

/* Error State */
.search-error {
  padding: 30px 20px;
  text-align: center;
  color: #d32f2f;
}

.search-error i {
  font-size: 32px;
  margin-bottom: 12px;
}

.search-error p {
  margin: 0;
  font-size: 14px;
}

/* Results List */
.search-results-list {
  padding: 8px 0;
}

.search-category {
  margin-bottom: 8px;
}

.search-category:last-child {
  margin-bottom: 0;
}

.search-category-title {
  padding: 12px 16px 8px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

.search-category:first-child .search-category-title {
  border-top: none;
}

/* Result Item */
.search-result-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:last-child {
  border-bottom: none;
}

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

.search-result-image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-right: 16px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.product-material {
  font-size: 12px;
  color: #666;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Results Footer */
.search-results-footer {
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  color: #999;
  background: #f8f9fa;
  border-top: 1px solid #e9ecef;
}

/* Scrollbar Styling */
.search-results-dropdown::-webkit-scrollbar {
  width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 8px 8px 0;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .search-results-dropdown {
    max-height: 400px;
    left: -16px;
    right: -16px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .search-result-image {
    width: 50px;
    height: 50px;
    margin-right: 12px;
  }

  .search-result-name {
    font-size: 13px;
  }

  .product-material {
    font-size: 11px;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-results-dropdown {
  animation: fadeIn 0.2s ease-out;
}
