/* ── Juwelier Filter v3.1 — "Luxuriöse Zurückhaltung" ───────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,600;1,400&display=swap');

.jfilter-wrap {
    box-sizing: border-box;
    position: relative;
    background: #fbf9f4;
    width: 100%;
    padding: 32px 24px 40px 0;
    font-family: 'Noto Serif', serif;
}
.jfilter-wrap *, .jfilter-wrap *::before, .jfilter-wrap *::after { box-sizing: border-box; }

/* ── Sektion ─────────────────────────────────────────────────────────────── */
.jfilter-group {
    margin-bottom: 48px;
}

/* Überschrift */
.jfilter-group__label {
    display: block;
    /* Schrift OHNE !important — Elementor Typography-Control kann überschreiben */
    font-family: 'Noto Serif', serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #1A1A1A;
    padding-bottom: 12px;
    border-bottom: 1px solid #dbdad5;
    margin-bottom: 20px;
}

/* ── 1. Kategorie-Liste ──────────────────────────────────────────────────── */
.jfilter-kat-list { display: flex; flex-direction: column; }

/* Kategorie-Buttons: nur Layout/Background per !important, Schrift bleibt überschreibbar */
.jfilter-wrap .jfilter-kat-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
    cursor: pointer !important;
    text-align: left !important;
    transition: color 300ms ease;
    /* Schrift OHNE !important → Elementor-Controls können überschreiben */
    font-family: 'Noto Serif', serif;
    font-size: 13px;
    line-height: 1.8;
    color: #4A4A4A;
}
.jfilter-wrap .jfilter-kat-item:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #D6B56A;
}
.jfilter-wrap .jfilter-kat-item:focus,
.jfilter-wrap .jfilter-kat-item:active {
    background: transparent !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}
.jfilter-wrap .jfilter-kat-item:last-child { margin-bottom: 0 !important; }
.jfilter-wrap .jfilter-kat-item.aktiv { color: #1A1A1A; font-weight: 600; }
.jfilter-wrap .jfilter-kat-item[disabled] { cursor: default !important; }

.jfilter-kat-name {
    flex: 1;
    text-align: left;
}

.jfilter-kat-count {
    font-family: sans-serif;
    font-size: 11px;
    color: #9A9A9A;
    margin-left: 8px;
    font-weight: 400;
    text-align: right;
    flex-shrink: 0;
}

/* ── 2. Material – Pill-Buttons ──────────────────────────────────────────── */
.jfilter-mat-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jfilter-mat-btn {
    background: transparent;
    border: 1px solid #dbdad5;
    border-radius: 999px;
    padding: 6px 12px;
    font-family: 'Noto Serif', serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4A4A4A;
    cursor: pointer;
    transition: background 200ms, border-color 200ms, color 200ms;
    white-space: nowrap;
}
.jfilter-mat-btn:hover:not(.aktiv) { border-color: #D6B56A; color: #D6B56A; }
.jfilter-mat-btn.aktiv {
    background: #D6B56A;
    border-color: #D6B56A;
    color: #FFFFFF;
}

/* ── 3. Farb-Circles (Swatches) ──────────────────────────────────────────── */
.jfilter-farbe-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* !important nötig um Elementor/WP button-Reset zu überschreiben */
.jfilter-wrap .jfilter-farbe-btn,
.jfilter-wrap .jfilter-farbe-btn:hover,
.jfilter-wrap .jfilter-farbe-btn:focus,
.jfilter-wrap .jfilter-farbe-btn:active {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1 !important;
}

.jfilter-farbe-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
    transition: box-shadow 200ms;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.10);
}

.jfilter-farbe-btn.aktiv .jfilter-farbe-circle {
    box-shadow: 0 0 0 2px #fbf9f4, 0 0 0 3.5px #1A1A1A;
}
.jfilter-farbe-btn:hover:not(.aktiv) .jfilter-farbe-circle {
    box-shadow: 0 0 0 2px #fbf9f4, 0 0 0 3.5px #D6B56A;
}

