html.yss-overlay-open,
body.yss-overlay-open {
  overflow: hidden !important;
}

.yss-overlay[hidden],
.yss-overlay [hidden] {
  display: none !important;
}

.yss-overlay,
.yss-overlay *,
.yss-overlay *::before,
.yss-overlay *::after {
  box-sizing: border-box;
}

.yss-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  font-family: inherit;
  color: var(--yss-text, #172033);
}

.yss-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 25, 35, .72);
  backdrop-filter: blur(1px);
}

.yss-overlay-panel {
  position: relative;
  width: 100%;
  max-width: var(--yss-content-max-width, 1920px);
  margin: 0 auto;
  background: var(--yss-panel-bg, #fff);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .22);
  overflow: hidden;
  transition: min-height .2s ease, max-height .2s ease;
}

.yss-overlay-panel[data-mode="discover"] {
  height: min(var(--yss-discover-height, 650px), 80vh);
  min-height: min(360px, 80vh);
  max-height: 80vh;
}

.yss-overlay-panel[data-mode="results"] {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
}

.yss-overlay-header {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(320px, 1fr) 52px;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-height: 116px;
  padding: 24px 38px 18px;
  border-bottom: 1px solid #e7eaf0;
  background: var(--yss-panel-bg, #fff);
}

.yss-overlay-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 70px;
}

.yss-overlay-logo {
  display: block;
  max-width: min(100%, var(--yss-logo-max-width, 100%));
  max-height: 68px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.yss-overlay-shop-name {
  font-size: 24px;
  line-height: 1.2;
}

.yss-overlay-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  border-bottom: 2px solid var(--yss-primary, #168fe5);
}

.yss-overlay-search-icon {
  display: flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  color: var(--yss-text, #1b2434);
}

.yss-overlay-search-icon svg,
.yss-overlay-close svg {
  width: 23px;
  height: 23px;
}

.yss-overlay-input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
  color: var(--yss-text, #172033);
  font: inherit;
  font-size: 17px;
}

.yss-overlay-input::-webkit-search-cancel-button {
  display: none;
}

.yss-overlay-spinner {
  position: absolute;
  right: 12px;
  width: 20px;
  height: 20px;
  border: 2px solid #d7dde6;
  border-top-color: var(--yss-primary, #2094ed);
  border-radius: 50%;
  animation: yss-spin .65s linear infinite;
}

.yss-overlay-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5c6470;
  cursor: pointer;
}

.yss-overlay-close:hover {
  color: #111827;
}

.yss-overlay-content {
  height: calc(100% - 116px);
  overflow: auto;
  overscroll-behavior: contain;
}

.yss-discover-view,
.yss-results-view {
  width: 100%;
  padding: 0 38px 32px;
}

.yss-recent-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 54px;
  padding: 8px 0;
  border-bottom: 1px solid #eef0f4;
  font-size: 14px;
}

.yss-recent-chips,
.yss-suggestions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.yss-chip {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 5px 13px;
  border: 1px solid #aeb5c0;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.yss-chip:hover {
  border-color: var(--yss-primary, #2394ef);
  color: var(--yss-primary, #0b78c8);
}

.yss-clear-recent {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--yss-primary, #238ee6);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.yss-discover-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  padding-top: 28px;
}

.yss-popular-block h3,
.yss-recommended-block h3,
.yss-filter-section h3 {
  margin: 0 0 15px;
  color: var(--yss-text, #192231);
  font-size: 16px;
  font-weight: 700;
}

.yss-popular-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.yss-popular-term {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--yss-text, #273244);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}

.yss-popular-term:hover {
  color: var(--yss-primary, #1689df);
}

.yss-recommended-shell {
  position: relative;
  min-width: 0;
}

.yss-recommended-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 210px);
  gap: 14px;
  overflow-x: auto;
  padding: 0 2px 10px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.yss-recommended-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: -25px;
  padding: 0;
  border: 1px solid #d8dee7;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 7px 20px rgba(15, 23, 42, .13);
  color: var(--yss-primary, #168fe5);
  cursor: pointer;
  transition: opacity .15s ease, box-shadow .15s ease, transform .15s ease;
}

.yss-recommended-arrow.is-prev {
  left: -20px;
}

.yss-recommended-arrow.is-next {
  right: -20px;
}

.yss-recommended-arrow:hover:not(:disabled) {
  box-shadow: 0 9px 24px rgba(15, 23, 42, .18);
  transform: translateY(-1px);
}

.yss-recommended-arrow:disabled {
  opacity: .28;
  cursor: default;
}

.yss-recommended-arrow svg {
  width: 22px;
  height: 22px;
}

.yss-results-view {
  min-height: 100%;
}

.yss-suggestions {
  min-height: 48px;
  padding: 10px 0 7px;
  border-bottom: 1px solid #eef0f4;
}

.yss-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.yss-results-count {
  color: var(--yss-text, #1e293b);
  font-size: 14px;
}

.yss-sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #596273;
  font-size: 13px;
}

.yss-sort-select {
  min-width: 160px;
  height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid #d9dee7;
  border-radius: 4px;
  background: #fff;
  color: var(--yss-text, #283245);
  font: inherit;
}

.yss-results-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.yss-filters {
  position: sticky;
  top: 0;
  padding: 4px 20px 40px 0;
  border-right: 1px solid #e7eaf0;
}

.yss-filter-section {
  padding: 14px 0 22px;
  border-bottom: 1px solid #edf0f4;
}

.yss-category-filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow: auto;
  padding-right: 5px;
}

.yss-category-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  margin: 0;
  color: #364152;
  font-size: 13px;
  cursor: pointer;
}

.yss-category-option input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--yss-primary, #2196f3);
}

.yss-category-option small {
  color: #778194;
  font-size: 12px;
}

.yss-filter-empty {
  color: #768094;
  font-size: 13px;
}

.yss-price-values {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--yss-primary, #167fce);
  font-size: 12px;
  font-weight: 700;
}

.yss-range-wrap {
  position: relative;
  height: 28px;
}

.yss-range-wrap::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 4px;
  border-radius: 4px;
  background: #d9e9f6;
}

.yss-range-wrap input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
}

.yss-range-wrap input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--yss-primary, #168fe5);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
}

.yss-range-wrap input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--yss-primary, #168fe5);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  pointer-events: auto;
}

