/* Lock scroll when modal is open */
.ts-lock { overflow: hidden !important; }

/* ---------- Buttons / utilities ---------- */
.ts-muted { opacity: .72; font-size: 13px; }
.ts-link { color: #2b5cff; text-decoration: none; font-weight: 600; background: none; border: 0; cursor: pointer; }
.ts-link:hover { text-decoration: underline; }

.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 11px 14px;
  border: 1px solid #e6e8ee;
  background: #fff;
  color: #111;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease;
}
.ts-btn:active { transform: translateY(1px); }
.ts-btn--primary { background: #111; color: #fff; border-color: #111; }
.ts-btn--ghost { background: #fff; color: #111; }
.ts-btn--full { width: 100%; }

.ts-iconbtn{
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid #e6e8ee;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display:flex;align-items:center;justify-content:center;
}
.ts-iconbtn--close { width: 44px; height: 44px; font-size: 26px; }

/* ---------- Badges ---------- */
.ts-badge{
  display:inline-flex;align-items:center;justify-content:center;
  font-size: 12px; font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e6e8ee;
  background:#fff;
}
.ts-badge--in { color:#0b6b2b; background:#ebfff2; border-color:#c7f2d3; }
.ts-badge--out { color:#9b1c1c; background:#fff0f0; border-color:#ffd0d0; }

/* ---------- Modal ---------- */
.ts-modal-backdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.45);
  z-index: 99998;
  display:none;
}

.ts-modal{
  position:fixed;
  left:0; right:0; top:0;
  height: 100vh;
  background:#fff;
  z-index: 99999;
  transform: translateY(-18px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  display:block;
}

.ts-modal.is-open{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ts-modal__top{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #eef0f4;
}

.ts-modal__brand{
  display:flex; align-items:center; gap:10px;
}
.ts-modal__logo{
  height: 28px; width: auto;
  display:block;
}

.ts-modal__search{
  flex:1;
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 10px 12px;
  background:#fff;
}
.ts-modal__search input{
  flex:1;
  border:0;
  outline:0;
  font-size: 16px;
  padding: 2px 0;
}

.ts-ic{ opacity:.55; font-size: 14px; }

/* chips row */
.ts-modal__chips{
  padding: 10px 18px;
  border-bottom: 1px solid #eef0f4;
}
.ts-chipbar{
  display:flex; align-items:center; gap:10px;
  flex-wrap: wrap;
}
.ts-chipbar__label{
  font-weight: 800;
  color:#111;
  margin-right: 6px;
}
.ts-chipbar__chips{ display:flex; gap:8px; flex-wrap: wrap; }

.ts-pill{
  display:inline-flex; align-items:center; gap:8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #e6e8ee;
  background:#fff;
  cursor:pointer;
}
.ts-pill__x{ opacity:.6; font-weight: 900; }

/* body split */
.ts-modal__body{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  padding: 14px 18px 18px;
  height: calc(100vh - 120px);
  overflow:hidden;
}

.ts-modal__side{
  border-right: 1px solid #eef0f4;
  padding-right: 14px;
  overflow:auto;
}

.ts-side__block{ margin-bottom: 18px; }
.ts-side__title{ font-weight: 900; margin: 12px 0; font-size: 14px; }
.ts-side__list{ display:flex; flex-direction: column; gap:8px; }

.ts-pop{
  text-align:left;
  border: 1px solid #e6e8ee;
  background:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  cursor:pointer;
  font-weight: 700;
}

.ts-reco{ display:flex; flex-direction: column; gap:12px; }
.ts-reco__item{
  display:grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #eef0f4;
  border-radius: 14px;
  background:#fff;
}
.ts-reco__img{ display:block; width:64px; height:64px; border-radius: 12px; overflow:hidden; border:1px solid #eef0f4; background:#fff; }
.ts-reco__img img{ width:100%; height:100%; object-fit: contain; }
.ts-reco__name{ font-weight: 900; font-size: 13px; line-height: 1.2; }
.ts-reco__name a{ color:#111; text-decoration:none; }
.ts-reco__row{ display:flex; align-items:center; justify-content: space-between; margin: 6px 0; }
.ts-reco__price{ font-weight: 900; }

/* main */
.ts-modal__main{
  overflow:auto;
  padding-right: 4px;
}
.ts-modal__meta{
  display:flex; align-items:center; justify-content: space-between;
  margin-bottom: 12px;
}

/* grids */
.ts-grid{
  display:grid;
  gap: 14px;
}
.ts-grid--modal{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ts-grid--page{ grid-template-columns: repeat(4, minmax(0, 1fr)); }

.ts-empty{
  padding: 22px;
  border: 1px dashed #e6e8ee;
  border-radius: 16px;
  color:#666;
  background:#fafbfc;
}

/* card */
.ts-card{
  border: 1px solid #eef0f4;
  border-radius: 18px;
  background:#fff;
  padding: 12px;
  display:flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.ts-card__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}
.ts-brandlogo{
  height: 18px; width:auto; max-width: 90px;
  opacity: .95;
}
.ts-card__img{
  display:block;
  border-radius: 14px;
  border: 1px solid #eef0f4;
  background:#fff;
  overflow:hidden;
}
.ts-card__img img{
  width:100%;
  height: 160px;
  object-fit: contain;
  display:block;
}
.ts-card__title{
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  color:#111;
}
.ts-card__meta{ font-size: 12px; opacity: .72; }
.ts-card__price{ font-size: 16px; font-weight: 900; padding-top: 4px; }
.ts-card__actions{
  margin-top: auto;
  display:flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Full page layout ---------- */
.ts-wrap{
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 12px;
}

.ts-topbar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ts-searchbar{
  flex:1;
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid #e6e8ee;
  border-radius: 14px;
  padding: 10px 12px;
  background:#fff;
}
.ts-searchbar input{
  flex:1;
  border:0;
  outline:0;
  font-size: 16px;
}

.ts-layout{
  display:grid;
  grid-template-columns: 320px 1fr; /* filters left, products right */
  gap: 16px;
  align-items: start;
}

.ts-filters{
  border: 1px solid #eef0f4;
  border-radius: 18px;
  background:#fff;
  padding: 14px;
  position: sticky;
  top: 90px;
}
.ts-filters__title{ font-weight: 900; margin-bottom: 10px; }

.ts-filterblock{ margin: 12px 0; }
.ts-filterblock__label{ font-weight: 800; font-size: 13px; opacity: .75; margin-bottom: 8px; }

.ts-facet{ display:flex; flex-wrap: wrap; gap: 8px; }
.ts-chip{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid #e6e8ee;
  background:#fff;
  padding: 8px 12px;
  cursor:pointer;
  font-weight: 800;
}
.ts-chip__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background:#f2f4f8;
  font-size: 12px;
  font-weight: 900;
  padding: 0 8px;
}
.ts-chip.active{
  background:#111;
  color:#fff;
  border-color:#111;
}
.ts-chip.active .ts-chip__count{
  background: rgba(255,255,255,.16);
  color:#fff;
}

.ts-row{ display:flex; gap: 10px; margin-bottom: 10px; }
.ts-row input{
  width: 100%;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.ts-main{ min-width: 0; }
.ts-summary{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin: 6px 0 12px;
}

.ts-pagination{
  display:flex;
  justify-content: space-between;
  margin-top: 14px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px){
  .ts-grid--modal, .ts-grid--page{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 980px){
  .ts-modal__body{ grid-template-columns: 1fr; height: calc(100vh - 120px); }
  .ts-modal__side{ border-right:0; border-bottom:1px solid #eef0f4; padding-right:0; padding-bottom: 14px; }
  .ts-layout{ grid-template-columns: 1fr; }
  .ts-filters{ position: relative; top:auto; }
  .ts-grid--modal, .ts-grid--page{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 540px){
  .ts-grid--modal, .ts-grid--page{ grid-template-columns: 1fr; }
}
/* Modal results paging */
.ts-pagination--modal {
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

/* Better scrolling inside modal */
.ts-modal__main {
  overflow: auto;
  padding-right: 4px;
}

.ts-modal__side {
  overflow: auto;
}

/* Show filters nicely in modal left side */
#tsSideFilters .ts-filterblock {
  margin-bottom: 14px;
}

#tsSideFilters .ts-facet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Modal card actions stacked */
.ts-card__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.ts-card__actions .ts-btn {
  width: 100%;
}

/* Recommended card button full width */
.ts-reco__info .ts-btn {
  width: 100%;
  margin-top: 6px;
}

/* Slightly taller modal body for more results */
.ts-modal__body {
  height: calc(100vh - 118px);
}
/* ------------------------------
   MOBILE-ONLY SEARCH TWEAKS
------------------------------ */
@media (max-width: 767px) {
  /* Put logo + close on first row, search full width underneath */
  .ts-modal__top {
    display: grid;
    grid-template-columns: 1fr 44px;
    grid-template-areas:
      "brand close"
      "search search";
    gap: 10px;
    align-items: center;
  }

  .ts-modal__brand {
    grid-area: brand;
  }

  .ts-iconbtn--close {
    grid-area: close;
    justify-self: end;
  }

  .ts-modal__searchwrap {
    grid-area: search;
    width: 100%;
  }

  .ts-modal__search {
    width: 100%;
  }

  /* Latest searches horizontal scroll */
  .ts-chipbar--latest {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ts-chipbar--latest::-webkit-scrollbar {
    display: none;
  }

  .ts-chipbar__label {
    flex: 0 0 auto;
  }

  .ts-chipbar__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
    flex: 0 0 auto;
  }

  .ts-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  #tsLatestClear {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Popular searches horizontal scroll */
  .ts-side__list--popular {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .ts-side__list--popular::-webkit-scrollbar {
    display: none;
  }

  .ts-side__list--popular .ts-pop {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    white-space: nowrap;
  }

  /* Mobile modal side should not stack above results anymore */
  .ts-modal__body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ts-modal__side {
    border-right: 0;
    border-bottom: 0;
    padding-right: 0;
    padding-bottom: 0;
    overflow: visible;
  }

  /* Default side content visible normally */
  #tsSideDefault {
    display: block;
  }

  /* Filters become a dropdown/popup panel on mobile */
  #tsSideFilters {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 132px;
    max-height: 60vh;
    overflow: auto;
    z-index: 100001;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
    padding: 14px;
  }

  #tsSideFilters.ts-mobile-open {
    display: block !important;
  }

  .ts-mobile-filters-btn {
    display: inline-flex;
    white-space: nowrap;
  }

  .ts-modal__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .ts-modal__meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  /* Keep modal results grid clean on mobile */
  .ts-grid--modal {
    grid-template-columns: 1fr;
  }

  .ts-pagination--modal {
    justify-content: space-between;
  }
}
.ts-main{
  min-height: 900px;
}

.ts-grid--page{
  min-height: 700px;
}

.ts-mobile-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ts-iconbtn--sm {
  width: 34px;
  height: 34px;
  font-size: 20px;
  border-radius: 10px;
}

.ts-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

.ts-card__brandwrap {
  flex: 1 1 auto;
  min-width: 0;
}

.ts-card__badgewrap {
  flex: 0 0 auto;
}

.ts-brandlogo {
  display: block;
  max-width: 90px;
  width: auto;
  height: 18px;
  object-fit: contain;
}
/* Stronger layout lock for results page */
.ts-layout {
  align-items: start;
}

.ts-main {
  width: 100%;
  min-width: 0;
  min-height: 75vh;
  display: flex;
  flex-direction: column;
}

.ts-grid--page {
  flex: 1 1 auto;
  min-height: 55vh;
  align-content: start;
}

.ts-summary,
.ts-pagination {
  flex: 0 0 auto;
}

/* Keep modal results area stable too */
.ts-modal__main {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
}

.ts-grid--modal {
  flex: 1 1 auto;
  align-content: start;
  min-height: 45vh;
}
/* Stronger stable layout */
.ts-layout {
  align-items: start;
}

.ts-main {
  width: 100%;
  min-width: 0;
  min-height: 75vh;
  display: flex;
  flex-direction: column;
}

.ts-grid--page {
  flex: 1 1 auto;
  min-height: 55vh;
  align-content: start;
}

.ts-summary,
.ts-pagination {
  flex: 0 0 auto;
}

.ts-modal__main {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
}

.ts-grid--modal {
  flex: 1 1 auto;
  align-content: start;
  min-height: 45vh;
}

/* Brand logo */
.ts-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
}

.ts-card__brandwrap {
  flex: 1 1 auto;
  min-width: 0;
}

.ts-card__badgewrap {
  flex: 0 0 auto;
}

.ts-brandlogo {
  display: block;
  max-width: 100px;
  width: auto;
  height: 24px;
  object-fit: contain;
}

/* Filter heads */
.ts-mobile-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ts-iconbtn--sm {
  width: 34px;
  height: 34px;
  font-size: 20px;
  border-radius: 10px;
}

.ts-summary__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ts-page-filters-btn {
  display: none;
}

/* Mobile-only behaviour */
@media (max-width: 767px) {
  .ts-modal__top {
    display: grid;
    grid-template-columns: 1fr 44px;
    grid-template-areas:
      "brand close"
      "search search";
    gap: 10px;
    align-items: center;
  }

  .ts-modal__brand {
    grid-area: brand;
  }

  .ts-iconbtn--close {
    grid-area: close;
    justify-self: end;
  }

  .ts-modal__searchwrap {
    grid-area: search;
    width: 100%;
  }

  .ts-modal__search {
    width: 100%;
  }

  .ts-chipbar--latest {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .ts-chipbar--latest::-webkit-scrollbar {
    display: none;
  }

  .ts-chipbar__label,
  #tsLatestClear {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .ts-chipbar__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    flex: 0 0 auto;
  }

  .ts-pill {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .ts-side__list--popular {
    display: flex;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .ts-side__list--popular::-webkit-scrollbar {
    display: none;
  }

  .ts-side__list--popular .ts-pop {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    white-space: nowrap;
  }

  .ts-modal__body {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ts-modal__side {
    border-right: 0;
    border-bottom: 0;
    padding-right: 0;
    padding-bottom: 0;
    overflow: visible;
  }

  #tsSideFilters {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 132px;
    max-height: 60vh;
    overflow: auto;
    z-index: 100001;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
    padding: 14px;
  }

  #tsSideFilters.ts-mobile-open {
    display: block !important;
  }

  .ts-mobile-filters-btn {
    display: inline-flex;
    white-space: nowrap;
  }

  .ts-modal__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .ts-modal__meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  .ts-grid--modal {
    grid-template-columns: 1fr;
  }

  .ts-pagination--modal {
    justify-content: space-between;
  }

  /* Main search page mobile filters like dropdown */
  .ts-layout {
    grid-template-columns: 1fr;
  }

  .ts-page-filters-btn {
    display: inline-flex;
  }

  .ts-filters {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    top: 120px;
    z-index: 100001;
    max-height: 70vh;
    overflow: auto;
    background: #fff;
    border: 1px solid #e6e8ee;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
    padding: 14px;
  }

  .ts-filters.ts-page-filters-mobile-open {
    display: block !important;
  }

  .ts-filters .ts-facet {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .ts-filters .ts-facet::-webkit-scrollbar {
    display: none;
  }

  .ts-filters .ts-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}
/* Strong stable frame */
.ts-wrap {
  width: 100%;
}

.ts-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
}

.ts-main {
  width: 100%;
  min-width: 0;
  min-height: 75vh;
  display: flex;
  flex-direction: column;
}

.ts-grid--page,
.ts-grid--modal {
  width: 100%;
  min-width: 0;
}

/* Better loading state */
.ts-loading-wrap {
  width: 100%;
}

.ts-loading-note {
  font-size: 14px;
  opacity: .7;
  margin-bottom: 12px;
}

.ts-loading-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.ts-skel-card {
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.ts-skel {
  background: linear-gradient(90deg, #f2f4f7 25%, #e9edf2 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: tsShimmer 1.2s ease-in-out infinite;
  border-radius: 12px;
}

.ts-skel--img {
  width: 100%;
  height: 180px;
  margin-bottom: 14px;
}

.ts-skel--line {
  height: 14px;
  margin-bottom: 10px;
}

.ts-skel--title {
  height: 20px;
  width: 85%;
}

.ts-skel--short {
  width: 55%;
}

.ts-skel--btn {
  margin-top: 16px;
  height: 42px;
  width: 100%;
  border-radius: 14px;
}

@keyframes tsShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Desktop page filters close button hidden */
#tsPageFiltersClose {
  display: none;
}

/* Mobile */
@media (max-width: 767px) {
  .ts-layout {
    grid-template-columns: 1fr;
  }

  .ts-main {
    min-height: 70vh;
  }

  .ts-loading-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ts-skel--img {
    height: 150px;
  }

  #tsPageFiltersClose {
    display: inline-flex;
  }
}
/* Force full-width page layout */
.ts-wrap {
  width: 100%;
  max-width: 100%;
}

.ts-layout {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 18px;
  align-items: start;
  width: 100%;
}

.ts-main {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 75vh !important;
  display: flex;
  flex-direction: column;
}

.ts-grid--page {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 55vh !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px;
  align-content: start;
  flex: 1 1 auto;
}

.ts-summary,
.ts-pagination {
  flex: 0 0 auto;
}

/* Loading must fill the whole results column */
.ts-loading-wrap {
  width: 100%;
}

.ts-loading-note {
  font-size: 14px;
  opacity: .7;
  margin-bottom: 12px;
}

.ts-loading-grid {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px;
}

.ts-skel-card {
  width: 100%;
  min-width: 0;
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-sizing: border-box;
}

.ts-skel {
  background: linear-gradient(90deg, #f2f4f7 25%, #e9edf2 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: tsShimmer 1.2s ease-in-out infinite;
  border-radius: 12px;
}

.ts-skel--img {
  width: 100%;
  height: 180px;
  margin-bottom: 14px;
}

.ts-skel--line {
  height: 14px;
  margin-bottom: 10px;
}

.ts-skel--title {
  height: 20px;
  width: 85%;
}

.ts-skel--short {
  width: 55%;
}

.ts-skel--btn {
  margin-top: 16px;
  height: 42px;
  width: 100%;
  border-radius: 14px;
}

@keyframes tsShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Desktop: hide page filter close button */
#tsPageFiltersClose {
  display: none;
}

/* Mobile */
@media (max-width: 767px) {
  .ts-layout {
    grid-template-columns: 1fr !important;
  }

  .ts-main {
    min-height: 70vh !important;
  }

  .ts-grid--page {
    grid-template-columns: 1fr !important;
  }

  .ts-loading-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .ts-skel--img {
    height: 150px;
  }

  #tsPageFiltersClose {
    display: inline-flex;
  }
}
/* Force the search results side to take the remaining width */
.ts-wrap {
  width: 100%;
  max-width: 100%;
}

.ts-layout {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 18px !important;
  width: 100% !important;
  align-items: start !important;
}

.ts-main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 75vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden;
}

.ts-summary {
  width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 16px;
  margin-bottom: 14px;
}

.ts-grid--page {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-content: start !important;
}

/* Make loading grid use exactly the same structure */
.ts-loading-wrap {
  width: 100% !important;
}

.ts-loading-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.ts-skel-card {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

/* Keep filters column fixed width */
.ts-filters {
  width: 320px !important;
  max-width: 320px !important;
  min-width: 320px !important;
  box-sizing: border-box;
}

/* Mobile */
@media (max-width: 767px) {
  .ts-layout {
    grid-template-columns: 1fr !important;
  }

  .ts-filters {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .ts-main {
    min-height: 70vh !important;
  }

  .ts-grid--page,
  .ts-loading-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ===== FINAL LAYOUT OVERRIDES ===== */

#ts-search-page,
#ts-search-page .ts-wrap {
  width: 100% !important;
  max-width: 100% !important;
}

#ts-search-page .ts-layout {
  display: grid !important;
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 18px !important;
  width: 100% !important;
  max-width: 100% !important;
  align-items: start !important;
}

#ts-search-page .ts-filters {
  width: 320px !important;
  min-width: 320px !important;
  max-width: 320px !important;
  box-sizing: border-box !important;
}

#ts-search-page .ts-main {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 75vh !important;
  box-sizing: border-box !important;
}

#ts-search-page .ts-summary {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  gap: 16px !important;
  margin-bottom: 14px !important;
}

#ts-search-page .ts-summary__left,
#ts-search-page .ts-summary__right {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

#ts-search-page #tsResults.ts-grid--page {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex: 1 1 auto !important;
  align-content: start !important;
  box-sizing: border-box !important;
}

#ts-search-page #tsResults .ts-card,
#ts-search-page #tsResults .ts-skel-card {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Loading must fill the whole results area */
#ts-search-page #tsResults .ts-loading-wrap {
  width: 100% !important;
}

#ts-search-page #tsResults .ts-loading-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  width: 100% !important;
  min-width: 0 !important;
}

#ts-search-page #tsResults .ts-skel-card {
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

#ts-search-page #tsResults .ts-skel {
  background: linear-gradient(90deg, #f2f4f7 25%, #e9edf2 37%, #f2f4f7 63%);
  background-size: 400% 100%;
  animation: tsShimmer 1.2s ease-in-out infinite;
  border-radius: 12px;
}

#ts-search-page #tsResults .ts-skel--img {
  width: 100%;
  height: 180px;
  margin-bottom: 14px;
}

#ts-search-page #tsResults .ts-skel--line {
  height: 14px;
  margin-bottom: 10px;
}

