theme-facets-form {
  display: contents;
}

.facets-wrapper {
  display: flex;
}

.facets-desktop {
  display: contents;
}

.facets-sorting__summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-inline-end: 12px;
}

.facets-sorting__summary svg {
  transition: 0.2s;
}

.facets-sorting__content-header {
  padding-block-end: 10px;
  border-block-end: 1px solid #ddd;
}

.facets-sorting__content-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.facets-sorting__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 296px;
  padding: 20px;
  background-color: rgb(var(--color-page-background));
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 4px;
}

@media (min-width: 960px) {
  .facets-sorting__content {
    --modal-animation-name: animation-slide-in;

    position: absolute;
    inset: 0;
    inset: unset;
    gap: 20px;
    width: 100%;
    min-width: 250px;
    max-width: 650px;
    padding-block-end: 30px;
    margin-block-start: 10px;
    transform-origin: top;
  }
}

.facets-sorting__content svg {
  width: 16px;
  opacity: 0;
}

.facets-sorting__content input {
  display: none;
}

.facets-sorting__content input:checked ~ svg {
  opacity: 1;
}

@media (min-width: 960px) {
  .facets-sorting__content input:checked ~ span {
    border-block-end: 1px solid rgb(var(--color-text));
  }
}

.facets-sorting__content label {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
}

.facets-sorting__details {
  position: relative;
}
.facets-sorting__content {
  position: absolute;
  bottom: unset;
  top: 100%;
}
@media (min-width: 960px) {
  .facets-sorting__details[open]::before {
    display: none;
  }
}

.facets-sorting__details[open] .facets-sorting__summary span {
  border-block-end: 1px solid rgb(var(--color-text));
}

.facets-sorting__details[open] .facets-sorting__summary svg {
  transition: 0.2s;
  transform: rotate(-180deg);
}

.facets-filtering {
  display: flex;
  flex-direction: column;
  position: relative;
}

.facets-filtering fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

.facets-filtering input[type="radio"],
.facets-filtering input[type="checkbox"] {
  display: none;
}

.facets-filtering__filters {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 12px;
}

.facets-filtering__summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: rgb(var(--color-text));
  border: 1px solid #ddd;
}

.facets-filtering__summary svg {
  flex-shrink: 0;
  width: 10px;
  transition: 0.2s;
}

.facets-filtering__details[open]::before {
  display: none;
}

.facets-filtering__details[open] .facets-filtering__summary {
  border-color: rgb(var(--color-text));
}

.facets-filtering__details[open] .facets-filtering__summary svg {
  transform: rotate(-180deg);
}

.facets-filtering__content-header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding-block: 5px;
}

.facets-filtering__content-header ~ fieldset {
  padding-block-start: 12px;
  border-block-start: 1px solid rgb(221 221 221 / 100%);
}

.facets-filtering__content {
  --modal-animation-name: animation-slide-in;

  position: absolute;
  inset-block-start: 100%;
  z-index: var(--z-index-dropdown);
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 296px;
  max-height: 480px;
  padding: 20px;
  margin-block-start: 10px;
  overflow: auto;
  background-color: rgb(var(--color-page-background));
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 4px;
  transform-origin: top;
}

.facets-filtering__content.price-range {
  gap: 20px;
  width: 340px;
}

.facets-filtering__content.price-range
  .facets-filtering__content-header
  ~ fieldset {
  padding: 0;
  border-block-start: 0;
}

.facets-filtering__reset {
  height: 100%;
  color: rgba(var(--color-text), 1);
  border-block-end: 1px solid rgb(var(--color-text));
}

.facets-filtering__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 0;
}

.facets-filtering__list > li {
  display: flex;
  gap: 5px;
  padding-block: 5px;
}

.facets-filtering__checkbox-wrapper {
  display: flex;
  gap: 8px;
  justify-content: space-around;
  width: 100%;
  cursor: pointer;
}

.facets-filtering__checkbox-wrapper.disabled {
  cursor: not-allowed;
}

