/* ==========================================================================
   SHOP ARCHIVE
   ========================================================================== */
.kor-shop {
    padding: 16px 0 64px;
}
.kor-shop__header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px 0;
}
.kor-shop__intro {
    max-width: 680px;
    margin: 8px auto 0;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}
/* Filter-knop: alleen op mobile zichtbaar (desktop toont sidebar altijd) */
.kor-filter-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    font-family: var(--kor-font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--kor-white);
    background: var(--kor-primary-dark);
    border: none;
    border-radius: var(--kor-radius-md);
    cursor: pointer;
    margin-bottom: 16px;
}
.kor-filter-btn:hover {
    background: var(--kor-primary-darker);
}
/* Drawer-head: titel altijd zichtbaar; sluitknop alleen mobile */
.kor-shop__filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.kor-shop__filters-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--kor-coffee-darkest);
    padding: 4px;
    line-height: 0;
}
.kor-shop__filters-apply {
    display: none;
    width: 100%;
    margin-top: 20px;
}
.kor-shop__filters-backdrop {
    display: none;
}
.kor-shop__title {
    font-family: var(--kor-font-heading);
    font-size: clamp(32px, 5vw, 44px);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--kor-coffee-darkest);
}
.kor-shop__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: flex-start;
}
.kor-shop__sidebar {
    position: sticky;
    top: calc(var(--kor-header-height) + 16px);
}
.kor-shop__filters {
    background: var(--kor-cream);
    border-radius: var(--kor-radius-md);
    padding: 20px;
}
.kor-shop__filters-title {
    font-family: var(--kor-font-heading);
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: var(--kor-coffee-dark);
}
.kor-shop__filters-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}
.kor-shop__filters .widget {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--kor-gray-200);
}
.kor-shop__filters .widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.kor-shop__filters .widget-title,
.kor-shop__filters .widgettitle,
.kor-shop__filters h3 {
    font-family: var(--kor-font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--kor-coffee-darkest);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--kor-primary);
    display: inline-block;
}

.kor-shop__filters ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Filter list items — clickable rows with hover and selected state */
.kor-shop__filters ul li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
}
.kor-shop__filters ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    gap: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--kor-coffee-dark);
    background: transparent;
    border-radius: var(--kor-radius-sm);
    transition: all 150ms ease;
    text-decoration: none;
    line-height: 1.3;
}
.kor-shop__filters ul li a:hover {
    background: var(--kor-white);
    color: var(--kor-primary-dark);
    transform: translateX(2px);
}
/* WooCommerce term count — inline, regardless of whether it's inside or outside the <a> */
.kor-shop__filters ul li .count,
.kor-shop__filters ul li small {
    color: var(--kor-gray-400);
    font-size: 12px;
    font-weight: 500;
    background: rgba(0,0,0,0.04);
    padding: 2px 8px;
    border-radius: var(--kor-radius-full);
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1.4;
    margin-left: auto;
    /* Cancel any block/newline styles WC applies */
    display: inline-block;
}
/* When count sits OUTSIDE the link (separate sibling), pull it next to the link */
.kor-shop__filters ul li > .count,
.kor-shop__filters ul li > small {
    margin-right: 8px;
    align-self: center;
}
.kor-shop__filters ul li.chosen a,
.kor-shop__filters ul li a.chosen {
    background: var(--kor-primary);
    color: var(--kor-white);
    font-weight: 600;
}
.kor-shop__filters ul li.chosen a .count,
.kor-shop__filters ul li.chosen a:hover .count {
    background: rgba(255,255,255,0.25);
    color: var(--kor-white);
}
/* Active filter "x" indicator before chosen item */
.kor-shop__filters ul li.chosen a::before {
    content: '✕ ';
    margin-right: 4px;
    opacity: 0.8;
    font-weight: 700;
}