#ts-search-page #tsResults .ts-skel--title {
  height: 20px;
  width: 85%;
}

#ts-search-page #tsResults .ts-skel--short {
  width: 55%;
}

#ts-search-page #tsResults .ts-skel--btn {
  margin-top: 16px;
  height: 42px;
  width: 100%;
  border-radius: 14px;
}

@keyframes tsShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* Brand logo */
.ts-card__top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 28px !important;
}

.ts-card__brandwrap {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.ts-card__badgewrap {
  flex: 0 0 auto !important;
}

.ts-brandlogo {
  display: block !important;
  max-width: 100px !important;
  width: auto !important;
  height: 24px !important;
  object-fit: contain !important;
}

/* Page filter close button hidden on desktop */
#tsPageFiltersClose {
  display: none !important;
}

/* Mobile */
@media (max-width: 767px) {
  #ts-search-page .ts-layout {
    grid-template-columns: 1fr !important;
  }

  #ts-search-page .ts-filters {
    display: none;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: 120px !important;
    z-index: 100001 !important;
    max-height: 70vh !important;
    overflow: auto !important;
    background: #fff !important;
    border: 1px solid #e6e8ee !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 40px rgba(0,0,0,.16) !important;
    padding: 14px !important;
  }

  #ts-search-page .ts-filters.ts-page-filters-mobile-open {
    display: block !important;
  }

  #ts-search-page .ts-main {
    min-height: 70vh !important;
  }

  #ts-search-page #tsResults.ts-grid--page,
  #ts-search-page #tsResults .ts-loading-grid {
    grid-template-columns: 1fr !important;
  }

  #tsPageFiltersClose {
    display: inline-flex !important;
  }

  .ts-page-filters-btn {
    display: inline-flex !important;
  }

  .ts-filters .ts-facet {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .ts-filters .ts-facet::-webkit-scrollbar {
    display: none !important;
  }

  .ts-filters .ts-chip {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
}
/* Keep results area stable */
#ts-search-page .ts-main {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 75vh !important;
  display: flex !important;
  flex-direction: column !important;
}

