/* =======================================================================
   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: var(--color-primary-dark);
}

.srm-header .results-controls-pricecompare {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  flex-shrink: 0;
  min-width: 0;
}

.save-search-btn--guest {
  text-decoration: none;
}

.save-search-msg {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
}

@media (max-width: 767px) {
  .save-search-msg {
    order: 10;
  }
}
.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: var(--color-primary);
  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: var(--color-primary); }
.srm-sidebar .btn-reset-filters {
  background: transparent;
  border: 0;
  color: var(--color-primary);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
.srm-sidebar .btn-reset-filters:hover { background: var(--color-primary-light); }

.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: var(--color-primary);
  color: var(--color-primary);
}
.srm-sidebar .rating-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  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: var(--color-primary); 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: var(--color-primary); 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: var(--color-primary-light); color: var(--color-primary);
}

.srm-sidebar .btn-show-more-filters {
  background: transparent;
  border: 0;
  color: var(--color-primary);
  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: var(--color-primary);
  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: var(--color-primary);
  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 (Bootstrap: 2 / 3 / 4 / 5 per row) ========== */
.products-grid-pricecompare.srm-grid {
  display: flex;
  flex-wrap: wrap;
  /* Reset CSS-grid rules from pricecompare-modern.css */
  grid-template-columns: none;
  gap: 0;
  row-gap: 1.75rem;
  margin-left: 0;
  margin-right: 0;
  border: none;
  background: transparent;
}

/* critical.css sets width:auto on .row > [class*=col-] — enforce BS widths */
.products-grid-pricecompare.srm-grid > .srm-grid-col {
  min-width: 0;
  display: flex;
  position: relative;
  border: none;
  margin-bottom: 0 !important;
  padding: 0.35rem 1.15rem 0.5rem !important;
}

/* Soft channel divider between columns (fades top/bottom — not a hairline grid) */
.products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(2n))::after {
  content: '';
  position: absolute;
  top: 0.75rem;
  bottom: 0.75rem;
  right: 0;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(148, 163, 184, 0) 0%,
    rgba(148, 163, 184, 0.35) 18%,
    rgba(148, 163, 184, 0.35) 82%,
    rgba(148, 163, 184, 0) 100%
  );
  pointer-events: none;
}

@media (min-width: 768px) {
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(2n))::after {
    content: none;
  }
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(3n))::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    right: 0;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      rgba(148, 163, 184, 0) 0%,
      rgba(148, 163, 184, 0.35) 18%,
      rgba(148, 163, 184, 0.35) 82%,
      rgba(148, 163, 184, 0) 100%
    );
    pointer-events: none;
  }
}

@media (min-width: 992px) {
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(3n))::after {
    content: none;
  }
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(4n))::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    right: 0;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      rgba(148, 163, 184, 0) 0%,
      rgba(148, 163, 184, 0.35) 18%,
      rgba(148, 163, 184, 0.35) 82%,
      rgba(148, 163, 184, 0) 100%
    );
    pointer-events: none;
  }
}

@media (min-width: 1200px) {
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(4n))::after {
    content: none;
  }
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col:not(:nth-child(5n))::after {
    content: '';
    position: absolute;
    top: 0.75rem;
    bottom: 0.75rem;
    right: 0;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(
      180deg,
      rgba(148, 163, 184, 0) 0%,
      rgba(148, 163, 184, 0.35) 18%,
      rgba(148, 163, 184, 0.35) 82%,
      rgba(148, 163, 184, 0) 100%
    );
    pointer-events: none;
  }
}

.products-grid-pricecompare.srm-grid > .srm-grid-col > .srm-card {
  width: 100%;
}

.products-grid-pricecompare.srm-grid > .col-6 {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
}

@media (min-width: 768px) {
  .products-grid-pricecompare.srm-grid > .col-md-4 {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
  }
}

@media (min-width: 992px) {
  .products-grid-pricecompare.srm-grid > .col-lg-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    width: 25% !important;
  }
}

