/* =================================================
 * FAZZIONE PRODUCT FILTERS
 * ================================================= */
.fz-pf-widget {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}
.fz-pf-widget *,
.fz-pf-widget *::before,
.fz-pf-widget *::after { box-sizing: border-box; }

.fz-pf-notice {
    padding: 16px;
    background: #FFF7ED;
    border-left: 3px solid #F59E0B;
    color: #92400E;
    font-size: 13px;
    border-radius: 6px;
}

/* ============ GRUPO ============ */
.fz-pf-group {
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 16px;
}
.fz-pf-group:last-of-type {
    border-bottom: none;
}
.fz-pf-group-title {
    width: 100%;
    background: none;
    border: none;
    padding: 0 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 700;
    color: #0F2A33;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
}
.fz-pf-arrow {
    font-size: 16px;
    transition: transform .25s ease;
    line-height: 1;
}
.fz-pf-group.is-collapsed .fz-pf-arrow { transform: rotate(-90deg); }
.fz-pf-group.is-collapsed .fz-pf-group-body { display: none; }

.fz-pf-group-body {
    padding-top: 4px;
}

.fz-pf-empty {
    color: #94A3B8;
    font-size: 13px;
    font-style: italic;
    margin: 4px 0;
}

/* ============ COR SWATCH ============ */
.fz-pf-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fz-pf-color {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #E5E7EB;
    padding: 0;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
    position: relative;
}
.fz-pf-color:hover {
    transform: scale(1.1);
}
.fz-pf-color.is-active {
    box-shadow: 0 0 0 2px #2BC4D9;
    transform: scale(1.1);
}
.fz-pf-color.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============ BUTTON ============ */
.fz-pf-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.fz-pf-button {
    background: #fff;
    border: 1.5px solid #E5E7EB;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    color: #475569;
    line-height: 1.2;
}
.fz-pf-button:hover {
    border-color: #2BC4D9;
    color: #0A4A5C;
}
.fz-pf-button.is-active {
    background: #2BC4D9;
    border-color: #2BC4D9;
    color: #fff;
}
.fz-pf-button small {
    margin-left: 4px;
    opacity: 0.7;
    font-weight: 500;
}
.fz-pf-button.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============ CHECKBOX / RADIO ============ */
.fz-pf-checkboxes,
.fz-pf-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.fz-pf-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    padding: 4px 0;
    transition: opacity .2s ease;
}
.fz-pf-checkbox.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
.fz-pf-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.fz-pf-checkbox-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid #CBD5E1;
    border-radius: 4px;
    background: #fff;
    position: relative;
    flex-shrink: 0;
    transition: all .2s ease;
}
.fz-pf-radio-box { border-radius: 50%; }
.fz-pf-checkbox input:checked + .fz-pf-checkbox-box {
    background: #2BC4D9;
    border-color: #2BC4D9;
}
.fz-pf-checkbox input:checked + .fz-pf-checkbox-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.fz-pf-checkbox input:checked + .fz-pf-radio-box::after {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #fff;
    border: none;
}
.fz-pf-option-label {
    flex: 1;
    color: #475569;
    line-height: 1.3;
}
.fz-pf-count {
    color: #94A3B8;
    font-size: 12px;
    font-weight: 500;
}

/* ============ DROPDOWN ============ */
.fz-pf-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    color: #475569;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'><polyline points='6,9 12,15 18,9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ============ RANGE ============ */
.fz-pf-range {
    padding: 8px 6px 0;
}
.fz-pf-range-slider {
    position: relative;
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    margin: 18px 6px;
}
.fz-pf-range-track { display: none; }
.fz-pf-range-fill {
    position: absolute;
    top: 0;
    height: 100%;
    background: #2BC4D9;
    border-radius: 3px;
    pointer-events: none;
}
.fz-pf-range-handle {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    background: #2BC4D9;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    border-radius: 50%;
    cursor: grab;
    transform: translate(-50%, -50%);
    z-index: 2;
    touch-action: none;
}
.fz-pf-range-handle:active { cursor: grabbing; }

