/*
Theme Name: KSE Shopverwaltung Child
Description: Child-Theme für KSE Shopverwaltung. Eigene Anpassungen bleiben bei Updates des Hauptthemes erhalten.
Author: KS-Eichinger / Custom Shop Theme
Template: kse-shopverwaltung
Version: 3.8.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: kleidungmitdruck-child
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ============================================================
START BLOCK – EIGENE CSS-ANPASSUNGEN

Eigene CSS-Regeln können hier eingefügt werden.
Das Haupttheme bleibt davon unberührt.
============================================================ */


/* ============================================================
END BLOCK – EIGENE CSS-ANPASSUNGEN
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD – FILTER NUR NACH EIGENER EINSTELLUNG
============================================================ */

/* Mobile-Filter im Haupttheme wieder aktivieren. */
@media screen and (max-width: 767px) {
    .woocommerce .pb-filter-toggle,
    .pb-filter-toggle {
        display: inline-flex !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 14px !important;
    }

    .pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar {
        display: block !important;
        width: 100% !important;
        margin: 0 0 18px !important;
    }

    .pb-shop-layout:not(.is-filter-open) .pb-shop-sidebar.kmd-filter-only-sidebar {
        display: none !important;
    }

    .pb-shop-sidebar.kmd-filter-only-sidebar .pb-filter-close {
        display: flex !important;
    }
}

/* Filter optisch sauber von Kategorien trennen. */
.kmd-filter-only-sidebar .pb-sidebar-title {
    margin-bottom: 14px;
}

.kmd-filter-only-sidebar .widget {
    margin-bottom: 22px;
}

