/* ==========================================================================
   Filter Everything Pro — theme look & feel
   Makes the FE Pro filter widget (.wpc-*) match the previous FacetWP design:
   collapsible accordions with a +/- icon, uppercase headings, custom checkboxes,
   a slim price slider, chips/reset, sort dropdown and native pagination.
   Scoped to the archive sidebar wrapper .woo-filters-fe where possible.
   ========================================================================== */

/* ---- Widget shell: strip FE Pro's own spacing/chrome ---- */
.woo-filters-fe .wpc-filters-main-wrap,
.woo-filters-fe .wpc-filters-widget-content,
.woo-filters-fe .wpc-filters-widget-containers-wrapper,
.woo-filters-fe .wpc-filters-scroll-container,
.woo-filters-fe .wpc-filters-widget-wrapper {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  max-height: none;
  overflow: visible;
}

/* Hide FE Pro's built-in mobile open button, popup close icon and bottom
   controls — the theme provides its own mobile panel + FILTER button. The open
   button is injected OUTSIDE .woo-filters-fe, so scope it to the body class. */
.gsw-fe-filters .wpc-filters-open-button-container,
.woo-filters-fe .wpc-widget-close-container,
.woo-filters-fe .wpc-filters-widget-controls-container,
.woo-filters-fe .wpc-spinner,
.woo-filters-fe .wpc-edit-filter-set,
.woo-filters-fe .wpc-filter-set-widget-title {
  display: none !important;
}

/* ---- Each filter = an accordion row (was .woo-filter) ---- */
.woo-filters-fe .wpc-filters-section {
  padding: 15px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #adb5bd;
}

/* ---- Filter header / toggle (was .woo-filter > a) ---- */
.woo-filters-fe .wpc-filter-header {
  margin: 0;
}
.woo-filters-fe .wpc-filter-title {
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: #212529;
  font-family: "Jost", "Roboto", sans-serif;
}
.woo-filters-fe .wpc-filter-title button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-transform: inherit;
  text-align: left;
}
.woo-filters-fe .wpc-filter-title .wpc-wrap-icons {
  display: inline;
}
.woo-filters-fe .wpc-filter-selected-values {
  display: none;
}

/* +/- icon (was .filter-icon with .line-plus/.line-minus).
   Neutralise FE Pro's chevron (border + rotate) with high specificity, then draw
   our own plus with the pseudo-elements. */
.woo-filters-fe .wpc-filter-title .wpc-open-icon {
  position: relative !important;
  width: 12px !important;
  min-width: 12px !important;
  height: 12px !important;
  flex: 0 0 12px;
  display: inline-block !important;
  border: 0 !important;
  transform: none !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  background: none !important;
}
.woo-filters-fe .wpc-filter-title .wpc-open-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 12px;
  height: 2px;
  background-color: #636363;
  transform: translateY(-50%);
}
.woo-filters-fe .wpc-filter-title .wpc-open-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 12px;
  background-color: #636363;
  transform: translateX(-50%);
}
/* Content open (clicked-open or auto-open because a value is selected) → minus */
.woo-filters-fe .wpc-filters-section.wpc-opened .wpc-filter-title .wpc-open-icon::after,
.woo-filters-fe .wpc-filters-section.wpc-filter-has-selected:not(.wpc-closed) .wpc-filter-title .wpc-open-icon::after {
  display: none;
}

/* Content spacing (was .woo-filter .flex.items-center { margin-top:10px }) */
.woo-filters-fe .wpc-filter-content {
  margin-top: 12px;
}

/* ---- Checkbox list ---- */
.woo-filters-fe .wpc-filters-ul-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.woo-filters-fe .wpc-filters-ul-list .children {
  list-style: none;
  margin: 0 0 0 22px;
  padding: 0;
}
.woo-filters-fe li.wpc-term-item {
  margin: 0 0 8px 0;
  padding: 0;
  background: none;
}
.woo-filters-fe .wpc-term-item-content-wrapper {
  display: flex;
  align-items: center;
}

/* Native checkbox styled like the old .facetwp-checkbox::before box */
.woo-filters-fe li.wpc-term-item input[type="checkbox"],
.woo-filters-fe li.wpc-term-item input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  flex: 0 0 14px;
  margin: 0 8px 0 0;
  padding: 0;
  border: 1px solid #ced4da;
  border-radius: 0;
  background: #fff;
  cursor: pointer;
  position: relative;
  top: 0;
}
.woo-filters-fe li.wpc-term-item input[type="radio"] {
  border-radius: 50%;
}
.woo-filters-fe li.wpc-term-item input[type="checkbox"]:checked,
.woo-filters-fe li.wpc-term-item input[type="radio"]:checked {
  background-color: #212529;
  border-color: #212529;
}

