/**
 * Poeles & Accessoires - Faceted Search / Filter Studio
 * Dedicated styling for ps_facetedsearch overrides.
 */

#category {
  --pa-filter-accent: #ff6900;
  --pa-filter-accent-dark: #e85f00;
  --pa-filter-ink: #1f1f1f;
  --pa-filter-muted: #77736e;
  --pa-filter-line: #e9e4de;
  --pa-filter-soft: #fff7ef;
  --pa-filter-soft-2: #faf8f5;
  --pa-filter-badge: #f1efec;
}

/* Panel */
#category .pa-catalog-sidebar {
  overflow: hidden;
  border: 1px solid var(--pa-filter-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(35, 30, 24, .07);
}

#category .pa-filter-studio__intro {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 24px 26px 14px;
  border: 0;
  background: #fff;
}

#category .pa-filter-studio__intro::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 0;
  width: 4px;
  height: 38px;
  border-radius: 0 4px 4px 0;
  background: var(--pa-filter-accent);
}

#category .pa-filter-studio__intro strong {
  color: var(--pa-filter-ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

#category .pa-filter-studio__result {
  color: #55514d;
  font-size: 14px;
  line-height: 1.4;
}

#category .pa-filter-studio__result b {
  color: var(--pa-filter-accent);
  font-size: 18px;
  font-weight: 800;
}

/* Active filters */
#category .pa-filter-studio__active:empty,
#category .pa-filter-studio__active .hide {
  display: none !important;
}

#category .pa-active-filter-panel {
  padding: 4px 26px 20px;
  border-bottom: 1px solid var(--pa-filter-line);
}

#category .pa-active-filter-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  color: var(--pa-filter-ink);
  font-size: 12px;
}

#category .pa-active-filter-panel__top strong {
  font-weight: 750;
}

#category .pa-active-filter-panel__top strong span {
  color: var(--pa-filter-accent);
}

#category .pa-active-filter-panel__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#category .pa-active-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 9px 0 11px;
  border: 1px solid #ffe0c8;
  border-radius: 9px;
  background: var(--pa-filter-soft);
  color: #352f2a;
  font-size: 12px;
  font-weight: 650;
}

#category .pa-active-filter-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-left: 5px;
  color: var(--pa-filter-accent);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
}

/* Native clear button repositioned as a light text action */
#category .pa-facets {
  position: relative;
  margin: 0;
  padding: 0;
}

#category .pa-facets__clear-all {
  /*position: absolute;
  z-index: 3;
  top: -55px;
  right: 22px;*/
}

#category .pa-facets__clear-button,
#category .pa-catalog-sidebar .js-search-filters-clear-all {
  min-width: 0;
  padding: 4px 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--pa-filter-accent) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-transform: none !important;
}

#category .pa-facets__clear-button:hover {
  color: var(--pa-filter-accent-dark) !important;
}

/* Facet sections */
#category .pa-catalog-sidebar .facet.pa-facet {
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--pa-filter-line);
  background: #fff;
}

#category .pa-catalog-sidebar .facet.pa-facet:last-child {
  border-bottom: 0;
}

#category .pa-facet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 68px;
  padding: 14px 24px;
  border: 0;
  background: transparent;
  color: var(--pa-filter-ink);
  text-align: left;
  cursor: pointer;
}

#category .pa-facet__heading {
  display: flex;
  align-items: center;
  min-width: 0;
}

#category .pa-facet__icon {
  position: relative;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  margin-right: 10px;
  color: var(--pa-filter-accent);
}

#category .pa-facet__icon::before,
#category .pa-facet__icon::after {
  content: '';
  position: absolute;
  box-sizing: border-box;
}

/* Generic sliders/equalizer icon */
#category .pa-facet__icon::before {
  top: 7px;
  left: 4px;
  width: 21px;
  height: 16px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
#category .pa-facet__icon::after {
  top: 14px;
  left: 4px;
  width: 21px;
  border-top: 2px solid currentColor;
}

/* Brand tag icon */
#category .pa-facet--brand .pa-facet__icon::before {
  top: 5px;
  left: 4px;
  width: 19px;
  height: 19px;
  border: 2px solid currentColor;
  border-radius: 4px 9px 9px 4px;
  transform: rotate(45deg);
}
#category .pa-facet--brand .pa-facet__icon::after {
  top: 9px;
  left: 8px;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

/* Price icon */
#category .pa-facet--price .pa-facet__icon::before {
  top: 4px;
  left: 3px;
  width: 24px;
  height: 24px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
#category .pa-facet--price .pa-facet__icon::after {
  content: '€';
  top: 4px;
  left: 0;
  width: 30px;
  border: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}

#category .pa-facet__title-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#category .pa-catalog-sidebar .pa-facet__title {
  margin: 0;
  color: var(--pa-filter-ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .02em;
  text-transform: uppercase;
  width: auto;
}