/* WooCommerce active filters widget */
.widget_woocommerce_layered_nav_filters ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
}
.widget_woocommerce_layered_nav_filters ul li {
    margin: 0;
}
.widget_woocommerce_layered_nav_filters ul li a {
    padding: 4px 12px;
    background: var(--kor-coffee-dark);
    color: var(--kor-white);
    border-radius: var(--kor-radius-full);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.widget_woocommerce_layered_nav_filters ul li a:hover {
    background: var(--kor-error);
    color: var(--kor-white);
    transform: none;
}
.widget_woocommerce_layered_nav_filters ul li a::before {
    content: '✕';
    margin-right: 4px;
}

/* Price filter widget — slider styling */
.widget_woocommerce_price_filter .price_slider_wrapper {
    margin-top: 8px;
}
.widget_woocommerce_price_filter .price_slider {
    background: var(--kor-gray-200);
    height: 6px;
    border-radius: 3px;
    margin: 24px 8px 16px;
    position: relative;
}
.widget_woocommerce_price_filter .ui-slider-range {
    background: var(--kor-primary);
    height: 100%;
    position: absolute;
    border-radius: 3px;
}
.widget_woocommerce_price_filter .ui-slider-handle {
    width: 20px;
    height: 20px;
    background: var(--kor-white);
    border: 3px solid var(--kor-primary);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    cursor: grab;
    box-shadow: var(--kor-shadow-sm);
    outline: none;
}
.widget_woocommerce_price_filter .ui-slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 0 0 6px var(--kor-primary-light);
}
.widget_woocommerce_price_filter .price_slider_amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--kor-gray-700);
    margin-top: 8px;
}
.widget_woocommerce_price_filter .price_slider_amount .button {
    background: var(--kor-primary);
    color: var(--kor-white);
    border: none;
    padding: 8px 16px;
    border-radius: var(--kor-radius-md);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 150ms ease;
}
.widget_woocommerce_price_filter .price_slider_amount .button:hover {
    background: var(--kor-primary-dark);
}
.widget_woocommerce_price_filter .price_slider_amount .price_label {
    font-weight: 600;
    color: var(--kor-coffee-dark);
}

/* Layered nav (attribute filters) — checkbox-style display */
.widget_woocommerce_layered_nav .woocommerce-widget-layered-nav-list__item {
    list-style: none;
}
.widget_woocommerce_layered_nav .woocommerce-widget-layered-nav-list__item--chosen a {
    font-weight: 600;
}
/* Color swatch support — if WC stores hex in term meta */
.widget_woocommerce_layered_nav ul li a span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kor-shop__filters .kor-shop__filters-hint {
    font-size: 13px;
    color: var(--kor-gray-700);
    line-height: 1.5;
    background: var(--kor-white);
    padding: 14px;
    border-radius: var(--kor-radius-sm);
    border: 1px dashed var(--kor-gray-200);
}

.kor-shop__main {
    min-width: 0;
}
.kor-shop__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: var(--kor-cream);
    border-radius: var(--kor-radius-md);
    gap: 16px;
    flex-wrap: wrap;
}
.kor-shop__toolbar .woocommerce-result-count {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
}
.kor-shop__toolbar .woocommerce-ordering select,
.kor-shop__toolbar .orderby {
    padding: 8px 12px;
    border: 2px solid var(--kor-gray-200);
    border-radius: var(--kor-radius-sm);
    background: var(--kor-white);
    font-size: 14px;
}

/* Pagination */
.woocommerce-pagination {
    margin-top: 32px;
    text-align: center;
}
.woocommerce-pagination .page-numbers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    gap: 6px;
}
.woocommerce-pagination .page-numbers li a,
.woocommerce-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--kor-radius-sm);
    background: var(--kor-cream);
    color: var(--kor-coffee-dark);
    font-weight: 600;
    font-size: 14px;
    transition: all 150ms ease;
}
.woocommerce-pagination .page-numbers li a:hover {
    background: var(--kor-primary-light);
    color: var(--kor-primary-dark);
}
.woocommerce-pagination .page-numbers li span.current {
    background: var(--kor-primary);
    color: var(--kor-white);
}

.kor-shop__empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--kor-cream);
    border-radius: var(--kor-radius-md);
}
.kor-shop__empty p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* Mobile filter drawer */
@media (max-width: 992px) {
    .kor-shop__header {
        margin-bottom: 16px;
        padding: 8px 0 4px;
    }
    .kor-shop__intro {
        font-size: 14px;
    }
    .kor-filter-btn {
        display: flex;
    }
    .kor-shop__filters-close {
        display: block;
    }
    .kor-shop__filters-apply {
        display: inline-flex;
    }
    .kor-shop__layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .kor-shop__sidebar {
        position: static;
    }
    .kor-shop__filters {
        position: fixed;
        inset: 0;
        z-index: 1002;
        background: var(--kor-white);
        padding: 24px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 250ms ease;
        border-radius: 0;
        max-width: 360px;
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    }
    body.filters-open .kor-shop__filters {
        transform: translateX(0);
    }
    body.filters-open .kor-shop__filters-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1001;
        background: rgba(0,0,0,0.45);
    }
    body.filters-open {
        overflow: hidden;
    }
}