#ts-search-page #tsResults.ts-grid--page {
  position: relative !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 55vh !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
  align-content: start !important;
}

#ts-search-page #tsResults.ts-is-loading {
  pointer-events: none;
}

#ts-search-page #tsResults .ts-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 12px;
}

#ts-search-page #tsResults .ts-loading-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#ts-search-page #tsResults .ts-loading-spinner {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid #d9dee7;
  border-top-color: #111;
  animation: tsSpin 0.8s linear infinite;
}

#ts-search-page #tsResults .ts-loading-note {
  font-size: 14px;
  opacity: .8;
}

@keyframes tsSpin {
  to { transform: rotate(360deg); }
}

/* Modal too */
.ts-grid--modal {
  position: relative !important;
  min-height: 45vh !important;
}

.ts-grid--modal.ts-is-loading {
  pointer-events: none;
}

.ts-grid--modal .ts-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 12px;
}

.ts-grid--modal .ts-loading-overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ts-grid--modal .ts-loading-spinner {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 3px solid #d9dee7;
  border-top-color: #111;
  animation: tsSpin 0.8s linear infinite;
}

@media (max-width: 767px) {
  #ts-search-page #tsResults.ts-grid--page {
    grid-template-columns: 1fr !important;
    min-height: 50vh !important;
  }
}