.fz-pf-range-inputs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.fz-pf-range-input {
    flex: 1;
}
.fz-pf-range-input label {
    display: block;
    font-size: 11px;
    color: #94A3B8;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.fz-pf-range-input input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: 13px;
}
.fz-pf-range-display {
    margin-top: 10px;
    font-size: 12px;
    color: #475569;
    text-align: center;
    font-weight: 600;
}

/* ============ TOGGLE ============ */
.fz-pf-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
}
.fz-pf-toggle input {
    position: absolute;
    opacity: 0;
}
.fz-pf-toggle-slider {
    width: 38px;
    height: 22px;
    background: #CBD5E1;
    border-radius: 11px;
    position: relative;
    transition: background .25s ease;
}
.fz-pf-toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.fz-pf-toggle input:checked + .fz-pf-toggle-slider {
    background: #2BC4D9;
}
.fz-pf-toggle input:checked + .fz-pf-toggle-slider::after {
    transform: translateX(16px);
}

/* ============ VER MAIS ============ */
.fz-pf-hidden-overflow { display: none !important; }
.fz-pf-group.is-expanded .fz-pf-hidden-overflow { display: inherit !important; }
.fz-pf-show-more {
    margin-top: 8px;
    background: none;
    border: none;
    color: #2BC4D9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}
.fz-pf-show-more:hover { text-decoration: underline; }

/* ============ AÇÕES ============ */
.fz-pf-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}
.fz-pf-clear {
    background: none;
    border: none;
    color: #2BC4D9;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px;
    text-align: center;
}
.fz-pf-clear:hover { text-decoration: underline; }
.fz-pf-apply-mobile {
    display: none;
    background: #2BC4D9;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

/* ============ CHIPS ATIVOS ============ */
.fz-pf-active-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.fz-pf-active-chips:empty { display: none; }
.fz-pf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2BC4D9;
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.fz-pf-chip-remove {
    background: rgba(255,255,255,0.3);
    border: none;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

/* ============ LOADING ============ */
.fz-pf-loading [data-fz-listing] {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity .25s ease;
    position: relative;
}
.fz-pf-loading [data-fz-listing]::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: #2BC4D9;
    border-radius: 50%;
    animation: fzPfSpin 0.8s linear infinite;
}
@keyframes fzPfSpin {
    to { transform: translateX(-50%) rotate(360deg); }
}

/* ============ DRAWER HEADER (escondido em desktop) ============ */
.fz-pf-drawer-header { display: none; }

/* ============ MOBILE DRAWER ============ */
.fz-pf-mobile-btn {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #2BC4D9;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 24px rgba(43, 196, 217, 0.5);
    cursor: pointer;
    z-index: 9990;
    align-items: center;
    gap: 8px;
}
.fz-pf-mobile-badge {
    background: #fff;
    color: #2BC4D9;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.fz-pf-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity .3s ease;
}
.fz-pf-backdrop.is-open {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    .fz-pf-mobile-btn { display: inline-flex; }

    .fz-pf-widget.has-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: 88%;
        max-width: 380px;
        height: 100vh;
        background: #fff;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform .3s ease;
        overflow-y: auto;
        padding: 16px 16px 100px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    }
    .fz-pf-widget.has-drawer.is-open {
        transform: translateX(0);
    }
    .fz-pf-widget.has-drawer .fz-pf-drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 12px;
        border-bottom: 1px solid #E5E7EB;
        margin-bottom: 8px;
    }
    .fz-pf-drawer-title {
        font-size: 16px;
        font-weight: 700;
        color: #0F2A33;
    }
    .fz-pf-drawer-close {
        background: none;
        border: none;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        color: #475569;
        padding: 0;
        width: 32px;
        height: 32px;
    }

    /* No mobile drawer, mostra botão Aplicar fixo */
    .fz-pf-widget.has-drawer .fz-pf-apply-mobile {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 88%;
        max-width: 380px;
        margin: 0 auto;
        right: 0;
        border-radius: 0;
        z-index: 10000;
    }
}