@media (min-width: 1200px) {
  .products-grid-pricecompare.srm-grid:not(.list-view) > .srm-grid-col {
    flex: 0 0 20% !important;
    max-width: 20% !important;
    width: 20% !important;
  }
}

.products-grid-pricecompare.srm-grid.list-view {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
  background: #ffffff;
  border: 1px solid var(--srm-border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  row-gap: 0;
}

.products-grid-pricecompare.srm-grid.list-view > .srm-grid-col {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  border: none;
  padding: 0 !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid var(--srm-border, #e5e7eb);
}

.products-grid-pricecompare.srm-grid.list-view > .srm-grid-col:last-child {
  border-bottom: none;
}

.products-grid-pricecompare.srm-grid.list-view > .srm-grid-col::after {
  content: none !important;
}

/* Horizontal row layout inside each list item */
.products-grid-pricecompare.srm-grid.list-view .srm-card {
  flex-direction: row;
  align-items: center;
  gap: 0;
  padding: 0.75rem 1rem;
  min-height: 0;
  background: #ffffff;
  transition: background 0.15s ease;
}

.products-grid-pricecompare.srm-grid.list-view .srm-card:hover {
  background: #f8fafc;
}

.products-grid-pricecompare.srm-grid.list-view .srm-image-wrap {
  flex: 0 0 64px;
  width: 64px;
  max-width: 64px;
  aspect-ratio: 3 / 4;
  height: auto;
  align-self: center;
  border-radius: 8px;
}

.products-grid-pricecompare.srm-grid.list-view .srm-image-link,
.products-grid-pricecompare.srm-grid.list-view .srm-image-wrap img {
  border-radius: 8px;
}

.products-grid-pricecompare.srm-grid.list-view .srm-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 0 0 0.875rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: 1rem;
  row-gap: 0.2rem;
  align-items: center;
}

.products-grid-pricecompare.srm-grid.list-view .srm-author-text {
  grid-column: 1;
  grid-row: 1;
}

.products-grid-pricecompare.srm-grid.list-view .srm-title {
  grid-column: 1;
  grid-row: 2;
  -webkit-line-clamp: 2;
  font-size: 0.9375rem;
}

.products-grid-pricecompare.srm-grid.list-view .srm-rating {
  grid-column: 1;
  grid-row: 3;
}

.products-grid-pricecompare.srm-grid.list-view .srm-footer {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  margin-top: 0;
  padding-left: 0.5rem;
  text-align: right;
}

.products-grid-pricecompare.srm-grid.list-view .srm-price-row {
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.products-grid-pricecompare.srm-grid.list-view .srm-price-main {
  font-size: 1.0625rem;
  font-weight: 700;
  white-space: nowrap;
}

.products-grid-pricecompare.srm-grid.list-view .srm-offers-hint {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--srm-muted, #64748b);
  margin-top: 0.15rem;
  white-space: nowrap;
}

.products-grid-pricecompare.srm-grid.list-view .srm-wishlist {
  top: 0.35rem;
  right: 0.35rem;
  width: 36px;
  height: 36px;
  font-size: 0.75rem;
}

.products-grid-pricecompare.srm-grid.list-view .srm-compare {
  top: auto;
  bottom: 0.35rem;
  left: 0.35rem;
  width: 36px;
  height: 36px;
}

.products-grid-pricecompare.srm-grid.list-view .srm-discount-badge {
  bottom: 0.35rem;
  left: 0.35rem;
  font-size: 0.625rem;
  padding: 0.15rem 0.4rem;
}

.products-grid-pricecompare.srm-grid.list-view .srm-offers-badge {
  top: auto;
  bottom: 0.35rem;
  right: 0.35rem;
  left: auto;
  font-size: 0.5625rem;
  padding: 0.15rem 0.35rem;
}

/* List column header (shown via :has when list view active) */
.srm-list-header {
  display: none;
  grid-template-columns: 64px minmax(0, 1fr) 7rem;
  gap: 0.875rem;
  align-items: center;
  padding: 0.55rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--srm-border, #e5e7eb);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--srm-muted, #64748b);
}

.search-page-chawkbazar:has(.products-grid-pricecompare.list-view) .srm-list-header {
  display: grid;
}

.search-page-chawkbazar:has(.products-grid-pricecompare.list-view) .products-grid-pricecompare.list-view {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.srm-list-header-price {
  text-align: right;
}

@media (min-width: 768px) {
  .products-grid-pricecompare.srm-grid.list-view .srm-card {
    padding: 0.875rem 1.25rem;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-image-wrap {
    flex: 0 0 80px;
    width: 80px;
    max-width: 80px;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-body {
    padding-left: 1.125rem;
    column-gap: 1.5rem;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-title {
    font-size: 1rem;
  }

  .srm-list-header {
    grid-template-columns: 80px minmax(0, 1fr) 8rem;
    gap: 1.125rem;
    padding: 0.65rem 1.25rem;
  }
}

@media (max-width: 479px) {
  .products-grid-pricecompare.srm-grid.list-view .srm-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-footer {
    grid-column: 1;
    grid-row: 4;
    align-self: start;
    padding-left: 0;
    text-align: left;
    margin-top: 0.15rem;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-price-row {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
  }

  .srm-list-header {
    display: none !important;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-image-wrap {
    margin-bottom: 0.35rem;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-compare {
    top: 0.35rem;
    bottom: auto;
    left: 0.35rem;
  }

  .products-grid-pricecompare.srm-grid.list-view .srm-discount-badge {
    bottom: 0.35rem;
    left: auto;
    right: 0.35rem;
  }
}

.products-grid-pricecompare.srm-grid > .srm-grid-col.srm-grid-col--full {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}

.products-grid-pricecompare.srm-grid > .srm-grid-col.srm-grid-col--full::after {
  content: none !important;
}

.products-grid-pricecompare.srm-grid > .srm-grid-ad,
.products-grid-pricecompare.srm-grid > .no-results-message {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
  border: none;
}

.products-grid-pricecompare.srm-grid > .srm-grid-ad::after,
.products-grid-pricecompare.srm-grid > .no-results-message::after {
  content: none !important;
}

.product-card-pricecompare.srm-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  transition: none;
  position: relative;
  box-shadow: none;
}
.srm-card:hover {
  box-shadow: none;
  border-color: transparent;
  transform: none;
}

/* Image area — catalog cover */
.srm-card .srm-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: transparent;
  overflow: hidden;
  border-radius: 12px;
}
.srm-card .srm-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}
.srm-card .srm-image-wrap img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  transition: transform 0.35s ease;
  padding: 0;
  border-radius: 12px;
}
.srm-card:hover .srm-image-wrap img { transform: scale(1.03); }
.srm-card .srm-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #cbd5e1; font-size: 2.5rem;
  border-radius: 12px;
}

/* Wishlist heart */
.srm-card .srm-wishlist {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  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;
}
.srm-card .srm-wishlist:hover {
  color: #ef4444;
  background: #ffffff;
  border-color: #fecaca;
  transform: scale(1.05);
}
.srm-card .srm-wishlist.active { color: #ef4444; }

.srm-card .srm-compare {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  width: 32px;
  height: 32px;
  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.75rem;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s ease;
}
.srm-card .srm-compare:hover,
.srm-card .srm-compare.active {
  color: var(--srm-accent, #17a2b8);
  border-color: #bae6fd;
  background: #fff;
}
.srm-card .srm-compare:focus-visible,
.view-btn:focus-visible,
.rating-pill:focus-visible,
.btn-reset-filters:focus-visible,
.srm-image-link:focus-visible {
  outline: 2px solid #17a2b8;
  outline-offset: 2px;
}

.srm-card:active {
  border-color: #cbd5e1;
}

/* Discount badge */
.srm-card .srm-discount-badge {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  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;
  bottom: 0.5rem;
  right: 0.5rem;
  top: auto;
  left: auto;
  background: rgba(15, 23, 42, 0.78);
  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 — title, stars, author, price */
.srm-card .srm-body {
  padding: 0.85rem 0.15rem 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  text-align: left;
}

.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, #138496);
  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.9375rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  margin: 0;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0;
  transition: color 0.2s ease;
}
.srm-card .srm-title:hover { color: #0f172a; }

.srm-card .srm-author-text {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.srm-card .srm-author-text a {
  color: inherit;
  text-decoration: none;
}
.srm-card .srm-author-text a:hover {
  color: #6b7280;
  text-decoration: underline;
}

.srm-card .srm-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #9ca3af;
  min-height: 1.1rem;
}
.srm-card .srm-rating .srm-stars { color: #f59e0b; letter-spacing: 1px; font-size: 0.7rem; }
.srm-card .srm-rating.is-empty .srm-stars { color: #d1d5db; }
.srm-card .srm-rating .srm-rating-value { display: none; }
.srm-card .srm-rating .srm-rating-count { color: #9ca3af; font-size: 0.75rem; font-weight: 500; }
.srm-card .srm-rating .srm-rating-empty { display: none; }

.srm-card .srm-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.srm-card .srm-price-main {
  font-size: 1rem;
  font-weight: 700;
  color: #f06c64;
  line-height: 1.2;
}
.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: block;
  margin-top: 0.15rem;
  padding-top: 0;
}
.srm-card .srm-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.srm-card .srm-stores-info { display: none; }
.srm-card .srm-arrow { display: none; }
.srm-card:hover .srm-arrow { display: none; }
.srm-card .srm-offers-hint { display: none; }

/* 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;
}

.srm-mobile-view {
  display: none;
}

/* ========== Responsive ========== */
@media (max-width: 767px) {
  .products-grid-pricecompare.srm-grid > .srm-grid-col {
    padding: 0.25rem 0.85rem 0.35rem !important;
  }
  .srm-card .srm-body { padding: 0.7rem 0.05rem 0.05rem; gap: 0.28rem; }
  .srm-card .srm-title { font-size: 0.8125rem; }
  .srm-card .srm-author-text { font-size: 0.75rem; }
  .srm-card .srm-price-main { font-size: 0.9375rem; }
  .srm-card .srm-image-wrap { border-radius: 10px; }
  .srm-card .srm-image-link,
  .srm-card .srm-image-wrap img { border-radius: 10px; }
  .srm-card .srm-wishlist { width: 36px; height: 36px; font-size: 0.8125rem; }
  .srm-card .srm-compare { width: 36px; height: 36px; 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: none;
  }
  .srm-card .srm-image-link:active img {
    transform: scale(0.98);
  }
  .srm-card .srm-image-wrap:active {
    opacity: 0.92;
  }
  .srm-mobile-view {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--srm-accent, #17a2b8);
    text-decoration: none;
  }
  .srm-mobile-view i {
    font-size: 0.65rem;
    transition: transform 0.15s ease;
  }
  .srm-mobile-view:active {
    opacity: 0.75;
  }
  .srm-mobile-view:active i {
    transform: translateX(2px);
  }
}

/* =======================================================================
   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, #17a2b8);
  --srm-accent-dark: var(--color-primary-dark, #138496);
  --srm-accent-soft: var(--color-primary-light, #e6f7fa);
  --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(23, 162, 184, 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, #ecfeff);
  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(23, 162, 184, 0.18);
}
.srm-header .view-toggle-pricecompare .view-btn.active {
  background: var(--srm-accent);
  color: #ffffff;
}

/* ---------- Card accent recolor + catalog shelf polish ---------- */
.srm-card { box-shadow: none; }
.srm-card:hover { box-shadow: none; }
.srm-card .srm-title:hover { color: #111827; }
.srm-card .srm-price-main { color: #f06c64; }
.srm-card .srm-category-pill {
  background: var(--srm-accent-soft);
  color: var(--srm-accent-dark);
}
.srm-card:hover .srm-arrow {
  display: none;
}

/* 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;
  }
}