/* ===== 1.4.1 UI fixes ===== */
.ts-modal__top{
  display:grid !important;
  grid-template-columns:auto minmax(0,1fr) auto !important;
  align-items:center !important;
  column-gap:16px !important;
}

.ts-modal__brand{
  min-width:max-content !important;
}

.ts-modal__searchwrap{
  width:100% !important;
  min-width:0 !important;
  flex:1 1 auto !important;
}

.ts-modal__search{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  box-sizing:border-box !important;
}

.ts-modal__search input{
  width:100% !important;
  min-width:0 !important;
}

.ts-modal__body{
  align-items:start !important;
}

.ts-modal__main{
  min-width:0 !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.ts-modal__meta{
  flex:0 0 auto !important;
}

#tsQuick.ts-grid--modal{
  flex:1 1 auto !important;
  align-content:start !important;
  overflow:auto !important;
  min-height:0 !important;
  padding-bottom:12px !important;
}

.ts-pagination.ts-pagination--modal{
  position:sticky !important;
  bottom:0 !important;
  left:0 !important;
  right:0 !important;
  z-index:20 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:12px !important;
  margin-top:12px !important;
  padding:14px 0 0 !important;
  background:#fff !important;
  border-top:1px solid #eef0f4 !important;
}

#tsQuickPage{
  min-width:120px !important;
  text-align:center !important;
  margin:0 !important;
  position:static !important;
}

@media (max-width: 991px){
  .ts-modal__top{
    grid-template-columns:1fr auto !important;
    grid-template-areas:
      "brand close"
      "search search" !important;
    row-gap:12px !important;
  }

  .ts-modal__brand{ grid-area:brand !important; }
  .ts-modal__searchwrap{ grid-area:search !important; }
  .ts-iconbtn--close{ grid-area:close !important; justify-self:end !important; }
}

@media (max-width: 767px){
  .ts-modal__top{
    padding:12px !important;
  }

  .ts-pagination.ts-pagination--modal{
    padding-top:10px !important;
    gap:8px !important;
  }

  #tsQuickPage{
    min-width:auto !important;
    font-size:13px !important;
  }
}


/* === 1.4.2 modal scroll + full-width layout fixes === */
.ts-modal{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.ts-modal__top,
.ts-modal__chips{
  flex:0 0 auto;
}

.ts-modal__top{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
}

.ts-modal__searchwrap{
  width:100%;
  min-width:0;
}

.ts-modal__search{
  width:100%;
}

.ts-modal__body{
  flex:1 1 auto;
  min-height:0;
  height:auto;
  align-items:stretch;
}

.ts-modal__side,
.ts-modal__main{
  min-height:0;
}

.ts-modal__main{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

.ts-modal__meta,
.ts-pagination--modal{
  flex:0 0 auto;
}

#tsQuick{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  align-content:start;
  padding-right:4px;
}

.ts-pagination--modal{
  justify-content:center;
  align-items:center;
  gap:12px;
  margin-top:12px;
  padding:12px 0 4px;
  background:#fff;
  border-top:1px solid #eef0f4;
}

.ts-pagination--modal #tsQuickPage{
  min-width:110px;
  text-align:center;
}

@media (max-width: 980px){
  .ts-modal__body{
    grid-template-columns:1fr;
  }

  .ts-modal__main{
    overflow:hidden;
  }

  #tsQuick{
    overflow:auto;
  }
}


/* --- 1.4.5 modal scroll fix --- */
.ts-modal{
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.ts-modal__top,
.ts-modal__chips{
  flex:0 0 auto;
}
.ts-modal__body{
  flex:1 1 auto;
  height:auto;
  min-height:0;
  overflow:hidden;
}
.ts-modal__side,
.ts-modal__main{
  min-height:0;
  max-height:100%;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.ts-modal__main{
  display:flex;
  flex-direction:column;
}
#tsQuick{
  flex:0 0 auto;
  padding-bottom:12px;
}
.ts-pagination--modal{
  position:sticky;
  bottom:0;
  z-index:3;
  background:#fff;
  padding:12px 0 8px;
  margin-top:auto;
}
@media (max-width: 980px){
  .ts-modal__body{
    grid-template-columns:1fr;
  }
  .ts-modal__side{
    max-height:none;
  }
}


/* v1.4.6 mobile dropdown filters button hard-fix */
@media (max-width: 767px) {
  .ts-modal__meta {
    align-items: center;
  }

  .ts-modal__meta-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .ts-mobile-filters-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    flex: 0 0 auto;
    visibility: visible;
  }

  .ts-mobile-filters-btn[style*="display: none"] {
    display: none !important;
  }

  .ts-mobile-filters-btn:not([style*="display: none"]) {
    display: inline-flex !important;
  }

  #tsSearchAll {
    flex: 0 0 auto;
    margin-left: auto;
  }
}



/* Facet list limiting / more button / scroll */
.ts-facet--scrollable{
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
}

.ts-facet-more-wrap{
  display: flex;
  width: 100%;
  margin-top: 8px;
}

.ts-facet-more-btn{
  width: 100%;
  justify-content: center;
}

.ts-facet--scrollable::-webkit-scrollbar{
  width: 8px;
}

.ts-facet--scrollable::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}



/* ===== 1.4.17 Mobile polish without breaking layout ===== */

/* Cleaner single search box */
.ts-modal__search{
  border-radius: 18px;
  padding: 12px 14px;
  min-height: 56px;
  box-shadow: 0 4px 18px rgba(15,23,42,.04);
}
.ts-modal__search input{
  font-size: 18px;
}
.ts-modal__searchwrap{
  min-width: 0;
}

/* Proper text close button */
.ts-iconbtn--close{
  width: auto;
  min-width: 92px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
}

/* Keep latest chips tidy on mobile */
@media (max-width: 767px) {
  .ts-modal__top {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand close"
      "search search";
    gap: 10px;
    padding: 12px;
  }

  .ts-modal__logo{
    height: 32px;
  }

  .ts-iconbtn--close{
    min-width: 78px;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 14px;
  }

  .ts-modal__search{
    min-height: 52px;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .ts-modal__search input{
    font-size: 16px;
  }

  .ts-modal__chips{
    padding: 10px 12px;
  }

  .ts-chipbar__label{
    margin-right: 0;
  }

  /* Keep result cards compact but intact */
  .ts-grid--modal{
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ts-card{
    border-radius: 16px;
  }

  .ts-card__body{
    padding: 12px;
  }

  .ts-card__title{
    font-size: 15px;
    line-height: 1.22;
  }

  /* Pagination stays on-screen */
  .ts-pagination--modal,
  .ts-pagination{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    padding: 14px 12px 20px;
    box-sizing: border-box;
  }

  #tsQuickPage,
  #tsPage{
    grid-column: 1 / -1;
    order: 3;
    text-align: center;
    width: 100%;
    margin-top: 2px;
  }

  #tsQuickPrev,
  #tsQuickNext,
  #tsPrev,
  #tsNext{
    width: 100%;
    min-width: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .ts-modal__meta{
    padding: 0 12px;
  }
}



/* ===== 1.4.22 targeted mobile cleanup ===== */
@media (max-width: 767px){
  /* search box: one clean thin square box */
  .ts-modal__searchwrap{
    width:100% !important;
    min-width:0 !important;
  }

  .ts-modal__search{
    width:100% !important;
    min-height:52px !important;
    padding:0 12px !important;
    gap:8px !important;
    border:1px solid #d9dde5 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    background:#fff !important;
  }

  .ts-modal__search input{
    width:100% !important;
    min-width:0 !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    font-size:16px !important;
  }

  .ts-modal__search .ts-ic,
  .ts-modal__search svg,
  .ts-modal__search .dashicons-search,
  .ts-modal__search .ts-icon,
  .ts-modal__search .ts-searchicon,
  .ts-modal__search .ts-iconbtn--search{
    display:none !important;
  }

  .ts-modal__search .ts-iconbtn,
  .ts-modal__search .ts-clear{
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    margin-left:8px !important;
    border-radius:10px !important;
  }

  .ts-iconbtn--close,
  #tsClose{
    min-width:78px !important;
    width:auto !important;
    height:44px !important;
    padding:0 14px !important;
    border-radius:14px !important;
    font-size:14px !important;
  }

  /* pagination visible on-screen */
  .ts-mobile-pagination-422,
  .ts-pagination--modal,
  .ts-pagination{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    padding:14px 12px 20px !important;
    margin:0 !important;
    box-sizing:border-box !important;
    overflow:visible !important;
  }

  #tsQuickPrev,
  #tsQuickNext,
  #tsPrev,
  #tsNext{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:42px !important;
    padding:0 8px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #tsQuickPage,
  #tsPage{
    grid-column:1 / -1 !important;
    order:3 !important;
    width:100% !important;
    text-align:center !important;
    margin:0 !important;
  }
}



