body.yocan-filter-open {
  overflow: hidden;
  position: fixed;
  top: var(--yocan-filter-scroll, 0);
  width: 100%;
}

.yocan-filter {
  background: #fff;
  border: 0;
  border-radius: 8px;
  box-sizing: border-box;
  color: #000;
  font-family: "Geist", sans-serif;
  font-size: 14px;
  height: calc(100svh - 40px);
  inset: 0 auto 0 20px;
  letter-spacing: 0;
  margin: auto 0;
  max-height: none;
  max-width: calc(100vw - 40px);
  overflow: hidden;
  padding: 0;
  width: 452px;
}

.yocan-filter[open] { display: flex; flex-direction: column; }
.yocan-filter::backdrop { background: rgb(0 0 0 / 18%); }
.yocan-filter *, .yocan-filter *::before, .yocan-filter *::after { box-sizing: border-box; }
.yocan-filter [hidden] { display: none !important; }

.yocan-filter__header {
  align-items: center;
  background: #fff;
  box-shadow: 0 12px 20px rgb(0 0 0 / 0%);
  display: flex;
  flex: none;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px 32px 18px 40px;
  position: relative;
  z-index: 2;
  transition: box-shadow 180ms ease-out;
}

.yocan-filter.is-scrolled .yocan-filter__header { box-shadow: 0 12px 20px rgb(0 0 0 / 4%); }

.yocan-filter::after {
  background: rgb(255 255 255 / 70%);
  content: "";
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 150ms ease-out;
  z-index: 4;
}

.yocan-filter.is-loading::after { opacity: 1; }
.yocan-filter__loader {
  border: 2px solid transparent;
  border-bottom-color: #5a5a5a;
  border-left-color: #5a5a5a;
  border-radius: 50%;
  height: 56px;
  left: calc(50% - 28px);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(50% - 28px);
  transition: opacity 150ms ease-out;
  width: 56px;
  z-index: 5;
}

.yocan-filter.is-loading .yocan-filter__loader { animation: yocan-filter-spin 700ms linear infinite; opacity: 1; }
.yocan-filter.is-loading .yocan-filter__body { cursor: progress; }
@keyframes yocan-filter-spin { to { transform: rotate(360deg); } }

.yocan-filter__header h2 {
  color: #000;
  font-family: "Geist", sans-serif;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.4;
  margin: 0;
}

.yocan-filter__header h2 span { color: #a3a3a3; }

.yocan-filter .yocan-filter__close {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #000;
  display: flex;
  flex: none;
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  height: 36px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 36px;
}

.yocan-filter__form { display: flex; flex: 1; margin: 0; min-height: 0; }
.yocan-filter__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 42px 48px 40px; scrollbar-width: thin; }

.yocan-filter .yocan-filter__group {
  border: 0;
  border-bottom: 1px solid #e5e5e5;
  margin: 0 0 24px;
  min-width: 0;
  padding: 0 0 32px;
}

.yocan-filter__group legend {
  color: #000;
  float: left;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.4;
  margin: 0 0 28px;
  padding: 0;
  text-transform: uppercase;
  width: 100%;
}

.yocan-filter__group legend + * { clear: both; }
.yocan-filter__options { display: flex; flex-direction: column; gap: 16px; }

.yocan-filter__option {
  align-items: center;
  color: #000;
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
  line-height: 1.4;
  margin: 0;
  min-height: 24px;
  position: relative;
}

.yocan-filter__option.is-unavailable { cursor: default; opacity: .4; }
.yocan-filter__count { color: #454545; }

.yocan-filter .yocan-filter__option input[type="checkbox"] {
  accent-color: #000;
  appearance: none;
  background: #fff;
  border: 1px solid #000;
  border-radius: 4px;
  cursor: inherit;
  flex: none;
  height: 24px;
  margin: 0;
  width: 24px;
}

.yocan-filter .yocan-filter__option input[type="checkbox"]:checked {
  background: #000;
}

.yocan-filter .yocan-filter__option input[type="checkbox"]:checked::after {
  border: solid #fff;
  border-width: 0 2px 2px 0;
  content: "";
  display: block;
  height: 12px;
  margin: 3px 0 0 8px;
  transform: rotate(45deg);
  width: 6px;
}

.yocan-filter .yocan-filter__more {
  background: none;
  border: 0;
  border-radius: 0;
  color: #000;
  font: inherit;
  font-weight: 550;
  line-height: 1.4;
  margin: 18px 0 0;
  min-height: 24px;
  padding: 0 6px;
}

.yocan-filter__options--colors {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, 34px);
}

.yocan-filter__options--colors .yocan-filter__option { height: 34px; min-height: 34px; width: 34px; }
.yocan-filter__options--colors input, .yocan-filter__options--chips input {
  opacity: 0;
  position: absolute;
}