/* === FILTER WIDGET ICONS === */
/* Subtle icon prefix on widget titles for visual recognition */
.kor-shop__filters .widget-title::before,
.kor-shop__filters .widgettitle::before,
.kor-shop__filters h3::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    vertical-align: -3px;
    background-color: var(--kor-primary);
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: contain;
            mask-size: contain;
}
/* Default: filter funnel icon (used for "Filter producten" header) */
.kor-shop__filters-title::before,
.kor-shop__filters .widget-title::before,
.kor-shop__filters .widgettitle::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polygon points="22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"/></svg>');
}
/* Price filter — euro symbol */
.widget_woocommerce_price_filter .widget-title::before,
.widget_woocommerce_price_filter .widgettitle::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M19 5c-1.5-1.5-4-2.5-6.5-2.5C7 2.5 3 7 3 12s4 9.5 9.5 9.5c2.5 0 5-1 6.5-2.5"/><path d="M3 10h12"/><path d="M3 14h12"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M19 5c-1.5-1.5-4-2.5-6.5-2.5C7 2.5 3 7 3 12s4 9.5 9.5 9.5c2.5 0 5-1 6.5-2.5"/><path d="M3 10h12"/><path d="M3 14h12"/></svg>');
}
/* Active filters — checkmark badge */
.widget_woocommerce_layered_nav_filters .widget-title::before,
.widget_woocommerce_layered_nav_filters .widgettitle::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="9 12 11 14 15 10"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="9 12 11 14 15 10"/></svg>');
}
/* Layered nav (attribute) — generic tag/grid icon */
.widget_woocommerce_layered_nav .widget-title::before,
.widget_woocommerce_layered_nav .widgettitle::before {
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>');
            mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>');
}


/* === v3.3.0: Hardcoded filter sidebar (replaces widget-config approach) === */
.kor-shop-filters {
    background: var(--kor-cream);
    border: 1px solid var(--kor-gray-100);
    border-radius: var(--kor-radius-md);
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
}
.kor-shop-filters__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: none;
    color: var(--kor-coffee-darkest);
    font-family: var(--kor-font-heading);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 150ms ease;
}
.kor-shop-filters__toggle:hover {
    background: rgba(198, 139, 54, 0.08);
}
.kor-shop-filters__chevron {
    transition: transform 200ms ease;
}
.kor-shop-filters__toggle[aria-expanded="true"] .kor-shop-filters__chevron {
    transform: rotate(180deg);
}
.kor-shop-filters__body {
    padding: 0 18px 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}
.kor-shop-filters__body .widget {
    margin: 0;
}
.kor-shop-filters__body .widget-title,
.kor-shop-filters__body h2 {
    font-family: var(--kor-font-heading);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--kor-coffee-darkest);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--kor-primary);
}
.kor-shop-filters__body ul {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}
.kor-shop-filters__body ul li {
    padding: 4px 0;
}
.kor-shop-filters__body ul li a {
    color: var(--kor-coffee-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.kor-shop-filters__body ul li a:hover {
    color: var(--kor-primary-dark);
}
.kor-shop-filters__body .count {
    color: var(--text-muted);
    font-size: 12px;
}

/* Mobile: collapsed by default, expand on click */
@media (max-width: 768px) {
    .kor-shop-filters__body {
        max-height: 0;
        padding: 0 18px;
        overflow: hidden;
        transition: max-height 300ms ease, padding 300ms ease;
        grid-template-columns: 1fr;
    }
    .kor-shop-filters__body.is-open {
        max-height: 1500px;
        padding: 0 18px 18px;
    }
}

/* Desktop: always open, no max-height */
@media (min-width: 769px) {
    .kor-shop-filters__body {
        max-height: none !important;
    }
    .kor-shop-filters__toggle {
        cursor: default;
        pointer-events: none;
    }
    .kor-shop-filters__chevron {
        display: none;
    }
}