.facets-filtering__checkbox-wrapper > span:nth-of-type(1) {
  display: inline-flex;
  flex: 1;
  gap: 8px;
  align-items: center;
}

.facets-filtering__checkbox-wrapper > span:nth-of-type(1)::before {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  content: "";
  border: 1px solid #ddd;
}

.facets-filtering__checkbox-wrapper > span:nth-of-type(2) {
  flex-shrink: 0;
  min-width: 10px;
  text-align: center;
  opacity: 0.6;
}

.facets-filtering__checkbox-wrapper
  input:checked
  ~ span:nth-of-type(1)::before {
  background: black;
  border-color: black;
  box-shadow: inset 0 0 0 2px #fff;
}

.facets-filtering__submenu-button-group {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.facets-filtering__submenu-button-group a {
  width: 100%;
}

.facets-filtering__submenu-button-group > * {
  flex: 1;
}

.facets-filtering__modal-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  overflow-y: auto;
}

.facets-filtering__modal-body-inner {
  padding: 0 20px 30px;
  overflow-y: auto;
}

.facets-confirm {
  width: 100%;
  color: rgb(var(--color-button-secondary-text));
  background-color: rgb(var(--color-button-secondary-background));
  box-shadow: inset 0 0 0 1px rgb(var(--color-button-secondary-border)) !important;
}

.facets-confirm:hover {
  color: rgb(var(--color-button-text));
  background-color: rgb(var(--color-button-background));
}

.facets-filtering__active {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.facets-filtering__active-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.facets-filtering__active-buttons:empty {
  width: 100px;
}

.facets-filtering__active-buttons:empty + theme-facets-remove {
  display: none;
}

.facets-filtering__active > theme-facets-remove:only-child {
  display: none;
}

.facets-filtering__active-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background-color: #3d3819;
}

.facets-filtering__active-button-inner {
  color: #fff;
}

