.facets {
  display: block;
  grid-column-start: span 2;
}

.facets__wrapper {
  align-items: center;
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  /* margin-bottom: 48px; */
}

.facets__form {
  display: grid;
  gap: 0 15px;
  grid-template-columns: 1fr max-content max-content;
  margin-bottom: 0;
}

.facets__summary {
  font-weight: 500;
}

.facets__summary > div {
  display: flex;
  align-items: center;
}

.facets__summary span {
  padding-right: 10px;
}

.facets__summary .icon-arrow {
  position: revert;
}

.facets__header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid #dddddd;
}

.facets__header .facets__selected {
  font-size: 14px;
}

.facets__display {
  position: absolute;
  top: 46px;
  left: 0;
  width: 350px;
  z-index: 2;
  background-color: rgb(var(--color-page-background));
  padding: 25px 20px;
}

.facets__display fieldset {
  border: 0;
  padding: 0;
}

.facets__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.facets__item {
  padding: 5px 0;
}

.facets__item:nth-of-type(1) {
  margin-top: 10px;
}

.facets__disclosure {
  margin-right: 35px;
}

.facets__price-details .facets__header {
  border-bottom: 0;
}

.facets__price {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  row-gap: 20px;
}

.facets__price .facets__price-footer {
  grid-row: 2;
  grid-column: 1 / -1;
}

.facets__price .facets__price-footer:hover {
  --color-button-background: inherit;
  --color-button-text: inherit;
}

.facets__price .field {
  margin: 0;
  padding: 0 10px;
  line-height: 1;
}

.facets__price .field-currency {
  opacity: 0.5;
  margin-right: 5px;
}

.facets__price .line {
  width: 10px;
  background: #dddddd;
  height: 1px;
  margin: 0 8px;
}

.facets__price .field__input {
  width: 100%;
  border-radius: 4px;
  border: none;
  line-height: 1.15;
  box-shadow: none !important;
  height: 48px;
  padding: 0;
}

.facet-checkbox {
  width: 100%;
  display: inline-block;
  cursor: pointer;
}

.facet-checkbox > span {
  display: inline-flex;
  align-items: center;
}

.facet-checkbox > span::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #dddddd;
  border-radius: 2px;
  margin-right: 10px;
  flex-shrink: 0;
}

.facet-checkbox > input[type="checkbox"] {
  display: none;
}

.facet-checkbox > input[type="checkbox"]:checked ~ span {
  font-weight: 500;
}

.facet-checkbox > input[type="checkbox"]:checked ~ span::before {
  background: black;
  box-shadow: inset 0 0 0px 2px #ffffff;
}

.active-facets {
  grid-row: 2;
  grid-column: 1 / -1;
}

.active-facets__button-inner {
  padding: 8px 14px;
  font-size: 14px;
  margin-right: 4px;
}

.active-facets__button-inner .icon-close {
  margin-right: 10px;
  flex-shrink: 0;
}

.active-facets__button-remove {
  font-size: 14px;
  margin-left: 18px;
}

.active-facets-horizontal .active-facets__button {
  display: inline-block;
  margin-top: 48px;
}

.active-facets-mobile facet-remove:not(.active-facets__button-wrapper) {
  margin-bottom: 20px;
  display: inline-block;
}

.active-facets facet-remove:only-child {
  display: none;
}

.facets__form-vertical {
  display: grid;
  width: 256px;
}

.facets__form-vertical .active-facets {
  grid-row: 1;
}

.facets__form-vertical .active-facets facet-remove {
  display: block;
}

.facets__form-vertical .active-facets__button-inner {
  margin-bottom: 4px;
}

.facets-vertical .product-list-container {
  width: 100%;
}

.facets-vertical-form {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.facets-vertical-sort {
  padding: 0;
}

.disclosure-has-popup {
  position: relative;
}

.disclosure-has-popup[open] > summary:before {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: block;
  cursor: default;
  content: " ";
  background: transparent;
}

.facets__disclosure-vertical {
  border-bottom: 1px solid #dddddd;
}

.facets__disclosure-vertical .facets__list,
.facets__disclosure-vertical .facets__price {
  padding-bottom: 15px;
}

.facets__disclosure-vertical .facets__summary {
  padding: 15px 0;
}

.facets__disclosure-vertical .facets__summary > div {
  justify-content: space-between;
}

.facets__disclosure-vertical .facets__header {
  display: none;
}

.facets__disclosure-vertical fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.mobile-facets {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.mobile-facets .select {
  width: 100%;
}

.mobile-facets__header {
  padding: 0 30px;
}

.mobile-facets__header-inner {
  border-bottom: 1px solid #dddddd;
  padding: 20px 0;
}

.mobile-facets__heading {
  color: #29252c;
  font-size: 22px;
  font-weight: 500;
  line-height: 160%;
}

.mobile-facets__count {
  color: #29252c;
  font-size: 16px;
  line-height: 160%;
}

.mobile-facets__disclosure {
  display: flex;
}

.mobile-facets__inner {
  max-width: 400px;
  width: calc(100% - 50px);
  margin-left: auto;
  background: white;
  height: 100%;
  /* padding: 30px; */
  display: flex;
  flex-direction: column;
  pointer-events: all;
  transition: transform 0.1s ease;
}

.menu-opening .mobile-facets__inner {
  transform: translateX(0);
}

.disclosure-has-popup:not(.menu-opening) .mobile-facets__inner {
  transform: translateX(105vw);
}

.mobile-facets__summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 0;
  border-bottom: 1px solid #dddddd;
}

.mobile-facets__main {
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 0 30px;
}

.mobile-facets__footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  padding-bottom: 25px;
}