.yss-products-area {
  position: relative;
  min-width: 0;
  padding-bottom: 40px;
}

.yss-products-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.yss-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 350px;
  padding: 15px;
  border: 1px solid #dfe3e9;
  border-radius: var(--yss-card-radius, 0);
  background: var(--yss-panel-bg, #fff);
  color: var(--yss-text, #263244);
  text-decoration: none !important;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.yss-product-card:hover {
  border-color: #bcc5d0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  color: var(--yss-text, #172033);
  transform: translateY(-1px);
}

.yss-product-card.is-compact {
  min-height: 300px;
  scroll-snap-align: start;
}

.yss-product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 205px;
  margin-bottom: 13px;
  background: #fff;
}

.yss-product-card.is-compact .yss-product-image {
  height: 175px;
}

.yss-product-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.yss-product-no-image {
  width: 70%;
  height: 70%;
  border: 1px dashed #d6dbe3;
  background: #f8fafc;
}

.yss-product-name {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  color: var(--yss-text, #273244);
  font-size: 14px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yss-product-variant {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yss-product-price {
  margin-top: auto;
  padding-top: 16px;
  color: var(--yss-text, #121926);
  font-size: 14px;
  font-weight: 800;
}

.yss-product-stock {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 700;
}

.yss-product-stock.is-in-stock {
  color: #15803d;
}

.yss-product-stock.is-out-of-stock {
  color: #b42318;
}

.yss-results-message,
.yss-discover-message {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #e3e7ed;
  background: #f8fafc;
  color: #667085;
  text-align: center;
}

.yss-results-message.is-error,
.yss-discover-message.is-error {
  border-color: #f0b9b5;
  background: #fff5f4;
  color: #9d2219;
}

body.yss-overlay-open .ui-autocomplete,
body.yss-overlay-open .autocomplete-suggestions,
body.yss-overlay-open .search-results,
body.yss-overlay-open .stsearchresult,
body.yss-overlay-open .search_widget_results {
  display: none !important;
}

/* Configurable 0.4.0 appearance rules. */
.yss-overlay.yss-logo-hidden .yss-overlay-header {
  grid-template-columns: minmax(320px, 1fr) 52px;
}

.yss-overlay.yss-logo-hidden .yss-overlay-brand,
.yss-overlay.yss-recent-hidden .yss-recent-row,
.yss-overlay.yss-popular-hidden .yss-popular-block,
.yss-overlay.yss-recommended-hidden .yss-recommended-block {
  display: none !important;
}

.yss-overlay.yss-popular-hidden .yss-discover-layout,
.yss-overlay.yss-recommended-hidden .yss-discover-layout {
  grid-template-columns: minmax(0, 1fr);
}

.yss-overlay.yss-recommended-hidden:not(.yss-popular-hidden) .yss-popular-list {
  flex-flow: row wrap;
}

.yss-overlay.yss-card-style-shadow .yss-product-card {
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
}

.yss-overlay.yss-card-style-shadow .yss-product-card:hover {
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}

.yss-overlay.yss-card-style-minimal .yss-product-card {
  padding: 10px;
  border-color: transparent;
  background: transparent;
}

.yss-overlay.yss-card-style-minimal .yss-product-card:hover {
  border-color: transparent;
  background: rgba(127, 127, 127, .06);
  box-shadow: none;
}

.yss-overlay.yss-image-fit-cover .yss-product-image img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}

.yss-product-reference {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #667085;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yss-overlay.yss-grid-cols-3 .yss-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.yss-overlay.yss-grid-cols-4 .yss-products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.yss-overlay.yss-grid-cols-5 .yss-products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.yss-overlay.yss-grid-cols-6 .yss-products-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.yss-overlay.yss-grid-cols-7 .yss-products-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.yss-overlay.yss-grid-cols-8 .yss-products-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }

/* Diagnostic search field kept for development. */
.yss-test-shell {
  position: relative;
  z-index: 60;
  width: 100%;
  padding: 12px 20px;
  background: #f5f7fa;
  border-bottom: 1px solid #e4e8ed;
}

.yss-test-box {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.yss-test-box label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.yss-input-wrap {
  position: relative;
}

.yss-search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #cfd7df;
  background: #fff;
}

.yss-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 99999;
  max-height: 520px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dfe5eb;
  box-shadow: 0 16px 40px rgba(22, 34, 48, .16);
}

.yss-result {
  display: block;
  padding: 12px 15px;
  border-bottom: 1px solid #edf0f3;
  color: #1f2937;
  text-decoration: none;
}

@keyframes yss-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1600px) {
  .yss-overlay.yss-grid-cols-6 .yss-products-grid,
  .yss-overlay.yss-grid-cols-7 .yss-products-grid,
  .yss-overlay.yss-grid-cols-8 .yss-products-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1250px) {
  .yss-overlay.yss-grid-cols-5 .yss-products-grid,
  .yss-overlay.yss-grid-cols-6 .yss-products-grid,
  .yss-overlay.yss-grid-cols-7 .yss-products-grid,
  .yss-overlay.yss-grid-cols-8 .yss-products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .yss-overlay-header {
    grid-template-columns: 190px minmax(260px, 1fr) 48px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .yss-discover-view,
  .yss-results-view {
    padding-right: 24px;
    padding-left: 24px;
  }

  .yss-results-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
  }

  .yss-overlay.yss-grid-cols-3 .yss-products-grid,
  .yss-overlay.yss-grid-cols-4 .yss-products-grid,
  .yss-overlay.yss-grid-cols-5 .yss-products-grid,
  .yss-overlay.yss-grid-cols-6 .yss-products-grid,
  .yss-overlay.yss-grid-cols-7 .yss-products-grid,
  .yss-overlay.yss-grid-cols-8 .yss-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .yss-overlay-panel[data-mode="discover"],
  .yss-overlay-panel[data-mode="results"] {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
  }

  .yss-overlay-header,
  .yss-overlay.yss-logo-hidden .yss-overlay-header {
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 8px;
    min-height: 76px;
    padding: 10px 12px;
  }

  .yss-overlay-brand {
    display: none;
  }

  .yss-overlay-content {
    height: calc(100% - 76px);
  }

  .yss-overlay-form {
    grid-column: 1;
  }

  .yss-overlay-close {
    width: 42px;
    height: 42px;
  }

  .yss-overlay-input {
    height: 48px;
    font-size: 16px;
  }

  .yss-discover-view,
  .yss-results-view {
    padding-right: 14px;
    padding-left: 14px;
  }

  .yss-recent-row {
    align-items: flex-start;
  }

  .yss-clear-recent {
    width: 100%;
    text-align: left;
  }

  .yss-discover-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 20px;
  }

  .yss-popular-list {
    flex-flow: row wrap;
  }

  .yss-popular-term {
    padding: 6px 10px;
    border: 1px solid #d9dee7;
    border-radius: 999px;
  }

  .yss-recommended-track {
    grid-auto-columns: minmax(165px, 76vw);
  }

  .yss-recommended-arrow {
    width: 38px;
    height: 38px;
  }

  .yss-recommended-arrow.is-prev {
    left: -7px;
  }

  .yss-recommended-arrow.is-next {
    right: -7px;
  }

  .yss-results-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .yss-sort-label {
    width: 100%;
    justify-content: space-between;
  }

  .yss-sort-select {
    min-width: 185px;
  }

  .yss-results-layout {
    display: block;
  }

  .yss-filters {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 0 0 16px;
    border-right: 0;
  }

  .yss-filter-section {
    padding: 10px 0 14px;
  }

  .yss-category-filter {
    flex-flow: row nowrap;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .yss-category-option {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid #d9dee7;
    border-radius: 999px;
  }

  .yss-category-option small {
    margin-left: 3px;
  }

  .yss-overlay.yss-grid-cols-3 .yss-products-grid,
  .yss-overlay.yss-grid-cols-4 .yss-products-grid,
  .yss-overlay.yss-grid-cols-5 .yss-products-grid,
  .yss-overlay.yss-grid-cols-6 .yss-products-grid,
  .yss-overlay.yss-grid-cols-7 .yss-products-grid,
  .yss-overlay.yss-grid-cols-8 .yss-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .yss-product-card,
  .yss-product-card.is-compact {
    min-height: 260px;
    padding: 10px;
  }

  .yss-product-image,
  .yss-product-card.is-compact .yss-product-image {
    height: 125px;
  }

  .yss-product-name {
    min-height: 39px;
    font-size: 12px;
  }

  .yss-product-price {
    padding-top: 10px;
    font-size: 13px;
  }

  .yss-product-stock {
    font-size: 11px;
  }
}

/* 0.3.0: recent-search controls, highlighted matches and result actions. */
.yss-recent-chip {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d7dde6;
  border-radius: 999px;
  background: #fff;
}

.yss-recent-chip .yss-chip {
  border: 0;
  border-radius: 0;
  padding-right: 7px;
}

.yss-remove-recent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  margin-right: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7a8494;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.yss-remove-recent:hover {
  background: #eef2f6;
  color: #1f2937;
}

.yss-highlight {
  padding: 0;
  background: #fff0a8;
  color: inherit;
  font-weight: inherit;
}

.yss-results-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 72px;
  padding: 22px 0 4px;
}

.yss-load-more,
.yss-view-all {
  min-width: 170px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, opacity .15s ease;
}

.yss-load-more {
  border: 1px solid var(--yss-primary, #168fe5);
  background: #fff;
  color: var(--yss-primary, #147dc5);
}

.yss-load-more:hover:not(:disabled) {
  background: #eef8ff;
}

.yss-load-more:disabled {
  opacity: .55;
  cursor: wait;
}

.yss-view-all {
  border: 1px solid var(--yss-primary, #168fe5);
  background: var(--yss-primary, #168fe5);
  color: #fff;
}

.yss-view-all:hover {
  background: #0f7fcf;
  border-color: #0f7fcf;
}

@media (max-width: 767px) {
  .yss-results-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .yss-load-more,
  .yss-view-all {
    width: 100%;
  }
}

/* 0.5.0 mobile search application layout. */
.yss-mobile-back,
.yss-mobile-clear,
.yss-mobile-result-buttons,
.yss-mobile-sheet-header,
.yss-mobile-filter-actions,
.yss-mobile-sheet-backdrop,
.yss-mobile-sort-sheet {
  display: none;
}

@media (max-width: 767px) {
  html.yss-overlay-open,
  body.yss-overlay-open {
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
  }

  .yss-overlay {
    width: 100dvw;
    height: 100dvh;
    background: var(--yss-panel-bg, #fff);
  }

  .yss-overlay-backdrop {
    display: none;
  }

  .yss-overlay-panel,
  .yss-overlay-panel[data-mode="discover"],
  .yss-overlay-panel[data-mode="results"] {
    position: absolute;
    inset: 0;
    width: 100dvw;
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
  }

  .yss-overlay-header,
  .yss-overlay.yss-logo-hidden .yss-overlay-header {
    position: relative;
    z-index: 30;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 4px;
    min-height: 64px;
    padding: max(6px, env(safe-area-inset-top)) 8px 6px;
    border-bottom: 1px solid #e5e8ed;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
  }

  .yss-overlay-brand,
  .yss-desktop-close,
  .yss-overlay-search-icon {
    display: none !important;
  }

  .yss-mobile-back,
  .yss-mobile-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--yss-text, #172033);
    cursor: pointer;
  }

  .yss-mobile-back svg,
  .yss-mobile-clear svg {
    width: 23px;
    height: 23px;
  }

  .yss-overlay-form {
    grid-column: 2;
    height: 48px;
    border-bottom-width: 2px;
  }

  .yss-overlay-input {
    height: 46px;
    padding: 0 36px 0 6px;
    font-size: 16px;
  }

  .yss-overlay-spinner {
    right: 8px;
  }

  .yss-overlay-content {
    height: calc(100dvh - 64px - max(0px, env(safe-area-inset-top)));
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .yss-discover-view,
  .yss-results-view {
    width: 100%;
    min-width: 0;
    padding: 0;
  }

  .yss-recent-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    min-height: 52px;
    padding: 9px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .yss-recent-row::-webkit-scrollbar,
  .yss-recent-chips::-webkit-scrollbar,
  .yss-popular-list::-webkit-scrollbar,
  .yss-suggestions::-webkit-scrollbar {
    display: none;
  }

  .yss-recent-row > strong {
    flex: 0 0 auto;
    align-self: center;
  }

  .yss-recent-chips {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .yss-clear-recent {
    flex: 0 0 auto;
    width: auto;
    align-self: center;
    text-align: left;
  }

  .yss-discover-layout {
    display: block;
    padding: 18px 12px 28px;
  }

  .yss-popular-block,
  .yss-recommended-block {
    min-width: 0;
  }

  .yss-popular-block {
    margin-bottom: 22px;
  }

  .yss-popular-block h3,
  .yss-recommended-block h3 {
    margin-bottom: 11px;
    font-size: 16px;
  }

  .yss-popular-list {
    display: flex;
    flex-flow: row nowrap;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scroll-snap-type: x proximity;
  }

  .yss-popular-term {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid #d8dee7;
    border-radius: 999px;
    background: #fff;
    line-height: 1.2;
    scroll-snap-align: start;
  }

  .yss-recommended-shell {
    width: 100%;
    overflow: visible;
  }

  .yss-overlay.yss-mobile-recommended-grid .yss-recommended-track {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .yss-overlay.yss-mobile-recommended-grid.yss-mobile-cols-1 .yss-recommended-track {
    grid-template-columns: minmax(0, 1fr);
  }

  .yss-overlay.yss-mobile-recommended-grid .yss-recommended-arrow {
    display: none !important;
  }

  .yss-overlay.yss-mobile-recommended-slider .yss-recommended-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(158px, 72vw);
    grid-template-columns: none;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    padding: 0 1px 8px;
  }

  .yss-overlay.yss-mobile-recommended-slider .yss-recommended-arrow {
    display: none !important;
  }

  .yss-product-card,
  .yss-product-card.is-compact {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    border-radius: var(--yss-card-radius, 0);
  }

  .yss-product-image,
  .yss-product-card.is-compact .yss-product-image {
    height: clamp(118px, 36vw, 165px);
    margin-bottom: 9px;
  }

  .yss-overlay.yss-mobile-cols-1 .yss-product-image,
  .yss-overlay.yss-mobile-cols-1 .yss-product-card.is-compact .yss-product-image {
    height: min(58vw, 260px);
  }

  .yss-product-name {
    min-height: 38px;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .yss-product-reference,
  .yss-product-variant {
    font-size: 11px;
  }

  .yss-product-price {
    padding-top: 9px;
    font-size: 13px;
  }

  .yss-product-stock {
    margin-top: 4px;
    font-size: 11px;
  }

  .yss-suggestions {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid #edf0f4;
    background: var(--yss-panel-bg, #fff);
  }

  .yss-suggestions .yss-chip {
    flex: 0 0 auto;
  }

  .yss-results-toolbar {
    position: sticky;
    top: 0;
    z-index: 16;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e8ed;
    background: var(--yss-panel-bg, #fff);
    box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
  }

  .yss-results-count {
    font-size: 13px;
    line-height: 1.35;
  }

  .yss-sort-label {
    display: none;
  }

  .yss-mobile-result-buttons {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .yss-mobile-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid #d5dbe4;
    border-radius: 8px;
    background: #fff;
    color: var(--yss-text, #172033);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .yss-mobile-action svg {
    width: 17px;
    height: 17px;
  }

  .yss-mobile-action b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--yss-primary, #168fe5);
    color: #fff;
    font-size: 10px;
  }

  .yss-mobile-filters-disabled .yss-mobile-filter-button {
    display: none;
  }

  .yss-results-layout {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .yss-products-area {
    width: 100%;
    min-width: 0;
    padding: 12px;
  }

  .yss-overlay.yss-mobile-cols-1 .yss-products-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px;
  }

  .yss-overlay.yss-mobile-cols-2 .yss-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .yss-filters {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    max-height: min(84dvh, 760px);
    padding: 0;
    border: 0;
    border-radius: 18px 18px 0 0;
    background: var(--yss-panel-bg, #fff);
    box-shadow: 0 -16px 48px rgba(15, 23, 42, .22);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
  }

  .yss-filters.is-mobile-open {
    transform: translateY(0);
    visibility: visible;
  }

  .yss-overlay.yss-mobile-filter-side .yss-filters {
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(90dvw, 390px);
    max-height: 100dvh;
    border-radius: 0;
    transform: translateX(105%);
  }

  .yss-overlay.yss-mobile-filter-side .yss-filters.is-mobile-open {
    transform: translateX(0);
  }

  .yss-mobile-filters-disabled .yss-filters {
    display: none !important;
  }

  .yss-mobile-sheet-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 10px 15px;
    border-bottom: 1px solid #e5e8ed;
    font-size: 16px;
  }

  .yss-mobile-sheet-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--yss-text, #172033);
    cursor: pointer;
  }

  .yss-mobile-sheet-header svg {
    width: 21px;
    height: 21px;
  }

  .yss-mobile-filter-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 5px 16px 18px;
  }

  .yss-filter-section {
    padding: 15px 0;
    border-bottom: 1px solid #edf0f4;
  }

  .yss-category-filter {
    display: flex;
    flex-flow: column nowrap;
    gap: 2px;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .yss-category-option {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    width: 100%;
    min-height: 44px;
    padding: 8px 2px;
    border: 0;
    border-radius: 0;
  }

  .yss-category-option small {
    margin-left: 8px;
  }

  .yss-mobile-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    flex: 0 0 auto;
    gap: 10px;
    padding: 12px 15px max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid #e5e8ed;
    background: var(--yss-panel-bg, #fff);
  }

  .yss-mobile-reset-filters,
  .yss-mobile-apply-filters {
    min-height: 46px;
    padding: 9px 12px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .yss-mobile-reset-filters {
    border: 1px solid #d5dbe4;
    background: #fff;
    color: var(--yss-text, #172033);
  }

  .yss-mobile-apply-filters {
    border: 1px solid var(--yss-primary, #168fe5);
    background: var(--yss-primary, #168fe5);
    color: #fff;
  }

  .yss-mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(15, 23, 42, .50);
    backdrop-filter: blur(1px);
  }

  .yss-mobile-sheet-backdrop[hidden] {
    display: none !important;
  }

  .yss-mobile-sort-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: block;
    max-height: 76dvh;
    border-radius: 18px 18px 0 0;
    background: var(--yss-panel-bg, #fff);
    box-shadow: 0 -16px 48px rgba(15, 23, 42, .22);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
  }

  .yss-mobile-sort-sheet.is-mobile-open {
    transform: translateY(0);
    visibility: visible;
  }

  .yss-mobile-sort-options {
    display: flex;
    flex-direction: column;
    padding: 5px 15px max(16px, env(safe-area-inset-bottom));
  }

  .yss-mobile-sort-options button {
    position: relative;
    min-height: 48px;
    padding: 10px 38px 10px 4px;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    background: transparent;
    color: var(--yss-text, #172033);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
  }

  .yss-mobile-sort-options button.is-active::after {
    content: "✓";
    position: absolute;
    top: 50%;
    right: 8px;
    color: var(--yss-primary, #168fe5);
    font-size: 18px;
    font-weight: 800;
    transform: translateY(-50%);
  }

  .yss-results-actions {
    gap: 9px;
    padding: 16px 0 max(10px, env(safe-area-inset-bottom));
  }

  .yss-load-more,
  .yss-view-all {
    min-height: 46px;
    border-radius: 8px;
  }
}

@media (max-width: 767px) {
  .yss-overlay.yss-mobile-sheet-open .yss-overlay-content {
    overflow: hidden;
  }
}

/* 0.5.1 tablet results layout: product-first grid with filters in a drawer. */
@media (min-width: 768px) and (max-width: 1100px) {
  .yss-overlay-header,
  .yss-overlay.yss-logo-hidden .yss-overlay-header {
    grid-template-columns: minmax(120px, 165px) minmax(0, 1fr) 46px;
    gap: 18px;
    min-height: 92px;
    padding: 14px 20px 12px;
  }

  .yss-overlay.yss-logo-hidden .yss-overlay-header {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .yss-overlay-brand {
    height: 58px;
  }

  .yss-overlay-logo {
    max-height: 56px;
  }

  .yss-overlay-input {
    height: 48px;
    font-size: 16px;
  }

  .yss-overlay-content {
    height: calc(100% - 92px);
  }

  .yss-discover-view,
  .yss-results-view {
    padding-right: 20px;
    padding-left: 20px;
  }

  .yss-suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .yss-suggestions .yss-chip {
    flex: 0 0 auto;
  }

  .yss-results-toolbar {
    position: sticky;
    top: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    padding: 10px 0;
    border-bottom: 1px solid #e7eaf0;
    background: var(--yss-panel-bg, #fff);
  }

  .yss-sort-label {
    display: flex;
  }

  .yss-sort-select {
    min-width: 150px;
  }

  .yss-mobile-result-buttons {
    display: flex;
    align-items: center;
  }

  .yss-mobile-result-buttons [data-yss-mobile-sort] {
    display: none;
  }

  .yss-mobile-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #d5dbe4;
    border-radius: 8px;
    background: #fff;
    color: var(--yss-text, #172033);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  .yss-mobile-action svg {
    width: 18px;
    height: 18px;
  }

  .yss-mobile-action b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--yss-primary, #168fe5);
    color: #fff;
    font-size: 10px;
  }

  .yss-mobile-filters-disabled .yss-mobile-filter-button {
    display: none;
  }

  .yss-results-layout {
    display: block;
    width: 100%;
  }

  .yss-products-area {
    width: 100%;
    padding: 14px 0 38px;
  }

  .yss-overlay.yss-grid-cols-3 .yss-products-grid,
  .yss-overlay.yss-grid-cols-4 .yss-products-grid,
  .yss-overlay.yss-grid-cols-5 .yss-products-grid,
  .yss-overlay.yss-grid-cols-6 .yss-products-grid,
  .yss-overlay.yss-grid-cols-7 .yss-products-grid,
  .yss-overlay.yss-grid-cols-8 .yss-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px;
  }

  .yss-product-card,
  .yss-product-card.is-compact {
    min-height: 372px;
    padding: 14px;
  }

  .yss-product-image,
  .yss-product-card.is-compact .yss-product-image {
    height: 190px;
    margin-bottom: 14px;
  }

  .yss-product-name {
    min-height: 44px;
    font-size: 14px;
    line-height: 1.55;
  }

  .yss-product-price {
    padding-top: 14px;
    font-size: 15px;
  }

  .yss-product-stock {
    font-size: 12px;
  }

  .yss-filters {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 60;
    display: flex;
    flex-direction: column;
    width: min(430px, 88vw);
    max-width: none;
    height: 100vh;
    max-height: 100vh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--yss-panel-bg, #fff);
    box-shadow: -18px 0 48px rgba(15, 23, 42, .22);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s ease;
  }

  .yss-filters.is-mobile-open {
    transform: translateX(0);
    visibility: visible;
  }

  .yss-mobile-filters-disabled .yss-filters {
    display: none !important;
  }

  .yss-mobile-sheet-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding: 10px 18px;
    border-bottom: 1px solid #e5e8ed;
    font-size: 17px;
  }

  .yss-mobile-sheet-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--yss-text, #172033);
    cursor: pointer;
  }

  .yss-mobile-sheet-header svg {
    width: 22px;
    height: 22px;
  }

  .yss-mobile-filter-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 20px 22px;
  }

  .yss-filter-section {
    padding: 16px 0 20px;
  }

  .yss-category-filter {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: none;
    overflow: visible;
  }

  .yss-category-option {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 46px;
    padding: 8px 2px;
  }

  .yss-mobile-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    flex: 0 0 auto;
    gap: 12px;
    padding: 14px 18px 18px;
    border-top: 1px solid #e5e8ed;
    background: var(--yss-panel-bg, #fff);
  }

  .yss-mobile-reset-filters,
  .yss-mobile-apply-filters {
    min-height: 48px;
    padding: 10px 14px;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .yss-mobile-reset-filters {
    border: 1px solid #d5dbe4;
    background: #fff;
    color: var(--yss-text, #172033);
  }

  .yss-mobile-apply-filters {
    border: 1px solid var(--yss-primary, #168fe5);
    background: var(--yss-primary, #168fe5);
    color: #fff;
  }

  .yss-mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(1px);
  }

  .yss-mobile-sheet-backdrop[hidden] {
    display: none !important;
  }

  .yss-overlay.yss-mobile-sheet-open .yss-overlay-content {
    overflow: hidden;
  }
}

/* 0.5.3 tablet discovery layout: full-height panel with fixed three-column recommendation grid. */
@media (min-width: 768px) and (max-width: 1100px) {
  .yss-overlay-panel[data-mode="discover"] {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
  }

  .yss-discover-layout {
    grid-template-columns: minmax(150px, 170px) minmax(0, 1fr);
    gap: 20px;
    width: 100%;
  }

  .yss-recommended-block,
  .yss-recommended-shell {
    min-width: 0;
    width: 100%;
  }

  .yss-recommended-track,
  .yss-overlay.yss-mobile-recommended-grid .yss-recommended-track,
  .yss-overlay.yss-mobile-recommended-slider .yss-recommended-track {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding: 0;
    scroll-behavior: auto;
    scroll-snap-type: none;
    scrollbar-width: none;
  }

  .yss-recommended-track::-webkit-scrollbar {
    display: none;
  }

  .yss-recommended-arrow {
    display: none !important;
  }

  .yss-recommended-track .yss-product-card,
  .yss-recommended-track .yss-product-card.is-compact {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}