.kmd-filter-only-sidebar .widget:last-child {
    margin-bottom: 0;
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD FILTER
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD – WARENKORB ENTLEEREN
============================================================ */

.woocommerce-cart .kmd-empty-cart-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-left: 10px !important;
    padding: 10px 18px !important;
    border: 1px solid #c62828 !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #c62828 !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.woocommerce-cart .kmd-empty-cart-button:hover,
.woocommerce-cart .kmd-empty-cart-button:focus {
    background: #c62828 !important;
    color: #ffffff !important;
}

@media screen and (max-width: 700px) {
    .woocommerce-cart .kmd-empty-cart-button {
        width: 100% !important;
        margin: 10px 0 0 !important;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD WARENKORB
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v1.5 – SHOP REDESIGN + DIREKTER FILTER
============================================================ */

/* Shop insgesamt ruhiger und breiter nutzen. */
body.post-type-archive-product .pb-page-shell,
body.tax-product_cat .pb-page-shell,
body.tax-product_tag .pb-page-shell {
    max-width: 1440px;
}

/* H1 und Einstieg kompakt – Produkte sollen schneller sichtbar werden. */
body.post-type-archive-product .woocommerce-products-header__title.page-title,
body.tax-product_cat .woocommerce-products-header__title.page-title {
    margin: 0 0 12px !important;
    font-size: clamp(27px, 3vw, 38px) !important;
    line-height: 1.1 !important;
    letter-spacing: -.02em;
}

body.post-type-archive-product .pb-shop-intro {
    margin: 0 0 18px !important;
    padding: 16px 18px !important;
    border: 1px solid #e3e6ea !important;
    border-left: 4px solid var(--pb-red) !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
}

body.post-type-archive-product .pb-shop-intro h2 {
    font-size: clamp(18px, 2vw, 23px) !important;
}

body.post-type-archive-product .pb-shop-intro p {
    max-width: 920px !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

/* Filterbutton: klar als Werkzeug erkennbar. */
.woocommerce .kmd-filter-toggle,
.kmd-filter-toggle {
    min-width: 210px !important;
    border: 1px solid #182232 !important;
    border-left: 1px solid #182232 !important;
    border-radius: 8px !important;
    background: #182232 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.woocommerce .kmd-filter-toggle:hover,
.woocommerce .kmd-filter-toggle:focus-visible,
.kmd-filter-toggle:hover,
.kmd-filter-toggle:focus-visible {
    border-color: var(--pb-red) !important;
    background: var(--pb-red) !important;
    color: #fff !important;
}

/* Filterpanel */
.pb-shop-sidebar.kmd-filter-only-sidebar {
    padding: 18px !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 8px 28px rgba(16, 21, 29, .07) !important;
}

.kmd-filter-head {
    display: block;
    margin-bottom: 14px;
}

.kmd-filter-eyebrow {
    display: block;
    margin: 0 0 4px;
    color: var(--pb-red);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.kmd-filter-only-sidebar .pb-sidebar-title {
    margin: 0 0 12px !important;
    font-size: 20px !important;
}

.kmd-filter-only-sidebar .pb-filter-close {
    margin: 0 0 14px !important;
}

.kmd-filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 38px;
    margin: 0 0 15px;
    padding: 8px 10px;
    border: 1px solid #e1b4b4;
    border-radius: 7px;
    background: #fff7f7;
    color: #b5161b !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}

.kmd-filter-reset:hover,
.kmd-filter-reset:focus {
    background: #b5161b;
    color: #fff !important;
}

.kmd-filter-widget {
    margin: 0 0 18px !important;
    padding: 0 0 18px !important;
    border: 0 !important;
    border-bottom: 1px solid #eceff2 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.kmd-filter-widget:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 0 !important;
}

.kmd-filter-widget .widget-title,
.kmd-filter-widget h3 {
    margin: 0 0 10px !important;
    color: #182232 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
}

/* Attributwerte als saubere Auswahl-Chips statt unruhiger Textliste. */
.kmd-filter-widget .woocommerce-widget-layered-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 !important;
    padding: 0 !important;
}

.kmd-filter-widget .woocommerce-widget-layered-nav-list__item {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.kmd-filter-widget .woocommerce-widget-layered-nav-list__item a {
    display: inline-flex !important;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px !important;
    border: 1px solid #d9dee5;
    border-radius: 7px;
    background: #f7f8fa;
    color: #28313c !important;
    font-size: 12px !important;
    font-weight: 750 !important;
    line-height: 1.1 !important;
    text-decoration: none !important;
}

.kmd-filter-widget .woocommerce-widget-layered-nav-list__item a:hover,
.kmd-filter-widget .woocommerce-widget-layered-nav-list__item--chosen a {
    border-color: #182232 !important;
    background: #182232 !important;
    color: #fff !important;
}

.kmd-filter-widget .count {
    margin-left: 4px;
    color: #7d8792 !important;
    font-size: 10px !important;
}

.kmd-filter-widget .woocommerce-widget-layered-nav-list__item--chosen .count {
    color: rgba(255,255,255,.72) !important;
}

/* Ergebnisanzahl / Sortierung wie eine gemeinsame Toolbar. */
.woocommerce .woocommerce-result-count {
    color: #67717e !important;
    font-size: 12px !important;
}

.woocommerce .woocommerce-ordering select {
    min-width: 210px;
    padding: 0 34px 0 12px !important;
    border: 1px solid #d9dee5 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    color: #28313c !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* Produktgrid – mehr Shop, weniger Standard-WooCommerce. */
body.post-type-archive-product .woocommerce ul.products,
body.tax-product_cat .woocommerce ul.products,
body.tax-product_tag .woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 18px !important;
    margin: 0 !important;
}

body.post-type-archive-product .woocommerce ul.products::before,
body.post-type-archive-product .woocommerce ul.products::after,
body.tax-product_cat .woocommerce ul.products::before,
body.tax-product_cat .woocommerce ul.products::after {
    display: none !important;
}

body.post-type-archive-product .woocommerce ul.products li.product,
body.tax-product_cat .woocommerce ul.products li.product,
body.tax-product_tag .woocommerce ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 12px 12px 14px !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

body.post-type-archive-product .woocommerce ul.products li.product:hover,
body.tax-product_cat .woocommerce ul.products li.product:hover,
body.tax-product_tag .woocommerce ul.products li.product:hover {
    transform: translateY(-2px) !important;
    border-color: #c6ccd3 !important;
    box-shadow: 0 10px 28px rgba(16,21,29,.08) !important;
}

body.post-type-archive-product .woocommerce ul.products li.product a img,
body.tax-product_cat .woocommerce ul.products li.product a img,
body.tax-product_tag .woocommerce ul.products li.product a img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    margin: 0 0 11px !important;
    padding: 8px !important;
    border-radius: 9px !important;
    background: #f7f8fa !important;
    object-fit: contain !important;
}

body.post-type-archive-product .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag .woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 42px;
    margin: 0 0 7px !important;
    padding: 0 !important;
    color: #1c232c !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
}

body.post-type-archive-product .woocommerce ul.products li.product .price,
body.tax-product_cat .woocommerce ul.products li.product .price,
body.tax-product_tag .woocommerce ul.products li.product .price {
    margin: 0 0 11px !important;
    color: #c91414 !important;
    font-size: 17px !important;
    font-weight: 900 !important;
}

body.post-type-archive-product .woocommerce ul.products li.product .button,
body.tax-product_cat .woocommerce ul.products li.product .button,
body.tax-product_tag .woocommerce ul.products li.product .button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 42px !important;
    margin-top: 8px !important;
    border-radius: 7px !important;
    background: #182232 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    text-align: center !important;
}

body.post-type-archive-product .woocommerce ul.products li.product .button:hover,
body.tax-product_cat .woocommerce ul.products li.product .button:hover,
body.tax-product_tag .woocommerce ul.products li.product .button:hover {
    background: var(--pb-red) !important;
}

/* SEO-Text bleibt vollständig vorhanden, wirkt aber nicht wie ein zweiter Shop. */
body.post-type-archive-product .pb-shop-seo {
    margin-top: 48px !important;
    padding: 24px !important;
    border-top: 1px solid #dfe3e8 !important;
    border-radius: 10px !important;
    background: #f7f8fa !important;
    box-shadow: none !important;
}

body.post-type-archive-product .pb-shop-original-content h1 {
    font-size: 24px !important;
}

@media screen and (max-width: 1100px) {
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.tax-product_tag .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 800px) {
    /* Parent blendet Mobile-Filter aus – Child aktiviert ihn bewusst wieder. */
    .woocommerce .kmd-filter-toggle,
    .kmd-filter-toggle {
        display: flex !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 10px !important;
    }

    .pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar {
        display: block !important;
        width: 100% !important;
        margin: 0 0 18px !important;
    }

    .pb-shop-layout:not(.is-filter-open) .pb-shop-sidebar.kmd-filter-only-sidebar {
        display: none !important;
    }

    .pb-shop-sidebar.kmd-filter-only-sidebar .pb-filter-close {
        display: flex !important;
    }

    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.tax-product_tag .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    body.post-type-archive-product .woocommerce ul.products li.product,
    body.tax-product_cat .woocommerce ul.products li.product,
    body.tax-product_tag .woocommerce ul.products li.product {
        padding: 8px 8px 11px !important;
        border-radius: 9px !important;
    }

    body.post-type-archive-product .woocommerce ul.products li.product .woocommerce-loop-product__title,
    body.tax-product_cat .woocommerce ul.products li.product .woocommerce-loop-product__title,
    body.tax-product_tag .woocommerce ul.products li.product .woocommerce-loop-product__title {
        min-height: 38px;
        font-size: 12px !important;
    }

    body.post-type-archive-product .woocommerce ul.products li.product .price,
    body.tax-product_cat .woocommerce ul.products li.product .price,
    body.tax-product_tag .woocommerce ul.products li.product .price {
        font-size: 15px !important;
    }

    body.post-type-archive-product .pb-shop-intro {
        padding: 13px 14px !important;
    }
}

@media screen and (max-width: 420px) {
    body.post-type-archive-product .woocommerce ul.products,
    body.tax-product_cat .woocommerce ul.products,
    body.tax-product_tag .woocommerce ul.products {
        gap: 8px !important;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v1.5 SHOP REDESIGN
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v1.5 – DIREKTE FILTERWERTE
============================================================ */

.kmd-filter-empty {
    padding: 14px;
    border: 1px solid #efd6a7;
    border-radius: 8px;
    background: #fff9ec;
    color: #5d4930;
    font-size: 13px;
    line-height: 1.5;
}

.kmd-filter-empty strong {
    display: block;
    margin-bottom: 5px;
    color: #34291d;
}

.kmd-filter-empty p {
    margin: 0 !important;
}

.kmd-price-filter-form {
    margin: 0;
}

.kmd-price-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 9px;
}

.kmd-price-fields label {
    display: block;
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    color: #5e6874;
}

.kmd-price-fields label span {
    display: block;
    margin-bottom: 4px;
}

.kmd-price-fields input {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #d9dee5;
    border-radius: 7px;
    background: #fff;
    color: #182232;
}

.kmd-price-submit {
    width: 100% !important;
    min-height: 38px !important;
    margin: 0 !important;
    border-radius: 7px !important;
    background: #182232 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.kmd-price-submit:hover,
.kmd-price-submit:focus {
    background: var(--pb-red) !important;
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v1.5 DIREKTE FILTERWERTE
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v1.9 – FILTERBEREICH SCROLLBAR
============================================================ */

/*
 * Der Filter kann durch viele Farben, Größen und Modelle höher
 * als der sichtbare Bildschirm werden. Deshalb bekommt nur der
 * Filter selbst eine vertikale Scrollfläche.
 */
.pb-shop-sidebar.kmd-filter-only-sidebar {
    max-height: calc(100vh - 36px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

/* Kopf des Filters bleibt beim Scrollen sichtbar. */
.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-head {
    position: sticky;
    top: -18px;
    z-index: 20;
    margin: -18px -18px 14px !important;
    padding: 18px 18px 12px !important;
    border-bottom: 1px solid #eceff2;
    background: #ffffff;
}

/* Dezente Scrollbar auf Desktop. */
.pb-shop-sidebar.kmd-filter-only-sidebar {
    scrollbar-width: thin;
    scrollbar-color: #aeb5bd #f2f4f6;
}

.pb-shop-sidebar.kmd-filter-only-sidebar::-webkit-scrollbar {
    width: 9px;
}

.pb-shop-sidebar.kmd-filter-only-sidebar::-webkit-scrollbar-track {
    background: #f2f4f6;
    border-radius: 999px;
}

.pb-shop-sidebar.kmd-filter-only-sidebar::-webkit-scrollbar-thumb {
    background: #aeb5bd;
    border: 2px solid #f2f4f6;
    border-radius: 999px;
}

/* Mobile: Filter bekommt ebenfalls eine eigene Scrollfläche. */
@media screen and (max-width: 800px) {
    .pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar {
        max-height: 75vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-head {
        top: -18px;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v1.9 FILTER-SCROLLBAR
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.1 – FILTER UX REDESIGN
============================================================ */

/* Panel ruhiger und klarer gliedern. */
.pb-shop-sidebar.kmd-filter-only-sidebar {
    padding: 0 !important;
    border-radius: 14px !important;
    overflow-y: auto !important;
}

.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-head {
    top: 0 !important;
    margin: 0 !important;
    padding: 18px 18px 14px !important;
    border-bottom: 1px solid #e8ebef !important;
    background: #fff !important;
}

.kmd-filter-head {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
}

.kmd-filter-head > div:first-child {
    min-width: 0;
}

.kmd-filter-help {
    max-width: 280px;
    margin: 5px 0 0 !important;
    color: #6b7280 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.kmd-filter-only-sidebar .pb-filter-close {
    flex: 0 0 auto;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 8px !important;
    background: #f7f8fa !important;
    color: #28313c !important;
}

.kmd-filter-widgets {
    padding: 14px 18px 96px;
}

/* Aktive Filter kompakt sichtbar. */
.kmd-active-filters {
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #f8fafb;
}

.kmd-active-filters-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    font-size: 12px;
}

.kmd-active-filters-title strong {
    color: #182232;
}

.kmd-active-filters-title a {
    color: #b5161b !important;
    font-weight: 800;
    text-decoration: none !important;
}

.kmd-active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.kmd-active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #cfd5dc;
    border-radius: 999px;
    background: #fff;
    color: #28313c !important;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
}

.kmd-active-filter-chip:hover {
    border-color: #b5161b;
    color: #b5161b !important;
}

/* Jede Filtergruppe ist einklappbar. */
.kmd-filter-group {
    margin: 0 0 9px;
    border: 1px solid #e0e4e9;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.kmd-filter-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 12px 13px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

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

.kmd-filter-group[open] > summary {
    border-bottom: 1px solid #edf0f3;
    background: #f8fafb;
}

.kmd-filter-group-title {
    color: #182232;
    font-size: 13px;
    font-weight: 900;
}

.kmd-filter-group-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.kmd-filter-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 999px;
    background: #182232;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.kmd-filter-group-chevron {
    display: inline-block;
    color: #66707c;
    font-size: 15px;
    transition: transform .18s ease;
}

.kmd-filter-group[open] .kmd-filter-group-chevron {
    transform: rotate(180deg);
}

/* Optionen als echte Checkbox-Zeilen statt Link-Wolke. */
.kmd-filter-options {
    display: grid;
    gap: 6px;
    max-height: 280px;
    padding: 10px;
    overflow-y: auto;
}

.kmd-filter-option {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}

.kmd-filter-option:hover {
    background: #f5f7f9;
}

.kmd-filter-option.is-selected {
    border-color: #182232;
    background: #f3f6f9;
}

.kmd-filter-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.kmd-filter-option-check {
    position: relative;
    width: 18px;
    height: 18px;
    border: 1.5px solid #aeb6c0;
    border-radius: 4px;
    background: #fff;
}

.kmd-filter-option input:checked + .kmd-filter-option-check {
    border-color: #182232;
    background: #182232;
}

.kmd-filter-option input:checked + .kmd-filter-option-check::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.kmd-filter-option-label {
    min-width: 0;
    color: #29323d;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

.kmd-filter-option-count {
    color: #7b8490;
    font-size: 11px;
    font-weight: 700;
}

/* Größen kompakter als Raster. */
.kmd-filter-options.is-size-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kmd-filter-options.is-size-filter .kmd-filter-option {
    grid-template-columns: 18px minmax(0, 1fr);
    min-height: 42px;
}

.kmd-filter-options.is-size-filter .kmd-filter-option-count {
    display: none;
}

/* Preis im selben Stil. */
.kmd-filter-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 11px;
}

.kmd-filter-price-grid label {
    color: #66707c;
    font-size: 11px;
    font-weight: 800;
}

.kmd-filter-price-grid label span {
    display: block;
    margin-bottom: 5px;
}

.kmd-filter-price-grid input {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #d8dde3;
    border-radius: 7px;
    background: #fff;
}

/* Immer erreichbare Aktionen unten. */
.kmd-filter-actions {
    position: sticky;
    bottom: -96px;
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 14px -18px -96px;
    padding: 12px 18px 16px;
    border-top: 1px solid #dfe3e8;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(7px);
}

.kmd-filter-apply {
    min-height: 43px;
    padding: 9px 15px;
    border: 0;
    border-radius: 8px;
    background: #182232;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.kmd-filter-apply:hover,
.kmd-filter-apply:focus {
    background: var(--pb-red);
}

.kmd-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 9px 12px;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    background: #fff;
    color: #4b5563 !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}

/* Alter Reset-Link aus früheren Versionen wird nicht mehr benötigt. */
.kmd-filter-reset {
    display: none !important;
}

@media screen and (max-width: 800px) {
    .pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar {
        max-height: 82vh !important;
    }

    .kmd-filter-widgets {
        padding: 12px 14px 90px;
    }

    .kmd-filter-actions {
        bottom: -90px;
        margin: 12px -14px -90px;
        padding: 11px 14px 14px;
    }

    .kmd-filter-help {
        max-width: 220px;
    }
}

@media screen and (max-width: 420px) {
    .kmd-filter-options.is-size-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kmd-filter-actions {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.1 FILTER UX REDESIGN
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.2 – SHOP KATEGORIEN / PRODUKTE TRENNEN
============================================================ */

body.post-type-archive-product .kmd-shop-categories-section,
body.post-type-archive-product .kmd-shop-products-section {
    width: 100%;
    clear: both;
    box-sizing: border-box;
}

body.post-type-archive-product .kmd-shop-categories-section {
    margin: 10px 0 34px;
    padding: 24px;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    background: #f6f7f8;
}

body.post-type-archive-product .kmd-shop-products-section {
    margin: 0 0 34px;
    padding: 24px;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    background: #ffffff;
}

.kmd-shop-section-heading {
    margin: 0 0 20px;
}

.kmd-shop-section-eyebrow {
    display: block;
    margin: 0 0 5px;
    color: #d71920;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: .08em;
}

.kmd-shop-section-heading h2 {
    margin: 0 0 7px !important;
    color: #202428;
    font-size: clamp(22px, 2.2vw, 30px) !important;
    line-height: 1.15 !important;
}

.kmd-shop-section-heading p {
    max-width: 760px;
    margin: 0 !important;
    color: #60676d;
    font-size: 14px;
    line-height: 1.55;
}

.kmd-shop-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.kmd-shop-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dde1e5;
    border-radius: 9px;
    background: #ffffff;
    color: #202428 !important;
    text-decoration: none !important;
    box-shadow: 0 2px 7px rgba(0,0,0,.04);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.kmd-shop-category-card:hover,
.kmd-shop-category-card:focus {
    border-color: #c9ced3;
    color: #202428 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(0,0,0,.09);
}

.kmd-shop-category-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 1px solid #eceff1;
}

.kmd-shop-category-media img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: contain;
}

.kmd-shop-category-media-empty {
    background: #eceff1;
}

.kmd-shop-category-media-empty > span {
    color: #9aa1a7;
    font-size: 42px;
    font-weight: 900;
}

.kmd-shop-category-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 38px 14px 14px;
}

.kmd-shop-category-content strong {
    color: #202428;
    font-size: 15px;
    line-height: 1.3;
}

.kmd-shop-category-content > span {
    color: #737a80;
    font-size: 12px;
    line-height: 1.3;
}

.kmd-shop-category-arrow {
    position: absolute;
    right: 13px;
    bottom: 16px;
    color: #d71920;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

/* Toolbar innerhalb des Produktbereichs ruhiger halten. */
body.post-type-archive-product .kmd-shop-products-section .woocommerce-result-count {
    margin-top: 4px;
}

body.post-type-archive-product .kmd-shop-products-section ul.products {
    margin-top: 22px !important;
}

/* Keine WooCommerce-Standard-Unterkategorien im Produktloop: v2.2 rendert
   die Kategorien oben in einem eigenen Bereich. */
body.post-type-archive-product .kmd-shop-products-section li.product-category {
    display: none !important;
}

@media screen and (max-width: 1050px) {
    .kmd-shop-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 760px) {
    body.post-type-archive-product .kmd-shop-categories-section,
    body.post-type-archive-product .kmd-shop-products-section {
        margin-bottom: 22px;
        padding: 16px;
        border-radius: 9px;
    }

    .kmd-shop-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .kmd-shop-category-content {
        padding: 11px 30px 12px 11px;
    }

    .kmd-shop-category-content strong {
        font-size: 13px;
    }

    .kmd-shop-category-arrow {
        right: 10px;
        bottom: 13px;
        font-size: 17px;
    }
}

@media screen and (max-width: 430px) {
    .kmd-shop-category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .kmd-shop-category-media {
        aspect-ratio: 1 / 1;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.2 SHOP-TRENNUNG
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.4 – FILTER SCHLIESSEN NEU POSITIONIERT
============================================================ */

/* Der Schließen-Button steht in einer eigenen Zeile oberhalb der Überschrift.
   Dadurch kann er weder Titel noch Filteroptionen überdecken. */
.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-close-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px 0 !important;
    background: #ffffff !important;
}

.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-close-row .pb-filter-close {
    position: static !important;
    inset: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 7px !important;
    background: #f7f8f9 !important;
    color: #30363b !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: none !important;
    transform: none !important;
}

.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-close-row .pb-filter-close:hover,
.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-close-row .pb-filter-close:focus {
    border-color: #c8cdd2 !important;
    background: #eceff1 !important;
    color: #111111 !important;
}

/* Überschrift bekommt eine eigene volle Zeile. */
.pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-head {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 8px 14px 12px !important;
    border-bottom: 1px solid #e8ebef !important;
    background: #ffffff !important;
}

.kmd-filter-head-title {
    width: 100% !important;
    min-width: 0 !important;
}

.kmd-filter-only-sidebar .pb-sidebar-title {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 17px !important;
    line-height: 1.25 !important;
}

.kmd-filter-eyebrow,
.kmd-filter-help {
    display: none !important;
}

.kmd-filter-widgets {
    padding-top: 12px !important;
}

@media screen and (max-width: 800px) {
    .pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-close-row {
        padding: 7px 8px 0 !important;
    }

    .pb-shop-sidebar.kmd-filter-only-sidebar .kmd-filter-head {
        padding: 7px 12px 11px !important;
    }

    .kmd-filter-only-sidebar .pb-sidebar-title {
        font-size: 16px !important;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.4 FILTER SCHLIESSEN
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.5 – FILTER SOFORT ANWENDEN
============================================================ */

/* Alle Filtergruppen sind bewusst offen; Summary bleibt sichtbar. */
.kmd-filter-only-sidebar .kmd-filter-group {
    overflow: visible;
}

/* Kein Anwenden-Button mehr – nur Zurücksetzen bei aktiven Filtern. */
.kmd-filter-actions-auto {
    display: block !important;
    position: static !important;
    margin-top: 14px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e7eaee !important;
    background: transparent !important;
}

.kmd-filter-actions-auto .kmd-filter-clear {
    width: 100% !important;
}

/* Kurzes optisches Feedback nach Auswahl. */
.kmd-filter-form.is-loading {
    opacity: .68;
    pointer-events: none;
}

.kmd-filter-form.is-loading::after {
    content: 'Produkte werden aktualisiert …';
    display: block;
    margin: 12px 0 0;
    color: #5d6670;
    font-size: 12px;
    font-weight: 700;
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.5
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.6 – FILTER OHNE INTERNE SCROLLBEREICHE
============================================================ */

/*
 * Alle Filterwerte vollständig anzeigen.
 * Es gibt keine eigene Scrollbox mehr im Filterpanel und keine
 * Scrollbox innerhalb von Farbe, Größe, Modell usw.
 * Gesrollt wird nur noch ganz normal über die Shop-Seite.
 */
.pb-shop-sidebar.kmd-filter-only-sidebar,
.pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    overscroll-behavior: auto !important;
    -webkit-overflow-scrolling: auto !important;
    scrollbar-gutter: auto !important;
    scrollbar-width: auto !important;
}

.pb-shop-sidebar.kmd-filter-only-sidebar::-webkit-scrollbar {
    width: auto !important;
    height: auto !important;
}

/* Jede Filtergruppe bleibt offen und zeigt alle Optionen. */
.kmd-filter-only-sidebar .kmd-filter-group {
    max-height: none !important;
    overflow: visible !important;
}

.kmd-filter-only-sidebar .kmd-filter-options,
.kmd-filter-only-sidebar .kmd-filter-options.is-size-filter {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
}

/* Auf Mobil ebenfalls keine interne Scrollfläche. */
@media screen and (max-width: 800px) {
    .pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar,
    .pb-shop-sidebar.kmd-filter-only-sidebar {
        max-height: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .kmd-filter-only-sidebar .kmd-filter-options,
    .kmd-filter-only-sidebar .kmd-filter-options.is-size-filter {
        max-height: none !important;
        overflow: visible !important;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.6 FILTER OHNE SCROLLBEREICHE
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.7 – FILTER VOLLE BREITE / ALLES OFFEN
============================================================ */

/*
 * Der geöffnete Produktfilter steht jetzt über der Produktliste
 * und nutzt die komplette verfügbare Shop-Breite.
 * Dadurch werden die Filter nicht mehr in eine schmale Sidebar
 * gepresst und alle Werte können vollständig sichtbar bleiben.
 */
@media screen and (min-width: 801px) {
    .pb-shop-layout.is-filter-open {
        display: block !important;
        width: 100% !important;
    }

    .pb-shop-layout.is-filter-open .pb-shop-sidebar.kmd-filter-only-sidebar {
        position: static !important;
        top: auto !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 24px !important;
    }

    .pb-shop-layout.is-filter-open .pb-shop-content {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Filterpanel immer an die vorhandene Seitenbreite anpassen. */
.pb-shop-sidebar.kmd-filter-only-sidebar {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

.kmd-filter-widgets,
.kmd-filter-form,
.kmd-filter-groups {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
}

/*
 * Die einzelnen Filterbereiche stehen auf breiten Bildschirmen
 * nebeneinander. Je nach verfügbarer Breite entstehen automatisch
 * mehr oder weniger Spalten.
 */
.kmd-filter-only-sidebar .kmd-filter-groups {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 16px !important;
    align-items: start !important;
}

/* Alle Gruppen bleiben immer geöffnet. */
.kmd-filter-only-sidebar .kmd-filter-group {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* Überschrift ist nur noch eine Gruppenüberschrift – nicht einklappbar. */
.kmd-filter-only-sidebar .kmd-filter-group > summary {
    pointer-events: none !important;
    cursor: default !important;
}

.kmd-filter-only-sidebar .kmd-filter-group-chevron {
    display: none !important;
}

/*
 * Werte nutzen innerhalb jeder Gruppe ebenfalls die vorhandene Breite.
 * Lange Bezeichnungen brechen sauber um statt abgeschnitten zu werden.
 */
.kmd-filter-only-sidebar .kmd-filter-options {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.kmd-filter-only-sidebar .kmd-filter-options.is-size-filter {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
}

.kmd-filter-only-sidebar .kmd-filter-option {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.kmd-filter-only-sidebar .kmd-filter-option-label {
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
}

/* Aktive Filter ebenfalls über die volle Breite. */
.kmd-filter-only-sidebar .kmd-active-filters {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Tablet: zwei gut lesbare Filterspalten, soweit Platz vorhanden. */
@media screen and (max-width: 1000px) {
    .kmd-filter-only-sidebar .kmd-filter-groups {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    }
}

/* Mobil: Gruppen untereinander, Werte weiterhin möglichst nebeneinander. */
@media screen and (max-width: 600px) {
    .kmd-filter-widgets {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .kmd-filter-only-sidebar .kmd-filter-groups {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .kmd-filter-only-sidebar .kmd-filter-options {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .kmd-filter-only-sidebar .kmd-filter-options.is-size-filter {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media screen and (max-width: 390px) {
    .kmd-filter-only-sidebar .kmd-filter-options {
        grid-template-columns: 1fr !important;
    }

    .kmd-filter-only-sidebar .kmd-filter-options.is-size-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.7 FILTER VOLLE BREITE
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.8 – FILTER-BUTTON GANZ NACH OBEN
============================================================ */

/*
 * Der Filter-Button wird vor dem Kategorienbereich ausgegeben.
 * Er ist dadurch direkt am Anfang des Shop-Inhalts sichtbar.
 */
body.post-type-archive-product .kmd-filter-toggle {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 48px !important;
    margin: 0 0 18px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
}

body.post-type-archive-product .kmd-filter-toggle .pb-filter-toggle-label {
    flex: 0 1 auto !important;
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.8 FILTER-BUTTON OBEN
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v2.9 – MOBILE FILTER AUTO-SCHLIESSEN
============================================================ */

@media screen and (max-width: 767px) {
    .kmd-shop-products-section {
        scroll-margin-top: 12px;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v2.9 MOBILE FILTER
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.0 – MOBILE FILTER DIREKT UNTER BUTTON
============================================================ */

@media screen and (max-width: 767px) {
    /*
     * Der Filter wird per JavaScript direkt hinter den
     * "Filter anzeigen"-Button verschoben. Dadurch sieht man
     * die Filteroptionen sofort an derselben Stelle.
     */
    .pb-shop-sidebar.kmd-filter-only-sidebar.kmd-mobile-filter-inline {
        display: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 18px !important;
        padding: 0 !important;
        position: static !important;
        inset: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .pb-shop-sidebar.kmd-filter-only-sidebar.kmd-mobile-filter-inline[aria-hidden="false"] {
        display: block !important;
    }

    /* Direkt unter dem Button sauber absetzen. */
    .kmd-filter-toggle + .kmd-mobile-filter-inline,
    .kmd-filter-control-row + .kmd-mobile-filter-inline {
        margin-top: -4px !important;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.0 MOBILE FILTER UNTER BUTTON
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.2 – FILTER BEI 0 TREFFERN
============================================================ */

.kmd-no-results-filter-recovery {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 18px;
}

.kmd-no-results-filter-recovery .kmd-filter-toggle {
    flex: 1 1 260px;
    margin-bottom: 0 !important;
}

.kmd-no-results-filter-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none !important;
}

@media screen and (max-width: 767px) {
    .kmd-no-results-filter-recovery {
        display: block;
    }

    .kmd-no-results-filter-recovery .kmd-filter-toggle,
    .kmd-no-results-filter-reset {
        width: 100%;
    }

    .kmd-no-results-filter-reset {
        margin-top: 10px;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.2
============================================================ */


/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.3 – RESET-BUTTON BEI GESCHLOSSENEM FILTER
============================================================ */

/*
 * Filter und Schnell-Reset stehen in einer gemeinsamen Zeile.
 * Der Reset erscheint nur, wenn mindestens ein Filter aktiv ist.
 */
.kmd-filter-control-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 18px;
}

body.post-type-archive-product .kmd-filter-control-row .kmd-filter-toggle,
.kmd-filter-control-row .kmd-filter-toggle {
    flex: 1 1 240px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
}

.kmd-filter-quick-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 48px;
    padding: 10px 18px;
    border: 1px solid currentColor;
    border-radius: 6px;
    box-sizing: border-box;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
}

.kmd-filter-quick-reset:hover,
.kmd-filter-quick-reset:focus-visible {
    text-decoration: none !important;
}

/* Im geöffneten Filter ist der Reset bereits vorhanden. */
.kmd-filter-toggle[aria-expanded="true"] + .kmd-filter-quick-reset {
    display: none !important;
}

/* Bei 0 Treffern dieselbe Button-Zeile sauber verwenden. */
.kmd-no-results-filter-recovery {
    display: block;
}

.kmd-no-results-filter-recovery .kmd-filter-control-row {
    margin-bottom: 0;
}

@media screen and (max-width: 520px) {
    .kmd-filter-control-row {
        gap: 8px;
    }

    .kmd-filter-control-row .kmd-filter-toggle,
    .kmd-filter-quick-reset {
        min-height: 46px;
    }

    .kmd-filter-quick-reset {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.3
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.4 – AKTIVE FILTER IM PRODUKTKOPF
============================================================ */

/*
 * Direkt unter „ONLINESHOP / Produkte“ werden die aktuell
 * gesetzten Filter sichtbar. Jeder Chip kann einzeln entfernt werden.
 */
.kmd-products-active-filters {
    display: flex;
    align-items: center;
    gap: 9px 12px;
    flex-wrap: wrap;
    width: 100%;
    margin: 14px 0 0;
    padding: 11px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    box-sizing: border-box;
    background: #f6f7f8;
}

.kmd-products-active-filters-title {
    flex: 0 0 auto;
    color: #202428;
    font-size: 13px;
    line-height: 1.35;
}

.kmd-products-active-filter-chips {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    min-width: 0;
}

.kmd-products-active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid #d7dce0;
    border-radius: 999px;
    box-sizing: border-box;
    background: #ffffff;
    color: #30363b !important;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none !important;
}

.kmd-products-active-filter-chip:hover,
.kmd-products-active-filter-chip:focus-visible {
    border-color: #d71920;
    color: #202428 !important;
    text-decoration: none !important;
}

.kmd-products-active-filter-attribute {
    font-weight: 800;
}

.kmd-products-active-filter-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: 2px;
    border-radius: 50%;
    color: #d71920;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
}

/* Auch im 0-Treffer-Fall bleiben die gewählten Werte sichtbar. */
.kmd-no-results-filter-recovery .kmd-products-active-filters {
    margin-top: 12px;
}

@media screen and (max-width: 600px) {
    .kmd-products-active-filters {
        align-items: flex-start;
        padding: 10px;
    }

    .kmd-products-active-filters-title {
        flex-basis: 100%;
    }

    .kmd-products-active-filter-chips {
        width: 100%;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.4
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.6 – AUTOMATISCHES NACHLADEN
============================================================ */

.kmd-infinite-scroll-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 34px;
    margin: 26px 0 12px;
    text-align: center;
}

.kmd-infinite-scroll-spinner {
    display: none;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: kmd-infinite-scroll-spin .75s linear infinite;
}

.kmd-infinite-scroll-wrap.is-loading .kmd-infinite-scroll-spinner {
    display: inline-block;
}

.kmd-infinite-scroll-status {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.kmd-infinite-scroll-wrap.is-complete .kmd-infinite-scroll-status {
    color: #555;
}

/* Nur ausblenden, wenn Infinite Scroll per JS wirklich aktiv ist. */
.kmd-infinite-scroll-active .woocommerce-pagination {
    display: none !important;
}

@keyframes kmd-infinite-scroll-spin {
    to { transform: rotate(360deg); }
}

@media screen and (max-width: 767px) {
    .kmd-infinite-scroll-wrap {
        margin-top: 20px;
        padding: 0 12px;
    }
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.6 – AUTOMATISCHES NACHLADEN
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.7 – HEADER SHOP DIREKTLINK
============================================================ */

/* „SHOP / Alle Produkte“ darf im Header kein Dropdown mehr besitzen. */
header .kmd-shop-direct-link > .sub-menu,
header .kmd-shop-direct-link > .submenu,
header .kmd-shop-direct-link > .dropdown-menu,
header .kmd-shop-direct-link > .mega-menu,
header .kmd-shop-direct-link > .mega-sub-menu,
header .kmd-shop-direct-link > .pb-mega-menu,
header .kmd-shop-direct-link > [role="menu"] {
    display: none !important;
}

header .kmd-shop-direct-link > a::after {
    /* Kein vom Parent-Theme per CSS erzeugter Dropdown-Pfeil. */
    content: none !important;
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.7 – HEADER SHOP DIREKTLINK
============================================================ */

/* ============================================================
KLEIDUNGMITDRUCK CHILD v3.8 – SHOP-MEGA-MENÜ KOMPLETT ENTFERNT
============================================================ */

/* Vom Script als Direktlink markierte Shop-Menüpunkte dürfen nie wieder
   vom Parent-Theme als Dropdown dargestellt werden. */
header .kmd-shop-direct-link > .sub-menu,
header .kmd-shop-direct-link > .submenu,
header .kmd-shop-direct-link > .dropdown-menu,
header .kmd-shop-direct-link > .mega-menu,
header .kmd-shop-direct-link > .mega-sub-menu,
header .kmd-shop-direct-link > .pb-mega-menu,
header .kmd-shop-direct-link > [role="menu"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

header .kmd-shop-direct-link > a::after,
header .kmd-shop-direct-link > button::after,
header .kmd-shop-categories-direct::after,
header .kmd-shop-categories-direct::before {
    content: none !important;
    display: none !important;
}

/* ============================================================
END – KLEIDUNGMITDRUCK CHILD v3.8
============================================================ */