/* ===== 1.4.30 clean mobile quick-search layout ===== */
@media (max-width: 767px){
  .ts-modal__top{
    padding: 12px !important;
    gap: 10px !important;
  }

  .ts-modal__logo{
    max-width: 185px !important;
    height: auto !important;
  }

  .ts-modal__search{
    width: 100% !important;
    min-height: 52px !important;
    padding: 0 12px !important;
    border: 1px solid #d9dde5 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    gap: 8px !important;
  }

  .ts-modal__search .ts-ic,
  .ts-modal__search svg,
  .ts-modal__search .dashicons-search,
  .ts-modal__search .ts-icon,
  .ts-modal__search .ts-searchicon,
  .ts-modal__search .ts-iconbtn--search{
    display:none !important;
  }

  .ts-modal__search input{
    width:100% !important;
    min-width:0 !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    font-size:16px !important;
  }

  .ts-modal__search .ts-iconbtn,
  .ts-modal__search .ts-clear{
    width:42px !important;
    min-width:42px !important;
    height:42px !important;
    margin-left:8px !important;
    border-radius:10px !important;
  }

  .ts-iconbtn--close,
  #tsClose{
    min-width:78px !important;
    width:auto !important;
    height:44px !important;
    padding:0 14px !important;
    border-radius:14px !important;
    font-size:14px !important;
  }

  .ts-modal__chips{
    padding: 10px 12px !important;
  }

  .ts-modal__body{
    display:block !important;
    height: calc(100vh - 138px) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 0 34px !important;
  }

  .ts-modal__side,
  .ts-modal__main{
    width:100% !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    overflow:visible !important;
  }

  .ts-modal.ts-no-query .ts-modal__main{
    display:none !important;
  }

  .ts-modal.ts-no-query #tsSideDefault{
    display:block !important;
    padding: 0 12px !important;
  }

  .ts-modal.ts-has-query #tsSideDefault{
    display:none !important;
  }

  .ts-modal.ts-has-query .ts-modal__main{
    display:block !important;
  }

  .ts-modal__meta{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    margin:0 0 12px 0 !important;
    padding:0 12px !important;
    background:transparent !important;
  }

  .ts-modal__meta-right{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    margin-left:auto !important;
  }

  #tsMobileFiltersBtn,
  #tsSearchAll{
    position:static !important;
    margin:0 !important;
  }

  .ts-grid--modal,
  #tsQuick{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    padding:0 12px !important;
    overflow:visible !important;
  }

  .ts-card{
    border-radius:16px !important;
    overflow:hidden !important;
  }

  .ts-card__body{
    padding:12px !important;
  }

  .ts-pagination--modal{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    margin:14px 0 0 0 !important;
    padding:0 12px calc(env(safe-area-inset-bottom, 0px) + 24px) 12px !important;
    background:transparent !important;
    box-shadow:none !important;
    border-top:0 !important;
    position:static !important;
  }

  #tsQuickPrev,
  #tsQuickNext{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:44px !important;
    padding:0 8px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #tsQuickPage{
    grid-column:1 / -1 !important;
    order:3 !important;
    width:100% !important;
    text-align:center !important;
    margin:0 !important;
    padding-top:4px !important;
    line-height:1.2 !important;
  }
}



/* ===== 1.4.31 mobile quick-search state fix ===== */
@media (max-width: 767px){
  .ts-modal__body{
    display:block !important;
    height: calc(100vh - 138px) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding:12px 0 34px !important;
  }

  .ts-modal__side,
  .ts-modal__main{
    width:100% !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
  }

  /* Before typing: show only popular/recommended */
  .ts-modal.ts-no-query .ts-modal__main{
    display:none !important;
  }
  .ts-modal.ts-no-query #tsSideDefault{
    display:block !important;
    padding:0 12px !important;
  }
  .ts-modal.ts-no-query #tsSideFilters{
    display:none !important;
  }

  /* After typing: show only results area by default */
  .ts-modal.ts-has-query #tsSideDefault{
    display:none !important;
  }
  .ts-modal.ts-has-query .ts-modal__main{
    display:block !important;
  }
  .ts-modal.ts-has-query #tsSideFilters{
    display:none;
  }
  .ts-modal.ts-has-query #tsSideFilters.ts-mobile-open{
    display:block !important;
    padding:0 12px 12px !important;
  }

  .ts-modal__meta{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    margin:0 0 12px 0 !important;
    padding:0 12px !important;
    background:transparent !important;
    position:static !important;
  }

  .ts-modal__meta-right{
    display:flex !important;
    align-items:center !important;
    gap:10px !important;
    margin-left:auto !important;
  }

  #tsMobileFiltersBtn,
  #tsSearchAll{
    position:static !important;
    margin:0 !important;
  }

  #tsQuick,
  #tsQuick.ts-grid--modal{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    padding:0 12px !important;
    overflow:visible !important;
  }

  .ts-pagination--modal{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    margin:14px 0 0 0 !important;
    padding:0 12px calc(env(safe-area-inset-bottom, 0px) + 24px) 12px !important;
    background:transparent !important;
    box-shadow:none !important;
    border-top:0 !important;
    position:static !important;
  }

  #tsQuickPrev,
  #tsQuickNext{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:44px !important;
    padding:0 8px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #tsQuickPage{
    grid-column:1 / -1 !important;
    order:3 !important;
    width:100% !important;
    text-align:center !important;
    margin:0 !important;
    padding-top:4px !important;
    line-height:1.2 !important;
  }
}



/* ===== 1.4.32 mobile state visibility safeguard ===== */
@media (max-width: 767px){
  .ts-modal.ts-no-query #tsSideDefault{ display:block !important; }
  .ts-modal.ts-no-query .ts-modal__main{ display:none !important; }
  .ts-modal.ts-has-query #tsSideDefault{ display:none !important; }
  .ts-modal.ts-has-query .ts-modal__main{ display:block !important; }
}



/* ===== 1.4.39 mobile sticky pager inside modal ===== */
@media (max-width: 767px){
  .ts-modal__body{
    display:block !important;
    height: calc(100dvh - 138px) !important;
    overflow:hidden !important;
    padding:12px 0 0 !important;
  }

  .ts-modal__main{
    display:block !important;
    height:100% !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    padding:0 0 0 0 !important;
  }

  #tsQuick,
  #tsQuick.ts-grid--modal{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    padding:0 12px 12px !important;
    overflow:visible !important;
  }

  .ts-pagination--modal{
    position: sticky !important;
    bottom: 0 !important;
    left: auto !important;
    right: auto !important;
    z-index: 20 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
    margin:12px 0 0 0 !important;
    padding:10px 12px calc(env(safe-area-inset-bottom, 0px) + 12px) 12px !important;
    background:#fff !important;
    border-top:1px solid #e9edf3 !important;
    box-shadow:0 -6px 18px rgba(15,23,42,.06) !important;
    box-sizing:border-box !important;
  }

  #tsQuickPrev,
  #tsQuickNext{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:44px !important;
    padding:0 8px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #tsQuickPage{
    grid-column:1 / -1 !important;
    order:3 !important;
    width:100% !important;
    text-align:center !important;
    margin:0 !important;
    padding-top:4px !important;
    line-height:1.2 !important;
  }
}



