/* ============================================================
   PFC Shop Filters — pfc.css
   Colours are owned outright (not inherited from the theme) so
   every state stays legible and consistent everywhere.
   ============================================================ */

:root {
    --pfc-brand: #a30754;
    --pfc-brand-text: #ffffff;
    --pfc-bg: #f7f7f7;
    --pfc-border: rgba(0, 0, 0, .1);
    --pfc-text-muted: #888;
}

/* ---- Sidebar container ---- */
.pfc-sidebar {
    font-size: inherit;
    margin-top: 40px;
    background: var(--pfc-bg);
    padding: 20px;
    border-radius: 4px;
}

.pfc-sidebar__title {
    margin: 0 0 1em;
    font-size: 1.1em;
    font-weight: 700;
}

/* ---- Mobile: collapsible sidebar toggle button ---- */
.pfc-mobile-toggle {
    display: none;
    width: 100%;
    background: var(--pfc-brand);
    color: var(--pfc-brand-text);
    border: none;
    padding: .8em 1em;
    font: inherit;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    text-align: left;
    border-radius: 3px;
    align-items: center;
    justify-content: space-between;
}

.pfc-mobile-toggle__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: .5em;
}

.pfc-mobile-toggle.is-open .pfc-mobile-toggle__arrow {
    transform: rotate(180deg);
}

@media (max-width: 760px) {
    .pfc-sidebar {
        margin-top: 0;
        padding: 0;
        overflow: hidden;
        margin-bottom: 1.5em;
    }

    .pfc-mobile-toggle {
        display: flex;
    }

    .pfc-sidebar__title {
        display: none;
    }

    .pfc-filters-collapsible {
        display: none;
        padding: 15px;
    }

    .pfc-filters-collapsible.is-open {
        display: block;
    }

    .pfc-active-filters {
        padding: .75em 15px !important;
    }
}

/* ---- Filter group ---- */
.pfc-group {
    border-bottom: 1px solid var(--pfc-border);
}

.pfc-group:last-child {
    border-bottom: none;
}

.pfc-group__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: .75em 5px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    color: inherit;
    border-radius: 3px;
}

.pfc-group__toggle:hover,
.pfc-group__toggle:focus,
.pfc-group__toggle:focus-visible,
.pfc-group__toggle:active {
    background-color: var(--pfc-brand);
    color: var(--pfc-brand-text);
    outline: none;
}

@media (max-width: 760px) {
    .pfc-group__toggle {
        padding: .9em 5px;
    }
}

.pfc-group__title {
    padding: .75em 0 .25em;
    margin: 0;
    font-size: 1em;
    font-weight: 600;
}

.pfc-group__arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform .2s;
    flex-shrink: 0;
    margin-left: .5em;
}

.pfc-group.is-open .pfc-group__arrow {
    transform: rotate(180deg);
}

.pfc-group__body {
    overflow: hidden;
    max-height: 0;
    transition: max-height .25s ease;
}

.pfc-group.is-open .pfc-group__body {
    max-height: 2000px;
    padding-bottom: .75em;
}

.pfc-group__body--open,
.pfc-group--always-open .pfc-group__body {
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: .75em;
}

/* ---- Checklist ---- */
.pfc-checklist {
    list-style: none !important;
    margin: 0 !important;
    padding: 5px !important;
}

.pfc-checklist__item {
    margin: .3em 0;
    padding: 0;
    list-style: none !important;
    background-image: none !important;
}

@media (max-width: 760px) {
    .pfc-checklist__item {
        margin: .45em 0;
    }
}

.pfc-checklist__item::before,
.pfc-checklist__item::marker {
    display: none !important;
    content: '' !important;
}

.pfc-checklist__label {
    display: flex;
    align-items: center;
    gap: .5em;
    cursor: pointer;
    font-size: .9em;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .pfc-checklist__label {
        padding: .35em 0;
        font-size: 1em;
    }
}

.pfc-checklist__label:hover .pfc-checklist__name {
    text-decoration: underline;
}

.pfc-checklist__checkbox {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    cursor: pointer;
    margin: 0;
    accent-color: var(--pfc-brand);
}

@media (max-width: 760px) {
    .pfc-checklist__checkbox {
        width: 18px;
        height: 18px;
    }
}

.pfc-checklist__count {
    color: var(--pfc-text-muted);
    font-size: .85em;
    margin-left: auto;
    padding-left: .25em;
}

/* ---- Search group ---- */
.pfc-search {
    display: flex;
    gap: .25em;
}

.pfc-search__input {
    flex: 1;
    min-width: 0;
    padding: .5em .7em;
    font: inherit;
    font-size: .9em;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 3px;
    background: #fff;
    color: inherit;
}

@media (max-width: 760px) {
    .pfc-search__input {
        font-size: 1em;
        padding: .55em .7em;
    }
}

.pfc-search__btn {
    padding: .5em .7em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--pfc-brand);
    color: var(--pfc-brand-text);
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.pfc-search__btn:hover,
.pfc-search__btn:focus {
    filter: brightness(1.1);
}

@media (max-width: 760px) {
    .pfc-search__btn {
        padding: .55em .8em;
    }

    .pfc-search__btn svg {
        width: 20px;
        height: 20px;
    }
}

.pfc-search__btn svg {
    display: block;
}

.pfc-apply {
    display: block;
    width: 100%;
    margin-top: .75em;
    background: var(--pfc-brand);
    color: var(--pfc-brand-text);
    border: none;
    padding: .6em;
    border-radius: 3px;
    cursor: pointer;
}

/* ---- Active filters ---- */
.pfc-active-filters {
    padding: .75em 0;
    border-top: 1px solid var(--pfc-border);
    margin-top: .5em;
}

.pfc-active-filters__title {
    margin: 0 0 .5em;
    font-size: .9em;
    font-weight: 600;
}

.pfc-active-filters__list {
    list-style: none !important;
    margin: 0 0 .5em !important;
    padding: 0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: .35em;
}

.pfc-active-filters__list li {
    list-style: none !important;
    background-image: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pfc-active-filters__chip {
    display: inline-flex;
    align-items: center;
    gap: .3em;
    background: rgba(0, 0, 0, .07);
    border-radius: 2em;
    padding: .3em .7em;
    font-size: .8em;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .pfc-active-filters__chip {
        font-size: .9em;
        padding: .35em .8em;
    }
}

.pfc-active-filters__remove {
    text-decoration: none;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    color: inherit;
    padding: 0 0 0 .1em;
    opacity: .7;
}

.pfc-active-filters__remove:hover {
    opacity: 1;
}

@media (max-width: 760px) {
    .pfc-active-filters__remove {
        font-size: 1.3em;
        padding: 0 0 0 .3em;
    }
}

.pfc-active-filters__clear {
    display: inline-block;
    font-size: .85em;
    background: var(--pfc-brand);
    color: var(--pfc-brand-text);
    text-decoration: none;
    padding: .4em .9em;
    border-radius: 3px;
}

.pfc-active-filters__clear:hover,
.pfc-active-filters__clear:focus {
    filter: brightness(1.1);
    color: var(--pfc-brand-text);
}

@media (max-width: 760px) {
    .pfc-active-filters__clear {
        font-size: .95em;
        padding: .5em 1em;
    }
}
