/* assets/css/category.css */
/* Cohesion-first: verwacht dat assets/css/fs-cohesion.css al geladen is. */

/* ===== Page base ===== */
body{
    background: var(--bg);
    color: var(--ink);
}

:root{
    --filters-top: 0px;            /* omdat jouw header niet fixed is */
    --filtersbar-gap: 10px;        /* kleine ruimte onder breadcrumbs */
}

/* Optioneel: als sommige pagina’s nog een grijze wrapper hebben */
.g-bg-gray-light-v5,
.g-bg-gray-light-v5 > *{
    background: transparent !important;
}

/* ===== Breadcrumbs ===== */
.crumbs{
    padding: 14px 0;
    border-bottom: 1px solid rgba(14,24,39,.08);
}
.crumbs a{
    color: rgba(61,61,61,.78);
    text-decoration: none;
    font-weight: 800;
}
.crumbs a:hover{ color: var(--accent); }
.crumbs .sep{
    color: rgba(61,61,61,.38);
    margin: 0 8px;
}

/* ===== Filterbar (STICKY) ===== */
#filtersBar.filters-bar{
    position: sticky;
    top: var(--filters-top, 0px);
    z-index: 50;

    background: var(--bg); /* belangrijk: voorkomt ‘doorschemeren’ */
    padding: 10px 0 12px 0;
    margin-top: var(--filtersbar-gap);

    border-bottom: 1px solid rgba(14,24,39,.06);
}

/* De "plate" binnen de bar */
#filtersBar .filters-inner{
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(14,24,39,.08);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(11,18,32,.06);
    padding: 10px;

    display: grid;
    grid-template-columns: 1fr 320px 320px; /* zoek | subcat | keurmerk */
    gap: 12px;
    align-items: center;
}

/* wrapper doet niet mee met layout */
.filters-row{ display: contents; }
.filters-row .filter{ width:100%; min-width:0; }

/* Tip tekst compact */
#filtersBar .muted{
    margin: 6px 0 0 2px;
    font-size: 12px;
    line-height: 1.3;
}

/* Mobile */
@media (max-width: 991px){
    #filtersBar .filters-inner{ grid-template-columns: 1fr; }
}

/* ===== Search bar ===== */
.searchbar{
    position: relative;
    width: 100%;
}
.searchbar input{
    padding-left: 40px;
    border-radius: 9999px;
    border: 1px solid rgba(14,24,39,.10);
    background: rgba(255,255,255,.96);
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
    transition: border-color .2s ease, box-shadow .2s ease, transform .1s ease;
}
.searchbar input:focus{
    border-color: rgba(var(--accent-rgb), .35);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .14);
    outline: none;
}
.searchbar .fa-search{
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(61,61,61,.62);
}

/* ===== Producten scrollen gewoon mee met de pagina ===== */
#productsScroll.products-scroll{
    overflow: visible;      /* ✅ geen interne scroll */
    padding-top: 12px;
    border-radius: 18px;
}

/* Product grid geen extra margins nodig */
.product-grid{ margin-top: 0 !important; }

/* ===== Product cards ===== */
.product-card{
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.product-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 18px 45px rgba(11,18,32,.10);
    border-color: rgba(var(--accent-rgb), .18);
}
.product-card.has-promotion{
    border-color: rgba(var(--accent-rgb), .30);
    box-shadow: 0 14px 34px rgba(11,18,32,.08), inset 0 0 0 1px rgba(255,255,255,.55);
}

/* Modern media */
.product-thumb{
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(11,18,32,.03);
    border: 1px solid rgba(14,24,39,.06);
}
.product-thumb img{
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}
.product-card:hover .product-thumb img{ transform: scale(1.02); }

