/* ── Layout ──────────────────────────────────────────────────────────────── */
.bf-layout { display: flex; gap: 30px; align-items: flex-start; }
.bf-sidebar { width: 260px; flex-shrink: 0; position: sticky; top: 100px; }
.bf-products { flex: 1; min-width: 0; position: relative; }
@media (max-width: 768px) {
    .bf-layout { flex-direction: column; }
    .bf-sidebar { width: 100%; position: static; }
}

/* ── Filter widget ── */
.bf-filter { border: 1px solid #e0e0e0; background: #fff; }
.bf-filter-header { background: #1a1a1a; color: #fff; padding: 12px 16px; font-weight: 700; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.bf-filter-group { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.bf-filter-group:last-of-type { border-bottom: none; }
.bf-filter-group-title { font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: #333; margin-bottom: 10px; }

/* ── Terms ── */
.bf-term { margin-bottom: 6px; }
.bf-term-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #333; line-height: 1.4; user-select: none; }
.bf-term-label:hover { color: #ff0a00; }
.bf-checkbox-input { position: absolute; opacity: 0; width: 0; height: 0; }
.bf-checkbox { width: 16px; height: 16px; border: 2px solid #ccc; border-radius: 2px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: border-color 0.15s, background 0.15s; }
.bf-checkbox-input:checked + .bf-checkbox { background: #1a1a1a; border-color: #1a1a1a; }
.bf-checkbox-input:checked + .bf-checkbox::after { content: ''; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); display: block; }
.bf-checkbox-input:disabled + .bf-checkbox { opacity: 0.3; cursor: not-allowed; }
.bf-term.bf-empty .bf-term-label { color: #aaa; cursor: not-allowed; }
.bf-count { color: #999; font-size: 12px; }
.bf-term.bf-active .bf-term-label { font-weight: 600; color: #1a1a1a; }

/* ── Cross-category ── */
.bf-term.bf-cross .bf-term-cross-label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #aaa; cursor: default; margin-bottom: 3px; }
.bf-checkbox-disabled { width: 16px; height: 16px; border: 2px solid #ddd; border-radius: 2px; flex-shrink: 0; opacity: 0.4; display: inline-block; }
.bf-cross-links { display: flex; flex-direction: column; gap: 2px; padding-left: 24px; }
.bf-cross-link { font-size: 12px; color: #ff0a00; text-decoration: none; }
.bf-cross-link:hover { text-decoration: underline; }

/* ── Price range ── */
.bf-price-range { display: flex; align-items: center; gap: 8px; }
.bf-price-range input { width: 80px; padding: 6px 8px; border: 1px solid #ddd; border-radius: 3px; font-size: 13px; text-align: center; }
.bf-price-range input:focus { outline: none; border-color: #1a1a1a; }
.bf-price-range span { color: #999; }

/* ── Reset ── */
.bf-reset { display: block; text-align: center; padding: 10px; font-size: 13px; color: #666; text-decoration: none; border-top: 1px solid #f0f0f0; }
.bf-reset:hover { color: #ff0a00; }

/* ── Loading ── */
.bf-products.bf-loading { opacity: 0.4; pointer-events: none; transition: opacity 0.2s; }
.bf-products.bf-loading::after { content: ''; position: absolute; top: 40px; left: 50%; transform: translateX(-50%); width: 32px; height: 32px; border: 3px solid #eee; border-top-color: #1a1a1a; border-radius: 50%; animation: bf-spin 0.7s linear infinite; }
@keyframes bf-spin { to { transform: translateX(-50%) rotate(360deg); } }

/* ── Results / no results ── */
.bf-results-count { font-size: 13px; color: #999; margin-bottom: 16px; }
.bf-no-results { padding: 40px 20px; text-align: center; color: #666; }
.bf-no-results .button { margin-top: 12px; background: #1a1a1a; color: #fff; border: none; padding: 10px 20px; cursor: pointer; }

/* ── Pagination ── */
.bf-pagination { margin-top: 30px; text-align: center; }
.bf-pagination .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 2px; border: 1px solid #ddd; color: #333; text-decoration: none; font-size: 14px; border-radius: 3px; }
.bf-pagination .page-numbers.current { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.bf-pagination .page-numbers:hover:not(.current) { border-color: #1a1a1a; color: #1a1a1a; }

/* ── Price slider ─────────────────────────────────────────────────────────── */
.bf-price-slider-wrap {
    padding: 4px 0 8px;
}

.bf-price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 18px;
}

.bf-slider-track {
    position: relative;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 16px 0 24px;
}

.bf-slider-range {
    position: absolute;
    height: 100%;
    background: #1a1a1a;
    border-radius: 2px;
    pointer-events: none;
}

.bf-range {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 0;
    left: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    outline: none;
    margin: 0;
    padding: 0;
}

.bf-range::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

.bf-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.1s, background 0.1s;
    margin-top: -7px;
}

.bf-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #ff0a00;
}

.bf-range::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
}

.bf-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    pointer-events: all;
}
