/* LaQ Product Filters. Version: 2.0
   The button above the loop, the off-canvas panel from the right, its facets. Loaded on product listings only. */

:root {
  --laq-pf-color: #000000;
  --laq-pf-accent: #f66c6c;
  --laq-pf-bg: #ffffff;
  --laq-pf-line: #f0f0f0;
  --laq-pf-muted: #808080;
  --laq-pf-width: min(90vw, 380px);
  --laq-pf-bottom: 0px;
}

/* ---- Button -------------------------------------------------------------------------------- */

.laq-pf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--laq-pf-color);
  border-radius: 999px;
  background: var(--laq-pf-bg);
  color: var(--laq-pf-color);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.laq-pf-button:hover,
.laq-pf-button:focus-visible,
.laq-pf-button[aria-expanded="true"] {
  background: var(--laq-pf-bg);
  color: var(--laq-pf-accent);
  border-color: var(--laq-pf-accent);
}

.laq-pf-button .laq-pf__svg {
  width: 20px;
  height: 20px;
}

.laq-pf-button__count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--laq-pf-color);
  color: #ffffff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.laq-pf-button--loop {
  margin: 0 0 16px;
}

/* Inside a bottom bar's menu panel the button fills the top row. */
.laq-pf-button--drawer {
  flex: 1 1 auto;
}

/* ---- Panel: slides in from the right, stops above the bottom bar on phones; one layer below the bar
   (2147483647), above the cookie banner (9,999,999). ---------------------------------------------- */

.laq-pf-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--laq-pf-bottom);
  left: 0;
  z-index: 2147483645;
  background: rgba(0, 0, 0, 0.45);
}

.laq-pf-backdrop[hidden] {
  display: none;
}

.laq-pf {
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--laq-pf-bottom);
  z-index: 2147483646;
  width: var(--laq-pf-width);
  background: var(--laq-pf-bg);
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.22s ease, visibility 0s linear 0.22s;
}

.laq-pf.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.22s ease;
}

body.laq-pf-locked {
  overflow: hidden;
}

@media only screen and (max-width: 979px) {
  :root {
    --laq-pf-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }
}

.laq-pf__form {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
}

.laq-pf__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid var(--laq-pf-line);
}

.laq-pf__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  color: var(--laq-pf-color);
}

.laq-pf__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--laq-pf-color);
  cursor: pointer;
}

.laq-pf__close .laq-pf__svg {
  width: 22px;
  height: 22px;
}

.laq-pf__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 0 auto;
  padding: 12px 20px 0;
}

.laq-pf__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f4f4;
  color: var(--laq-pf-color);
  font-size: 12px;
  line-height: 1.2;
  text-decoration: none;
}

.laq-pf__chip:hover {
  color: var(--laq-pf-accent);
}

.laq-pf__chip--clear {
  background: none;
  text-decoration: underline;
}

.laq-pf__chip-x {
  font-size: 14px;
  line-height: 1;
}

.laq-pf__facets {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 12px;
}

/* ---- Facets ------------------------------------------------------------------------------ */

.laq-pf__facet {
  border-bottom: 1px solid var(--laq-pf-line);
}

.laq-pf__summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 0;
  color: var(--laq-pf-color);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

.laq-pf__summary::-webkit-details-marker {
  display: none;
}

.laq-pf__summary > span:first-child {
  flex: 1 1 auto;
}

.laq-pf__summary-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--laq-pf-accent);
  color: #ffffff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  box-sizing: border-box;
}

.laq-pf__summary .laq-pf__svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.laq-pf__facet[open] > .laq-pf__summary .laq-pf__svg {
  transform: rotate(180deg);
}

.laq-pf__body {
  padding: 0 0 12px;
}

.laq-pf__list,
.laq-pf__list li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.laq-pf__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  color: var(--laq-pf-color);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  cursor: pointer;
}

.laq-pf__option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--laq-pf-color);
}

.laq-pf__name {
  flex: 1 1 auto;
}