.mobile-facets__footer > * {
  flex-grow: 1;
  width: 100%;
}

.mobile-facets__clear-wrapper {
  margin-right: 10px;
}

.mobile-facets__clear-wrapper .button {
  width: 100%;
}

.mobile-facets__wrapper {
  margin-left: 0;
  display: flex;
  flex-grow: 1;
  margin-bottom: 45px;
}

@media (max-width: 959px) {
  .mobile-facets__wrapper {
    margin-bottom: 20px;
  }
}

.mobile-facets .submenu-open {
  visibility: hidden;
}

.mobile-facets__submenu {
  position: absolute;
  top: 0;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 3;
  transform: translate(100%);
  visibility: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 30px;
}

.mobile-facets__arrow .icon-arrow {
  transform: rotate(-90deg);
}

.mobile-facets__sort .icon-arrow {
  transform: rotate(-90deg);
}

.facets-container {
  display: grid;
  grid-template-columns: repeat(2, auto);
  grid-template-rows: repeat(2, auto);
}

details[open].menu-opening > .mobile-facets__submenu {
  transform: translate(0);
  visibility: visible;
}

details[open] > .mobile-facets__submenu {
  transition: transform 0.4s cubic-bezier(0.29, 0.63, 0.44, 1),
    visibility 0.4s cubic-bezier(0.29, 0.63, 0.44, 1);
}

.facets__form-vertical details[open] .icon-arrow {
  transform: rotate(180deg);
}

.facets__form details[open] .facets__summary span {
  text-decoration: underline;
}

.facets__form details[open] .icon-arrow {
  transform: rotate(180deg);
}

.mobile-facets__close-button {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  box-shadow: none;
  font-size: 18px;
  background-color: transparent;
  padding: 25px 0 15px 0;
}

.mobile-facets__close-button .icon-arrow {
  transform: rotate(90deg);
  margin-right: 22px;
}

.mobile-facets__close {
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 42px;
  right: 38px;
  z-index: 101;
  display: none;
}

.mobile-facets__close .icon-close {
  width: 12px;
  height: 12px;
}

.mobile-facets__open {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.mobile-facets__open .icon-filter {
  margin-right: 13px;
}

.mobile-facets__open-label {
  font-weight: 500;
}

details.menu-opening .mobile-facets__close {
  display: flex;
}

.facets-container-drawer .facets-pill {
  width: 100%;
}

.facets-container-drawer .facets__form {
  margin-bottom: 0;
}

.facets-container-drawer .facets__form facet-remove:not(:only-child) {
  display: inline-block;
  margin-bottom: 42px;
}

.mobile-facets__sort .icon-arrow {
  width: 10px;
}

.select {
  position: relative;
}

.select .icon-arrow {
  position: absolute;
  top: calc(50% - 5px);
  pointer-events: none;
}

.facet-filters {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.facets__form .facet-filters__sort {
  /* text-align: right;
  padding-right: 16px; */
}

.facet-filters__sort {
  background-color: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 10px;
  width: 100%;
  outline: 0;
  color: rgba(var(--color-text));
}

.facet-filters__sort + .icon-arrow {
  right: 0px;
}

@media screen and (max-width: 959px) {
  .facet-filters__sort + .icon-arrow {
    right: 10px;
  }
}

.product-count.loading > span {
  display: none;
}

a.facets__reset,
a.facets__reset:hover {
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 6px;
  white-space: nowrap;
}

@media screen and (max-width: 959px) {
  .facets-container {
    grid-template-columns: auto minmax(0, max-content);
    column-gap: 2rem;
  }
}

@media screen and (min-width: 960px) {
  .facets-vertical {
    display: flex;
  }
  .facets-vertical .facets-wrapper {
    padding-right: 30px;
  }

  .facets-container-drawer {
    display: flex;
    flex-flow: row wrap;
    column-gap: 0;
  }
}

/* The ipad end responds to the mobile end in vertical screen */

/* @custom-media --tablet (max-width: 959px); */

/* @custom-media --gt-mobile (min-width: 751px); */

/* detectingScreen need to consider the configuration of the tablet */
