/* ============================================================
   WC Produkt Filter v2 – Popup Modal
   ============================================================ */

/* ---- Trigger Bar ---- */
.wcpf-trigger-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wcpf-btn-open {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background .15s, transform .1s;
}
.wcpf-btn-open:hover { background: #333; }
.wcpf-btn-open:active { transform: scale(.97); }

.wcpf-count {
    background: #fff;
    color: #111;
    border-radius: 50%;
    width: 20px; height: 20px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.wcpf-btn-clear {
    background: #e53e3e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    cursor: pointer;
    transition: background .15s;
}
.wcpf-btn-clear:hover { background: #c53030; }

/* ---- Active Tag Pills ---- */
.wcpf-active-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wcpf-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 2px solid #0bc5c5;
    border-radius: 99px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    color: #111;
}
.wcpf-tag-remove {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 11px;
    color: #e53e3e;
    line-height: 1;
    padding: 0;
}

/* ---- Overlay ---- */
.wcpf-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9998;
    backdrop-filter: blur(2px);
}
.wcpf-overlay.wcpf-visible { display: block; }

/* ---- Modal ---- */
.wcpf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}
.wcpf-modal.wcpf-visible {
    display: flex;
    pointer-events: all;
}

.wcpf-modal-inner {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px 28px;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-shadow: 0 24px 80px rgba(0,0,0,.25);
    animation: wcpf-slide-in .22s cubic-bezier(.34,1.4,.64,1) both;
}

@keyframes wcpf-slide-in {
    from { opacity: 0; transform: translateY(24px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.wcpf-modal-inner::-webkit-scrollbar { width: 4px; }
.wcpf-modal-inner::-webkit-scrollbar-track { background: transparent; }
.wcpf-modal-inner::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }

/* ---- Modal Header ---- */
.wcpf-modal-close {
    position: absolute;
    top: 18px; right: 20px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color .15s;
}
.wcpf-modal-close:hover { color: #111; }

.wcpf-modal-title {
    margin: 0 0 24px;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #111;
    letter-spacing: -.3px;
}

/* ---- Groups ---- */
.wcpf-group {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
}
.wcpf-group:last-of-type { border-bottom: none; }

.wcpf-group-label {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    color: #111;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

/* ---- Category Checkboxes ---- */
.wcpf-cat-box {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    padding: 4px 0;
}

.wcpf-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: #111;
    cursor: pointer;
    transition: background .1s;
}
.wcpf-cat-item:hover { background: #f9fafb; }
.wcpf-cat-item input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
    flex-shrink: 0;
}

/* ---- Color Swatches ---- */
.wcpf-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wcpf-swatch {
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    position: relative;
    transition: transform .12s, border-color .12s, box-shadow .12s;
    padding: 0;
    outline: none;
    flex-shrink: 0;
    box-shadow: 0 0 0 1.5px rgba(0,0,0,.12);
}
.wcpf-swatch:hover {
    transform: scale(1.12);
    box-shadow: 0 0 0 2px rgba(0,0,0,.2);
}
.wcpf-swatch--active {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px #0891b2, 0 0 0 5px rgba(8,145,178,.15);
    transform: scale(1.08);
}
.wcpf-swatch--empty {
    background: #fff !important;
    border: 2px dashed #d1d5db !important;
    box-shadow: none !important;
}
.wcpf-swatch--empty:hover { border-color: #9ca3af !important; }

/* ---- Price Input ---- */
.wcpf-price-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #111;
    outline: none;
    transition: border-color .15s;
    font-family: inherit;
}
.wcpf-price-input::placeholder { color: #9ca3af; }
.wcpf-price-input:focus { border-color: #0891b2; box-shadow: 0 0 0 3px rgba(8,145,178,.1); }

/* ---- Apply Button ---- */
.wcpf-btn-apply {
    width: 100%;
    padding: 16px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    cursor: pointer;
    margin-top: 8px;
    transition: background .15s, transform .1s;
}
.wcpf-btn-apply:hover { background: #333; }
.wcpf-btn-apply:active { transform: scale(.98); }
