:root {
    --zw-filter-accent: #5f0018;
    --zw-filter-background: #ffffff;
    --zw-filter-border: #e8e0e3;
    --zw-filter-text: #20181a;
    --zw-filter-muted: #6f6166;
    --zw-filter-radius: 10px;
    --zw-filter-height: 42px;
    --zw-filter-padding: 16px;
    --zw-filter-gap: 12px;
    --zw-filter-font-size: 14px;
    --zw-filter-label-size: 12px;
    --zw-filter-shadow: 0 8px 26px rgba(22, 10, 14, 0.06);
}

.zw-shop-filters {
    margin: 0 0 24px;
}

.zw-shop-filters__form {
    position: relative;
    padding: var(--zw-filter-padding, 16px);
    background: var(--zw-filter-background, #fff);
    border: 1px solid var(--zw-filter-border, #e8e0e3);
    border-radius: calc(var(--zw-filter-radius, 10px) + 2px);
    box-shadow: var(--zw-filter-shadow);
}

.zw-shop-filters__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.zw-shop-filters__title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--zw-filter-text, #20181a);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.zw-shop-filters__title::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--zw-filter-accent, #5f0018);
    box-shadow: 0 0 0 4px rgba(95, 0, 24, 0.12);
}

.zw-shop-filters__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: var(--zw-filter-gap, 12px);
    align-items: end;
}

.zw-shop-filters__field {
    min-width: 0;
}

.zw-shop-filters__field label {
    display: block;
    margin: 0 0 7px;
    color: var(--zw-filter-muted, #6f6166);
    font-size: var(--zw-filter-label-size, 12px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.zw-shop-filters__select-wrap {
    position: relative;
}

.zw-shop-filters__select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 14px;
    width: 9px;
    height: 9px;
    margin-top: -6px;
    border-right: 2px solid var(--zw-filter-accent, #5f0018);
    border-bottom: 2px solid var(--zw-filter-accent, #5f0018);
    transform: rotate(45deg);
    pointer-events: none;
}

.zw-shop-filters select,
.zw-shop-filters__submit,
.zw-shop-filters__reset,
.zw-shop-filters__toggle {
    font: inherit;
}

.zw-shop-filters select {
    width: 100%;
    height: var(--zw-filter-height, 42px);
    padding: 0 40px 0 14px;
    color: var(--zw-filter-text, #20181a);
    background: #fff;
    border: 1px solid var(--zw-filter-border, #e8e0e3);
    border-radius: var(--zw-filter-radius, 10px);
    font-size: var(--zw-filter-font-size, 14px);
    font-weight: 500;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.zw-shop-filters select:hover,
.zw-shop-filters select:focus {
    border-color: rgba(95, 0, 24, 0.35);
    box-shadow: 0 0 0 4px rgba(95, 0, 24, 0.08);
}

.zw-shop-filters__actions {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.zw-shop-filters__submit,
.zw-shop-filters__reset,
.zw-shop-filters__toggle {
    min-height: var(--zw-filter-height, 42px);
    border-radius: var(--zw-filter-radius, 10px);
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.zw-shop-filters__submit {
    min-width: 110px;
    padding: 0 18px;
    color: #fff;
    background: var(--zw-filter-accent, #5f0018);
    border: 1px solid var(--zw-filter-accent, #5f0018);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(95, 0, 24, 0.15);
}

.zw-shop-filters__submit:hover,
.zw-shop-filters__submit:focus {
    color: #fff;
    opacity: .94;
    transform: translateY(-1px);
}

.zw-shop-filters__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 0 14px;
    color: var(--zw-filter-accent, #5f0018);
    background: rgba(95, 0, 24, 0.04);
    border: 1px solid rgba(95, 0, 24, 0.12);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
}

.zw-shop-filters__reset:hover,
.zw-shop-filters__reset:focus {
    color: var(--zw-filter-accent, #5f0018);
    background: rgba(95, 0, 24, 0.08);
}

.zw-shop-filters__toggle {
    display: none;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    color: #fff;
    background: var(--zw-filter-accent, #5f0018);
    border: 1px solid var(--zw-filter-accent, #5f0018);
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
}

.zw-shop-filters__toggle-icon,
.zw-shop-filters__toggle-icon::before,
.zw-shop-filters__toggle-icon::after {
    display: block;
    width: 17px;
    height: 2px;
    background: currentColor;
}

.zw-shop-filters__toggle-icon {
    position: relative;
}

.zw-shop-filters__toggle-icon::before,
.zw-shop-filters__toggle-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.zw-shop-filters__toggle-icon::before { top: -5px; }
.zw-shop-filters__toggle-icon::after { top: 5px; }

.zw-shop-filters__status {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.zw-filter-loading {
    position: relative;
    min-height: 180px;
    pointer-events: none;
    opacity: .56;
}

.zw-filter-loading::after {
    content: '';
    position: absolute;
    z-index: 30;
    top: 90px;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid rgba(95, 0, 24, .12);
    border-top-color: var(--zw-filter-accent, #5f0018);
    border-radius: 50%;
    animation: zw-filter-spin .7s linear infinite;
}

@keyframes zw-filter-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
    .zw-shop-filters__grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .zw-shop-filters__actions {
        justify-content: flex-start;
    }
}

@media (max-width: 700px) {
    .zw-shop-filters {
        margin-bottom: 20px;
    }

    .zw-shop-filters__toggle {
        display: flex;
    }

    .zw-shop-filters__form {
        display: none;
        margin-top: 10px;
    }

    .zw-shop-filters.is-open .zw-shop-filters__form {
        display: block;
    }

    .zw-shop-filters__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .zw-shop-filters__actions {
        display: grid;
        grid-template-columns: 1fr auto;
    }

    .zw-shop-filters__submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zw-shop-filters *,
    .zw-shop-filters *::before,
    .zw-shop-filters *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Vaste Zelfwrappen-selectie: twee compacte filters en acties op één rij. */
.zw-shop-filters--fixed .zw-shop-filters__grid {
    grid-template-columns: repeat(2, minmax(190px, 1fr)) auto;
}

.zw-shop-filters--fixed .zw-shop-filters__form {
    padding: 14px 16px;
}

@media (max-width: 900px) {
    .zw-shop-filters--fixed .zw-shop-filters__grid {
        grid-template-columns: repeat(2, minmax(160px, 1fr));
    }

    .zw-shop-filters--fixed .zw-shop-filters__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .zw-shop-filters--fixed .zw-shop-filters__grid {
        grid-template-columns: 1fr;
    }

    .zw-shop-filters--fixed .zw-shop-filters__actions {
        grid-column: auto;
    }
}