.facets-filtering__active-clear-all {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.facets-sorting {
  margin-top: 20px;
}

@media (min-width: 960px) {
  .facets-sorting {
    margin-top: 0;
  }
  .facets-layout-horizontal .facets-filtering__details {
    position: relative;
  }
  .facets-layout-vertical .facets-filtering {
    gap: 0;
  }

  .facets-layout-vertical .facets-filtering__active {
    flex-wrap: wrap;
    gap: 4px;
  }

  .facets-layout-vertical .facets-filtering__active-buttons {
    flex-wrap: wrap;
  }

  .facets-layout-vertical .facets-filtering__active-clear-all {
    padding: 10px 0;
  }

  .facets-layout-vertical .facets-filtering__filters {
    flex-direction: column;
    order: 1;
  }

  /* 侧栏里不是下拉层，不要继承下拉的 z-index，否则页面滚动时会盖到吸顶导航上 */
  .facets-layout-vertical .facets-filtering__content {
    position: relative;
    z-index: auto;
    width: 100%;
    padding: 0;
    border: 0;
  }

  .facets-layout-vertical .facets-filtering__summary {
    justify-content: space-between;
    padding: 15px 0;
    border: 0;
  }

  .facets-layout-vertical .facets-filtering__details {
    border: 0;
  }
  .facets-layout-vertical .facets-filtering theme-collapse:not(:last-child) {
    border-block-end: 1px solid #ddd;
  }

  .facets-layout-vertical .facets-filtering__content-header {
    display: none;
  }

  .facets-layout-vertical .facets-filtering__content-header ~ fieldset {
    padding: 0;
    border: 0;
  }

  .facets-layout-vertical .facets-active {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .facets-layout-vertical .facets-count {
    justify-self: start;
  }

  .facets-layout-vertical .facets-sorting {
    justify-self: end;
  }
  .facets-layout-drawer .facets-filtering__modal-header {
    padding: 30px 20px 0;
    color: rgb(var(--color-text));
  }

  .facets-layout-drawer .facets-filtering__modal-summary {
    display: flex;
    gap: 10px;
    align-items: center;
    width: fit-content;
  }

  .facets-layout-drawer .facets-filtering__summary {
    justify-content: space-between;
    padding: 15px 0;
    border: 0;
  }

  .facets-layout-drawer .facets-filtering__summary svg {
    transform: rotate(-90deg);
  }

  .facets-layout-drawer .facets-filtering__submenu-summary {
    padding: 0;
    cursor: pointer;
    background: none;
    border: 0;
    outline: 0;
  }

  .facets-layout-drawer .facets-filtering__submenu-summary svg {
    margin-inline-end: 20px;
    transform: rotate(90deg);
  }

  .facets-layout-drawer .facets-filtering__modal-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 400px;
  }

  .facets-layout-drawer .facets-filtering__filters {
    flex-direction: column;
  }

  .facets-layout-drawer .facets-filtering__content-header {
    padding: 15px 20px;
  }

  .facets-layout-drawer .facets-filtering__content-header ~ fieldset {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 0 20px 20px;
    overflow: hidden;
    border: 0;
  }

  .facets-layout-drawer .facets-filtering__content {
    --modal-animation-name: animation-slide-in-right;

    inset-block-start: 0;
    z-index: var(--z-index-dropdown);
    gap: 10px;
    width: 100%;
    height: 100%;
    max-height: none;
    padding: 0;
    margin: 0;
    border: 0;
  }
  .facets-layout-drawer
    .facets-filtering__content.price-range
    .facets-filtering__content-header
    ~ fieldset {
    padding: 0 20px 20px;
  }

  .facets-layout-drawer .facets-filtering__list {
    padding-block-end: 20px;
    overflow: auto;
  }
  .facets-sorting__details {
    position: relative;
  }

  .facets-sorting__content {
    position: absolute;
    inset-inline-end: 0;
    z-index: var(--z-index-dropdown);
  }
}

.facets-mobile__modals {
  display: flex;
  padding: 15px 0;
}

.facets-mobile__modals > * {
  flex: 1;
}

.facets-mobile__modals > *:first-child {
  border-inline-end: 1px solid #ddd;
}

.facets-mobile__modals summary {
  display: flex;
  justify-content: center;
  width: 100%;
}

.facets-mobile .facets-sorting__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.facets-mobile .facets-sorting__content label {
  padding: 5px 0;
}

.facets-mobile .facets-filtering__modal-header {
  padding: 20px 20px 10px;
}

.facets-mobile .facets-filtering__modal-header > *:first-child {
  padding-block: 4.5px;
}

.facets-mobile .facets-filtering__content-header {
  display: none;
}

.facets-mobile .facets-filtering__content-header ~ fieldset {
  padding: 0;
  border: 0;
}

.facets-mobile .facets-filtering__filters {
  flex-direction: column;
}

.facets-mobile .facets-filtering__summary {
  justify-content: space-between;
  padding: 12px 0;
  border: 0;
}

.facets-mobile .facets-filtering__modal-content {
  display: flex;
  flex-direction: column;
  width: 92%;
  overflow-y: auto;
  background-color: rgb(var(--color-page-background));
}

.facets-mobile .facets-filtering__content {
  position: relative;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
}

.facets-mobile .facets-filtering__details[open] {
  padding-block-end: 10px;
}

.facets-mobile .facets-filtering__details:not(:last-child) {
  border-block-end: 1px solid #ddd;
}

.facets-mobile .facets-filtering__modal-body {
  overflow-y: hidden;
}

.facets-mobile .facets-filtering__modal-body > *:first-child {
  flex: 1;
  padding: 0 20px;
  overflow: hidden auto;
}

.facets-mobile .facets-filtering__submenu-button-group {
  padding: 0 20px 20px;
}

.facets-mobile .facets-filtering .price-range .facets-confirm {
  display: none;
}

.price-range-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.price-range-input .field {
  padding: 8px 12px;
  margin: 0;
}

.price-range-input .field::after {
  border-color: #ddd;
}

.price-range-input .field:focus-within::after {
  border-color: black;
}

.price-range-input .field__input {
  padding: 0;
  height: 20px;
}

.price-range-input .line {
  flex-shrink: 0;
  width: 10px;
  height: 1px;
  background: #ddd;
}

.price-range-input .field-currency {
  flex-shrink: 0;
  padding-inline-end: 5px;
  opacity: 0.5;
}

.facets-loading {
  position: fixed;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  z-index: var(--z-index-fixed);
  width: 92px;
  height: 92px;
  background-color: rgb(var(--color-page-background));
  border-radius: 12px;
  box-shadow: 0 10px 50px 0 rgba(var(--color-text), 0.08);
  transform: translate(-50%, -50%);
}

.facets-loading > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.facets-loading > div svg {
  width: 60%;
  height: 60%;
}

.facets-loading-wrapper {
  position: fixed;
  inset: 0;
  z-index: var(--z-index-fixed);
  display: none;
  content: "";
}

.facets-loading-wrapper.loading {
  display: block;
}

/* ---------- Lensly 筛选栏：性别胶囊 / 款形图格 / 色系色块，+ − 折叠 ---------- */

/* 筛选组固定顺序，后台「智能搜索推荐 → 筛选器」里怎么排都不影响 */
.facets-mobile .facets-filtering__modal-body > div:first-child {
  display: flex;
  flex-direction: column;
}

theme-collapse:has([data-filter-key="filter.p.m.filter.gender"]) { order: 1; }
theme-collapse:has([data-filter-key="filter.p.m.filter.shape"]) { order: 2; }
theme-collapse:has([data-filter-key="filter.v.option.Color"]) { order: 3; }
theme-collapse:has([data-filter-key="filter.p.m.filter.material"]) { order: 4; }
theme-collapse:has([data-filter-key="filter.p.m.filter.frame_size"]) { order: 5; }
theme-collapse:has([data-filter-key="filter.p.m.filter.rim"]) { order: 6; }
theme-collapse:has([data-filter-key^="filter.v.price"]) { order: 7; }

.facets-sidebar__head {
  order: -1;
  margin-block-end: 6px;
  font-family: var(--title-font);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  color: rgb(var(--color-text));
}

/* 竖向侧栏和手机抽屉里用 + − 代替箭头 */
.facets-layout-vertical .facets-filtering__summary > svg,
.facets-mobile .facets-filtering__summary > svg {
  display: none;
}

.facets-filtering__toggle {
  display: none;
}

.facets-layout-vertical .facets-filtering__toggle,
.facets-mobile .facets-filtering__toggle {
  position: relative;
  display: block;
  flex: none;
  width: 12px;
  height: 12px;
}

.facets-filtering__toggle::before,
.facets-filtering__toggle::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0;
  width: 12px;
  height: 1.5px;
  content: "";
  background-color: currentColor;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
}