.woo-filters-fe li.wpc-term-item label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: #212529;
}
.woo-filters-fe li.wpc-term-item label a,
.woo-filters-fe li.wpc-term-item .wpc-filter-link {
  color: #212529;
  text-decoration: none;
}
.woo-filters-fe li.wpc-term-item.wpc-term-selected > .wpc-term-item-content-wrapper label a {
  font-weight: 600;
}
.woo-filters-fe .wpc-term-count {
  color: #868e96;
  font-size: 13px;
}

/* Disabled / empty terms */
.woo-filters-fe li.wpc-term-item.wpc-term-disabled {
  opacity: 0.45;
}

/* Hierarchy expand toggle */
.woo-filters-fe i.wpc-toggle-children-list {
  cursor: pointer;
  margin-left: auto;
}

/* ---- "See more" / "See less" (was FacetWP soft-limit) ---- */
.woo-filters-fe .wpc-see-more-control,
.woo-filters-fe .wpc-see-less-control {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  color: #212529;
  cursor: pointer;
}

/* ---- In-filter search box ---- */
.woo-filters-fe .wpc-filter-search-wrapper {
  position: relative;
  margin-bottom: 10px;
}
.woo-filters-fe .wpc-filter-search-field {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ced4da;
  font-size: 13px;
}

/* ==========================================================================
   Price range filter (jQuery UI slider) — was the noUiSlider price facet
   ========================================================================== */
.woo-filters-fe .wpc-range-filter .wpc-filter-title,
.woo-filters-fe .wpc-filter-_price .wpc-filter-title {
  margin-bottom: 18px;
}
.woo-filters-fe .wpc-filters-range-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.woo-filters-fe .wpc-filters-range-column {
  position: relative;
  flex: 1;
}
.woo-filters-fe .wpc-filters-range-wrapper input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ced4da;
  background: #fff;
  font-size: 14px;
  color: #212529;
}
.woo-filters-fe .wpc-range-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  cursor: pointer;
  color: #868e96;
  line-height: 1;
}
.woo-filters-fe .wpc-filters-range-values-wrapper p {
  font-size: 13px;
  color: #636363;
  margin: 0;
}

/* jQuery UI slider track / range / handles (mirrors old .noUi-* look) */
.woo-filters-fe .wpc-filters-range-slider-wrapper {
  padding: 6px 8px 0;
}
.woo-filters-fe .ui-slider.ui-slider-horizontal {
  height: 3px;
  background: #dee2e6;
  border: 0;
  border-radius: 0;
  position: relative;
  margin: 6px 0 10px;
}
.woo-filters-fe .ui-slider .ui-slider-range {
  background: #212529;
  height: 3px;
  border: 0;
  top: 0;
}
.woo-filters-fe .ui-slider .ui-slider-handle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #212529;
  border: 0;
  outline: none;
  top: -7px;
  margin-left: -8px;
  cursor: pointer;
}

/* ==========================================================================
   Chips / reset (was [facetwp facet="poniti_filter"])
   ========================================================================== */
