/* Search Product Items */
.search-product-item {
  padding: 16px;
  border-radius: 12px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  cursor: pointer;
}

.search-product-item:hover {
  background-color: #ffffff;
  border-color: #28a745;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.1);
  transform: translateY(-2px);
}

.search-product-item img {
  border-radius: 8px;
  object-fit: cover;
}

/* Loading State */
.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.search-loading .animate-spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

.no-results i {
  display: block;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Search Results Header */
.search-results-header {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.search-results-count {
  font-weight: 500;
  color: #495057;
}

/* Search Results Info */
.search-results-info {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 16px;
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid #28a745;
}

/* Category Filter Active State */
.category-filter.active {
  background-color: #28a745 !important;
  color: white !important;
}

.category-filter.active span {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: white !important;
}

/* Search Dropdown Animations */
#search-header-3 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#search-header-3.open {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Mobile Search Adjustments */
@media (max-width: 768px) {
  .search-product-item {
    padding: 12px;
  }
  
  .search-product-item img {
    width: 60px;
    height: 60px;
  }
  
  .search-loading,
  .no-results {
    padding: 30px 15px;
  }
}

/* Scrollbar Styling */
.search-products-container::-webkit-scrollbar {
  width: 4px;
}

.search-products-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.search-products-container::-webkit-scrollbar-thumb {
  background: #28a745;
  border-radius: 2px;
}

.search-products-container::-webkit-scrollbar-thumb:hover {
  background: #218838;
}

/* Price Styling in Search Results */
.search-product-item .price {
  font-weight: 600;
  color: #28a745;
}

.search-product-item del {
  color: #6c757d;
  font-size: 12px;
}

/* Discount Badge */
.search-product-item .discount-badge {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* Search Input Focus States */
input[name="search"]:focus,
#search-dropdown-field:focus {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
  outline: none;
}

/* Fade In Animation for Search Results */
.search-product-item {
  animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Static Products Container - Hidden during search */
.static-products-container {
  transition: opacity 0.3s ease;
}

.static-products-container.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Search Overlay for Mobile */
@media (max-width: 1024px) {
  #search-header-3 .fixed {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.5);
  }
}

/* Highlight Search Terms */
.search-highlight {
  background-color: #fff3cd;
  color: #856404;
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 600;
}