/* ===== 1.4.40 phone-safe fixed pager using visual viewport ===== */
@media (max-width: 767px){
  .ts-modal{
    --tsvv-bottom: 12px;
    --ts-pager-h: 88px;
  }

  .ts-modal__body{
    display:block !important;
    height: calc(100dvh - 138px) !important;
    overflow:hidden !important;
    padding:12px 0 0 !important;
  }

  .ts-modal__main{
    display:block !important;
    height:100% !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    padding:0 0 calc(var(--ts-pager-h) + var(--tsvv-bottom) + 18px) 0 !important;
  }

  #tsQuick,
  #tsQuick.ts-grid--modal{
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:12px !important;
    padding:0 12px 12px !important;
    overflow:visible !important;
  }

  .ts-pagination--modal{
    position: fixed !important;
    left: 10px !important;
    right: 10px !important;
    bottom: var(--tsvv-bottom) !important;
    z-index: 999999 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    gap:8px !important;
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:10px 10px calc(env(safe-area-inset-bottom, 0px) + 8px) 10px !important;
    background:rgba(255,255,255,.98) !important;
    border:1px solid #e9edf3 !important;
    border-radius:16px !important;
    box-shadow:0 -8px 24px rgba(15,23,42,.10) !important;
    box-sizing:border-box !important;
    backdrop-filter: blur(2px) !important;
  }

  #tsQuickPrev,
  #tsQuickNext{
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    height:44px !important;
    padding:0 8px !important;
    margin:0 !important;
    box-sizing:border-box !important;
  }

  #tsQuickPage{
    grid-column:1 / -1 !important;
    order:3 !important;
    width:100% !important;
    text-align:center !important;
    margin:0 !important;
    padding-top:2px !important;
    line-height:1.2 !important;
  }
}


/* ===== 1.4.42 faster dropdown feel ===== */
.ts-modal__search input{caret-color:auto;}


/* ===== 1.4.43 instant open feel ===== */
.ts-modal{
  transition: transform .06s ease, opacity .06s ease !important;
}
.ts-modal-backdrop{
  transition: opacity .06s ease !important;
}


/* ===== 1.4.45 faster open + save-on-real-action ===== */
.ts-modal{
  transition: transform .06s ease, opacity .06s ease !important;
}
.ts-modal-backdrop{
  transition: opacity .06s ease !important;
}


/* ===== 1.4.46 static modal pagination on mobile ===== */
@media (max-width: 767px){
  .ts-pagination.ts-pagination--modal{
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 14px 0 0 0 !important;
    padding: 0 12px 24px 12px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border-top: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
  }

  .ts-modal__main{
    padding-bottom: 24px !important;
    overflow-y: auto !important;
  }

  #tsQuickPrev,
  #tsQuickNext{
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
  }

  #tsQuickPage{
    grid-column: 1 / -1 !important;
    text-align: center !important;
    margin-top: 4px !important;
  }
}

