:root {
  --bds-accent: #c2185b;
  --bds-ink: #17171a;
  --bds-muted: #727279;
  --bds-line: #e8e8ec;
  --bds-soft: #f7f7f9;
}

body.bds-search-open {
  overflow: hidden;
}

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

.bds-overlay {
  position: fixed;
  z-index: 100000;
  inset: 0;
  padding: 0;
  overflow-y: auto;
  background: #fff;
  opacity: 0;
  transition: opacity 180ms ease;
}

.bds-overlay.is-open {
  opacity: 1;
}

.bds-dialog {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  color: var(--bds-ink);
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  font-family: inherit;
}

.bds-overlay.is-open .bds-dialog {
  transform: none;
}

.bds-header {
  position: sticky;
  z-index: 20;
  top: 0;
  padding: 18px clamp(18px, 3vw, 52px);
  border-bottom: 1px solid var(--bds-line);
  background: #fff;
}

.bds-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 0 10px 0 20px;
  border: 2px solid var(--bds-accent);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(194, 24, 91, 0.14);
  box-shadow: 0 7px 22px color-mix(in srgb, var(--bds-accent) 14%, transparent);
}

.bds-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  place-items: center;
  color: var(--bds-accent);
}

.bds-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.bds-input {
  width: 100%;
  min-width: 0;
  height: 56px;
  padding: 0;
  color: var(--bds-ink);
  background: transparent;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  font: inherit;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 500;
}

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

.bds-input::placeholder {
  color: #9a9aa1;
}

.bds-close {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 9px;
  place-items: center;
  color: #4c4c53;
  background: var(--bds-soft);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, transform 150ms ease;
}

.bds-close:hover,
.bds-close:focus-visible {
  color: #fff;
  background: var(--bds-accent);
  transform: rotate(4deg);
}

.bds-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.bds-content {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: calc(100vh - 98px);
}

.bds-aside {
  position: sticky;
  top: 98px;
  align-self: start;
  max-height: calc(100vh - 98px);
  padding: 28px 24px 50px;
  overflow-y: auto;
  background: var(--bds-soft);
  border-right: 1px solid var(--bds-line);
}

.bds-main {
  min-width: 0;
  padding: 28px clamp(18px, 3vw, 48px) 70px;
}

.bds-section-heading {
  margin: 0 0 22px;
}

