/* ==============================================================
   SEARCH PAGE – PURE CSS (NO TAILWIND)
   ============================================================== */

.search-section {
  padding: 3rem 0;
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Title & Count */
.search-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}
.dark .search-title { color: #f1f5f9; }

.result-count {
  color: #6b7280;
  margin-bottom: 2rem;
}
.dark .result-count { color: #94a3b8; }

/* Layout */
.search-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .search-layout { flex-direction: row; }
  .filters { width: 25%; }
  .results-main { width: 75%; }
}

/* Filters */
.filters-card {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  padding: 1.5rem;
}
.dark .filters-card { background: #1e293b; }

.filters-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111827;
}
.dark .filters-title { color: #f1f5f9; }

.filter-group { margin-bottom: 1.5rem; }
.filter-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
  color: #374151;
}
.dark .filter-label { color: #e2e8f0; }

.filter-select {
  width: 100%;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.875rem;
}
.dark .filter-select { background: #1e293b; border-color: #334155; color: #f1f5f9; }

.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #4b5563;
  cursor: pointer;
}
.dark .radio-label { color: #d1d5db; }
.radio-label input { margin-right: 0.5rem; }

/* Sort Bar */
.sort-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.sort-select {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.875rem;
}
.dark .sort-select { background: #1e293b; border-color: #334155; color: #f1f5f9; }

/* Product Grid */
.product-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
@media (min-width: 1024px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Item Card */
.item-card {
  display: block;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  transition: all .3s ease;
  text-decoration: none;
  color: inherit;
}
.dark .item-card { background: #1e293b; }

.item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1);
}

.image-container {
  background: #e5e7eb;
  overflow: hidden;
}
.dark .image-container { background: #334155; }

.product-img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  display: block;
}
@media (min-width: 640px) {
  .product-img { height: 14rem; }
}

.item-details {
  padding: 0.5rem;
  text-align: left;
}
.item-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dark .item-name { color: #f1f5f9; }

.item-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: #16a34a;
}
.dark .item-price { color: #86efac; }

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem 0;
  color: #6b7280;
  font-size: 1.125rem;
}
.dark .no-results { color: #94a3b8; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}
.pagination-btn {
  background: #16a34a;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background .2s;
}
.pagination-btn:hover:not(.disabled) {
  background: #059669;
}
.pagination-btn.disabled {
  background: #9ca3af;
  cursor: not-allowed;
  pointer-events: none;
}
.page-info {
  color: #6b7280;
  font-size: 0.875rem;
}
.dark .page-info { color: #94a3b8; }

/* Dark Mode */
html.dark .search-section { background: #0f172a; }