/* Shared faceted-filter sidebar styles — used by the category page and the
   Algolia search page (via #facet-app / _facet_helpers.php). */

.product-search-widget {
    margin: 1% 0 4% 0;
}

/* ---- faceted filter sidebar ---- */
.product-filter-section { color: slategrey; }

.facet-heading {
    color: #b7b7b7; font-weight: 400; font-size: 1.5rem; margin: 0;
    padding: 0 0.5rem 0.75rem; border-bottom: 1px solid #e6e6e6;
}

.product-filter-section .card { border: none; border-bottom: 1px solid #e6e6e6; }
.product-filter-section .card:last-child { border-bottom: none; }
.product-filter-section .card .card-header { background: #fff; padding: 0; }
.product-filter-section .card .card-header h2 a {
    font-size: 1.10rem; font-weight: 600; color: slategrey; padding-right: 1.5rem;
}
.product-filter-section .card .card-header h2 a:hover { text-decoration: none; }
/* +/- collapse indicator: "+" collapsed, "-" expanded.
   !important + font-family:inherit defeats the theme's FontAwesome \f077/\f078 rule in style.css */
.product-filter-section .card .card-header .btn-link::after {
    content: "\002B" !important;              /* + when collapsed */
    font-family: inherit !important;
    font-size: 1.75rem !important;
    font-weight: 400;
    line-height: 1;
    color: #333;
    background: none !important;
    position: absolute; right: 10px; top: 50%;
    width: auto; height: auto; margin: 0;
    transform: translateY(-50%);
    transition: none;
}
.product-filter-section .card .card-header .btn-link[aria-expanded="true"]::after {
    content: "\2212" !important;              /* - when expanded */
}

/* per-section: "N X filters applied" + chips + clear */
.facet-applied-line { font-size: 0.85rem; color: slategrey; font-weight: 600; margin-bottom: 6px; }
.facet-section-chips { margin-bottom: 4px; }
.facet-clear-row { text-align: right; margin-bottom: 6px; }
/* specificity bumped past the theme's ".card .card-body a { color: inherit }" in style.css */
.product-filter-section .card-body a.facet-clear-section,
.product-filter-section .card-body a.facet-clear-section:hover { color: #F47929; font-size: 0.8rem; }

.product-filter-section .facet-list { list-style: none; margin: 0; padding: 0; }
.product-filter-section .facet-list li { padding: 3px 0; }
.facet-label { display: flex; align-items: center; margin: 0; font-weight: 400; cursor: pointer; }
.facet-label .facet-name { flex: 1 1 auto; }
.facet-label .facet-count { font-size: 0.8rem; margin-left: 8px; }
.facet-label.text-muted { cursor: default; }

/* checkbox: light-blue outline, blue fill + white tick when checked (matches legacy look) */
.facet-label .facet-check {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    flex: 0 0 auto; width: 18px; height: 18px; margin: 0 8px 0 0;
    border: 2px solid #27a2f4; border-radius: 2px; background: #fff;
    position: relative; cursor: pointer; transition: background .12s ease;
}
.facet-label .facet-check:checked { background: #27a2f4; border-color: #27a2f4; }
.facet-label .facet-check:checked::after {
    content: ""; position: absolute; left: 4px; top: 1px;
    width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.facet-label .facet-check:focus { outline: 2px solid rgba(39, 162, 244, .35); outline-offset: 1px; }
.facet-label .facet-check:disabled { border-color: #cbd2d9; background: #f5f7fa; cursor: default; }
.facet-search { margin-bottom: 10px; }
.facet-search::placeholder { color: #b7b7b7; }
.product-filter-section .card-body a.facet-more-toggle {
    display: block; margin-top: 10px; text-align: right;
    font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.product-filter-section .card-body a.facet-more-toggle:hover { color: #27a2f4; text-decoration: none; }

/* ---- selected-filter chips (rendered inside each facet section) ---- */
.facet-chip {
    display: inline-flex; align-items: center; background: #eef1f4; color: #3e4c59;
    border-radius: 14px; padding: 4px 10px; margin: 0 6px 6px 0; font-size: 0.8rem; font-weight: 400;
}
.product-filter-section .card-body a.facet-chip-remove { margin-left: 6px; color: #7b8794; font-weight: 700; text-decoration: none; line-height: 1; }
.product-filter-section .card-body a.facet-chip-remove:hover { color: #cf1124; }

/* ---- ajax loading state ---- */
#facet-app.is-loading #facet-results { opacity: 0.45; pointer-events: none; transition: opacity .15s ease; }

/* ---- pagination ---- */
.pagination .page-item .page-link, a {
    color: #6e6e6e; text-decoration: none; background-color: transparent;
    -webkit-text-decoration-skip: objects;
}
.page-item.active .page-link { z-index: 1; color: #fff; background-color: #27a2f4; border-color: #27a2f4; }
.pagination .page-item a:hover { color: #27a2f4; text-decoration: none; }