.facets-filtering__toggle::after {
  transform: translateY(-50%) rotate(90deg);
}

.facets-filtering__details[open] .facets-filtering__toggle::after {
  transform: translateY(-50%) rotate(0deg);
}

.facets-layout-vertical .facets-filtering__summary,
.facets-mobile .facets-filtering__summary {
  color: rgb(var(--color-text));
}

.facets-layout-vertical .facets-filtering__summary .body2,
.facets-mobile .facets-filtering__summary .body2 {
  font-size: 15px;
  font-weight: 600;
}

.facets-layout-vertical .facets-filtering__details[open],
.facets-mobile .facets-filtering__details[open] {
  padding-block-end: 16px;
}

/* 已选条件：沙色小标签，跟加购推荐卡同一套暖色 */
.facets-filtering__active-button {
  gap: 4px;
  padding: 5px 10px;
  cursor: pointer;
  background-color: #f7f3ee;
  border: 0;
  border-radius: 99px;
}

.facets-filtering__active-button-inner {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
  line-height: 1.4;
  color: #8a5a35;
}

.facets-filtering__active-button-inner svg {
  width: 9px;
  height: 9px;
}

.facets-color-chips {
  display: contents;
}

.facets-filtering__active-clear-all,
.facets-filtering__active-clear-all span {
  font-size: 13px;
  font-weight: 400;
  color: rgba(var(--color-text), 0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 960px) {
  .facets-layout-vertical .facets-filtering__active {
    order: 0;
    padding-block-end: 10px;
  }

  .facets-layout-vertical .facets-filtering__active:has(.facets-filtering__active-buttons:empty) {
    padding: 0;
  }

  .facets-layout-vertical .facets-filtering__active-clear-all {
    padding: 4px 0;
  }

  .facets-layout-vertical .facets-filtering theme-collapse:not(:last-child) {
    border-block-end: 0;
  }

  .facets-layout-vertical .facets-filtering theme-collapse {
    border-block-start: 1px solid #eee;
  }
}

/* 计数：小号灰字 */
.facets-filtering__checkbox-wrapper > span.body4 {
  font-size: 11px;
}

/* 性别：两个等宽胶囊 */
.facets-list--pills {
  flex-direction: row;
  gap: 8px;
}

.facets-list--pills > li {
  flex: 1;
  padding: 0;
}

.facets-list--pills .facets-filtering__checkbox-wrapper {
  gap: 4px;
  align-items: baseline;
  justify-content: center;
  padding: 8px 6px;
  border: 1px solid #ddd;
  border-radius: 99px;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.facets-list--pills .facets-filtering__checkbox-wrapper > span:nth-of-type(1) {
  flex: none;
}

.facets-list--pills .facets-filtering__checkbox-wrapper > span:nth-of-type(1)::before,
.facets-list--shapes .facets-filtering__checkbox-wrapper > span:nth-of-type(1)::before {
  display: none;
}

.facets-list--pills .facets-filtering__checkbox-wrapper > span:nth-of-type(2) {
  min-width: 0;
}

.facets-list--pills .facets-filtering__checkbox-wrapper:not(.disabled):hover {
  border-color: rgb(var(--color-text));
}

.facets-list--pills .facets-filtering__checkbox-wrapper:has(input:checked) {
  color: #fff;
  background-color: rgb(var(--color-text));
  border-color: rgb(var(--color-text));
}

.facets-list--pills .facets-filtering__checkbox-wrapper:has(input:checked) span {
  color: #fff;
}

/* 款形：三列镜框图格子，数量放右上角 */
.facets-list--shapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.facets-list--shapes > li {
  padding: 0;
}

.facets-list--shapes .facets-filtering__checkbox-wrapper {
  position: relative;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 62px;
  padding: 10px 4px 8px;
  color: rgb(var(--color-text));
  background-color: #fff;
  border: 1px solid #e6e2dc;
  border-radius: 10px;
  transition: border-color 0.2s, background-color 0.2s;
}

.facets-list--shapes .facets-shape__icon {
  width: 46px;
  height: 20px;
}

.facets-list--shapes .facets-filtering__checkbox-wrapper > span:nth-of-type(1) {
  flex: none;
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
}

.facets-list--shapes .facets-filtering__checkbox-wrapper > span:nth-of-type(2) {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 6px;
  min-width: 0;
  font-size: 10px;
  line-height: 1;
}

.facets-list--shapes .facets-filtering__checkbox-wrapper:not(.disabled):hover {
  border-color: rgb(var(--color-text));
}

.facets-list--shapes .facets-filtering__checkbox-wrapper:has(input:checked) {
  background-color: #f7f3ee;
  border-color: rgb(var(--color-text));
  box-shadow: inset 0 0 0 1px rgb(var(--color-text));
}

.facets-list--pills .facets-filtering__checkbox-wrapper.disabled,
.facets-list--shapes .facets-filtering__checkbox-wrapper.disabled {
  opacity: 0.4;
}

/* 色系：四列圆色块 + 名称 */
.facets-colors__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 4px;
  /* 选中外圈画在色块外面，手机抽屉是裁切滚动的，留出位置 */
  padding-block-start: 4px;
}

.facets-colors__family {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  padding: 0;
  font-family: var(--body-font);
  font-size: 11px;
  line-height: 1.2;
  color: rgba(var(--color-text), 0.8);
  cursor: pointer;
  background: none;
  border: 0;
}

.facets-colors__family[hidden] {
  display: none;
}

.facets-colors__family i {
  display: block;
  width: 26px;
  height: 26px;
  background-color: #d9d2c8;
  background-position: center;
  background-size: cover;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%);
  transition: box-shadow 0.2s;
}