.yocan-filter__swatch {
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: 4px;
  display: block;
  height: 34px;
  overflow: hidden;
  width: 34px;
}

.yocan-filter__swatch img { display: block; height: 100%; object-fit: fill; width: 100%; }
.yocan-filter__option input:checked + .yocan-filter__swatch { outline: 2px solid #000; outline-offset: 3px; }
.yocan-filter__option input:focus-visible + span { outline: 2px solid #000; outline-offset: 4px; }
.yocan-filter__options--chips { flex-direction: row; flex-wrap: wrap; gap: 16px 24px; }
.yocan-filter__options--chips .yocan-filter__option { padding: 6px; }
.yocan-filter__options--chips input:checked + span { text-decoration: underline; text-underline-offset: 5px; }
.yocan-filter__options--labeled-colors { display: flex; flex-direction: row; flex-wrap: wrap; gap: 16px 24px; }
.yocan-filter__options--labeled-colors .yocan-filter__option { gap: 12px; height: auto; min-height: 30px; width: auto; }
.yocan-filter__options--labeled-colors .yocan-filter__swatch { flex: none; height: 24px; width: 24px; }

.yocan-filter__stock {
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 0 48px;
}

.yocan-filter__stock label { cursor: pointer; font-size: 16px; font-weight: 750; line-height: 1.4; margin: 0; }
.yocan-filter .yocan-filter__stock input {
  appearance: none;
  background: #d7d7d7;
  border: 0;
  border-radius: 12px;
  box-shadow: inset 0 1px 3px rgb(0 0 0 / 8%);
  cursor: pointer;
  flex: none;
  height: 24px;
  margin: 0;
  position: relative;
  transition: background 150ms;
  width: 48px;
}

.yocan-filter__stock input::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: transform 150ms;
  width: 18px;
}

.yocan-filter .yocan-filter__stock input:checked { background: #000; }
.yocan-filter__stock input:checked::after { transform: translateX(24px); }
.yocan-filter .yocan-filter__price { border-bottom: 0; margin-bottom: 0; padding-bottom: 24px; }
.yocan-filter__price p { color: #666; font-size: 14px; line-height: 1.4; margin: 0 0 16px; }
.yocan-filter__ranges { --range-min: 0%; --range-max: 100%; height: 24px; margin-bottom: 24px; position: relative; }
.yocan-filter__ranges::before {
  background: linear-gradient(to right, #d7d7d7 0 var(--range-min), #000 var(--range-min) var(--range-max), #d7d7d7 var(--range-max) 100%);
  content: "";
  height: 2px;
  inset: 11px 12px auto;
  position: absolute;
}

.yocan-filter .yocan-filter__ranges input[type="range"] { appearance: none; background: transparent; border: 0; height: 24px; inset: 0; margin: 0; padding: 0; pointer-events: none; position: absolute; width: 100%; }
.yocan-filter__ranges input::-webkit-slider-thumb { appearance: none; background: #000; border: 0; border-radius: 50%; cursor: grab; height: 24px; pointer-events: auto; width: 24px; }
.yocan-filter__ranges input::-moz-range-thumb { background: #000; border: 0; border-radius: 50%; cursor: grab; height: 24px; pointer-events: auto; width: 24px; }
.yocan-filter__price-fields { align-items: center; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.yocan-filter__price-fields label { align-items: center; display: flex; gap: 8px; margin: 0; padding: 4px 12px; }
.yocan-filter__price-fields label > span { color: #666; font-weight: 650; }
.yocan-filter .yocan-filter__price-fields input[type="number"] { appearance: textfield; background: #fff; border: 0; border-radius: 0; color: #000; font-family: inherit; font-size: 14px; font-weight: 700; min-width: 0; padding: 4px 0; width: 100%; }
.yocan-filter__price-fields input::-webkit-inner-spin-button { appearance: none; }
.yocan-filter__actions { align-items: center; display: flex; gap: 20px; justify-content: space-between; margin-top: 16px; }
.yocan-filter__actions a { color: #232323; font-size: 14px; text-underline-offset: 3px; }
.yocan-filter__actions button { background: #232323; border: 1px solid #232323; border-radius: 4px; color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; padding: 10px 18px; }
.yocan-filter__actions button:hover { background: #000; }
.yocan-filter__status { color: #5a5a5a; font-size: 13px; line-height: 1.4; margin: 12px 0 0; min-height: 18px; }
.yocan-filter :focus-visible { outline: 2px solid #000; outline-offset: 3px; }

@media (max-width: 540px) {
  .yocan-filter__header { padding-left: 24px; padding-right: 20px; }
  .yocan-filter__body { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .yocan-filter, .yocan-filter *, .yocan-filter::after { transition: none !important; }
  .yocan-filter.is-loading .yocan-filter__loader { animation: none; }
}
