/* Princess Lucy Site – Filterbalk boven de producten (05-11-2026). */

.pl-filterbar {
    display: block;
    margin: 0 0 28px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--pl-border-soft);
    border-radius: 18px;
    box-shadow: var(--pl-shadow-sm);
    font-family: var(--pl-font-ui);
    position: relative;
    z-index: 5;
}

.pl-filterbar__label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pl-text-muted, #7a6656);
    margin-right: 4px;
}

.pl-filter {
    position: relative;
}

.pl-filter[open] {
    z-index: 30;   /* open menu boven de andere knoppen (ook op een 2e rij) */
}

.pl-filter > summary,
.pl-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--pl-border);
    border-radius: 999px;
    background: var(--pl-bg, #f7f3ee);
    color: var(--pl-text-strong, #3f342b);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    text-decoration: none;
    user-select: none;
    transition: background .2s, border-color .2s;
}

.pl-filter > summary::-webkit-details-marker { display: none; }

.pl-filter > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s;
}

.pl-filter[open] > summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.pl-filter > summary:hover,
.pl-filter-toggle:hover,
.pl-filter[open] > summary {
    background: #fff;
    border-color: var(--pl-accent-dark, #8a6a45);
}

.pl-filter.is-active > summary,
.pl-filter-toggle.is-on {
    background: var(--pl-text-strong, #3f342b);
    border-color: var(--pl-text-strong, #3f342b);
    color: #fff;
}

.pl-filterbar__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #fff;
    color: var(--pl-text-strong, #3f342b);
    font-size: 12px;
}

.pl-filter__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--pl-border-soft);
    border-radius: 16px;
    box-shadow: var(--pl-shadow-md);
    z-index: 31;
}

.pl-filter__menu li { margin: 0; }

.pl-filter__opt {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--pl-text-strong, #3f342b);
    font-size: 14px;
    text-decoration: none;
}

.pl-filter__opt:hover { background: var(--pl-bg, #f7f3ee); color: var(--pl-text-strong, #3f342b); }

.pl-filter__count { color: var(--pl-text-muted, #7a6656); margin-left: auto; }

.pl-filter__check {
    flex: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--pl-text-muted, #7a6656);
    border-radius: 5px;
    background: #fff;
    position: relative;
}

.pl-filter__opt.is-on .pl-filter__check,
.pl-filter-toggle.is-on .pl-filter__check {
    background: var(--pl-accent-dark, #8a6a45);
    border-color: var(--pl-accent-dark, #8a6a45);
}

.pl-filter__opt.is-on .pl-filter__check::after,
.pl-filter-toggle.is-on .pl-filter__check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

.pl-filter-toggle.is-on .pl-filter__check { border-color: #fff; }

.pl-filterbar__clear {
    margin-left: auto;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 6px;
    color: var(--pl-text-strong, #3f342b);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
}

.pl-filter-empty {
    margin: 0 0 40px;
    color: var(--pl-text-strong, #3f342b);
}

@media (max-width: 600px) {
    .pl-filterbar { gap: 8px; padding: 10px; }
    .pl-filterbar__label { width: 100%; }
    .pl-filter > summary, .pl-filter-toggle { padding: 0 14px; }
    .pl-filter__menu { min-width: 210px; }
    .pl-filter:last-of-type .pl-filter__menu { left: auto; right: 0; }
    .pl-filterbar__clear { margin-left: 0; }
}

/* ---------- Categoriepagina: compacte titel (05-11-2026) ---------- */

@media (min-width: 1000px) {
    body .pl-brand-hero {
        margin-bottom: 36px !important;
    }
}

@media (max-width: 999.98px) {

    body .pl-breadcrumbs-wrapper .woocommerce-breadcrumb {
        margin-top: 12px !important;
        font-size: 12px;
    }

    body .pl-brand-hero {
        margin-bottom: 14px !important;
    }

    body .pl-brand-hero .pl-brand-title {
        font-size: 34px !important;
        line-height: 1.1 !important;
        margin: 6px 0 8px !important;
    }

    body .pl-brand-hero .pl-line {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .pl-filterbar {
        margin-bottom: 12px;
    }

    .pl-filterbar__label {
        display: none;   /* de knoppen spreken voor zich; spaart een regel */
    }

    body .woo-listing-top {
        margin-bottom: 12px !important;
    }
}

/* ---------- Filterbalk v2: knop "Filter" + sortering, paneel standaard dicht (06-11-2026) ---------- */

/* Blocksy's eigen rij met sortering: staat nu in de filterbalk */
body.pl-has-filterbar .woo-listing-top {
    display: none !important;
}

.pl-filterbar__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-filterbar__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--pl-border);
    border-radius: 999px;
    background: var(--pl-bg, #f7f3ee);
    color: var(--pl-text-strong, #3f342b);
    font-family: var(--pl-font-ui);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.pl-filterbar__toggle:hover,
.pl-filterbar__toggle.is-open {
    background: #fff;
    border-color: var(--pl-accent-dark, #8a6a45);
}

.pl-filterbar__toggle.is-active {
    background: var(--pl-text-strong, #3f342b);
    border-color: var(--pl-text-strong, #3f342b);
    color: #fff;
}

.pl-filterbar__chev {
    width: 7px;
    height: 7px;
    margin-left: 2px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform .2s;
}

.pl-filterbar__toggle.is-open .pl-filterbar__chev {
    transform: translateY(2px) rotate(-135deg);
}

.pl-filterbar .pl-filterbar__clear {
    margin-left: 4px;
}

/* Sortering rechts in de balk */
.pl-filterbar__sort {
    margin-left: auto;
}

.pl-filterbar__sort .woocommerce-ordering {
    margin: 0 !important;
    float: none !important;
    position: relative;
}

.pl-filterbar__sort select.orderby {
    min-height: 44px;
    padding: 0 40px 0 16px !important;
    border: 1px solid var(--pl-border) !important;
    border-radius: 999px !important;
    background-color: var(--pl-bg, #f7f3ee) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233f342b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4v16M3 16l4 4 4-4M17 20V4M13 8l4-4 4 4'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 16px !important;
    color: var(--pl-text-strong, #3f342b) !important;
    font-family: var(--pl-font-ui);
    font-size: 14px !important;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    max-width: 320px;
}

.pl-filterbar__panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pl-border-soft);
}

.pl-filterbar__panel[hidden] {
    display: none;
}

/* Blocksy zet een eigen sorteer-icoontje naast de keuzelijst: hier dubbel */
.pl-filterbar__sort .woocommerce-ordering svg,
.pl-filterbar__sort .ct-sort-icon {
    display: none !important;
}

@media (max-width: 600px) {
    .pl-filterbar__top { gap: 8px; }
    .pl-filterbar__toggle { flex: none; padding: 0 14px; }
    .pl-filterbar__sort { flex: 1 1 auto; min-width: 0; display: flex; justify-content: flex-end; }
    .pl-filterbar__sort .woocommerce-ordering { min-width: 0; max-width: 100%; }
    .pl-filterbar__sort select.orderby {
        max-width: 100%;
        width: auto;
        padding: 0 34px 0 14px !important;
        background-position: right 12px center !important;
        font-size: 13px !important;
        text-overflow: ellipsis;
    }
}
