/* PX filters drawer (shop / category pages) */
.pxf {
  --pxf-ink: #1b1b1b;
  --pxf-muted: #6f6f6f;
  --pxf-line: #e8e8e8;
  --pxf-pad: 28px;
  --pxf-radius: var(--px-radius, 0px);
  --pxf-accent: var(--wd-primary-color, #ff8873);
  position: fixed;
  inset: 0;
  z-index: 100000;
  color: var(--pxf-ink);
  font-family: var(--wd-text-font, inherit);
}
.pxf[hidden] { display: none; }

.pxf-overlay {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / .45);
  opacity: 0;
  transition: opacity .3s ease;
}
.pxf-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: min(var(--pxf-w, 440px), 100vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 0 40px rgb(0 0 0 / .12);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}
.pxf--left .pxf-panel { right: auto; left: 0; transform: translateX(-100%); }
.pxf.is-open .pxf-overlay { opacity: 1; }
.pxf.is-open .pxf-panel { transform: none; }
html.pxf-lock, html.pxf-lock body { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
  .pxf-overlay, .pxf-panel { transition: none; }
}

/* Head */
.pxf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--pxf-pad);
  border-bottom: 1px solid var(--pxf-line);
}
.pxf .pxf-title {
  margin: 0;
  font-family: var(--px-sheet-title-font, var(--wd-title-font, inherit));
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--pxf-ink);
  text-transform: none;
}
.pxf button { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; box-shadow: none; }
.pxf .pxf-x {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  margin: -8px -10px -8px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}
.pxf svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Body + sections */
.pxf-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--pxf-pad);
}
.pxf-sec { border-bottom: 1px solid var(--pxf-line); }
.pxf-sec:last-child { border-bottom: 0; }
.pxf .pxf-sec-t { margin: 0; font-size: inherit; line-height: inherit; }
.pxf .pxf-sec-h {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 22px 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.pxf-sec-h > span:first-child { flex: 1; }
.pxf-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--pxf-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.pxf-badge[hidden] { display: none; }
.pxf-chev { flex: none; transition: transform .25s ease; }
.pxf-sec-h[aria-expanded="true"] .pxf-chev { transform: rotate(180deg); }
.pxf-sec-b[hidden] { display: none; }
.pxf-sec-in { padding: 0 0 24px; }

/* Checkbox / radio rows */
.pxf-list { display: flex; flex-direction: column; gap: 4px; }
.pxf-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  user-select: none;
}
.pxf input[type=checkbox], .pxf input[type=radio] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.pxf-box {
  flex: none;
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #c4c4c4;
  border-radius: var(--pxf-radius);
  background: #fff;
  transition: background-color .15s ease, border-color .15s ease;
}
.pxf-opt:hover .pxf-box { border-color: var(--pxf-ink); }
.pxf-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1.5px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .15s ease;
}
.pxf-opt input:checked + .pxf-box { border-color: var(--pxf-ink); background: var(--pxf-ink); }
.pxf-opt input:checked + .pxf-box::after { transform: rotate(45deg) scale(1); }
.pxf-radio .pxf-box { border-radius: 50%; }
.pxf-radio .pxf-box::after { left: 4px; top: 4px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: scale(0); }
.pxf-radio input:checked + .pxf-box::after { transform: scale(1); }
.pxf-opt input:focus-visible + .pxf-box, .pxf-chip input:focus-visible + span { outline: 2px solid var(--pxf-accent); outline-offset: 2px; }
.pxf-n { color: var(--pxf-muted); font-size: 14px; }
.pxf-lbl + .pxf-n { margin-left: -8px; }
.pxf-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); margin-right: -4px; }

