/* Tehberi Smart Search 3.0.5: namespaced result-page UI.
 * Do not reuse .tb-search-panel: the legacy header assigns absolute positioning to it.
 * No selectors below target the header, Smart Search modal, or product card internals.
 */
#product-search .tbss-rp-search {
  position: static;
  display: block;
  min-width: 0;
  margin: 0 0 24px;
  padding: 16px 18px 6px;
  border: 1px solid #e4e9f1;
  border-radius: 12px;
  background: #f7f9fc;
  color: #172235;
  box-shadow: none;
}
#product-search .tbss-rp-search,
#product-search .tbss-rp-search * { box-sizing: border-box; }
#product-search .tbss-rp-keyword-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
#product-search .tbss-rp-input.form-control {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  height: 48px;
  padding: 12px 15px;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
  background: #fff;
  color: #172235;
  font-size: 16px;
  line-height: 1.4;
  box-shadow: none;
}
#product-search .tbss-rp-input.form-control:focus {
  border-color: var(--tb-color-primary, #0757ff);
  outline: 2px solid #d8e6ff;
  outline-offset: 1px;
  box-shadow: none;
}
#product-search .tbss-rp-submit.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  min-height: 48px;
  height: 48px;
  padding: 10px 20px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.3;
  white-space: nowrap;
  transform: none;
}
#product-search .tbss-rp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#product-search .tbss-rp-refine { margin: 2px 0 0; min-width: 0; }
#product-search .tbss-rp-summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 0;
  list-style: none;
  cursor: pointer;
  color: #53647d;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}
#product-search .tbss-rp-summary::-webkit-details-marker { display: none; }
#product-search .tbss-rp-summary::marker { content: ''; }
#product-search .tbss-rp-summary:hover { color: var(--tb-color-primary, #0757ff); }
#product-search .tbss-rp-summary:focus-visible {
  outline: 2px solid var(--tb-color-primary, #0757ff);
  outline-offset: 3px;
  border-radius: 3px;
}
#product-search .tbss-rp-chevron {
  display: block;
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
#product-search .tbss-rp-refine[open] > .tbss-rp-summary .tbss-rp-chevron { transform: rotate(225deg); }
#product-search .tbss-rp-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 24px;
  padding: 14px 0 16px;
  border-top: 1px solid #e4e9f1;
}
#product-search .tbss-rp-category { display: grid; gap: 7px; min-width: 0; margin: 0; }
#product-search .tbss-rp-category > span { font-size: 12px; font-weight: 500; color: #61718a; }
#product-search .tbss-rp-category select.form-control {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 9px 12px;
  border: 1px solid #dfe5ee;
  border-radius: 8px;
  background-color: #fff;
  font-size: 14px;
  box-shadow: none;
  text-overflow: ellipsis;
}
#product-search .tbss-rp-checks { align-self: end; min-width: 0; }
#product-search .tbss-rp-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  cursor: pointer;
}
#product-search .tbss-rp-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--tb-color-primary, #0757ff); }
#product-search .tbss-rp-check span { min-width: 0; overflow-wrap: anywhere; }
#product-search .tbss-rp-check input:disabled + span { color: #8a96a7; }
#product-search.tbss-results-page .tb-listing-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }
#product-search.tbss-results-page #tb-search-results-title { margin: 0; font-size: 20px; line-height: 1.4; }
#product-search.tbss-results-page .tb-listing-results { overflow-wrap: anywhere; }
/* Scoped safety net for a third-party modifier retaining the old section. */
#product-search section.tb-search-panel[aria-labelledby="tb-search-controls-title"] {
  position: static;
  inset: auto;
  width: auto;
  max-width: 100%;
  max-height: none;
  overflow: visible;
  transform: none;
  box-shadow: none;
}
@media (max-width: 767px) {
  #product-search .tbss-rp-search { padding: 12px 12px 2px; margin-bottom: 20px; }
  #product-search .tbss-rp-keyword-row { gap: 8px; }
  #product-search .tbss-rp-input.form-control { padding: 10px 12px; }
  #product-search .tbss-rp-submit.btn { min-width: 88px; padding: 10px 12px; }
  #product-search .tbss-rp-options { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #product-search .tbss-rp-check { min-height: 44px; }
  #product-search.tbss-results-page #tb-search-results-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #product-search .tbss-rp-chevron { transition: none; }
}