.laq-pf__count {
  flex: 0 0 auto;
  color: var(--laq-pf-muted);
  font-size: 12px;
}

.laq-pf__option:hover .laq-pf__name,
.laq-pf__option.is-active .laq-pf__name,
.laq-pf__option.is-checked .laq-pf__name {
  color: var(--laq-pf-accent);
}

.laq-pf__option.is-active .laq-pf__name {
  font-weight: 600;
}

/* Pills: the checkbox is kept for the form but drawn as a pill. */
.laq-pf__list--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.laq-pf__list--chips .laq-pf__option {
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
}

.laq-pf__list--chips .laq-pf__option input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.laq-pf__list--chips .laq-pf__option.is-checked {
  border-color: var(--laq-pf-color);
  background: var(--laq-pf-color);
  color: #ffffff;
}

.laq-pf__list--chips .laq-pf__option.is-checked .laq-pf__name,
.laq-pf__list--chips .laq-pf__option.is-checked .laq-pf__count {
  color: #ffffff;
}

/* Swatches. */
.laq-pf__dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 50%;
  background: var(--laq-pf-swatch, #ffffff);
  box-sizing: border-box;
}

.laq-pf__dot--none {
  background: repeating-linear-gradient(45deg, #f0f0f0 0 4px, #ffffff 4px 8px);
}

.laq-pf__option.is-checked .laq-pf__dot {
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px var(--laq-pf-color);
}

.laq-pf__option--switch {
  padding: 4px 0;
}

/* Search within a long list. */
.laq-pf__search {
  position: relative;
  margin: 0 0 8px;
}

.laq-pf__search .laq-pf__svg {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--laq-pf-muted);
  pointer-events: none;
}

.laq-pf__search-field {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 10px 0 32px;
  border: 1px solid #e3e3e3;
  border-radius: 999px;
  background: #f4f4f4;
  font-size: 16px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.laq-pf__search-field:focus {
  outline: none;
  border-color: #b5b5b5;
  background: #ffffff;
}

/* Price: two range inputs over one track (like WooCommerce's price slider), the values below. */
.laq-pf__price {
  padding: 4px 2px 0;
}

.laq-pf__range {
  position: relative;
  height: 28px;
}

.laq-pf__range::before,
.laq-pf__range-fill {
  content: "";
  position: absolute;
  top: 12px;
  height: 4px;
  border-radius: 2px;
}

.laq-pf__range::before {
  left: 0;
  right: 0;
  background: #e3e3e3;
}

.laq-pf__range-fill {
  left: 0;
  right: 0;
  background: var(--laq-pf-color);
}

.laq-pf__range-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.laq-pf__range-input::-webkit-slider-runnable-track {
  background: none;
}

.laq-pf__range-input::-moz-range-track {
  background: none;
}

.laq-pf__range-input::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  border: 2px solid var(--laq-pf-color);
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
}

.laq-pf__range-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 2px solid var(--laq-pf-color);
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  pointer-events: auto;
}

.laq-pf__price-values {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 14px;
}

.laq-pf__price-sep {
  color: var(--laq-pf-muted);
}

/* Rating. */
.laq-pf__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #f5b301;
}

.laq-pf__stars .laq-pf__svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.laq-pf__stars-n {
  margin-left: 6px;
  color: var(--laq-pf-muted);
  font-size: 12px;
}

/* ---- Actions ------------------------------------------------------------------------------ */

.laq-pf__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 12px 20px;
  border-top: 1px solid var(--laq-pf-line);
  background: var(--laq-pf-bg);
}

.laq-pf__clear {
  flex: 0 0 auto;
  color: var(--laq-pf-color);
  font-size: 13px;
  text-decoration: underline;
}

.laq-pf__apply {
  flex: 1 1 auto;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--laq-pf-color);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.laq-pf__apply:hover,
.laq-pf__apply:focus-visible {
  background: var(--laq-pf-accent);
  color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
  .laq-pf,
  .laq-pf.is-open,
  .laq-pf__summary .laq-pf__svg {
    transition: none;
  }
}
