.hpf {
    --hpf-accent: #d20a11;
    --hpf-border: #dcdcdc;
    --hpf-muted: #777;
    --hpf-soft: #f6f6f6;
    --hpf-text: #222;
    --hpf-columns: 3;
    width: 100%;
    color: var(--hpf-text);
}

.hpf *, .hpf *::before, .hpf *::after { box-sizing: border-box; }
.hpf-layout { display: grid; grid-template-columns: minmax(230px, 285px) minmax(0, 1fr); gap: 34px; align-items: start; }
.hpf-sidebar { background: #fff; border: 1px solid var(--hpf-border); }
.hpf-sidebar-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 14px 18px; border-bottom: 1px solid var(--hpf-border); font-size: 17px; }
.hpf-mobile-close { display: none; appearance: none; border: 0; background: transparent; font-size: 30px; line-height: 1; cursor: pointer; padding: 0; }
.hpf-form { margin: 0; }
.hpf-search-wrap { padding: 16px 18px; border-bottom: 1px solid var(--hpf-border); }
.hpf-search { width: 100%; height: 42px; border: 1px solid #cfcfcf; border-radius: 2px; padding: 0 12px; background: #fff; color: inherit; font: inherit; }
.hpf-search:focus, .hpf-range-number:focus, .hpf-sort:focus { outline: 2px solid color-mix(in srgb, var(--hpf-accent) 25%, transparent); border-color: var(--hpf-accent); }
.hpf-filter-group { margin: 0; border-bottom: 1px solid var(--hpf-border); }
.hpf-filter-group summary { position: relative; list-style: none; cursor: pointer; padding: 16px 42px 16px 18px; font-weight: 700; line-height: 1.3; user-select: none; }
.hpf-filter-group summary::-webkit-details-marker { display: none; }
.hpf-filter-group summary::after { content: ''; position: absolute; right: 19px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #555; border-bottom: 2px solid #555; transform: translateY(-65%) rotate(45deg); transition: transform .18s ease; }
.hpf-filter-group[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.hpf-options { padding: 0 18px 15px; max-height: 265px; overflow: auto; scrollbar-width: thin; }
.hpf-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 32px; margin: 1px 0; cursor: pointer; font-size: 14px; }
.hpf-option input { position: absolute; opacity: 0; pointer-events: none; }
.hpf-checkmark { width: 17px; height: 17px; border: 1px solid #aaa; background: #fff; display: block; position: relative; }
.hpf-option input:checked + .hpf-checkmark { background: var(--hpf-accent); border-color: var(--hpf-accent); }
.hpf-option input:checked + .hpf-checkmark::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hpf-option input:focus-visible + .hpf-checkmark { outline: 2px solid color-mix(in srgb, var(--hpf-accent) 25%, transparent); outline-offset: 2px; }
.hpf-option-count { color: var(--hpf-muted); font-size: 12px; min-width: 18px; text-align: right; }
.hpf-option.is-unavailable { opacity: .42; cursor: default; }
.hpf-range-group > .hpf-dual-range { padding: 0 18px 20px; }
.hpf-range-values { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 17px; }
.hpf-range-values label > span:first-child { display: block; color: var(--hpf-muted); font-size: 11px; margin-bottom: 4px; }
.hpf-number-wrap { display: flex; align-items: center; height: 38px; border: 1px solid #ccc; background: #fff; }
.hpf-number-wrap:focus-within { border-color: var(--hpf-accent); }
.hpf-range-number { min-width: 0; width: 100%; height: 36px; border: 0 !important; outline: 0 !important; padding: 0 3px 0 9px; background: transparent; font: inherit; }
.hpf-number-wrap em { font-style: normal; padding: 0 9px 0 3px; color: var(--hpf-muted); font-size: 12px; }
.hpf-range-number::-webkit-inner-spin-button { opacity: .4; }
.hpf-range-track-wrap { position: relative; height: 24px; }
.hpf-range-track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; background: #ddd; border-radius: 10px; }
.hpf-range-fill { position: absolute; top: 0; bottom: 0; background: var(--hpf-accent); border-radius: 10px; }
.hpf-range-input { position: absolute; left: 0; top: 4px; width: 100%; height: 18px; margin: 0; appearance: none; pointer-events: none; background: transparent; }
.hpf-range-input::-webkit-slider-thumb { appearance: none; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 2px solid var(--hpf-accent); cursor: pointer; pointer-events: auto; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.hpf-range-input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--hpf-accent); cursor: pointer; pointer-events: auto; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.hpf-actions { padding: 16px 18px 18px; display: grid; gap: 9px; }
.hpf-apply, .hpf-reset, .hpf-mobile-toggle, .hpf-page { font: inherit; cursor: pointer; }
.hpf-apply { min-height: 42px; border: 1px solid var(--hpf-accent); background: var(--hpf-accent); color: #fff; font-weight: 700; padding: 8px 14px; }
.hpf-reset { border: 0; background: transparent; color: #555; text-decoration: underline; min-height: 32px; }
.hpf-js .hpf-apply { display: none; }
.hpf-toolbar { min-height: 49px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--hpf-border); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.hpf-result-count { font-weight: 600; }
.hpf-sort-label { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--hpf-muted); font-size: 13px; }
.hpf-sort { height: 38px; border: 1px solid #ccc; background: #fff; color: var(--hpf-text); padding: 0 32px 0 10px; font: inherit; font-size: 13px; }
.hpf-results { position: relative; min-width: 0; }
.hpf .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hpf-results ul.products { width: 100%; display: grid; grid-template-columns: repeat(var(--hpf-columns), minmax(0, 1fr)); gap: 28px 22px; margin: 0; padding: 0; }
.hpf-results ul.products::before, .hpf-results ul.products::after { display: none; content: none; }
.hpf-results ul.products li.product { float: none !important; width: auto !important; margin: 0 !important; min-width: 0; }
.hpf-loader { position: absolute; z-index: 20; inset: 49px 0 0; background: rgba(255,255,255,.82); display: flex; align-items: flex-start; justify-content: center; gap: 10px; padding-top: 80px; font-size: 14px; font-weight: 600; }
.hpf-loader[hidden] { display: none; }
.hpf-spinner { width: 20px; height: 20px; border: 2px solid #ccc; border-top-color: var(--hpf-accent); border-radius: 50%; animation: hpf-spin .7s linear infinite; }
@keyframes hpf-spin { to { transform: rotate(360deg); } }
.hpf-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 34px; }
.hpf-page { min-width: 38px; height: 38px; border: 1px solid #ccc; background: #fff; color: #333; }
.hpf-page:hover, .hpf-page:focus-visible { border-color: var(--hpf-accent); color: var(--hpf-accent); }
.hpf-page.is-active { background: var(--hpf-accent); border-color: var(--hpf-accent); color: #fff; font-weight: 700; }
.hpf-page-dots { padding: 0 4px; color: #777; }
.hpf-empty { min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 30px; text-align: center; background: var(--hpf-soft); border: 1px solid var(--hpf-border); }
.hpf-empty span { color: var(--hpf-muted); }
.hpf-error { margin: 0 0 16px; padding: 12px 14px; border-left: 3px solid #b32d2e; background: #fcf0f1; color: #6d1b1c; }
.hpf-mobile-toggle { display: none; width: 100%; min-height: 46px; margin: 0 0 18px; border: 1px solid var(--hpf-border); background: #fff; color: var(--hpf-text); font-weight: 700; align-items: center; justify-content: center; gap: 9px; }
.hpf-filter-icon { width: 17px; height: 13px; position: relative; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.hpf-filter-icon::after { content: ''; position: absolute; left: 3px; right: 3px; top: 4px; border-top: 2px solid currentColor; }
.hpf-mobile-backdrop { display: none; }
html.hpf-lock, html.hpf-lock body { overflow: hidden; }

@media (max-width: 980px) {
    .hpf-layout { grid-template-columns: minmax(210px, 250px) minmax(0,1fr); gap: 24px; }
}

@media (max-width: 980px) and (min-width: 768px) {
    .hpf-results ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    .hpf-mobile-toggle { display: flex; }
    .hpf-layout { display: block; }
    .hpf-sidebar { position: fixed; z-index: 999999; left: 0; top: 0; bottom: 0; width: min(88vw, 360px); overflow-y: auto; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 10px 0 30px rgba(0,0,0,.2); }
    .hpf-sidebar.is-open { transform: translateX(0); }
    .hpf-mobile-close { display: block; }
    .hpf-mobile-backdrop:not([hidden]) { display: block; position: fixed; z-index: 999998; inset: 0; background: rgba(0,0,0,.42); }
    .hpf-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
    .hpf-sort-label { justify-content: space-between; }
    .hpf-sort { min-width: 0; width: 65%; }
    .hpf-loader { inset: 88px 0 0; }
    .hpf-results ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
}

@media (max-width: 520px) {
    .hpf-results ul.products { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hpf-sort-label { display: block; }
    .hpf-sort-label > span { display: block; margin-bottom: 5px; }
    .hpf-sort { width: 100%; }
}