/* Buttons (sizes) */
.pxf-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pxf-chip { position: relative; margin: 0; cursor: pointer; }
.pxf-chip span {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid #d6d6d6;
  border-radius: var(--pxf-radius);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.pxf-chip:hover span { border-color: var(--pxf-ink); }
.pxf-chip input:checked + span { border-color: var(--pxf-ink); background: var(--pxf-ink); color: #fff; }

/* Categories */
.pxf-cats, .pxf-sub { margin: 0; padding: 0; list-style: none; }
.pxf-cat { display: flex; flex-wrap: wrap; align-items: center; margin: 0; }
.pxf-cat.pxf-extra { display: none; }
.pxf-cats.is-all .pxf-extra { display: flex; }
.pxf .pxf-cat-btn {
  flex: 1;
  min-height: 0;
  padding: 9px 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}
.pxf .pxf-cat-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.pxf .pxf-cat-btn[aria-pressed="true"] { font-weight: 600; }
.pxf .pxf-cat-btn[aria-pressed="true"]::after { content: ""; display: inline-block; width: 5px; height: 10px; margin-left: 10px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.pxf .pxf-cat-tg {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 0;
  margin: 0 6px 0 -6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  cursor: pointer;
}
.pxf-cat-tg svg { width: 16px; height: 16px; transition: transform .2s ease; }
.pxf-cat-tg[aria-expanded="true"] svg { transform: rotate(90deg); }
.pxf-sub { flex-basis: 100%; padding-left: 28px; }
.pxf-sub[hidden] { display: none; }
.pxf .pxf-more {
  min-height: 0;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* Price */
.pxf-price { padding-top: 6px; }
.pxf-range { position: relative; height: 28px; --a: 0; --b: 1; }
.pxf-range::before, .pxf-range::after {
  content: "";
  position: absolute;
  top: 13px;
  height: 2px;
  left: 11px;
  right: 11px;
  background: var(--pxf-line);
}
.pxf-range::after {
  left: calc(11px + (100% - 22px) * var(--a));
  right: calc(11px + (100% - 22px) * (1 - var(--b)));
  background: var(--pxf-ink);
}
.pxf-range input[type=range] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
.pxf-range input[type=range]::-webkit-slider-runnable-track { height: 28px; background: none; border: 0; }
.pxf-range input[type=range]::-moz-range-track { height: 28px; background: none; border: 0; }
.pxf-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border: 2px solid var(--pxf-ink);
  border-radius: 50%;
  background: #fff;
  cursor: grab;
  pointer-events: auto;
}
.pxf-range input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--pxf-ink);
  border-radius: 50%;
  background: #fff;
  cursor: grab;
  pointer-events: auto;
}
.pxf-range input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--pxf-accent); outline-offset: 2px; }
.pxf-price-out { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pxf-price-out > span {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d6d6d6;
  border-radius: var(--pxf-radius);
  font-size: 15px;
}
.pxf-price-out small { display: block; color: var(--pxf-muted); font-size: 12px; }

/* Footer buttons */
.pxf-foot {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
  padding: 16px var(--pxf-pad) calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--pxf-line);
  background: #fff;
}
.pxf .pxf-clear, .pxf .pxf-apply {
  position: relative;
  overflow: hidden;
  min-height: 52px;
  margin: 0;
  padding: 0 12px;
  /* theme button settings (Theme Settings > Buttons): corners, weight */
  border-radius: var(--btn-default-brd-radius, var(--pxf-radius));
  font-size: 15px;
  font-weight: var(--btn-default-font-weight, 600);
  line-height: 1.1;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.pxf .pxf-clear { border: 1px solid var(--pxf-ink); background: #fff; color: var(--pxf-ink); }
.pxf .pxf-clear:hover { background: var(--pxf-ink); color: #fff; }
/* nothing chosen yet: nothing to clear */
.pxf .pxf-clear.is-idle, .pxf .pxf-clear.is-idle:hover { border-color: #e2e2e2; background: #fff; color: #a8a8a8; cursor: default; pointer-events: none; }
.pxf .pxf-apply { border: 0; background: var(--btn-default-bgcolor, var(--pxf-accent)); color: var(--btn-default-color, #fff); }
.pxf .pxf-apply:hover { background: #000; color: #fff; }
.pxf .pxf-apply::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100%;
  width: 100%;
  transform: skew(-15deg);
  background-image: linear-gradient(90deg, transparent, rgb(255 255 255 / .2), transparent);
  transition: left 1s ease;
  pointer-events: none;
}
.pxf .pxf-apply:hover::after { left: 100%; }
.pxf .pxf-apply[disabled] { background: #bdbdbd; cursor: not-allowed; }
.pxf .pxf-apply.is-busy .pxf-apply-n { opacity: .5; }
.pxf .pxf-apply.is-busy { pointer-events: none; }

@media (max-width: 767px) {
  .pxf { --pxf-pad: 20px; }
  .pxf-panel { width: 100%; }
  .pxf-head { padding-block: 16px; }
  .pxf .pxf-title { font-size: 20px; }
  .pxf .pxf-sec-h { padding: 18px 0; }
  .pxf .pxf-title { font-size: 20px; }
  .pxf-foot { grid-template-columns: 1fr 1.4fr; }
}

/* the theme styles every button on hover / focus: keep the drawer's own look */
.pxf .pxf-sec-h:hover, .pxf .pxf-sec-h:focus, .pxf .pxf-cat-btn:hover, .pxf .pxf-cat-btn:focus,
.pxf .pxf-cat-tg:hover, .pxf .pxf-cat-tg:focus, .pxf .pxf-more:hover, .pxf .pxf-more:focus,
.pxf .pxf-x:hover, .pxf .pxf-x:focus { background: none; color: var(--pxf-ink); box-shadow: none; }
.pxf button:focus:not(:focus-visible) { outline: none; }
.pxf button:focus-visible { outline: 2px solid var(--pxf-accent); outline-offset: 2px; }
.pxf .pxf-cat-btn, .pxf .pxf-sec-h { justify-content: flex-start; text-align: left; }
.pxf .pxf-cat-btn { display: block; width: auto; height: auto; line-height: 1.35; white-space: normal; }
.pxf .pxf-more, .pxf .pxf-more:hover { display: inline-block; width: auto; height: auto; text-decoration: underline !important; text-underline-offset: 4px; color: var(--pxf-ink); }
