/* Filtri catalogo v1 — nomi prefissati fc- per non interferire con il tema */
.fc {
    --fc-ink: #181818;
    --fc-border: #e5e7eb;
    --fc-muted: #666;
    --fc-bg: #f4f4f5;
    --fc-focus: #087e92;
    position: relative;
    z-index: 20;
    box-sizing: border-box;
    margin: 24px 0 20px;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--fc-ink)
}
.fc * {
    box-sizing: border-box
}
.fc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px
}
.fc-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap
}
.fc-heading {
    font-weight: 700;
    font-size: 17px
}
.fc-total {
    font-size: 13px;
    color: var(--fc-muted);
    font-weight: 500
}
.fc-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--fc-border);
    padding: 0 0 16px
}
.fc-filters {
    display: flex;
    flex: 1;
    gap: 8px;
    align-items: flex-start;
    flex-wrap: wrap;
    min-width: 0
}
.fc-filter {
    position: relative;
    flex: 0 0 auto
}
.fc-filter > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 39px;
    padding: 10px 14px;
    background: var(--fc-bg);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    user-select: none;
    white-space: nowrap
}
.fc-filter > summary::-webkit-details-marker {
    display: none
}
.fc-filter > summary::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 2px;
    transition: transform .15s
}
.fc-filter[open] > summary {
    border-color: var(--fc-ink);
    background: #fff
}
.fc-filter[open] > summary::after {
    transform: rotate(225deg) translateY(-1px)
}
.fc-filter-count {
    display: none;
    min-width: 17px;
    text-align: center;
    padding: 2px 5px;
    font-size: 10px;
    border-radius: 999px;
    color: #fff;
    background: var(--fc-ink)
}
.fc-filter-count.is-visible {
    display: inline-flex;
    justify-content: center
}
.fc-menu {
    position: absolute;
    z-index: 200;
    top: calc(100% + 9px);
    left: 0;
    width: 288px;
    max-height: 350px;
    overflow-y: auto;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--fc-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .15)
}
.fc-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.35
}
.fc-option:hover {
    background: #f6f7f8
}
.fc-option input {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    accent-color: #191919;
    margin: 0
}
.fc-option span {
    flex: 1
}
.fc-option small {
    font-size: 11px;
    color: var(--fc-muted)
}
.fc-price-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 4px 0 14px
}
.fc-price-fields label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    font-weight: 600
}
.fc-price-fields input {
    min-width: 0;
    width: 100%;
    padding: 10px 9px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px
}
.fc-reset-single {
    border: 0;
    background: transparent;
    color: var(--fc-ink);
    font-size: 12px;
    font-weight: 700;
    padding: 10px 8px;
    margin-top: 7px;
    border-top: 1px solid #eee;
    text-align: left;
    display: block;
    width: 100%;
    cursor: pointer
}
.fc-reset-single:hover {
    text-decoration: underline
}
.fc-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 0 0 auto
}
.fc-order-label {
    font-size: 12px;
    color: var(--fc-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap
}
.fc-order-label select {
    background: #fff;
    color: var(--fc-ink);
    border: 1px solid var(--fc-border);
    border-radius: 999px;
    padding: 10px 25px 10px 10px;
    font-size: 12px;
    max-width: 175px
}
.fc-reset-all {
    background: #fff;
    border: 1.5px solid #e11d48;
    color: #e11d48;
    border-radius: 999px;
    padding: 10px 13px;
    white-space: nowrap;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer
}
.fc-reset-all:hover, .fc-reset-all.has-filters {
    background: #fff1f4
}
.fc-feedback {
    font-size: 12px;
    color: #52525b;
    margin-top: 7px;
    min-height: 2px
}
.fc-loading #fc-total {
    opacity: .5
}
.fc-no-results {
    padding: 54px 20px;
    text-align: center;
    background: #f8f8f8;
    border-radius: 14px
}
.fc-no-results strong {
    font-size: 17px
}
.fc-no-results p {
    font-size: 13px;
    color: #666
}
.fc-mobile-trigger, .fc-mobile-head, .fc-mobile-footer {
    display: none
}
.fc-backdrop[hidden] {
    display: none !important
}
.fc-filter > summary:focus-visible, .fc-option input:focus-visible, .fc button:focus-visible, .fc select:focus-visible {
    outline: 3px solid var(--fc-focus);
    outline-offset: 2px
}
@media(max-width:1220px) and (min-width:769px) {
    .fc-form {
        flex-direction: column
    }
    .fc-tools {
        width: 100%;
        justify-content: space-between
    }
    .fc-menu {
        z-index: 250
    }
}
@media(max-width:768px) {
    .fc {
        margin: 16px 0
    }
    .fc.fc-mobile-open {
        z-index: 999999
    }
    .fc-header {
        margin-bottom: 12px
    }
    .fc-heading {
        font-size: 15px
    }
    .fc-mobile-trigger {
        display: inline-flex;
        background: var(--fc-ink);
        border: 0;
        border-radius: 9px;
        color: #fff;
        padding: 11px 13px;
        font-weight: 700;
        font-size: 12px;
        cursor: pointer;
        white-space: nowrap
    }
    .fc-form {
        position: fixed;
        z-index: 100002;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(100%, 420px);
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        background: #fff;
        overflow-y: auto;
        box-shadow: -15px 0 50px rgba(0, 0, 0, .18);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .23s ease, visibility .23s
    }
    .fc-mobile-open .fc-form {
        transform: translateX(0);
        visibility: visible
    }
    .fc-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        z-index: 100001;
        inset: 0;
        background: rgba(0, 0, 0, .46)
    }
    .fc-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
        padding: 19px 20px;
        border-bottom: 1px solid var(--fc-border)
    }
    .fc-mobile-head strong {
        font-size: 18px
    }
    #fc-mobile-close {
        background: #f4f4f5;
        border: 0;
        border-radius: 100%;
        height: 36px;
        width: 36px;
        font-size: 27px;
        cursor: pointer;
        line-height: 1
    }
    .fc-filters {
        flex: 1;
        display: block;
        width: 100%;
        padding: 10px 16px;
        overflow: visible
    }
    .fc-filter {
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--fc-border)
    }
    .fc-filter > summary {
        background: #fff;
        border: 0;
        border-radius: 0;
        padding: 17px 8px;
        font-size: 14px;
        justify-content: space-between
    }
    .fc-filter[open] > summary {
        border: 0;
        background: #fff
    }
    .fc-filter > summary::after {
        margin-left: auto
    }
    .fc-menu {
        position: static;
        box-shadow: none;
        width: 100%;
        border: 0;
        max-height: none;
        padding: 0 2px 14px;
        border-radius: 0
    }
    .fc-tools {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 15px 24px;
        border-top: 1px solid var(--fc-border);
        gap: 14px
    }
    .fc-order-label {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
        font-weight: 600
    }
    .fc-order-label select {
        max-width: none;
        width: 100%;
        border-radius: 9px;
        padding: 12px;
        font-size: 14px
    }
    .fc-reset-all {
        align-self: center
    }
    .fc-mobile-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 12px 20px;
        display: block;
        width: 100%;
        border-top: 1px solid var(--fc-border)
    }
    #fc-show-results {
        display: block;
        width: 100%;
        background: #171717;
        color: #fff;
        border: 0;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        padding: 15px;
        cursor: pointer
    }
    body.fc-lock-scroll {
        overflow: hidden
    }
}
@media(prefers-reduced-motion:reduce) {
    .fc-form {
        transition: none !important
    }
}
/* ===== V1.2 - Ordina per e' una pill con menu come tutti gli altri filtri ===== */
.fc-sort {
    position: relative;
    flex: 0 0 auto
}
.fc-sort-current {
    font-size: 12px;
    font-weight: 500;
    color: #9f9f9f;
    padding-left: 9px;
    border-left: 1px solid #d1d5db
}
.fc-sort > .fc-menu {
    left: auto;
    right: 0;
    width: 242px
}
.fc-sort .fc-option input[type=radio] {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    accent-color: #191919;
    margin: 0
}
@media(max-width:768px) {
    .fc-sort {
        width: 100%
    }
    .fc-sort > summary {
        padding: 17px 8px;
        border-radius: 0;
        justify-content: space-between
    }
    .fc-sort > .fc-menu {
        position: static;
        left: auto;
        right: auto;
        width: 100%;
        max-height: none;
        box-shadow: none;
        border: 0;
        padding: 0 2px 14px
    }
    .fc-sort-current {
        margin-left: auto
    }
}

/* ==========================================
   FILTRI DESKTOP - PULSANTI SCURI
   Solo schermi superiori a 769px
========================================== */

@media (min-width: 769px) {

    /* FILTRO CHIUSO */
    .fc .fc-filter > summary {
        background: #252525;
        color: #FFFFFF;
        border: 1px solid #252525;
        transition: background .2s ease,
                    color .2s ease,
                    border-color .2s ease;
    }

    /* HOVER */
    .fc .fc-filter:not([open]) > summary:hover {
        background: #3A3A3A;
        border-color: #3A3A3A;
    }

    /* FILTRO APERTO */
    .fc .fc-filter[open] > summary {
        background: #FFFFFF;
        color: #252525;
        border: 1px solid #252525;
    }

    /* CONTATORE SELEZIONI - FILTRO CHIUSO */
    .fc .fc-filter:not([open]) .fc-filter-count {
        background: #FFFFFF;
        color: #252525;
    }

    /* CONTATORE SELEZIONI - FILTRO APERTO */
    .fc .fc-filter[open] .fc-filter-count {
        background: #252525;
        color: #FFFFFF;
    }

}