.bds-title {
  margin: 0;
  color: var(--bds-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.bds-subtitle {
  margin: 6px 0 0;
  color: var(--bds-muted);
  font-size: 14px;
  line-height: 1.45;
}

.bds-query-pill {
  padding: 13px 14px;
  overflow: hidden;
  color: var(--bds-ink);
  background: #fff;
  border: 1px solid var(--bds-line);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bds-all-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--bds-ink) !important;
  background: #fff;
  border: 1px solid var(--bds-line);
  border-radius: 10px;
  text-decoration: none !important;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.bds-all-link:hover {
  border-color: var(--bds-accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.bds-all-link .bds-icon {
  width: 18px;
  height: 18px;
}

.bds-all-link span {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
}

.bds-aside-title {
  margin: 28px 0 12px;
  color: var(--bds-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bds-category-list {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bds-category-list li {
  position: relative;
  padding: 7px 6px 7px 15px;
  color: #46464c;
  font-size: 13px;
  line-height: 1.35;
}

.bds-category-list li::before {
  position: absolute;
  top: 13px;
  left: 2px;
  width: 5px;
  height: 5px;
  background: var(--bds-accent);
  border-radius: 50%;
  content: '';
}

.bds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 30px 18px;
}

.bds-product {
  display: block;
  min-width: 0;
  color: var(--bds-ink) !important;
  text-decoration: none !important;
}

.bds-product__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  margin-bottom: 13px;
  background: var(--bds-soft);
  border-radius: 11px;
}

.bds-product__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 240ms ease;
}

.bds-product:hover .bds-product__image {
  transform: scale(1.045);
}

.bds-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 5px 7px;
  color: #fff;
  background: var(--bds-accent);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.bds-product__category {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--bds-muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.bds-product__name {
  display: -webkit-box;
  min-height: 38px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--bds-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.bds-product__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 7px;
}

.bds-product__price {
  color: var(--bds-accent);
  font-size: 15px;
  font-weight: 750;
}

.bds-product__regular {
  color: #929298;
  font-size: 12px;
  text-decoration: line-through;
}

.bds-footer {
  display: flex;
  justify-content: center;
  padding-top: 32px;
}

.bds-view-all {
  display: inline-flex;
  min-height: 44px;
  padding: 0 25px;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: var(--bds-accent);
  border: 1px solid var(--bds-accent);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: filter 150ms ease, transform 150ms ease;
}

.bds-view-all:hover {
  filter: brightness(0.9);
  transform: translateY(-1px);
}

.bds-toolbar {
  display: flex;
  min-height: 44px;
  margin-bottom: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bds-toolbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bds-total {
  color: var(--bds-ink);
  font-size: 15px;
  white-space: nowrap;
}

.bds-filter-button {
  display: none;
  min-height: 40px;
  padding: 0 15px;
  color: var(--bds-ink);
  background: #fff;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.bds-sort {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--bds-muted);
  font-size: 13px;
}

.bds-sort__select {
  min-height: 40px;
  max-width: 260px;
  padding: 0 34px 0 12px;
  color: var(--bds-ink);
  background-color: #fff;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.bds-filters-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bds-filter-close {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--bds-ink);
  background: #fff;
  border: 1px solid var(--bds-line);
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
}

.bds-filter-count {
  margin: 6px 0 20px;
  color: var(--bds-muted);
  font-size: 12px;
}

.bds-facets #search_filters > .h6,
.bds-facets .title.hidden-md-up,
.bds-facets .facet-title.hidden-md-up {
  display: none !important;
}

.bds-facets .facet {
  margin: 0;
  padding: 20px 0;
  border-top: 1px solid #dedee3;
}

.bds-facets .facet:first-of-type {
  border-top: 0;
}

.bds-facets .facet .facet-title,
.bds-facet-title {
  display: block !important;
  margin: 0 0 13px;
  color: var(--bds-ink);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.3;
  text-transform: none;
}

.bds-facets .facet ul,
.bds-facets .facet ul.collapse {
  display: grid !important;
  gap: 3px;
  height: auto !important;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bds-facets .facet li {
  margin: 0;
  padding: 0;
}

.bds-facets .facet li[hidden] {
  display: none !important;
}

.bds-facets .facet-label {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  min-height: 34px;
  margin: 0;
  align-items: center;
  cursor: pointer;
  text-align: left !important;
}

.bds-facets .custom-checkbox,
.bds-facets .custom-radio {
  position: relative;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
}

.bds-facets input[type='checkbox'],
.bds-facets input[type='radio'] {
  position: static !important;
  display: block !important;
  width: 17px;
  height: 17px;
  margin: 0;
  opacity: 1 !important;
  appearance: auto !important;
  accent-color: var(--bds-accent);
}

.bds-facets .custom-checkbox > span,
.bds-facets .custom-radio > span {
  display: none !important;
}

.bds-facets .search-link {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  color: #4d4d53 !important;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none !important;
  text-overflow: ellipsis;
  text-align: left !important;
}

.bds-facets .search-link:hover {
  color: var(--bds-accent) !important;
}

.bds-facets .magnitude {
  margin-left: auto;
  color: #929298;
  font-size: 11px;
}

.bds-facet-search {
  width: 100%;
  height: 38px;
  margin: 0 0 11px;
  padding: 0 11px;
  color: var(--bds-ink);
  background: #fff;
  border: 1px solid #d9d9de;
  border-radius: 7px;
  outline: 0;
  font: inherit;
  font-size: 13px;
}

.bds-facet-search:focus {
  border-color: var(--bds-accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bds-accent) 12%, transparent);
}

.bds-facet-more {
  margin: 10px 0 0;
  padding: 0;
  color: var(--bds-accent);
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bds-facets .faceted-slider {
  display: block !important;
  padding: 2px 5px 8px !important;
}

.bds-facets .faceted-slider p {
  margin: 0 0 16px;
  color: var(--bds-ink);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.bds-facets .ui-slider {
  position: relative;
  height: 5px;
  margin: 10px 8px 15px;
  background: #dcdce2;
  border: 0;
  border-radius: 4px;
}

.bds-facets .ui-slider-range {
  position: absolute;
  height: 100%;
  background: var(--bds-accent);
}

.bds-facets .ui-slider-handle {
  position: absolute;
  top: 50%;
  width: 19px;
  height: 19px;
  margin-left: -9px;
  background: #fff;
  border: 2px solid var(--bds-accent);
  border-radius: 50%;
  outline: 0;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.14);
  transform: translateY(-50%);
  cursor: grab;
}

.bds-price-fallback {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bds-price-input {
  width: 100%;
  height: 38px;
  padding: 0 8px;
  color: var(--bds-ink);
  background: #fff;
  border: 1px solid #d9d9de;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
}

.bds-price-apply {
  grid-column: 1 / -1;
  min-height: 38px;
  color: #fff;
  background: var(--bds-accent);
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bds-active-filters:empty,
.bds-active-filters .hide {
  display: none;
}

.bds-active-filters #js-active-search-filters:not(.hide) {
  margin: 0 0 14px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--bds-line);
  border-radius: 8px;
}

.bds-active-filters .filter-block {
  display: inline-flex;
  margin: 3px;
  padding: 5px 7px;
  color: var(--bds-ink);
  background: var(--bds-soft);
  border-radius: 5px;
  font-size: 11px;
}

.bds-infinite-status {
  display: flex;
  min-height: 90px;
  padding: 30px 12px 12px;
  align-items: center;
  justify-content: center;
  color: var(--bds-muted);
  font-size: 13px;
  text-align: center;
}

.bds-infinite-status:not(.is-complete):not(.is-error)::before {
  width: 25px;
  height: 25px;
  border: 2px solid #e4e4e8;
  border-top-color: var(--bds-accent);
  border-radius: 50%;
  animation: bds-spin 700ms linear infinite;
  content: '';
}

.bds-infinite-status.is-complete::before {
  width: 35px;
  height: 1px;
  margin-right: 12px;
  background: var(--bds-line);
  content: '';
}

.bds-infinite-status.is-complete::after {
  width: 35px;
  height: 1px;
  margin-left: 12px;
  background: var(--bds-line);
  content: '';
}

.bds-infinite-status.is-error {
  color: #a13232;
}

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

.bds-hint,
.bds-empty {
  display: flex;
  min-height: 420px;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--bds-muted);
  text-align: center;
}

.bds-hint .bds-icon,
.bds-empty .bds-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  opacity: 0.55;
}

.bds-hint p {
  margin: 0;
  font-size: 16px;
}

.bds-skeleton {
  animation: bds-pulse 1.2s ease-in-out infinite alternate;
}

.bds-skeleton__image {
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
  background: #ededf1;
  border-radius: 11px;
}

.bds-skeleton__line {
  height: 11px;
  margin-bottom: 9px;
  background: #ededf1;
  border-radius: 6px;
}

.bds-skeleton__line--short {
  width: 58%;
}

@keyframes bds-pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

@media (max-width: 980px) {
  .bds-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .bds-content {
    display: block;
  }

  .bds-aside {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(340px, 90vw);
    max-height: none;
    padding: 24px 20px 50px;
    border-right: 1px solid var(--bds-line);
    box-shadow: 18px 0 50px rgba(0, 0, 0, 0.16);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .bds-overlay.filters-open .bds-aside {
    transform: translateX(0);
  }

  .bds-filter-button,
  .bds-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .bds-main {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (max-width: 720px) {
  .bds-overlay {
    padding: 0;
    background: #fff;
  }

  .bds-dialog {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .bds-header {
    position: sticky;
    z-index: 20;
    top: 0;
    padding: 12px;
  }

  .bds-form {
    min-height: 52px;
    padding-left: 14px;
    border-radius: 10px;
  }

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

  .bds-close {
    width: 38px;
    height: 38px;
  }

  .bds-aside {
    padding: 20px 16px 45px;
  }

  .bds-sort > span {
    display: none;
  }

  .bds-sort__select {
    width: min(45vw, 190px);
  }

  .bds-main {
    padding: 20px 16px 30px;
  }

  .bds-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 12px;
  }

  .bds-hint,
  .bds-empty {
    min-height: 55vh;
  }

  .bds-product__name {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bds-overlay,
  .bds-dialog,
  .bds-product__image,
  .bds-close,
  .bds-view-all,
  .bds-skeleton {
    animation: none !important;
    transition: none !important;
  }
}
