/* Layout wrapper */
.af-assortiment-wrap{
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    padding: 292px 24px 60px;
}

.af-acc {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.af-breadcrumbs{
    width: min(1200px, 92%);
    margin: 18px auto 0;
    font-size: 13px;
    opacity: .75;
}

/* Sidebar card */
.af-sidebar-card{
    background: #f3f3f3;
    padding: 24px;
    border-radius: 24px;
}

.af-sidebar-title{
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 48px;
}

.af-assortiment-desc__text em {
    color: #2c57ff;
}

/* Accordion */
.af-acc-item{
    overflow: hidden;
}

.af-acc-head{
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    height: 24px;
}

.af-acc-parent-link{
    text-decoration: none;
    color: #111;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.2;
}

.af-acc-parent-link.is-active{
    color: #2c57ff;
}

.af-acc-toggle{
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
}



.af-acc-chevron{
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-right: 2px solid #001989;
    border-bottom: 2px solid #001989;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.af-acc-item.is-open .af-acc-chevron{
    transform: rotate(225deg);
}

.af-top-controls{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 24px;
}

.af-woocommerce-ordering{
    width: auto;
    margin: 0;
}

.af-filter-btn{
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid #d7d7d7;
    background: #fff;
    color: #001989;
    padding: 0;
    cursor: pointer;
}

.af-filter-ico{
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.af-filter-overlay{
    display: none;
}


.af-filter-overlay-close{
    display: none;
}


/* Accordion panel animation (closed = NO spacing visible) */
.af-acc-panel{
    background: #e9e9e9;
    border-radius: 16px;

    display: grid;
    gap: 0;

    max-height: 0;
    overflow: hidden;

    opacity: 0;
    transform: translateY(-6px);

    margin: 0;          /* ✅ geen ruimte als gesloten */
    padding: 0;         /* ✅ geen padding als gesloten */

    transition:
            max-height .28s ease,
            opacity .20s ease,
            transform .20s ease,
            margin .20s ease,
            padding .20s ease;
}

/* Open state: spacing pas tonen wanneer open */
.af-acc-item.is-open .af-acc-panel{
    opacity: 1;
    transform: translateY(0);

    margin: 14px 0 14px;  /* ✅ nu pas zichtbaar */
    padding: 0 14px;       /* ✅ nu pas zichtbaar */
}

/* spacing inside panel */
.af-acc-panel > *:first-child{ margin-top: 14px; }
.af-acc-panel > *:last-child{ margin-bottom: 14px; }

.af-acc-item.is-open .af-acc-panel{
    opacity: 1;
    transform: translateY(0);
}

.af-acc-child-link{
    text-decoration: none;
    color: #111;
    font-weight: 400;
    font-size: 14px;
}

.af-acc-child-link.is-active{
    color: #2c57ff;
}

/* Main */
.af-assortiment-title{
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.af-assortiment-desc{
    max-width: 100%;
    margin-bottom: 48px;
    border-bottom: 2px solid #F6F6F6;
    padding-bottom: 48px;
}

/* Read more */
.af-assortiment-desc__text{
    font-size: 14px;
    line-height: 1.6;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.af-assortiment-desc.is-open .af-assortiment-desc__text{
    -webkit-line-clamp: initial;
    overflow: visible;
}

.af-readmore-btn{
    margin-top: 24px;
    border: 0;
    background: transparent;
    color: #ddbe52;
    font-weight: 400;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-style: italic;
}

.af-readmore-caret{
    width: 8px;
    height: 8px;
    border-right: 2px solid #ddbe52;
    border-bottom: 2px solid #ddbe52;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.af-assortiment-desc.is-open .af-readmore-caret{
    transform: rotate(225deg);
}

/* Grid cards */
.af-cat-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 10px;
    width: 100%;
}

a.added_to_cart.wc-forward {
    display: none;
}

.af-cat-card{
    text-decoration: none;
    color: #fff;
    border-radius: 16px;
    border: 2px solid #1e3fff;
    overflow: hidden;
    background: #fff;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 300px;
}

.af-cat-card__img{
    background: #fff;
    display: grid;
    place-items: center;
    padding: 0;
}

.af-cat-card__img img{
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
}

.af-cat-thumb-placeholder{
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30,63,255,.08), rgba(0,0,0,.03));
}

.af-cat-card__label{
    background: #081a6a;
    color: #fff;
    font-weight: 800;
    text-align: center;
    padding: 12px 10px;
    font-size: 12px;
}

.af-cat-card:hover{
    transform: translateY(-1px);
    transition: transform .15s ease;
}

.af-empty{
    margin-top: 20px;
    opacity: .7;
}

.af-sidebar-mobile-head{display:none;}

/* Responsive */
@media (max-width: 980px){
    .af-assortiment-wrap{
        grid-template-columns: 1fr;

    }
    .af-cat-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Mobile filter offcanvas (matches PDF design) */
    .af-filter-btn{
        display: inline-flex;
    }

    .af-filter-overlay{
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
        z-index: 9998;
        backdrop-filter: blur(10px);
    }

    html.af-filter-open .af-filter-overlay{
        opacity: 1;
        visibility: visible;
    }

    /* Close button on overlay (top-right) */
    .af-filter-overlay-close{
        position: fixed;
        top: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        border-radius: 999px;
        border: 2px solid #001989;
        background: #fff;
        color: #001989;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s ease;
        box-shadow: 0 10px 26px rgba(0,0,0,.22);
    }

    html.af-filter-open .af-filter-overlay-close{
        opacity: 1;
        visibility: visible;
    }

    /* Hide the close button inside the sidebar header on mobile (we use overlay close) */
    .af-sidebar-mobile-head .af-filter-close{
        display: none;
    }


    /* Sidebar becomes offcanvas */
    .af-assortiment-sidebar{
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: min(86vw, 300px);
        transform: translateX(-105%);
        transition: transform .28s ease;
        z-index: 9999;
        background: #fff;
        overflow: auto;
        padding: 14px 14px 22px;
    }

    html.af-filter-open .af-assortiment-sidebar{
        transform: translateX(0);
    }

    .af-sidebar-title{
        display: none;
    }

    .af-sidebar-mobile-head{
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 4px 2px 12px;
    }

    .af-sidebar-mobile-title{
        font-size: 18px;
        font-weight: 700;
    }

    .af-filter-close{
        background: transparent;
        border: 0;
        padding: 6px 10px;
        font-size: 28px;
        line-height: 1;
        color: #001989;
        cursor: pointer;
    }

    body.af-filter-open{
        overflow: hidden;
    }
}
@media (max-width: 560px){
    .af-cat-grid{
        grid-template-columns: 1fr;
    }
}



/* ===== Product grid like screenshot ===== */
.woocommerce ul.products{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    padding: 0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after{
    display: none !important;
}

.woocommerce ul.products li.product{
    list-style: none;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}

/* Card */
.af-product-card{
    border: 2px solid rgba(0,0,0,.08);
    border-radius: 22px;
    overflow: hidden;
    background: #fff;
    transition: border-color .15s ease, transform .15s ease;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.af-product-card:hover{
    border-color: #2c57ff;
    transform: translateY(-1px);
}

/* Whole clickable area (except cart button) */
.af-product-link{
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

/* Image area */
.af-product-image{
    padding: 24px 24px 10px;
    display: grid;
    place-items: center;
    min-height: 190px;
}
.af-product-thumb{
    width: 100%;
    height: auto;
    max-height: 170px;
    object-fit: contain;
}

/* Body text */
.af-product-body{
    padding: 10px 24px 14px;
}

.af-product-cat{
    color: #2c57ff;
    font-weight: 400;
    font-size: 13px;
    margin-bottom: 10px;
}

.af-product-title{
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    color: #0b1b3a;
}

/* Footer */
.af-product-footer{
    padding: 14px 18px 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.af-product-price{
    display: flex;
    gap: 14px;
    align-items: center;
}

/* Woo price */
.af-product-price .price{
    margin: 0 !important;
    font-weight: 900;
    font-size: 26px;
    color: #111;
}
.af-product-price .woocommerce-Price-amount{
    font-weight: 900;
}
.af-product-price del{
    opacity: .5;
    font-size: 14px;
}
.af-product-price ins{
    text-decoration: none;
}

.af-price-tax{
    font-size: 11px;
    opacity: .55;
    text-decoration: underline;
}

/* Green cart button */
.af-add-to-cart{
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: #11c311;
    display: grid;
    place-items: center;
    padding: 0 !important;
    min-width: 56px;
    box-shadow: none !important;
    border: 0 !important;
}

.af-add-to-cart:hover{
    filter: brightness(.95);
}

.af-cart-ico{
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* Remove Woo default button styles conflicts */
.woocommerce ul.products li.product .button{
    margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 980px){
    .woocommerce ul.products{
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px){
    .woocommerce ul.products{
        grid-template-columns: 1fr;
    }
}



/* Zorg dat de sidebar container een vaste hoogte heeft */
@media (max-width: 980px){

    /* Sidebar card wordt wit en strak zoals design */
    .af-sidebar-card{
        background: #fff;
        border-radius: 0;
        padding: 0;
    }

    .af-sidebar-mobile-head{
        padding: 14px 16px;
        border-bottom: 1px solid #dbe4ff;
    }

    .af-acc{
        gap: 0; /* geen ruimte tussen items */
    }

    .af-acc-item{
        border-radius: 0;
        overflow: visible; /* belangrijk: panel niet “geknipt” */
    }

    .af-acc-head{
        padding: 14px 16px;
        border-bottom: 1px solid #dbe4ff;
        height: auto;
    }

    /* Subcategorie panel: GEEN grijze box meer */
    .af-acc-panel{
        background: transparent;
        border-radius: 0;
        margin: 0;
        padding: 0;
        transform: none;
    }

    .af-acc-item.is-open .af-acc-panel{
        margin: 0;
        padding: 0;
    }

    /* verwijder die extra spacing hacks in panel */
    .af-acc-panel > *:first-child,
    .af-acc-panel > *:last-child{
        margin: 0;
    }

    /* Subcategorie links als nette lijst */
    .af-acc-child-link{
        display: flex;
        padding: 14px 18px 16px 28px;
        border-bottom: 1px solid #dbe4ff;
        font-weight: 500;
        align-items: center;
        height: 45px;
        width: 100%;
    }

    .af-acc-child-link.is-active{
        color: #2c57ff;
    }
}

ul.products.columns-4 {
    margin-top: 48px;
}


@media (max-width: 980px){

    /* accordion panel animatie via CSS (geen inline px) */
    .af-acc-panel{
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .28s ease, opacity .28s ease;
    }

    .af-acc-item.is-open .af-acc-panel{
        max-height: 2000px; /* groot genoeg */
        opacity: 1;
    }

}





































/* Mobile category chips (2 visible + swipe) */
.af-mobile-bar{ display:none; }

    @media (max-width: 980px){

    /* bar full width (ook als parent max-width heeft) */
    .af-mobile-bar{
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding: 0 16px;
        box-sizing: border-box;

        display: flex;
        align-items: center;
        gap: 10px;
        margin-top: 12px;
        padding-left: 24px;
        padding-right: 24px;
    }

    /* tabs: horizontaal swipen */
    .af-mobile-tabs{
        flex: 1 1 auto;
        min-width: 0;

        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 10px;

        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;

        padding: 0 0 10px 0;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;

        position: relative;
    }

    .af-mobile-tabs::-webkit-scrollbar{ display:none; }

    /* ✅ altijd 2 chips tegelijk zichtbaar (werkt voor <a>, <button>, etc.) */
    .af-mobile-tabs > *{
        flex: 0 0 calc((100% - 10px) / 2) !important;
        max-width: calc((100% - 10px) / 2) !important;
        scroll-snap-align: start;
    }

    /* chip styling */
    .af-mobile-tab,
    .af-mobile-tabs > a,
    .af-mobile-tabs > button{
        display: flex;
        align-items: center;
        justify-content: center;

        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;

        padding: 10px 12px;
        border: 1px solid #d9d9d9;
        border-radius: 4px;
        background:#fff;
        font-weight: 600;
        line-height: 1;
        text-decoration:none;
        color:#111;
        box-sizing: border-box;
    }

    .af-mobile-tab.is-active{
        border-color:#001989;
    }

    /* fade rechts zoals design */
    .af-mobile-bar-right:before{
        content: "";
        position: absolute;
        top: 1px;
        left: -50px;
        bottom: 2px;
        width: 48px;
        pointer-events: none;
        background: linear-gradient(to left, #fff 60%, rgba(255, 255, 255, 0));
    }

    /* rechter controls (filter / ordering) */
    .af-mobile-bar-right{
        flex: 0 0 auto;
        display:flex;
        align-items:center;
        gap:10px;
        margin-top: -9px;
        position: relative;
    }

    /* ordering */
    .af-mobile-ordering .woocommerce-ordering{ margin:0; }
    .af-mobile-ordering select{
        height: 38px;
        border-radius: 4px;
    }

    /* filter button */
    .af-mobile-filter-btn{
        width: 40px;
        height: 38px;
        border-radius: 4px;
        border: 1px solid #d9d9d9;
        background:#fff;
        display:flex;
        align-items:center;
        justify-content:center;
        cursor:pointer;
        flex: 0 0 auto;
    }
    .af-mobile-filter-btn svg{
        width: 18px;
        height: 18px;
        fill:#111;
    }

    /* hand/hint uit */
    .af-mobile-tabs-hint{ display:none !important; }
}


@media (max-width: 980px){

    /* chips tekst beter leesbaar */
    .af-mobile-tab{
        font-size: 13px;        /* iets kleiner */
        padding: 10px 10px;     /* iets minder padding */
        font-weight: 600;
        justify-content: flex-start; /* tekst start links, leest beter */
    }

    /* ellipsis werkt alleen als er echte overflow is */
    .af-mobile-tab{
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* geef iets meer ruimte door de chip iets breder te maken */
    .af-mobile-tabs > *{
        flex: 0 0 70% !important;     /* i.p.v. exact 50% */
        max-width: 70% !important;
    }
}