#category .pa-facet__status {
  min-height: 14px;
  margin-top: 2px;
  color: var(--pa-filter-accent);
  font-size: 10px;
  font-weight: 650;
  text-transform: none;
}

#category .pa-facet__chevron {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 12px;
  transition: transform .22s ease;
}

#category .pa-facet__chevron::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #5f5a55;
  border-bottom: 1.5px solid #5f5a55;
  transform: rotate(45deg);
}

#category .pa-facet.is-open .pa-facet__chevron {
  transform: rotate(180deg);
}

#category .pa-facet__body {
  display: grid;
  grid-template-rows: 0fr;
  padding: 0 24px;
  opacity: 0;
  transition: grid-template-rows .24s ease, opacity .2s ease, padding .24s ease;
}

#category .pa-facet__body > * {
  min-height: 0;
  overflow: hidden;
}

#category .pa-facet__body.is-open {
  grid-template-rows: 1fr;
  padding: 0 24px 20px;
  opacity: 1;
}

/* Options */
#category .pa-catalog-sidebar .pa-facet__options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#category .pa-catalog-sidebar .pa-facet__option {
  margin: 0;
  padding: 0;
}

#category .pa-catalog-sidebar .pa-facet-choice {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px 6px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #fff;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
}

#category .pa-catalog-sidebar .pa-facet-choice:hover {
  border-color: #f1ded0;
  background: #fffbf7;
  transform: translateX(2px);
}

#category .pa-catalog-sidebar .pa-facet-choice.is-active,
#category .pa-catalog-sidebar .pa-facet-choice.active {
  border-color: var(--pa-filter-accent);
  background: var(--pa-filter-soft);
  box-shadow: 0 4px 14px rgba(255, 105, 0, .08);
}

#category .pa-catalog-sidebar .pa-facet-choice__control {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0 9px 0 0;
}

#category .pa-catalog-sidebar .pa-facet-choice__control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#category .pa-catalog-sidebar .pa-facet-choice__box,
#category .pa-catalog-sidebar .pa-facet-choice__radio {
  position: absolute;
  inset: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #d5d0c9;
  border-radius: 6px;
  background: #fff;
  transition: all .18s ease;
}

#category .pa-catalog-sidebar .pa-facet-choice__radio {
  border-radius: 50%;
}

#category .pa-catalog-sidebar .pa-facet-choice__box .checkbox-checked {
  display: none;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}

#category .pa-catalog-sidebar .pa-facet-choice__control input:checked + .pa-facet-choice__box,
#category .pa-catalog-sidebar .pa-facet-choice__control input:checked + .pa-facet-choice__radio {
  border-color: var(--pa-filter-accent);
  background: var(--pa-filter-accent);
}

#category .pa-catalog-sidebar .pa-facet-choice__control input:checked + .pa-facet-choice__box .checkbox-checked {
  display: block;
}

#category .pa-catalog-sidebar .pa-facet-choice__link {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  color: #4b4743 !important;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none !important;
}

#category .pa-catalog-sidebar .pa-facet-choice__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#category .pa-catalog-sidebar .pa-facet-choice.is-active .pa-facet-choice__label,
#category .pa-catalog-sidebar .pa-facet-choice.active .pa-facet-choice__label {
  color: var(--pa-filter-ink);
  font-weight: 700;
}

#category .pa-catalog-sidebar .pa-facet-choice__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 27px;
  height: 24px;
  margin-left: auto;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--pa-filter-badge);
  color: #8b8781;
  font-size: 10px;
  font-weight: 750;
  line-height: 1;
}

#category .pa-catalog-sidebar .pa-facet-choice.is-active .pa-facet-choice__count,
#category .pa-catalog-sidebar .pa-facet-choice.active .pa-facet-choice__count {
  background: #ffe6d5;
  color: var(--pa-filter-accent-dark);
}

/* Selection cues */
#category .pa-facet--selection .pa-facet-choice__label::before {
  display: inline-block;
  width: 18px;
  margin-right: 5px;
  color: var(--pa-filter-accent);
  font-size: 15px;
  text-align: center;
}
#category .pa-facet--selection .pa-facet-choice.is-promo .pa-facet-choice__label::before { content: '♨'; }
#category .pa-facet--selection .pa-facet-choice.is-new .pa-facet-choice__label::before { content: '✦'; }
#category .pa-facet--selection .pa-facet-choice.is-discount .pa-facet-choice__label::before { content: '◆'; font-size: 11px; }

/* Brand search */
#category .pa-brand-search {
  position: relative;
  display: block;
  margin: 0 0 10px;
}

#category .pa-brand-search__input {
  width: 100%;
  height: 42px;
  padding: 0 12px 0 38px;
  border: 1px solid #dfdbd5;
  border-radius: 9px;
  outline: 0;
  background: #fff;
  color: #393531;
  font-size: 12px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

