/* ── Finder Layout ── */
.pf-finder-wrap {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    color: #fff;
    max-width: 100%;
    padding: 24px 0;
}

/* ── Mobile Filter Toggle Button ── */
.pf-filter-toggle-btn {
    display: none;
    align-items: center;
    gap: 10px;
    background: #1c2033;
    border: 1px solid #353d58;
    color: #fff;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 0;
    width: 100%;
    transition: all 0.18s;
}
.pf-filter-toggle-btn:hover {
    border-color: #e95178;
    color: #e95178;
}
.pf-filter-toggle-btn svg { flex-shrink: 0; }

/* ── Mobile Filter Panel ── */
.pf-mobile-filter-panel {
    display: none;
    background: #1c2033;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}
.pf-mobile-filter-panel.is-open { display: block; }

/* ════════════════════════════════════════════════════
   SIDEBAR – Zweigeteilt:
   Oben: Filter (scrollbar, bekommt den meisten Platz)
   Unten: CTA (kompakt, immer sichtbar)
   ════════════════════════════════════════════════════ */
.pf-finder-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    background: #1c2033;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Filter-Bereich: bekommt allen verfügbaren Platz, scrollt intern */
.pf-sidebar-filters {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    padding: 20px 20px 12px;
    min-height: 0; /* kritisch für flex + overflow */
}
.pf-sidebar-filters::-webkit-scrollbar { display: none; }

/* CTA-Bereich: kompakt, max 220px, nie kleiner als Inhalt */
.pf-sidebar-contact {
    flex: 0 0 auto;
    border-top: 1px solid #2a3048;
    overflow: hidden;
    /* Nur writing-mode fixen – alles andere GB überlassen */
    writing-mode: horizontal-tb;
}

/* writing-mode nur auf Textelemente zurücksetzen, nicht auf Layout-Elemente */
.pf-sidebar-contact h1,
.pf-sidebar-contact h2,
.pf-sidebar-contact h3,
.pf-sidebar-contact p,
.pf-sidebar-contact span,
.pf-sidebar-contact a,
.pf-sidebar-contact li {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    letter-spacing: normal;
}

/* Äußersten Container auf Sidebar-Breite begrenzen */
.pf-sidebar-contact > div {
    width: 100%;
    max-width: 100%;
}

/* Bilder nicht überlaufen lassen */
.pf-sidebar-contact img {
    max-width: 100%;
    height: auto;
}

/* GB Bild-Div: Background-Image sichtbar machen.
   Das erste GB-Element im cta--small ist immer das Bild-Div. */
.pf-sidebar-contact .cta--small > div:first-child {
    min-height: 150px;
    max-height: 150px; /* verhindert dass es sich auf 521px streckt */
    background-image: var(--inline-bg-image);
    background-size: cover;
    background-position: center;
}

/* cta--small Grid auf Sidebar-Breite anpassen */
.pf-sidebar-contact .cta--small {
    width: 100%;
    grid-template-columns: 120px 1fr; /* statt 141.5px + 141.5px */
}

.pf-sidebar-overlay { display: none !important; }
.pf-sidebar-close { display: none !important; }

/* ── Filter Reset ── */
.pf-filter-reset-wrap { margin-bottom: 16px; }
.pf-filter-reset {
    width: 100%;
    background: transparent;
    border: 1px solid #353d58;
    color: #8b91a8;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 0.82em;
    cursor: pointer;
    text-align: center;
    transition: all 0.18s;
}
.pf-filter-reset:hover { border-color: #e95178; color: #fff; }

/* ── Filter Gruppen ── */
.pf-filter-group { border-bottom: 1px solid #2a3048; }
.pf-filter-group:last-child { border-bottom: none; }
.pf-filter-group-toggle {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
    padding: 12px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
}
.pf-filter-arrow {
    font-size: 1em;
    color: #8b91a8;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.pf-filter-group--open .pf-filter-arrow { transform: rotate(180deg); }
.pf-filter-group-body { display: none; padding-bottom: 12px; }
.pf-filter-group--open .pf-filter-group-body { display: block; }

/* ── Checkboxen ── */
.pf-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    font-size: 0.82em;
    color: #c5c9d8;
}
.pf-filter-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #e95178;
    cursor: pointer;
    flex-shrink: 0;
    background: transparent;
}
.pf-filter-checkbox:hover span { color: #fff; }

/* ── Range Slider ── */
.pf-range-wrap {
    position: relative;
    height: 28px;
    margin: 10px 0 6px;
}
.pf-range-track {
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 3px;
    background: #111925;
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
}
.pf-range-fill {
    position: absolute;
    height: 100%;
    background: #e95178;
    border-radius: 2px;
    pointer-events: none;
}
.pf-range {
    position: absolute;
    width: 100%;
    height: 28px;
    background: transparent !important;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    top: 50%;
    transform: translateY(-50%);
    margin: 0; padding: 0;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
}
.pf-range::-webkit-slider-runnable-track {
    background: transparent !important;
    border: none !important;
    height: 3px;
}
.pf-range::-moz-range-track {
    background: transparent !important;
    border: none !important;
    height: 3px;
}
.pf-range::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #e95178 !important;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
    margin-top: 0;
    position: relative;
    z-index: 3;
}
.pf-range::-moz-range-thumb {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #e95178 !important;
    cursor: pointer;
    pointer-events: all;
    border: 2px solid #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important;
}
.pf-range--min { z-index: 3; }
.pf-range--max { z-index: 2; }

.pf-range-inputs { display: flex; gap: 8px; margin-top: 8px; }
.pf-range-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    background: #111925 !important;
    border: 1px solid #353d58 !important;
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.78em;
    min-width: 0;
    box-shadow: none !important;
}
.pf-range-input-wrap label { color: #8b91a8; font-size: 0.85em; white-space: nowrap; flex-shrink: 0; }
.pf-range-input-wrap span { color: #8b91a8; font-size: 0.85em; flex-shrink: 0; }
.pf-range-input {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 0.9em;
    width: 100%;
    min-width: 0;
    outline: none !important;
    padding: 0 !important;
    -moz-appearance: textfield;
}
.pf-range-input::-webkit-outer-spin-button,
.pf-range-input::-webkit-inner-spin-button { display: none; }
.pf-range-input:focus {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ── Main ── */
.pf-finder-main { min-width: 0; }
.pf-finder-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
}
.pf-finder-count { font-size: 0.85em; color: #8b91a8; }

/* ── Kamera Grid ── */
.pf-finder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ── Kamera Karte ── */
.pf-camera-card {
    background: #1c2033;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s, box-shadow 0.18s;
}
.pf-camera-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.pf-card-top {
    background: #e8eaf0;
    display: flex;
    flex-direction: column;
}
.pf-card-image-wrap {
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
}
.pf-card-image-wrap img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.3s;
}
.pf-camera-card:hover .pf-card-image-wrap img { transform: scale(1.04); }
.pf-card-name-wrap { padding: 12px 16px 14px; }
.pf-camera-card a,
.pf-camera-card a:visited { transition: none !important; }
.pf-card-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #111 !important;
    text-decoration: none !important;
    line-height: 1.3;
    display: block;
    transition: color 0.18s !important;
}
.pf-card-title:hover { color: #e95178 !important; }
.pf-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #1c2033;
}
.pf-card-props {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    flex: 1;
}
.pf-card-props li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    border-bottom: 1px solid #2a3048;
    font-size: 0.78em;
}
.pf-card-props li:last-child { border-bottom: none; }
.pf-card-prop-label { color: #8b91a8; font-size: 0.85em; }
.pf-card-prop-value { color: #fff; font-weight: 500; }
.pf-card-btn {
    display: block;
    text-align: center;
    background: transparent;
    border: 1px solid #e95178;
    color: #e95178;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 0.82em;
    text-decoration: none;
    transition: all 0.18s;
    margin-top: auto;
}
.pf-card-btn:hover { background: #e95178; color: #fff; }

/* ── Grid Wrapper + Loading Overlay ── */
.pf-finder-grid-wrap { position: relative; min-height: 200px; }
.pf-finder-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    z-index: 10;
    border-radius: 12px;
}
.pf-spinner {
    width: 28px; height: 28px;
    border: 3px solid #2a3048;
    border-top-color: #e95178;
    border-radius: 50%;
    animation: pf-spin 0.7s linear infinite;
}
@keyframes pf-spin { to { transform: rotate(360deg); } }
.pf-finder-empty {
    text-align: center; color: #8b91a8;
    padding: 40px; font-size: 0.9em;
}

/* ── CTA unterhalb des Finders (page-produkte.php Fallback) ── */
.pf-finder-contact {
    margin-top: 40px;
    width: 100%;
}

/* Lila Gutenberg-Button-Outline entfernen */
.pf-related-load-more,
.pf-related-load-more:focus,
.pf-related-load-more:active {
    outline: none !important;
    box-shadow: none !important;
    border-color: #353d58 !important;
    color: #c5c9d8 !important;
    background: transparent !important;
}
.pf-related-load-more:hover {
    border-color: #e95178 !important;
    color: #fff !important;
}

/* ── Responsive: Tablet ── */
@media (max-width: 1200px) {
    .pf-finder-wrap { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; }
    .pf-finder-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
    .pf-filter-toggle-btn { display: flex; }

    .pf-finder-wrap {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }
    .pf-finder-sidebar { display: none !important; }

    .pf-mobile-filter-panel {
        display: none;
        background: #1c2033;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
    }
    .pf-mobile-filter-panel.is-open { display: block; }

    .pf-finder-grid { grid-template-columns: 1fr; gap: 12px; }
    .pf-camera-card { flex-direction: column !important; }
    .pf-card-image-wrap {
        width: 100% !important;
        min-width: unset !important;
        aspect-ratio: 4/3 !important;
    }
    .pf-card-image-wrap img { height: 100%; padding: 16px; }
    .pf-card-body { padding: 14px; }
    .pf-card-excerpt { display: block; }

    /* CTA auf Mobile nicht in Sidebar (die ist ausgeblendet) */
    .pf-sidebar-contact { display: none; }
}

/* ── Marke in Kamera-Karte ── */
.pf-card-brand {
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888 !important;
    font-weight: 600;
    margin-bottom: 3px;
}

/* ── Pagination ── */
.pf-pagination {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #2a3048;
}
.pf-page-count { font-size: 0.82em; color: #8b91a8; }
.pf-page-nav { display: flex; align-items: center; gap: 8px; }
.pf-page-btn {
    background: transparent;
    border: 1px solid #353d58;
    color: #c5c9d8;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pf-page-num {
    background: #fff;
    border: 1px solid #fff;
    color: #111;
    border-radius: 50%;
    width: 36px; height: 36px;
    cursor: pointer;
    font-size: 0.88em;
    font-weight: 500;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pf-page-btn:hover:not(:disabled) { border-color: #e95178; color: #e95178; }
.pf-page-num:hover { border-color: #e95178; color: #e95178; }
.pf-page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.pf-page-num--active { background: #e95178; border-color: #e95178; color: #fff !important; }