.woo-filters-fe .wpc-custom-selected-terms,
.woo-filters-fe .wpc-inner-widget-chips-wrapper {
  margin-bottom: 12px;
}
.woo-filters-fe .wpc-filter-chips-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.woo-filters-fe .wpc-filter-chip {
  margin: 0;
}
.woo-filters-fe .wpc-filter-chip > a,
.woo-filters-fe .wpc-filter-chip > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f1f3f5;
  border: 1px solid #dee2e6;
  font-size: 12px;
  color: #212529;
  text-decoration: none;
  text-transform: uppercase;
}
.woo-filters-fe .wpc-chip-remove-icon {
  font-size: 14px;
  line-height: 1;
}
/* Reset-all chip → styled like the old reset button */
.woo-filters-fe .wpc-filter-chip.wpc-chip-reset-all > a {
  background: #e9ecef;
  border: 0;
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================================
   Zlato archive: hide the price filter (matches old display:none)
   ========================================================================== */
.gsw-fe-zlato .woo-filters-fe .wpc-range-filter,
.gsw-fe-zlato .woo-filters-fe .wpc-filter-_price {
  display: none !important;
}

/* ==========================================================================
   Catalog intro: SEO H1 + expandable description above the product grid
   (populated by a Filter Everything Pro SEO Rule when filtered, else category)
   ========================================================================== */
.gsw-catalog-intro {
  margin: 0 0 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e9ecef;
}
.gsw-catalog-intro__title {
  font-family: "Jost", "Roboto", sans-serif;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #212529;
  margin: 0 0 14px;
}
.gsw-catalog-intro__body {
  position: relative;
  max-width: 900px;
}
.gsw-catalog-intro__desc {
  font-family: "Roboto", sans-serif;
  font-size: 14.5px;
  line-height: 1.7;
  color: #6c757d;
  overflow: hidden;
  max-height: 6.8em; /* ~4 lines collapsed */
  transition: max-height 0.4s ease;
}
.gsw-catalog-intro__desc :first-child { margin-top: 0; }
.gsw-catalog-intro__desc :last-child { margin-bottom: 0; }
.gsw-catalog-intro__desc p { margin: 0 0 10px; }
.gsw-catalog-intro__desc:empty { display: none; }
/* Soft fade at the bottom while collapsed */
.gsw-catalog-intro__body::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.2em;
  height: 2.2em;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 85%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.gsw-catalog-intro.is-open .gsw-catalog-intro__desc {
  max-height: 200em;
}
.gsw-catalog-intro.is-open .gsw-catalog-intro__body::after {
  opacity: 0;
}
.gsw-catalog-intro__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: "Jost", "Roboto", sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #212529;
}
.gsw-catalog-intro__toggle:hover { color: #000; }
.gsw-catalog-intro__toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-top: -3px;
}
.gsw-catalog-intro.is-open .gsw-catalog-intro__toggle::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}
.gsw-catalog-intro .gsw-intro-less { display: none; }
.gsw-catalog-intro.is-open .gsw-intro-more { display: none; }
.gsw-catalog-intro.is-open .gsw-intro-less { display: inline; }
/* Toggle + fade only appear when the text actually overflows 4 lines
   (JS adds .is-clamped); with no overflow the description shows in full. */
.gsw-catalog-intro:not(.is-clamped) .gsw-catalog-intro__toggle,
.gsw-catalog-intro:not(.is-clamped) .gsw-catalog-intro__body::after {
  display: none;
}
.gsw-catalog-intro:not(.is-clamped) .gsw-catalog-intro__desc {
  max-height: none;
}
@media (max-width: 767px) {
  .gsw-catalog-intro__title { font-size: 22px; }
}

/* ==========================================================================
   Sort dropdown ([fe_sort] → .wpc-orderby-select), was .facetwp-facet-sort_archive
   ========================================================================== */
.wpc-sorting-form {
  margin: 0;
}
.woo-bar .wpc-orderby-select,
.wpc-orderby-select {
  background-color: #f1f3f5 !important;
  padding: 10px 15px;
  outline: none !important;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  color: #212529;
}
.wpc-orderby-select option {
  font-size: 13px;
}

/* ==========================================================================
   Native WooCommerce pagination (replaces [facetwp facet="pagination"])
   Mirrors the old .facetwp-page look.
   ========================================================================== */
.woocommerce-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 50px 0;
}
.woocommerce-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 0;
}
.woocommerce-pagination ul.page-numbers li {
  margin: 0;
  border: 0;
}
.woocommerce-pagination .page-numbers {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  text-decoration: none;
  background: none;
  border: 0;
}
.woocommerce-pagination .page-numbers.current {
  color: #fff;
  background-color: #212529;
}
.woocommerce-pagination .page-numbers.next,
.woocommerce-pagination .page-numbers.prev {
  position: relative;
  font-size: 0;
  width: 34px;
}
.woocommerce-pagination .page-numbers.next::after,
.woocommerce-pagination .page-numbers.prev::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24.5px;
  height: 24.5px;
  transform: translate(-50%, -50%);
  background: url("../icons/pagination.svg") no-repeat center / contain;
}
.woocommerce-pagination .page-numbers.prev::after {
  transform: translate(-50%, -50%) rotate(180deg);
}

/* ==========================================================================
   Mobile: keep the theme's fixed filter panel behaviour intact
   ========================================================================== */
@media only screen and (max-width: 1024px) {
  .woo-filters-fe .wpc-filters-scroll-container {
    max-height: none;
    overflow: visible;
  }
}