.product-thumb .fs-promo-badge{
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    z-index: 8 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 24px);
    min-height: 32px;
    padding: 5px 11px 5px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,248,241,.96));
    color: #173824 !important;
    border: 1px solid rgba(var(--accent-rgb), .34);
    box-shadow: 0 14px 28px rgba(11,18,32,.15);
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: 0;
}
.fs-promo-badge__icon{
    width: 21px;
    height: 21px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 21px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #f2a000);
    box-shadow: 0 7px 18px rgba(var(--accent-rgb), .26);
}
.fs-promo-badge__icon .fa{
    color: inherit;
    font-size: 10px;
}
.fs-promo-badge__text{
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 575px){
    .product-thumb .fs-promo-badge{
        top: 9px !important;
        left: 9px !important;
        max-width: calc(100% - 18px);
        min-height: 29px;
        padding: 4px 9px 4px 5px;
        font-size: 11px;
    }
    .fs-promo-badge__icon{
        width: 19px;
        height: 19px;
        flex-basis: 19px;
    }
}

.meta-row{
    display:flex;
    align-items:center;
    justify-content: space-between;
    margin-top: 8px;
    gap: 10px;
}

.product-title{
    font-size: 14px;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.35;
    margin: 10px 0 2px;
}
.product-title a{
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
.product-title a:hover,
.product-title a:focus{
    color: var(--accent) !important;
    text-decoration: none;
}

.product-art{ font-size: 12px; color: rgba(61,61,61,.65); }
.product-unit{ font-size: 11px; color: rgba(61,61,61,.70); }

.product-price{
    font-size: 18px;
    font-weight: 950;
    margin-top: 8px;
    color: var(--ink);
}

/* ===== CTA button ===== */
.btn-pill{
    border-radius: 14px;
    background: rgba(var(--accent-rgb), .10);
    color: var(--ink);
    border: 1px solid rgba(var(--accent-rgb), .28);
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 950;
    text-align: center;
    transition: background .2s ease, transform .1s ease, box-shadow .15s ease;
}
.btn-pill:hover{
    background: rgba(var(--accent-rgb), .14);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(var(--accent-rgb), .18);
}

/* ===== Chips ===== */
.chip{
    display:inline-flex;
    align-items:center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 9999px;
    background: rgba(11,18,32,.03);
    color: rgba(61,61,61,.80);
    border: 1px solid rgba(14,24,39,.08);
    font-size: 12px;
    font-weight: 900;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover{
    background: rgba(var(--accent-rgb), .10);
    color: var(--ink);
    border-color: rgba(var(--accent-rgb), .18);
}
.chip .fa{ font-size: 11px; opacity: .8; }

/* ===== Skeleton ===== */
.skeleton{ animation: pulse 1.2s ease-in-out infinite; }
.sk-card{
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 12px;
}
.sk-bar, .sk-thumb{
    background: rgba(11,18,32,.08);
    border-radius: 12px;
}
.sk-bar{ height: 10px; margin: 8px 0; }
.sk-thumb{ height: 140px; }

@keyframes pulse{
    0%,100%{ opacity:.6; }
    50%{ opacity:1; }
}

/* ===== Pagination ===== */
.pager-lite a,
.pager-lite span{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    border: 1px solid rgba(14,24,39,.10);
    margin-right: 6px;
    font-size: 12px;
    font-weight: 900;
    color: rgba(61,61,61,.85);
    background: rgba(255,255,255,.92);
    transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.pager-lite a:hover{
    border-color: rgba(var(--accent-rgb), .25);
    box-shadow: 0 10px 24px rgba(11,18,32,.08);
    transform: translateY(-1px);
    color: var(--ink);
}
.pager-lite .active{
    background: rgba(var(--accent-rgb), .12);
    color: var(--ink);
    border-color: rgba(var(--accent-rgb), .30);
}

/* ===== Product footer: voorraad-pill + icon-knoppen ===== */
.card-foot{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.stock-pill,
.voorraad-pill{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    height: 28px;
    padding: 0 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: .02em;
    white-space: nowrap;
    border: 1px solid rgba(14,24,39,.10);
    background: rgba(255,255,255,.92);
    color: rgba(61,61,61,.82);
}

.stock-pill .dot,
.voorraad-pill .dot{
    display:inline-block;
    width:8px;height:8px;border-radius:50%;
    background: rgba(61,61,61,.40);
}

.stock-pill.is-stock .dot,
.voorraad-pill.is-stock .dot{ background: rgba(34,197,94,.85); }
.stock-pill.is-low .dot,
.voorraad-pill.is-low .dot{ background: rgba(var(--accent-light-rgb), .95); }
.stock-pill.is-out,
.voorraad-pill.is-out{ color: rgba(61,61,61,.55); }
.stock-pill.is-out .dot,
.voorraad-pill.is-out .dot{ background: rgba(61,61,61,.22); }

.actions-icons{
    display:inline-flex;
    align-items:center;
    gap: 8px;
}

.btn-icon{
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(14,24,39,.10);
    background: rgba(255,255,255,.92);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    line-height: 1;
    text-decoration: none;
    color: rgba(61,61,61,.78);
    transition: transform .08s ease, border-color .12s ease, box-shadow .12s ease, color .12s ease;
}
.btn-icon:hover{
    border-color: rgba(var(--accent-rgb), .25);
    box-shadow: 0 10px 24px rgba(11,18,32,.08);
    color: var(--ink);
    transform: translateY(-1px);
}
.btn-icon:active{ transform: translateY(0); }

.btn-icon.is-fav,
.btn-icon.active{
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), .30);
    box-shadow: 0 10px 24px rgba(var(--accent-rgb), .14);
}

.actions{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 10px;
}
.actions .actions-icons{ margin-left: auto; }

.js-add-cart.is-loading{
    opacity: .6;
    pointer-events: none;
}

.product-actions ul.list-inline{
    display:flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0;
    margin: 0 0 8px 0;
    list-style: none;
}
.product-actions ul.list-inline li{ margin: 0; }
.product-actions ul.list-inline a{
    display:flex;
    align-items:center;
    justify-content:center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(14,24,39,.10);
    background: rgba(255,255,255,.92);
    transition: transform .08s ease, box-shadow .12s ease, border-color .12s ease, color .12s ease;
    text-decoration:none;
    color: rgba(61,61,61,.78);
}
.product-actions ul.list-inline a:hover{
    color: var(--ink);
    border-color: rgba(var(--accent-rgb), .25);
    box-shadow: 0 10px 24px rgba(11,18,32,.08);
    transform: translateY(-1px);
}
.product-actions ul.list-inline i{
    font-size: 17px;
    line-height: 1;
}

.product-card .assortiment_beheer{
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    width: 100%;
    padding: 8px 10px;
    line-height: 1.15;
    white-space: normal;
}

.product-card .assortiment_beheer span{
    display: inline-flex;
    align-items: center;
    transform: none !important;
}

.product-card .assortiment-icon{
    flex: 0 0 auto;
    font-weight: 950;
}

.product-card .assortiment-label{
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ===== Add-to-cart: soft cohesion brand variant ===== */
.product-card .js-add-cart.btn-pill{
    background: rgba(39, 93, 56, .10) !important;   /* soft brand */
    border: 1px solid rgba(39, 93, 56, .30) !important;
    color: var(--brand) !important;
}

/* Hover = iets voller, maar geen blok */
.product-card .js-add-cart.btn-pill:hover,
.product-card .js-add-cart.btn-pill:focus{
    background: rgba(39, 93, 56, .16) !important;
    border-color: rgba(39, 93, 56, .45) !important;
    color: var(--brand) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(39, 93, 56, .14);
    text-decoration: none;
}

/* Active subtiel */
.product-card .js-add-cart.btn-pill:active{
    background: rgba(39, 93, 56, .20) !important;
    transform: translateY(0);
}