/* ===== 1.4.46 highlight + autocomplete ===== */
.ts-hl{
  background: #fff3a3;
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

.ts-modal__searchwrap{
  position: relative;
}

.ts-autobox{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000000;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(15,23,42,.10);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.ts-auto__item{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #eef0f4;
  background: #fff;
  cursor: pointer;
}
.ts-auto__item:last-child{ border-bottom: 0; }
.ts-auto__item.is-active,
.ts-auto__item:hover{
  background: #f7f9fc;
}
.ts-auto__main{
  min-width: 0;
}
.ts-auto__title{
  font-weight: 700;
  color: #111;
}
.ts-auto__meta{
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.ts-auto__type{
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  color: #555;
  border: 1px solid #e6e8ee;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
}

@media (max-width: 767px){
  .ts-autobox{
    left: 0;
    right: 0;
    border-radius: 10px;
    max-height: 260px;
  }
  .ts-auto__item{
    padding: 11px 12px;
  }
}


/* ===== 1.4.47 inline autocomplete suggestion ===== */
.ts-autobox{
  display:none !important;
}

.ts-modal__search{
  position: relative;
}

.ts-inline-suggest{
  position: absolute;
  left: 12px;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  z-index: 1;
  font: inherit;
  line-height: 1.2;
}

.ts-inline-suggest__typed{
  visibility: hidden;
}

.ts-inline-suggest__tail{
  color: #9aa0ab;
}

.ts-modal__search input{
  position: relative;
  z-index: 2;
  background: transparent !important;
}

@media (max-width: 767px){
  .ts-inline-suggest{
    left: 12px;
    right: 56px;
  }
}


/* ===== 1.4.50 horizontal scroll suggestions ===== */
.ts-inline-suggest{ display:none !important; }
.ts-autobox{ display:none !important; }

.ts-suggest-rail{
  display:flex;
  gap:8px;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  padding:8px 0 0 0;
  scrollbar-width:none;
}
.ts-suggest-rail::-webkit-scrollbar{ display:none; }

.ts-suggest-pill{
  flex:0 0 auto;
  border:1px solid #e6e8ee;
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
}
.ts-suggest-pill.is-active,
.ts-suggest-pill:hover{
  background:#f7f9fc;
  border-color:#d8dee8;
}

@media (max-width: 767px){
  .ts-suggest-rail{
    padding-top:8px;
  }
  .ts-suggest-pill{
    padding:8px 11px;
    font-size:13px;
  }
}


/* ===== 1.4.51 keep search and close inline + suggestion sources ===== */
.ts-suggest-pill{
  font-weight: 600;
}

@media (max-width: 767px){
  .ts-modal__top{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: start !important;
    gap: 10px !important;
  }

  .ts-modal__searchwrap{
    min-width: 0 !important;
  }

  .ts-modal__search{
    width: 100% !important;
  }

  #tsClose,
  .ts-iconbtn--close{
    align-self: start !important;
    margin-top: 0 !important;
  }

  .ts-suggest-rail{
    grid-column: 1 / 2 !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
}


/* ===== 1.4.52 mobile search row + close button fix ===== */
@media (max-width: 767px){
  .ts-modal__top{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-areas:
      "logo close"
      "search search" !important;
    align-items: center !important;
    column-gap: 10px !important;
    row-gap: 10px !important;
  }

  .ts-modal__logo{
    grid-area: logo !important;
    max-width: 190px !important;
  }

  #tsClose,
  .ts-iconbtn--close{
    grid-area: close !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 88px !important;
    height: 44px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    align-self: start !important;
  }

  .ts-modal__searchwrap{
    grid-area: search !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .ts-modal__search{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 52px !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .ts-modal__search input{
    min-width: 0 !important;
    width: 100% !important;
  }

  #tsClearQ,
  .ts-modal__search .ts-iconbtn{
    position: static !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  .ts-suggest-rail{
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
}


/* ===== 1.4.53 mobile top layout repair ===== */
@media (max-width: 767px){
  .ts-modal__top{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-areas:
      "brand close"
      "search search" !important;
    align-items: start !important;
    column-gap: 10px !important;
    row-gap: 10px !important;
  }

  .ts-modal__brand{
    grid-area: brand !important;
    min-width: 0 !important;
  }

  .ts-modal__logo{
    display: block !important;
    max-width: 190px !important;
    width: auto !important;
    height: auto !important;
  }

  .ts-modal__searchwrap{
    grid-area: search !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .ts-modal__search{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 52px !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .ts-modal__search input{
    min-width: 0 !important;
    width: 100% !important;
  }

  #tsClearQ{
    position: static !important;
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    justify-self: end !important;
    align-self: center !important;
  }

  #tsClose,
  .ts-iconbtn--close{
    grid-area: close !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 88px !important;
    height: 44px !important;
    padding: 0 14px !important;
    margin: 0 !important;
    align-self: start !important;
  }

  .ts-suggest-rail{
    display: flex !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
}


/* ===== 1.4.55 mobile search clear spacing + horizontal reco ===== */
@media (max-width: 767px){
  /* Keep equal spacing around the search clear X */
  .ts-modal__search{
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 52px !important;
    gap: 10px !important;
    padding: 0 10px 0 12px !important;
    box-sizing: border-box !important;
  }

  .ts-modal__search input{
    min-width: 0 !important;
    width: 100% !important;
    margin: 0 !important;
  }

  #tsClearQ{
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-self: center !important;
    align-self: center !important;
  }

  /* Horizontal scroll for recommended products on mobile */
  #tsReco.ts-reco,
  .ts-reco{
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 0 10px 0 !important;
    scrollbar-width: none !important;
  }

  #tsReco.ts-reco::-webkit-scrollbar,
  .ts-reco::-webkit-scrollbar{
    display: none !important;
  }

  #tsReco .ts-reco__item,
  .ts-reco .ts-reco__item{
    flex: 0 0 84% !important;
    min-width: 84% !important;
    max-width: 84% !important;
  }
}


/* ===== 1.4.56 mobile recommended products true horizontal scroll ===== */
@media (max-width: 767px){
  #tsReco,
  #tsReco.ts-reco,
  .ts-reco{
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px 0 12px 0 !important;
    scrollbar-width: none !important;
  }

  #tsReco::-webkit-scrollbar,
  #tsReco.ts-reco::-webkit-scrollbar,
  .ts-reco::-webkit-scrollbar{
    display: none !important;
  }

  #tsReco > *,
  #tsReco.ts-reco > *,
  .ts-reco > *{
    flex: 0 0 84% !important;
    width: 84% !important;
    min-width: 84% !important;
    max-width: 84% !important;
  }

  #tsReco .ts-reco__item,
  .ts-reco .ts-reco__item{
    display: flex !important;
    flex: 0 0 84% !important;
    width: 84% !important;
    min-width: 84% !important;
    max-width: 84% !important;
    box-sizing: border-box !important;
  }
}


/* ===== Powered by badge ===== */
.ts-powered {
  position: absolute;
  bottom: 10px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #888;
  text-decoration: none;
  opacity: 0.85;
  transition: all 0.2s ease;
  z-index: 9999;
}

.ts-powered img {
  height: 16px;
  width: auto;
  display: block;
  opacity: 0.9;
}

.ts-powered:hover {
  opacity: 1;
  transform: translateY(-1px);
}

@media (max-width: 767px){
  .ts-powered {
    bottom: 6px;
    right: 10px;
    font-size: 10px;
  }

  .ts-powered img {
    height: 14px;
  }
}


/* ===== 1.4.59 filters/search/subcats/powered ===== */
.ts-filters__tools{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin:10px 0 16px;
}
.ts-filter-search,
.ts-filter-select{
  width:100%;
  height:42px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:0 12px;
  background:#fff;
  font-size:14px;
}
.ts-check{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size:14px;
  color:#222;
}
.ts-check input{
  width:16px;
  height:16px;
}
.ts-subcats{
  margin:0 0 18px;
}
.ts-subcats__title{
  font-size:13px;
  font-weight:700;
  color:#666;
  margin:0 0 10px;
}
.ts-subcats__grid{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.ts-subcat{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:999px;
  padding:10px 14px;
  font-size:14px;
  line-height:1.2;
  cursor:pointer;
}
.ts-powered--soft{
  background:rgba(255,255,255,.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding:6px 10px;
  border-radius:20px;
  box-shadow:0 4px 14px rgba(0,0,0,.06);
}
.ts-page-powered{
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
}
@media (max-width: 767px){
  .ts-filters__tools{
    gap:8px;
  }
  .ts-subcats__grid{
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:6px;
    -webkit-overflow-scrolling:touch;
  }
  .ts-subcat{
    white-space:nowrap;
  }
  .ts-page-powered{
    justify-content:center;
    margin-top:14px;
  }
}


/* ===== 1.4.60 nicer filters + subcategory cards ===== */
.ts-filter-toolbar{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:10px 0 18px;
  padding:12px;
  border:1px solid #eceef2;
  border-radius:18px;
  background:#fafbfc;
}
.ts-filter-toolbar__row{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ts-filter-search,
.ts-filter-select{
  width:100%;
  height:44px;
  border:1px solid #e4e7ec;
  border-radius:14px;
  padding:0 14px;
  background:#fff;
  font-size:14px;
  box-sizing:border-box;
}
.ts-check--pill{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:0 14px;
  border:1px solid #e4e7ec;
  border-radius:14px;
  background:#fff;
}
.ts-check--pill input{
  width:16px;
  height:16px;
}
.ts-subcat-slider{
  margin:0 0 18px;
}
.ts-subcat-slider__track{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:2px 0 8px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.ts-subcat-slider__track::-webkit-scrollbar{display:none;}
.ts-subcat-card{
  flex:0 0 auto;
  min-width:180px;
  max-width:220px;
  text-align:left;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 3px 10px rgba(0,0,0,.03);
  cursor:pointer;
}
.ts-subcat-card__label{
  display:block;
  font-weight:700;
  font-size:15px;
  color:#1f2937;
}
.ts-subcat-card__count{
  display:inline-flex;
  margin-top:8px;
  font-size:12px;
  font-weight:700;
  color:#6b7280;
  background:#f3f4f6;
  border-radius:999px;
  padding:4px 8px;
}
.ts-facet-group--price,
.ts-price-filter,
.ts-filter-price,
.ts-filter-price-range{
  display:none !important;
}
.ts-page-powered .ts-powered{
  position:static !important;
}
@media (min-width: 768px){
  .ts-filter-toolbar__row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
  }
}
@media (max-width: 767px){
  .ts-subcat-card{
    min-width:160px;
    max-width:160px;
    padding:12px 14px;
  }
}


/* 1.4.61b page filters and subcategory slider */
.ts-filter-toolbar{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin:0 0 18px;
  padding:12px;
  border:1px solid #e8ebf0;
  border-radius:18px;
  background:#fafbfc;
}
.ts-filter-toolbar__row{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
.ts-filter-search,
.ts-filter-select{
  width:100%;
  height:42px;
  border:1px solid #dfe4ea;
  border-radius:12px;
  padding:0 12px;
  background:#fff;
  box-sizing:border-box;
  font-size:14px;
}
.ts-check--pill{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  border:1px solid #dfe4ea;
  border-radius:12px;
  padding:0 12px;
  background:#fff;
}
.ts-check--pill input{
  width:16px;
  height:16px;
}
.ts-filterblock__label{
  margin-bottom:10px;
}

#tsSubcats{
  margin:0 0 16px;
}
.ts-subcat-slider{
  margin:0 0 8px;
}
.ts-subcat-slider__title{
  font-size:13px;
  font-weight:700;
  color:#6b7280;
  margin:0 0 10px;
}
.ts-subcat-slider__track{
  display:flex;
  gap:12px;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:4px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.ts-subcat-slider__track::-webkit-scrollbar{
  display:none;
}
.ts-subcat-card{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  min-width:180px;
  border:1px solid #e5e7eb;
  border-radius:18px;
  background:#fff;
  padding:14px 16px;
  box-shadow:0 3px 10px rgba(0,0,0,.03);
  cursor:pointer;
}
.ts-subcat-card__label{
  font-size:15px;
  font-weight:700;
  color:#1f2937;
  text-align:left;
}
.ts-subcat-card__count{
  font-size:12px;
  color:#6b7280;
  background:#f3f4f6;
  border-radius:999px;
  padding:4px 8px;
}

#tsPageFilters .ts-filterblock .ts-row,
#tsPageFilters #tsMin,
#tsPageFilters #tsMax,
#tsPageFilters #tsApplyPrice{
  display:none !important;
}

@media (min-width: 768px){
  .ts-filter-toolbar__row{
    grid-template-columns:1fr;
  }
}


/* 1.4.62 page fixes */
#tsPageFilters .ts-filterblock .ts-price,
#tsPageFilters .ts-price-filter,
#tsPageFilters .ts-filter-price,
#tsPageFilters #tsMin,
#tsPageFilters #tsMax,
#tsPageFilters #tsApplyPrice,
#tsPageFilters input[placeholder="Min"],
#tsPageFilters input[placeholder="Max"]{
  display:none !important;
}
#tsPageFilters button.ts-btn.ts-btn--primary,
#tsPageFilters button.ts-btn.ts-btn--ghost[data-price-apply]{
  display:none !important;
}
.ts-cat-suggest{
  margin-top:8px;
}
.ts-cat-suggest__track{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.ts-cat-suggest__item{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font-size:13px;
  line-height:1.2;
  cursor:pointer;
}
.ts-filter-toolbar{
  margin-bottom:14px !important;
}
.ts-filter-toolbar__row{
  grid-template-columns:1fr !important;
}
.ts-subcat-slider{
  margin:0 0 18px !important;
}
.ts-subcat-slider__track{
  display:flex !important;
  gap:12px !important;
  overflow-x:auto !important;
  -webkit-overflow-scrolling:touch;
}
.ts-subcat-card{
  min-width:180px !important;
  display:flex !important;
}


/* arrows */
.ts-subcat-arrow{
  position:absolute;
  top:40%;
  transform:translateY(-50%);
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid #ddd;
  background:#fff;
  cursor:pointer;
  z-index:10;
}
.ts-subcat-arrow--left{ left:-10px; }
.ts-subcat-arrow--right{ right:-10px; }

/* clear button */
.ts-clear-btn{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  font-size:16px;
  cursor:pointer;
  opacity:0.5;
}
.ts-clear-btn:hover{ opacity:1; }


/* 1.4.64 restore brand filter */
#tsFacetBrand,
#tsFacetBrand .ts-chip,
#tsFacetBrand .ts-facet,
#tsFacetBrand .ts-pill{
  display: block;
}


/* 1.4.65 fix subcategory arrows + restore brand block */
.ts-subcat-slider{
  position: relative;
}

.ts-subcat-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  z-index: 10;
}

.ts-subcat-arrow--left{ left: -14px; }
.ts-subcat-arrow--right{ right: -14px; }

@media (max-width: 1024px){
  .ts-subcat-arrow{ display:none !important; }
}

#tsPageFilters .ts-filterblock:last-child{
  display:block !important;
}

#tsFacetBrand{
  display:block !important;
}


/* 1.4.66 modal filters + spacing */
.ts-filter-toolbar--modal{
  margin: 0 0 16px;
}
#tsQuickSubcats{
  margin: 0 0 14px;
}
#tsQuickFacetBrand,
#tsFacetBrand,
.ts-facet{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#tsQuickFacetBrand .ts-chip,
#tsFacetBrand .ts-chip{
  margin: 0 !important;
}

.ts-subcat-slider{
  position: relative;
}
.ts-subcat-arrow{
  position: absolute;
  top: 56%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  z-index: 10;
}
.ts-subcat-arrow--left{ left: -14px; }
.ts-subcat-arrow--right{ right: -14px; }

@media (max-width: 1024px){
  .ts-subcat-arrow{ display:none !important; }
}
@media (max-width: 767px){
  .ts-filter-toolbar__row{
    grid-template-columns: 1fr !important;
  }
  #tsQuickFacetBrand,
  #tsFacetBrand,
  .ts-facet{
    gap: 8px;
  }
}


/* 1.4.67 tidy brand chips desktop + mobile */
#tsFacetBrand,
#tsQuickFacetBrand{
  display:flex !important;
  flex-wrap:wrap !important;
  align-items:flex-start;
  gap:10px 10px !important;
}

#tsFacetBrand .ts-chip,
#tsQuickFacetBrand .ts-chip,
#tsFacetBrand .ts-pill,
#tsQuickFacetBrand .ts-pill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-height:40px;
  padding:8px 14px !important;
  margin:0 !important;
  border-radius:999px;
  box-sizing:border-box;
  white-space:nowrap;
}

#tsFacetBrand .ts-chip__count,
#tsQuickFacetBrand .ts-chip__count,
#tsFacetBrand .ts-pill__count,
#tsQuickFacetBrand .ts-pill__count{
  margin-left:8px !important;
}

@media (max-width: 767px){
  #tsFacetBrand,
  #tsQuickFacetBrand{
    gap:8px 8px !important;
  }

  #tsFacetBrand .ts-chip,
  #tsQuickFacetBrand .ts-chip,
  #tsFacetBrand .ts-pill,
  #tsQuickFacetBrand .ts-pill{
    min-height:38px;
    padding:7px 12px !important;
  }
}


/* 1.4.68b voice search real button */
.ts-modal__search,
.ts-page__search,
.ts-searchbar,
.ts-search-page__search,
.ts-main .ts-search{
  position: relative;
}

.ts-iconbtn--voice{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
  z-index:3;
}

.ts-modal__search .ts-iconbtn--voice{
  position:absolute;
  right:48px;
  top:50%;
  transform:translateY(-50%);
}

.ts-page__search .ts-iconbtn--voice,
.ts-searchbar .ts-iconbtn--voice,
.ts-search-page__search .ts-iconbtn--voice,
.ts-main .ts-search .ts-iconbtn--voice{
  position:absolute;
  right:48px;
  top:50%;
  transform:translateY(-50%);
}

.ts-iconbtn--voice.is-listening{
  color:#b91c1c;
  border-color:#f3b1b1;
  background:#fff5f5;
  animation: tsVoicePulse 1.1s ease-in-out infinite;
}

@keyframes tsVoicePulse{
  0%{ box-shadow:0 0 0 0 rgba(185,28,28,.18); }
  70%{ box-shadow:0 0 0 8px rgba(185,28,28,0); }
  100%{ box-shadow:0 0 0 0 rgba(185,28,28,0); }
}


/* 1.4.69 voice button cleanup */
.ts-modal__search,
.ts-page__search,
.ts-searchbar,
.ts-search-page__search,
.ts-main .ts-search{
  position: relative;
}

.ts-search-has-actions input[type="search"],
.ts-search-has-actions #tsModalQ,
.ts-search-has-actions #tsPageQ,
.ts-search-has-actions #tsQ{
  padding-right: 104px !important;
}

