/* SEARCH RESULTS PAGE STYLES */
:root {
  --primary-color: #4CAF50;
  --primary-dark: #3e8e41;
  --primary-light: #81c784;
  --text-color: #333;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --border-color: #e0e0e0;
}

.search-hero {
  background-color: var(--bg-light);
  padding: 100px 0 60px;
  margin-bottom: 40px;
  background-image: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(255, 255, 255, 1) 100%);
}

.search-hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.search-hero h1 {
  font-size: 2.5rem;
  color: var(--text-color);
  margin-bottom: 15px;
  font-weight: 700;
}

.search-meta {
  font-size: 1.1rem;
  color: var(--text-light);
}

.search-meta strong {
  color: var(--text-color);
  font-weight: 600;
}

.result-count {
  color: var(--primary-color);
  font-weight: 700;
}

/* Results List */
.results-list {
  margin-bottom: 40px;
}

.result-item {
  padding: 25px 0;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.result-item:hover {
  background-color: rgba(76, 175, 80, 0.03);
}

.result-image-wrapper {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(76, 175, 80, 0.1), rgba(76, 175, 80, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.result-image-wrapper:hover .image-overlay {
  opacity: 1;
}

.result-image-wrapper:hover .result-image {
  transform: scale(1.05);
}

.result-details h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.result-details h3 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s;
}

.result-details h3 a:hover {
  color: var(--primary-color);
}

.category-badge {
  display: inline-block;
  margin-bottom: 12px;
}

.category-badge a {
  font-size: 0.8rem;
  padding: 4px 12px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 20px;
  color: var(--primary-dark);
  text-decoration: none;
  transition: all 0.3s;
  font-weight: 500;
}

.category-badge a:hover {
  background: var(--primary-color);
  color: white;
}

.result-excerpt {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 15px;
}

.result-meta {
  margin-bottom: 15px;
  font-size: 0.9rem;
  color: #888;
}

.result-date {
  display: inline-flex;
  align-items: center;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--primary-color);
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
  border: none;
  font-weight: 500;
}

.btn-view:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

/* Pagination */
.results-pagination {
  margin-top: 40px;
}

.pagination {
  justify-content: center;
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-link {
  color: var(--primary-color);
  margin: 0 5px;
  border-radius: 4px !important;
  border: 1px solid var(--border-color);
}

.page-link:hover {
  color: var(--primary-dark);
  background-color: rgba(76, 175, 80, 0.1);
  border-color: var(--border-color);
}

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 0;
  background-color: var(--bg-light);
  border-radius: 8px;
  margin: 40px 0;
}

.no-results-content {
  max-width: 600px;
  margin: 0 auto;
}

.no-results-icon {
  color: var(--primary-light);
  margin-bottom: 25px;
}

.no-results h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--text-color);
  font-weight: 600;
}

.no-results p {
  color: var(--text-light);
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.suggestions-list {
  list-style: none;
  padding: 0;
  margin: 0 auto 30px;
  max-width: 300px;
  text-align: left;
}

.suggestions-list li {
  padding: 8px 0;
  position: relative;
  padding-left: 25px;
  color: var(--text-light);
}

.suggestions-list li:before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 10px;
}

/* Search Sidebar */
.search-sidebar {
  position: sticky;
  top: 20px;
}

.sidebar-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 25px;
  overflow: hidden;
  border: none;
  transition: transform 0.3s ease;
}

.sidebar-card:hover {
  transform: translateY(-5px);
}

.sidebar-card .card-body {
  padding: 25px;
}

.sidebar-card .card-title {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

.search-form .input-group {
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 15px;
}

.search-form .form-control {
  border: 1px solid var(--border-color);
  border-right: none;
}

.search-form .btn {
  background: var(--primary-color);
  border-color: var(--primary-color);
  padding: 0 20px;
}

.search-form .btn:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.form-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
  display: block;
}

.form-select {
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  font-size: 0.9rem;
}

.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(76, 175, 80, 0.25);
}

/* Popular Products */
.popular-items {
  margin-top: 10px;
}

.popular-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s;
  align-items: center;
}

.popular-item:hover {
  background: rgba(76, 175, 80, 0.03);
  padding-left: 5px;
}

.popular-image {
  width: 60px;
  height: 60px;
  margin-right: 15px;
  overflow: hidden;
  border-radius: 6px;
}

.popular-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.popular-item:hover .popular-image img {
  transform: scale(1.1);
}

.popular-info h6 {
  font-size: 0.95rem;
  margin-bottom: 5px;
  font-weight: 600;
}

.popular-category {
  font-size: 0.8rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Categories */
.categories-list {
  margin-top: 10px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-light);
  transition: all 0.3s;
}

.category-item:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.category-name {
  font-size: 0.9rem;
}

.product-count {
  background: var(--primary-color);
  color: white;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.btn-view-all {
  display: block;
  text-align: center;
  margin-top: 15px;
  padding: 8px;
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-view-all:hover {
  background: var(--primary-color);
  color: white;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .search-hero {
    padding: 80px 0 50px;
  }
  
  .search-hero h1 {
    font-size: 2rem;
  }
  
  .result-item {
    padding: 20px 0;
  }
  
  .result-details h3 {
    font-size: 1.1rem;
  }
  
  .search-sidebar {
    margin-top: 40px;
  }
}

@media (max-width: 768px) {
  .result-image {
    height: 140px;
  }
  
  .no-results {
    padding: 60px 20px;
  }
  
  .no-results h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 576px) {
  .result-item .row {
    flex-direction: column;
  }
  
  .result-item .col-md-3 {
    margin-bottom: 15px;
  }
  
  .result-image {
    max-height: 200px;
    height: auto;
  }
  
  .search-hero {
    padding: 60px 0 40px;
  }
  
  .search-hero h1 {
    font-size: 1.8rem;
  }
  
  .no-results h3 {
    font-size: 1.3rem;
  }
  
  .suggestions-list {
    max-width: 100%;
  }
}