/* ──────────────────────────────────────────────────────────────────
   ETCH Product Filter – Frontend
   Neutral gehalten, einfach mit Theme-CSS überschreibbar.
   ────────────────────────────────────────────────────────────────── */

/* ── Filterleiste ──────────────────────────────────────────────── */

.etch-pf-bar {
    width: 100%;
    margin-bottom: 1.5rem;
}

.etch-pf-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* ── Widget-Block ──────────────────────────────────────────────── */

.etch-pf-widget {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 140px;
}

.etch-pf-widget__label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #555;
}

/* ── Select ────────────────────────────────────────────────────── */

.etch-pf-select {
    padding: .4rem .6rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: .9rem;
    cursor: pointer;
    min-width: 140px;
}

.etch-pf-select:focus {
    outline: none;
    border-color: #999;
}

/* ── Checkboxen ────────────────────────────────────────────────── */

.etch-pf-checkboxes {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.etch-pf-check-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .9rem;
    cursor: pointer;
}

/* ── Range-Slider ──────────────────────────────────────────────── */

.etch-pf-range-wrap {
    min-width: 180px;
    padding: 4px 0 0;
}

/* Sichtbare Leiste */
.etch-pf-range-track {
    position: relative;
    top: 8px;
    height: 8px;
    background: #ddd;
    border-radius: 2px;
    margin: 10px 0;
}

.etch-pf-range-fill {
    position: absolute;
    height: 100%;
    background: #1C2B3A;
    border-radius: 2px;
}

/* Beide Inputs übereinandergelegt */
.etch-pf-range-inputs {
    position: relative;
    height: 0;
}

.etch-pf-range {
    position: absolute;
    top: -10px; /* (Thumb-Höhe / 2) × -1  */
    width: 100%;
    height: 8px;
    margin: 0;
    pointer-events: none;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.etch-pf-range::-webkit-slider-thumb {
    pointer-events: all;
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1C2B3A;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.25);
    cursor: pointer;
}

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

.etch-pf-range-display {
    font-size: .8rem;
    color: #666;
    margin-top: .5rem;
}

/* ── Reset-Button ──────────────────────────────────────────────── */

.etch-pf-reset {
    padding: .45rem .9rem;
    border: 1px solid #ccc;
    border-radius: 3px;
    background: #fff;
    font-size: .85rem;
    cursor: pointer;
    color: #444;
    align-self: flex-end;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.etch-pf-reset:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* ── Ergebnis-Container ────────────────────────────────────────── */

.etch-pf-results {
    position: relative;
    min-height: 200px;
    transition: opacity .2s;
}

.etch-pf-results.etch-pf-loading {
    opacity: .5;
    pointer-events: none;
}

.etch-pf-results.etch-pf-loading::after {
    content: '';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.5);
}

.etch-pf-no-results {
    padding: 2rem;
    text-align: center;
    color: #666;
}

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

@media ( max-width: 768px ) {
    .etch-pf-bar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .etch-pf-widget {
        min-width: 0;
        width: 100%;
    }

    .etch-pf-select {
        min-width: 0;
        width: 100%;
    }
}