.ts-modal__search #tsClearQ,
.ts-modal__search #tsVoiceBtn,
.ts-page__search #tsPageClear,
.ts-page__search #tsPageVoice,
.ts-searchbar #tsPageClear,
.ts-searchbar #tsPageVoice,
.ts-search-page__search #tsPageClear,
.ts-search-page__search #tsPageVoice,
.ts-main .ts-search #tsPageClear,
.ts-main .ts-search #tsPageVoice{
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  background: #fff !important;
  z-index: 4 !important;
}

.ts-modal__search #tsClearQ,
.ts-page__search #tsPageClear,
.ts-searchbar #tsPageClear,
.ts-search-page__search #tsPageClear,
.ts-main .ts-search #tsPageClear{
  right: 8px !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.ts-modal__search #tsVoiceBtn,
.ts-page__search #tsPageVoice,
.ts-searchbar #tsPageVoice,
.ts-search-page__search #tsPageVoice,
.ts-main .ts-search #tsPageVoice{
  right: 56px !important;
  font-size: 0 !important;
}

.ts-modal__search #tsVoiceBtn::before,
.ts-page__search #tsPageVoice::before,
.ts-searchbar #tsPageVoice::before,
.ts-search-page__search #tsPageVoice::before,
.ts-main .ts-search #tsPageVoice::before{
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3Z'/><path d='M19 10a7 7 0 0 1-14 0'/><path d='M12 19v4'/><path d='M8 23h8'/></svg>");
}

.ts-iconbtn--voice.is-listening{
  border-color: #d1d5db !important;
  background: #f9fafb !important;
}

.ts-iconbtn--voice.is-listening::before{
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a73e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3Z'/><path d='M19 10a7 7 0 0 1-14 0'/><path d='M12 19v4'/><path d='M8 23h8'/></svg>");
}

@media (max-width: 767px){
  .ts-modal__search #tsClearQ,
  .ts-modal__search #tsVoiceBtn,
  .ts-page__search #tsPageClear,
  .ts-page__search #tsPageVoice,
  .ts-searchbar #tsPageClear,
  .ts-searchbar #tsPageVoice,
  .ts-search-page__search #tsPageClear,
  .ts-search-page__search #tsPageVoice,
  .ts-main .ts-search #tsPageClear,
  .ts-main .ts-search #tsPageVoice{
    width: 38px !important;
    height: 38px !important;
  }
  .ts-modal__search #tsVoiceBtn,
  .ts-page__search #tsPageVoice,
  .ts-searchbar #tsPageVoice,
  .ts-search-page__search #tsPageVoice,
  .ts-main .ts-search #tsPageVoice{
    right: 54px !important;
  }
}