#category .pa-brand-search__input::placeholder {
  color: #aaa49e;
}

#category .pa-brand-search__input:focus {
  border-color: var(--pa-filter-accent);
  box-shadow: 0 0 0 3px rgba(255, 105, 0, .09);
}

#category .pa-brand-search__icon {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 14px;
  width: 14px;
  height: 14px;
  border: 1.6px solid #8d8882;
  border-radius: 50%;
}

#category .pa-brand-search__icon::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  border-top: 1.6px solid #8d8882;
  transform: rotate(45deg);
}

/* Dropdown */
#category .pa-facet-dropdown__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dfdbd5;
  border-radius: 9px;
  color: #4b4743;
  text-decoration: none;
}

#category .pa-facet-dropdown__menu {
  width: 100%;
  border: 1px solid var(--pa-filter-line);
  border-radius: 9px;
  box-shadow: 0 12px 30px rgba(20, 18, 15, .1);
}

/* Price */
#category .pa-price-facet {
  margin: 0 !important;
  padding: 0 !important;
}

#category .pa-price-facet li {
  margin: 0 !important;
  padding: 0 !important;
}

#category .pa-price-facet__native-label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

#category .pa-price-facet__values {
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  gap: 8px;
  align-items: end;
  margin: 0 0 22px;
}

#category .pa-price-facet__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#category .pa-price-facet__field small {
  color: #7c7771;
  font-size: 10px;
}

#category .pa-price-facet__field strong {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #ded9d3;
  border-radius: 8px;
  background: #fff;
  color: #37332f;
  font-size: 12px;
  font-weight: 700;
}

#category .pa-price-facet__separator {
  padding-bottom: 12px;
  color: #817c76;
  text-align: center;
}

/* Both native jQuery UI slider and the custom fallback in custom.js inherit this polish. */
#category .pa-price-facet__slider,
#category .faceted-slider [id^='slider-range_'] {
  height: 5px;
  margin: 0 9px 9px;
  border: 0 !important;
  border-radius: 999px;
  background: #ece7e1;
}

#category .faceted-slider .ui-slider-range {
  border: 0 !important;
  background: var(--pa-filter-accent) !important;
}

#category .faceted-slider .ui-slider-handle {
  top: -7px !important;
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  border: 2px solid var(--pa-filter-accent) !important;
  border-radius: 50% !important;
  outline: 0 !important;
  background: #fff !important;
  box-shadow: 0 3px 9px rgba(43, 34, 27, .12);
  cursor: grab;
}

/* Help block already present below product grid: align its filter-side visual language. */
#category .pa-filter-mobile-actions {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--pa-filter-line);
  background: #fff;
}

#category .pa-filter-mobile-actions__show {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: #171717;
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}

/* Remove old Classic mobile titles: our header replaces them. */
#category .pa-catalog-sidebar .facet > .title,
#category .pa-catalog-sidebar #search_filters > p.text-uppercase,
#category .pa-catalog-sidebar #search_filters > .h6 {
  display: none !important;
}

/* Sticky desktop filter studio */
@media (min-width: 992px) {
  #category .pa-catalog-sidebar {
    position: sticky;
    top: 18px;
    align-self: flex-start;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d8d2cc transparent;
  }

  #category .pa-catalog-sidebar::-webkit-scrollbar { width: 5px; }
  #category .pa-catalog-sidebar::-webkit-scrollbar-track { background: transparent; }
  #category .pa-catalog-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: #d8d2cc; }
}

/* Drawer mobile */
@media (max-width: 991px) {
  #category .pa-catalog-sidebar {
    border-radius: 0;
    box-shadow: -12px 0 40px rgba(20, 18, 16, .16);
  }

  #category .pa-filter-drawer__head {
    min-height: 58px;
    padding: 0 18px;
    border-bottom: 1px solid var(--pa-filter-line);
    background: #fff;
  }

  #category .pa-filter-drawer__head strong {
    font-size: 15px;
    font-weight: 800;
  }

  #category .pa-filter-studio__intro {
    padding: 20px 20px 12px;
  }

  #category .pa-filter-studio__intro::before {
    top: 20px;
  }

  #category .pa-active-filter-panel,
  #category .pa-facet__header,
  #category .pa-facet__body.is-open {
    padding-left: 20px;
    padding-right: 20px;
  }

  #category .pa-facets__clear-all {
    right: 18px;
  }

  #category .pa-filter-mobile-actions {
    position: sticky;
    z-index: 8;
    bottom: 0;
    box-shadow: 0 -8px 20px rgba(20, 18, 16, .06);
  }
}

@media (prefers-reduced-motion: reduce) {
  #category .pa-facet__body,
  #category .pa-facet__chevron,
  #category .pa-catalog-sidebar .pa-facet-choice {
    transition: none !important;
  }
}
