/* WC Friendly Faceted Filters v0.3.4 */
.wcff {
  --wcff-border: rgba(10, 31, 61, .14);
  --wcff-radius: 14px;
  --wcff-gap: 24px;
  width: 100%;
  position: relative;
}

.wcff *, .wcff *::before, .wcff *::after { box-sizing: border-box; }
html.wcff-lock { overflow: hidden; }

.wcff__layout {
  display: grid !important;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) !important;
  gap: var(--wcff-gap) !important;
  align-items: start !important;
}

.wcff__sidebar {
  position: sticky;
  top: 24px;
  width: 100%;
  min-width: 0;
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--wcff-border);
  border-radius: var(--wcff-radius);
  padding: 18px;
}

.wcff__sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.wcff__close {
  display: none;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.wcff__filter {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--wcff-border);
}

.wcff__filter--search {
  padding: 12px 0 16px;
  border-top: 0;
}

.wcff__filter--search > label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.wcff__filter > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  padding: 14px 20px 14px 0;
  position: relative;
}

.wcff__filter > summary::-webkit-details-marker { display: none; }
.wcff__filter > summary::after {
  content: '+';
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
}
.wcff__filter[open] > summary::after { content: '−'; }

.wcff__filter-body { padding: 0 0 14px; }

.wcff input[type="search"],
.wcff input[type="number"],
.wcff select {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.17);
  border-radius: 8px;
  background: #fff;
}

.wcff__price-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  gap: 8px;
  align-items: center;
}

.wcff__term-search { margin-bottom: 9px; }

.wcff__options {
  max-height: 250px;
  overflow: auto;
  padding-right: 4px;
}

.wcff__check {
  display: grid;
  grid-template-columns: 18px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
  cursor: pointer;
}

.wcff__check input { margin: 0; }
.wcff__check small { opacity: .58; font-size: .82em; }

.wcff__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
}

.wcff__apply,
.wcff__clear,
.wcff__mobile-toggle,
.wcff__chip {
  border: 1px solid rgba(0,0,0,.13);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  cursor: pointer;
  line-height: 1.2;
}

.wcff__apply {
  background: #111;
  color: #fff;
  border-color: #111;
}

.wcff__main { min-width: 0; }

.wcff__toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 12px;
}

.wcff__status { min-height: 24px; }

.wcff__sort {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

.wcff__sort select { width: auto; min-width: 160px; }

.wcff__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
  margin-bottom: 14px;
}

.wcff__chips:empty { margin-bottom: 0; }

.wcff__chip {
  padding: 7px 11px;
  font-size: .88rem;
}

.wcff__result-meta { display: none; }

.wcff__results ul.products {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.wcff__pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.wcff__pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--wcff-border);
  border-radius: 8px;
  text-decoration: none;
}

.wcff__pagination .current { font-weight: 700; }

.wcff--loading .wcff__results {
  opacity: .45;
  pointer-events: none;
}

.wcff__mobile-toggle { display: none; margin-bottom: 14px; }
.wcff__overlay { display: none; }

@media (max-width: 1024px) {
  .wcff__layout {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) !important;
    gap: 18px !important;
  }
}

@media (max-width: 767px) {
  .wcff__layout { grid-template-columns: 1fr !important; }
  .wcff__mobile-toggle { display: inline-flex; }

  .wcff__sidebar {
    position: fixed;
    z-index: 99999;
    inset: 0 auto 0 0;
    width: min(92vw, 360px);
    max-height: none;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.22);
  }

  .wcff__close { display: block; }

  .wcff__overlay {
    position: fixed;
    z-index: 99998;
    inset: 0;
    background: rgba(0,0,0,.38);
  }

  .wcff--open .wcff__sidebar { transform: translateX(0); }
  .wcff--open .wcff__overlay { display: block; }

  .wcff__toolbar {
    align-items: flex-start;
    gap: 10px;
  }

  .wcff__sort {
    margin-left: auto;
    max-width: 58%;
  }

  .wcff__sort span { display: none; }
  .wcff__sort select { min-width: 0; width: 100%; }
}


/* Product-card alignment and polish */
.wcff__results ul.products {
  align-items: stretch !important;
}

.wcff__results ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.wcff__results ul.products li.product > a.woocommerce-LoopProduct-link,
.wcff__results ul.products li.product > a.woocommerce-loop-product__link {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.wcff__results ul.products li.product img {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  margin-bottom: 10px !important;
}

.wcff__results ul.products li.product .woocommerce-loop-category__title,
.wcff__results ul.products li.product .woocommerce-loop-product__title,
.wcff__results ul.products li.product h2,
.wcff__results ul.products li.product h3 {
  line-height: 1.25 !important;
}

.wcff__results ul.products li.product .woocommerce-loop-product__title {
  min-height: 3.75em !important;
  margin-bottom: 8px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.wcff__results ul.products li.product .price {
  margin-top: auto !important;
  margin-bottom: 10px !important;
}

.wcff__results ul.products li.product .button,
.wcff__results ul.products li.product a.button,
.wcff__results ul.products li.product .added_to_cart {
  width: 100% !important;
  text-align: center !important;
  margin-top: 0 !important;
}

@media (max-width: 767px) {
  .wcff__results ul.products li.product .woocommerce-loop-product__title {
    min-height: 3.6em !important;
    -webkit-line-clamp: 3 !important;
  }
}


/* Explicit control colors to prevent theme/Elementor button styles
   from producing white text on white backgrounds. */
.wcff__clear,
.wcff__mobile-toggle,
.wcff__chip,
.wcff__pagination .page-numbers {
  color: #0a1f3d !important;
  background: #ffffff !important;
  border-color: rgba(10, 31, 61, .18) !important;
  opacity: 1 !important;
  text-decoration: none !important;
}

.wcff__clear:hover,
.wcff__clear:focus,
.wcff__mobile-toggle:hover,
.wcff__mobile-toggle:focus,
.wcff__chip:hover,
.wcff__chip:focus,
.wcff__pagination .page-numbers:hover,
.wcff__pagination .page-numbers:focus {
  color: #ffffff !important;
  background: #2fa8bd !important;
  border-color: #2fa8bd !important;
}

.wcff__pagination .page-numbers.current {
  color: #ffffff !important;
  background: #0a1f3d !important;
  border-color: #0a1f3d !important;
}

.wcff__apply {
  color: #ffffff !important;
  background: #111111 !important;
  border-color: #111111 !important;
}

.wcff__apply:hover,
.wcff__apply:focus {
  color: #ffffff !important;
  background: #2fa8bd !important;
  border-color: #2fa8bd !important;
}

/* Some themes apply button text color to nested spans. */
.wcff__clear *,
.wcff__mobile-toggle *,
.wcff__chip *,
.wcff__pagination .page-numbers * {
  color: inherit !important;
}


/* Dynamic facet states */
.wcff__check--disabled {
  opacity: .42;
  cursor: not-allowed;
}
.wcff__check--disabled input {
  cursor: not-allowed;
}
