/* ── Archive ─────────────────────────────────────────────────────────────── */

.archive-page-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 24px 0 16px;
    text-transform: uppercase;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */

.ftoolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}

.ftoolbar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
    font-family: var(--font-primary);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1.5px solid var(--color-text);
    border-radius: 2px;
    background: none;
    color: var(--color-text);
    cursor: pointer;
    transition: background 150ms, color 150ms;
}

.ftoolbar-toggle:hover,
.ftoolbar-toggle[aria-expanded="true"] {
    background: var(--color-text);
    color: #fff;
}

.ftoolbar-toggle[aria-expanded="true"] svg {
    stroke: #fff;
}

.ftoolbar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
}

.ftoolbar-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.fchip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-family: var(--font-primary);
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 150ms;
}

.fchip:hover { border-color: var(--color-primary); color: var(--color-primary); }

.ftoolbar-count {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.ftoolbar-clear {
    font-size: 12px;
    font-family: var(--font-primary);
    font-weight: 600;
    text-decoration: underline;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
}

.ftoolbar-clear:hover { color: var(--color-primary); }

/* ── Filter Bar ──────────────────────────────────────────────────────────── */

.fbar {
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    /* hidden attribute handles display */
}

.fbar-inner {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.fbar-inner::-webkit-scrollbar { display: none; }

/* ── Sections ────────────────────────────────────────────────────────────── */

.fsection {
    flex-shrink: 0;
    border-right: 1px solid var(--color-border);
    min-width: 160px;
    max-width: 240px;
}

.fsection:last-child { border-right: none; }

.fsection-head {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 16px 20px;
    font-size: 13px;
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    text-align: left;
    transition: background 150ms;
}

.fsection-head:hover { background: var(--color-surface); }

.fsection-chevron {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 200ms ease;
}

.fsection-head[aria-expanded="true"] .fsection-chevron {
    transform: rotate(180deg);
}

.fsection-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
}

.fsection-body {
    padding: 4px 0 16px;
    max-height: 280px;
    overflow-y: auto;
}

/* ── Options ─────────────────────────────────────────────────────────────── */

.fopt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background 120ms;
    user-select: none;
    color: var(--color-text);
}

.fopt:hover { background: var(--color-surface); }

.fopt input[type="checkbox"],
.fopt input[type="radio"] {
    width: 15px;
    height: 15px;
    accent-color: var(--color-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.fopt.is-active { font-weight: 600; }

.fopt-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Radio options (Sortieren) */
.fopt-radio { }

/* ── Color options ───────────────────────────────────────────────────────── */

.fopt-color {
    padding: 6px 20px;
}

.fopt-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1.5px var(--color-border);
    transition: box-shadow 140ms, transform 140ms;
}

.fopt-color:hover .fopt-dot {
    box-shadow: 0 0 0 2px var(--color-primary);
    transform: scale(1.1);
}

.fopt-color.is-active .fopt-dot {
    box-shadow: 0 0 0 2px var(--color-background), 0 0 0 4px var(--color-primary);
}

.fopt-color-label {
    font-size: 13px;
}

/* ── Price slider ────────────────────────────────────────────────────────── */

.fprice-wrap { padding: 4px 20px 8px; }

.fprice-track {
    position: relative;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin: 16px 0 12px;
}

.fprice-fill {
    position: absolute;
    height: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    pointer-events: none;
}

.fprice-track input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    top: 0; left: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    pointer-events: none;
}

.fprice-track input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    cursor: pointer;
    pointer-events: all;
}

.fprice-track input[type="range"]::-moz-range-thumb {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.2);
    cursor: pointer;
    pointer-events: all;
    border: none;
}

.fprice-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

#fgrid.is-loading { opacity: .4; pointer-events: none; transition: opacity 200ms; }

/* ── Pagination ──────────────────────────────────────────────────────────── */

#fpagination { margin-top: 40px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .fbar-inner { flex-direction: column; }
    .fsection { max-width: 100%; border-right: none; border-bottom: 1px solid var(--color-border); }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
}