.jfilter-farbe-label {
    display: block;
    font-family: sans-serif;
    font-size: 9px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #7A7A7A;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}


/* ── 4. Preisspanne – Range Slider ───────────────────────────────────────── */
.jfilter-range-track-wrap {
    position: relative;
    height: 2px;
    margin: 20px 0 18px;
}

.jfilter-range-track {
    position: absolute;
    inset: 0;
    height: 2px;
    border-radius: 1px;
    background: #dbdad5;
}

.jfilter-range-fill {
    position: absolute;
    top: 0;
    height: 2px;
    border-radius: 1px;
    background: #006D77;
    pointer-events: none;
}

.jfilter-range-thumb {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #006D77;
    border: none;
    box-shadow: none;
    cursor: grab;
    touch-action: none;
    transition: box-shadow 150ms;
}
.jfilter-range-thumb:active { cursor: grabbing; box-shadow: 0 0 0 4px rgba(0,109,119,.18); }
.jfilter-range-thumb:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0,109,119,.22); }

.jfilter-range-values {
    display: flex;
    justify-content: space-between;
    font-family: sans-serif;
    font-size: 11px;
    color: #9A9A9A;
    margin-top: 4px;
}

/* ── 5. Ringgröße – Grid-Buttons ─────────────────────────────────────────── */
.jfilter-ring-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.jfilter-ring-btn {
    height: 28px;
    padding: 0;
    text-align: center;
    background: #FFFFFF;
    border: 1px solid #dbdad5;
    border-radius: 0;
    font-family: sans-serif;
    font-size: 11px;
    color: #4A4A4A;
    cursor: pointer;
    transition: border-color 200ms, color 200ms, background 200ms;
}
.jfilter-ring-btn:hover:not(.aktiv) { border-color: #D6B56A; color: #D6B56A; }
.jfilter-ring-btn.aktiv {
    background: #D6B56A;
    border-color: #D6B56A;
    color: #FFFFFF;
}

/* ── 6. Maße – Checkbox-Liste ────────────────────────────────────────────── */
.jfilter-masse-list { display: flex; flex-direction: column; }

.jfilter-masse-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.jfilter-masse-item:last-child { margin-bottom: 0; }

/* Custom Checkbox */
.jfilter-masse-cb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 1px solid #dbdad5;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background 150ms, border-color 150ms;
}
.jfilter-masse-cb:checked {
    background: #006D77;
    border-color: #006D77;
}
.jfilter-masse-cb:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.jfilter-masse-label {
    font-family: 'Noto Serif', serif;
    font-size: 13px;
    line-height: 1.8;
    color: #4A4A4A;
    cursor: pointer;
    transition: color 300ms;
}
.jfilter-masse-label:hover,
.jfilter-masse-label.aktiv { color: #1A1A1A; }

/* ── Reset-Button ────────────────────────────────────────────────────────── */
.jfilter-actions { margin-top: 32px; }

.jfilter-reset {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Noto Serif', serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9A9A9A;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 200ms;
}
.jfilter-reset:hover { color: #1A1A1A; }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.jfilter-loading { display: flex; align-items: center; padding: 12px 0; }
.jfilter-spinner {
    width: 18px; height: 18px;
    border: 1.5px solid #dbdad5;
    border-top-color: #006D77;
    border-radius: 50%;
    animation: jf-spin .8s linear infinite;
}
@keyframes jf-spin { to { transform: rotate(360deg); } }

/* ── Editor-Hinweis ──────────────────────────────────────────────────────── */
.jfilter-editor-hint {
    border: 1px dashed #dbdad5;
    padding: 12px 16px;
    font-size: 12px;
    color: #9A9A9A;
    line-height: 1.6;
    margin-bottom: 16px;
}
.jfilter-editor-hint code {
    background: #f0ede6;
    padding: 1px 5px;
    font-size: 11px;
}

/* ── Horizontal-Layout ───────────────────────────────────────────────────── */
.jfilter-layout-horizontal .jfilter-controls {
    display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: flex-end;
}
.jfilter-layout-horizontal .jfilter-group { margin-bottom: 0; min-width: 140px; }
.jfilter-layout-horizontal .jfilter-actions { margin-top: 0; }