.facets-colors__family--other i {
  background-image: conic-gradient(#e2574c, #f2c94c, #6fcf97, #56ccf2, #9b51e0, #e2574c);
}

.facets-colors__family:not(:disabled):hover i {
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%), 0 0 0 2px #fff, 0 0 0 3px rgba(var(--color-text), 0.35);
}

.facets-colors__family.is-active i {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgb(var(--color-text));
}

.facets-colors__family.is-active span {
  font-weight: 600;
  color: rgb(var(--color-text));
}

.facets-colors__family:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

/* 手机端：底部弹出的抽屉 */
@media (max-width: 959px) {
  .facets-mobile .facets-filtering__modal-content {
    width: 100%;
    max-height: 86vh;
    border-radius: 18px 18px 0 0;
  }

  .facets-mobile .facets-filtering__modal-header {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: baseline;
    padding: 18px 20px 12px;
  }

  .facets-mobile .facets-filtering__modal-header .facets-count {
    font-size: 13px;
    color: rgba(var(--color-text), 0.6);
  }

  .facets-filtering__modal-close {
    position: absolute;
    inset-block-start: 14px;
    inset-inline-end: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: rgb(var(--color-text));
    cursor: pointer;
    background: none;
    border: 0;
  }

  .facets-filtering__modal-close svg {
    width: 14px;
    height: 14px;
  }

  .facets-mobile .facets-filtering__details:not(:last-child) {
    border-block-end: 0;
  }

  /* 显示顺序靠 CSS order 调过，不能用「相邻兄弟」画分隔线；每组都画上边线，标题栏就不再画下边线 */
  .facets-mobile .facets-filtering__modal-body theme-collapse {
    border-block-start: 1px solid #eee;
  }

  .facets-mobile .facets-filtering__summary {
    padding: 14px 0;
  }

  .facets-mobile .facets-filtering__submenu-button-group {
    padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
    border-block-start: 1px solid #eee;
  }

  .facets-mobile .facets-filtering__submenu-button-group .button {
    border-radius: 99px;
  }

  .facets-mobile .facets-filtering__active {
    gap: 6px;
    padding-block-start: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .facets-filtering__toggle::before,
  .facets-filtering__toggle::after {
    transition: none;
  }
}

/* 颜色原始列表只给色系脚本用，不显示 */
.facets-filtering__list.facets-list--colors {
  display: none;
}

/* 后台给的值按字母排，这里改成顾客习惯的顺序 */
.facets-list--pills > li:has(input[value="Women"]) { order: 1; }
.facets-list--pills > li:has(input[value="Men"]) { order: 2; }

.facets-list--shapes > li:has(input[value="Square"]) { order: 1; }
.facets-list--shapes > li:has(input[value="Rectangle"]) { order: 2; }
.facets-list--shapes > li:has(input[value="Cat-eye"]) { order: 3; }
.facets-list--shapes > li:has(input[value="Round"]) { order: 4; }
.facets-list--shapes > li:has(input[value="Oval"]) { order: 5; }
.facets-list--shapes > li:has(input[value="Aviator"]) { order: 6; }
.facets-list--shapes > li:has(input[value="Geometric"]) { order: 7; }
.facets-list--shapes > li { order: 8; }

[data-filter-key="filter.p.m.filter.frame_size"] .facets-filtering__list > li:has(input[value="Small"]) { order: 1; }
[data-filter-key="filter.p.m.filter.frame_size"] .facets-filtering__list > li:has(input[value="Medium"]) { order: 2; }
[data-filter-key="filter.p.m.filter.frame_size"] .facets-filtering__list > li:has(input[value="Large"]) { order: 3; }
[data-filter-key="filter.p.m.filter.frame_size"] .facets-filtering__list > li:has(input[value="Oversized"]) { order: 4; }
