/* =======================================================================
   Search Results Modern - Card Grid + Sidebar Redesign
   Reference: Modern price comparison UI with rich product cards
   ======================================================================= */

/* ========== Layout helpers ========== */
.search-page-chawkbazar { padding: 1.5rem 0 3rem; background: #fafafa; }
.search-page-chawkbazar .container { max-width: 1320px; }

/* ========== Results header (top toolbar) ========== */
.search-results-header-pricecompare.srm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.srm-header .results-info-pricecompare { flex: 1 1 auto; min-width: 0; }
.srm-header .results-count-heading {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  line-height: 1.4;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.srm-header .results-count-heading strong {
  font-weight: 700;
  color: #0f172a;
}
.srm-header .results-query-text {
  color: #475569;
  font-weight: 500;
}
.srm-header .results-query-text em {
  font-style: normal;
  color: #1e40af;
}

.srm-header .results-controls-pricecompare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  min-width: 0;
}
.srm-header .sort-wrapper-pricecompare {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.srm-header .sort-select-pricecompare {
  appearance: none;
  -webkit-appearance: none;
  background: #ffffff url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2364748b'%3e%3cpath d='M8 11.5L3 6.5h10z'/%3e%3c/svg%3e") right 0.65rem center/12px no-repeat;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 2rem 0.5rem 0.85rem;
  font-size: 0.875rem;
  color: #1f2937;
  font-weight: 500;
  cursor: pointer;
  min-width: 140px;
  max-width: 100%;
}
.srm-header .sort-select-pricecompare:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.srm-header .sort-label-pricecompare { display: none; }

.srm-header .view-toggle-pricecompare {
  display: inline-flex;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}
.srm-header .view-toggle-pricecompare .view-btn {
  background: transparent;
  border: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.srm-header .view-toggle-pricecompare .view-btn + .view-btn {
  border-left: 1px solid #e5e7eb;
}
.srm-header .view-toggle-pricecompare .view-btn:hover { color: #1f2937; }
.srm-header .view-toggle-pricecompare .view-btn.active {
  background: #0f172a;
  color: #ffffff;
}

/* ========== Sidebar (Filters) ========== */
.search-sidebar-pricecompare.srm-sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.srm-sidebar .filters-header-pricecompare {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
}
.srm-sidebar .filters-title-pricecompare {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.srm-sidebar .filters-title-pricecompare i { color: #2563eb; }
.srm-sidebar .btn-reset-filters {
  background: transparent;
  border: 0;
  color: #2563eb;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
.srm-sidebar .btn-reset-filters:hover { background: #eff6ff; }

.srm-sidebar .filter-section-pricecompare {
  border-bottom: 1px solid #f1f5f9;
  padding: 0.75rem 0;
}
.srm-sidebar .filter-section-pricecompare:last-child { border-bottom: 0; }
.srm-sidebar .filter-section-header-pricecompare {
  width: 100%;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
  cursor: pointer;
}
.srm-sidebar .filter-section-title-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}
.srm-sidebar .filter-toggle-icon {
  font-size: 0.75rem;
  color: #64748b;
  transition: transform 0.2s ease;
}
.srm-sidebar .filter-section-pricecompare.collapsed .filter-toggle-icon {
  transform: rotate(-90deg);
}
.srm-sidebar .filter-section-pricecompare.collapsed .filter-options-pricecompare {
  display: none;
}
.srm-sidebar .filter-options-pricecompare {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.5rem;
}

/* Rating pill buttons */
.srm-sidebar .rating-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-top: 0.5rem;
}
.srm-sidebar .rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.srm-sidebar .rating-pill i { color: #f59e0b; font-size: 0.75rem; }
.srm-sidebar .rating-pill:hover {
  border-color: #2563eb;
  color: #2563eb;
}
.srm-sidebar .rating-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.srm-sidebar .rating-pill.active i { color: #ffffff; }

/* Generic checkbox row */
.srm-sidebar .filter-checkbox-label-pricecompare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  color: #334155;
  font-size: 0.8125rem;
}
.srm-sidebar .filter-checkbox-label-pricecompare:hover { background: #f8fafc; }
.srm-sidebar .filter-checkbox-label-pricecompare.active { color: #2563eb; font-weight: 600; }
.srm-sidebar .filter-checkbox-label-pricecompare input[type="checkbox"],
.srm-sidebar .filter-checkbox-label-pricecompare input[type="radio"] {
  width: 14px; height: 14px; accent-color: #2563eb; cursor: pointer; flex-shrink: 0;
}
.srm-sidebar .checkbox-custom-pricecompare,
.srm-sidebar .radio-custom-pricecompare { display: none; }
.srm-sidebar .filter-label-text-pricecompare { flex: 1; }
.srm-sidebar .filter-count-badge {
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
}
.srm-sidebar .filter-checkbox-label-pricecompare.active .filter-count-badge {
  background: #dbeafe; color: #2563eb;
}

.srm-sidebar .btn-show-more-filters {
  background: transparent;
  border: 0;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.4rem 0.25rem;
  text-align: left;
}
.srm-sidebar .btn-show-more-filters:hover { text-decoration: underline; }

/* Price slider */
.srm-sidebar .price-slider-container { padding-top: 0.5rem; }
.srm-sidebar .price-values-display {
  display: flex; justify-content: space-between;
  font-size: 0.8125rem; font-weight: 600; color: #0f172a;
  margin-bottom: 0.5rem;
}
.srm-sidebar .price-slider-wrapper {
  position: relative; height: 28px;
}
.srm-sidebar .price-slider {
  position: absolute; left: 0; right: 0; width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 4px; background: #e5e7eb; border-radius: 2px; outline: none;
  pointer-events: none; padding: 0; margin: 12px 0;
}
.srm-sidebar .price-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%; background: #2563eb;
  border: 2px solid #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  cursor: pointer; pointer-events: auto;
}
.srm-sidebar .price-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: #2563eb;
  border: 2px solid #ffffff; cursor: pointer; pointer-events: auto;
}
.srm-sidebar .btn-apply-price-pricecompare {
  margin-top: 0.75rem; width: 100%;
  background: #0f172a; color: #ffffff; border: 0;
  padding: 0.5rem 0.75rem; border-radius: 8px;
  font-size: 0.8125rem; font-weight: 600; cursor: pointer;
}
.srm-sidebar .btn-apply-price-pricecompare:hover { background: #1f2937; }

/* ========== Product grid ========== */
.products-grid-pricecompare.srm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.875rem;
}

.product-card-pricecompare.srm-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.srm-card:hover {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
  border-color: var(--srm-accent, #7C4A85);
  transform: translateY(-4px);
}

/* Image area */
.srm-card .srm-image-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  /* background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); */
  overflow: hidden;
}
.srm-card .srm-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.srm-card .srm-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s ease;
  padding: 0.875rem;
}
.srm-card:hover .srm-image-wrap img { transform: scale(1.04); }
.srm-card .srm-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #cbd5e1; font-size: 2.5rem;
}

/* Wishlist heart */
.srm-card .srm-wishlist {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.875rem;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s ease;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}
.srm-card .srm-wishlist:hover {
  color: #ef4444;
  background: #ffffff;
  border-color: #fecaca;
  transform: scale(1.05);
}
.srm-card .srm-wishlist.active { color: #ef4444; }

/* Compare button (top-left; wishlist stays top-right) */
.srm-card .srm-compare {
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.8125rem;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}
.srm-card .srm-compare:hover {
  color: #7C4A85;
  background: #ffffff;
  border-color: #f0c4ce;
  transform: scale(1.05);
}
.srm-card .srm-compare.active { color: #7C4A85; }

/* Discount badge */
.srm-card .srm-discount-badge {
  position: absolute;
  bottom: 0.625rem;
  left: 0.625rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #10b981;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}
.srm-card .srm-discount-badge i { font-size: 0.6875rem; }

.srm-card .srm-offers-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  z-index: 2;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* Body */
.srm-card .srm-body {
  padding: 0.875rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
}

.srm-card .srm-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.srm-card .srm-brand-text {
  font-size: 0.625rem;
  color: var(--srm-accent-dark, #4A2E4D);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srm-card .srm-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  transition: color 0.2s ease;
}
.srm-card .srm-title:hover { color: var(--srm-accent-dark, #4A2E4D); }

.srm-card .srm-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #475569;
}
.srm-card .srm-rating .srm-stars { color: #f59e0b; letter-spacing: 1px; font-size: 0.75rem; }
.srm-card .srm-rating .srm-rating-value { font-weight: 600; color: #0f172a; }
.srm-card .srm-rating .srm-rating-count { color: #94a3b8; }

.srm-card .srm-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.srm-card .srm-price-main {
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}
.srm-card .srm-price-original {
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: line-through;
}
.srm-card .srm-price-savings {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #059669;
}

.srm-card .srm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.375rem;
}
.srm-card .srm-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.srm-card .srm-stores-info {
  font-size: 0.625rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srm-card .srm-unit-price {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}
.srm-card .srm-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 0.6875rem;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.srm-card:hover .srm-arrow {
  background: var(--srm-accent, #7C4A85);
  color: #ffffff;
  transform: translateX(2px);
}

/* Legacy blocks kept for list-view / AJAX partial templates */
.srm-card .srm-retailer-card {
  background: #f9fafb;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.75rem;
}
.srm-card .srm-retailer-name {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #1f2937;
  font-weight: 600;
  min-width: 0;
}
.srm-card .srm-retailer-name i { color: #64748b; font-size: 0.75rem; }
.srm-card .srm-retailer-name span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srm-card .srm-retailer-meta {
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
}
.srm-card .srm-retailer-meta i { margin-right: 0.2rem; }

.srm-card .srm-cta-btn {
  display: none;
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
  .products-grid-pricecompare.srm-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}
@media (max-width: 767px) {
  .products-grid-pricecompare.srm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
  }
  .srm-card .srm-body { padding: 0.625rem 0.75rem 0.75rem; gap: 0.3rem; }
  .srm-card .srm-title { font-size: 0.75rem; min-height: 2.5em; }
  .srm-card .srm-price-main { font-size: 0.875rem; }
  .srm-card .srm-image-wrap img { padding: 0.625rem; }
  .srm-card .srm-arrow { width: 24px; height: 24px; font-size: 0.625rem; }
  .srm-card .srm-wishlist { width: 28px; height: 28px; font-size: 0.75rem; }
  .srm-card .srm-compare { width: 28px; height: 28px; font-size: 0.7rem; }
  .srm-card .srm-offers-badge,
  .srm-card .srm-discount-badge { font-size: 0.5625rem; padding: 0.2rem 0.45rem; }
  .srm-header { padding: 0.6rem 0.75rem; }
  .srm-header .results-count-heading { font-size: 0.875rem; }
  .srm-header .sort-select-pricecompare { min-width: 0 !important; font-size: 0.8125rem; }
  .srm-card:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  }
}

/* =======================================================================
   Refinements (May 2026) — brand-aligned accents, cleaner category header,
   softer shadows. Appended below the original block so the prior rules can
   still be diffed/reverted independently.
   ======================================================================= */

:root {
  /* Local brand-aware tokens. Fall back gracefully if --color-primary is not
     defined on the page (rare — modern-frontend.css defines it globally). */
  --srm-accent: var(--color-primary, #7C4A85);
  --srm-accent-dark: var(--color-primary-dark, #4A2E4D);
  --srm-accent-soft: var(--color-primary-light, #F4E7F3);
  --srm-accent-mid: var(--color-secondary, #A69BC1);
  --srm-ink: #0f172a;
  --srm-muted: #64748b;
  --srm-border: #e5e7eb;
}

/* ---------- Page background — tone down for less visual fatigue ---------- */
.search-page-chawkbazar { background: #f6f7f9; }

/* ---------- Category header (replaces inline-styled block) ---------- */
.category-header-modern {
  background: #ffffff;
  border: 1px solid var(--srm-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.category-header-modern .chm-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--srm-accent), var(--srm-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(124, 74, 133, 0.25);
}
.category-header-modern .chm-icon img {
  width: 64px;
  height: 64px;
  max-width: 64px;
  max-height: 64px;
  object-fit: contain;
  border-radius: 0;
}
.category-header-modern .chm-icon--image {
  background: var(--srm-accent-soft, #F4E7F3);
  box-shadow: none;
  overflow: hidden;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}
.category-header-modern .chm-text { flex: 1 1 240px; min-width: 0; }
.category-header-modern .chm-title {
  margin: 0 0 0.35rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--srm-ink);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.category-header-modern .chm-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--srm-muted);
}
.category-header-modern .chm-stats strong { color: var(--srm-ink); font-weight: 600; }
.category-header-modern .chm-stats .chm-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: #cbd5e1; display: inline-block;
}
.category-header-modern .chm-desc {
  flex: 1 1 100%;
  margin: 0;
  padding-top: 0.85rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #475569;
}
@media (max-width: 640px) {
  .category-header-modern { padding: 1rem; gap: 0.85rem; }
  .category-header-modern .chm-icon { width: 48px; height: 48px; flex-basis: 48px; font-size: 1.25rem; border-radius: 10px; }
  .category-header-modern .chm-icon--image { width: 56px; height: 56px; flex-basis: 56px; }
  .category-header-modern .chm-icon--image img { width: 44px; height: 44px; max-width: 44px; max-height: 44px; }
  .category-header-modern .chm-title { font-size: 1.125rem; }
}

/* ---------- Toolbar accent recolor ---------- */
.srm-header .results-query-text em { color: var(--srm-accent-dark); }
.srm-header .sort-select-pricecompare:focus {
  border-color: var(--srm-accent);
  box-shadow: 0 0 0 3px rgba(124, 74, 133, 0.18);
}
.srm-header .view-toggle-pricecompare .view-btn.active {
  background: var(--srm-accent);
  color: #ffffff;
}

/* ---------- Card accent recolor + softer shadow ---------- */
.srm-card { box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); }
.srm-card:hover { box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1); }
.srm-card .srm-title:hover { color: var(--srm-accent-dark); }
.srm-card .srm-price-main { color: #0f172a; }
.srm-card .srm-category-pill {
  background: var(--srm-accent-soft);
  color: var(--srm-accent-dark);
}
.srm-card:hover .srm-arrow {
  background: var(--srm-accent);
}

/* Sidebar small accents */
.srm-sidebar .filter-checkbox-label-pricecompare.active .filter-count-badge {
  background: var(--srm-accent-soft);
  color: var(--srm-accent-dark);
}
.srm-sidebar .btn-show-more-filters { color: var(--srm-accent-dark); }
.srm-sidebar .price-slider::-webkit-slider-thumb { background: var(--srm-accent); }
.srm-sidebar .price-slider::-moz-range-thumb { background: var(--srm-accent); }
.srm-sidebar .btn-apply-price-pricecompare { background: var(--srm-accent); }
.srm-sidebar .btn-apply-price-pricecompare:hover { background: var(--srm-accent-dark); }

/* ---------- Bootstrap grid fallback (extracted from inline <style> in searchresults.php)
   Ensures sidebar layout works even if Bootstrap loads slowly ---------- */
.search-page-chawkbazar .row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}
.search-page-chawkbazar .row > * {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}
.search-page-chawkbazar .col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}
@media (min-width: 992px) {
  .search-page-chawkbazar .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .search-page-chawkbazar .col-lg-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
}

/* ========== Toolbar + pagination — single-row on mobile ========== */
.search-page-chawkbazar .srm-header .results-controls-pricecompare {
  flex-wrap: nowrap;
}

.search-page-chawkbazar .srm-header .sort-wrapper-pricecompare {
  flex: 1 1 auto;
  min-width: 0;
}

.search-page-chawkbazar .srm-header .view-toggle-pricecompare {
  flex: 0 0 auto;
}

/* Pagination renders outside .search-page-chawkbazar (navigation.php) */
.pagination-wrapper-modern {
  margin-top: 1.5rem;
  padding: 0.25rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.pagination-wrapper-modern::-webkit-scrollbar {
  display: none;
}

.pagination-wrapper-modern .pagination-list {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.25rem;
  width: max-content;
  max-width: none;
  margin: 0 auto;
}

.pagination-wrapper-modern .pagination-link {
  min-width: 34px;
  height: 34px;
  padding: 0 0.45rem;
  font-size: 0.8125rem;
}

@media (max-width: 767px) {
  .search-page-chawkbazar .srm-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .search-page-chawkbazar .srm-header .results-info-pricecompare {
    flex: 0 0 auto;
  }

  .search-page-chawkbazar .srm-header .results-controls-pricecompare {
    width: 100%;
    gap: 0.375rem;
  }

  .search-page-chawkbazar .srm-header .mobile-filter-toggle-btn {
    flex: 0 0 auto;
    padding: 0.45rem 0.55rem;
    min-height: 36px;
    gap: 0;
  }

  .search-page-chawkbazar .srm-header .mobile-filter-toggle-btn span {
    display: none;
  }

  .search-page-chawkbazar .srm-header .sort-select-pricecompare {
    width: 100%;
    min-width: 0 !important;
    max-width: none;
    font-size: 0.75rem;
    padding: 0.45rem 1.65rem 0.45rem 0.55rem;
    min-height: 36px;
  }

  .search-page-chawkbazar .srm-header .view-toggle-pricecompare .view-btn {
    padding: 0.45rem 0.55rem;
    min-height: 36px;
    font-size: 0.8125rem;
  }

  .pagination-wrapper-modern .pagination-text {
    display: none !important;
  }

  .pagination-wrapper-modern .pagination-link.pagination-prev,
  .pagination-wrapper-modern .pagination-link.pagination-next {
    min-width: 34px;
    padding: 0 0.5rem;
    gap: 0;
  }

  .pagination-wrapper-modern .pagination-link {
    min-width: 32px;
    height: 32px;
    min-height: 32px !important;
  }

  .search-page-chawkbazar .srm-header .mobile-filter-toggle-btn,
  .search-page-chawkbazar .srm-header .view-toggle-pricecompare .view-btn,
  .search-page-chawkbazar .srm-header .sort-select-pricecompare {
    min-height: 36px !important;
  }
}

@media (min-width: 768px) {
  .pagination-wrapper-modern .pagination-list {
    flex-wrap: nowrap;
  }
}
