.af-cart { margin: 0 auto; }
.af-cart__grid { display: grid; grid-template-columns: 1fr 380px; gap: 72px; align-items: start; }
.af-cart__title { font-size: 44px; line-height: 1.1; margin: 0 0 18px; }

/* Free shipping bar */
.af-free-ship{ width: 100%; margin: 14px 0 24px; text-align: left; }
.af-free-ship__inner { background: #1539ab; border-radius: 10px; padding: 14px 16px; color: #fff; }
.af-free-ship__text { font-size: 14px; margin-bottom: 10px; }
.af-free-ship__bar { height: 8px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; }
.af-free-ship__bar span { display: block; height: 100%; background: rgba(255,255,255,.9); border-radius: 999px; }

/* Header + rows */
.af-cart__head { display: grid; grid-template-columns: 1fr 220px 160px; padding: 14px 0; border-bottom: 2px solid #00184c; margin-bottom: 8px; }
.af-cart__row  { display: grid; grid-template-columns: 1fr 220px 160px; padding: 28px 0; border-bottom: 1px solid #e9edf3; align-items: center; }
.af-cart__h { font-weight: 700; color: #0b1b3f; }

.af-col-qty { text-align: center; }
.af-col-subtotal { text-align: right; }

/* Product */
.af-prod { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; }
.af-prod__thumb img { width: 72px; height: 52px; object-fit: contain; border-radius: 8px; border: 1px solid #eef2f7; padding: 6px; background:#fff; }
.af-prod__name a { font-weight: 700; color: #0b1b3f; text-decoration: none; }
@media (hover:hover){.af-prod__name a:hover { text-decoration: underline; }}

/* ===== Quantity (precies zoals screenshot) ===== */
.af-qty{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.af-qty__pill{
    display: inline-flex;
    align-items: stretch;
    background: #e9e9e9;
    border-radius: 8px;
    overflow: hidden;
    height: 40px;
    min-width: auto;
}

.af-qty__btn{
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    color: #111;
    user-select: none;
}
@media (hover:hover){.af-qty__btn:hover{ background: rgba(255,255,255,.25); }}

.af-qty__input{ display: inline-flex; align-items: stretch; }
.af-qty__input .quantity{ display: inline-flex; align-items: stretch; margin: 0; }
.af-qty__input .quantity label{ display:none !important; }

.af-qty__input .quantity input.af-qty__field,
.af-qty__input .quantity input.qty{
    width: 120px !important;
    height: 68px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: center !important;
    font-size: 44px !important;
    font-weight: 900 !important;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    -moz-appearance: textfield;
}
.af-qty__input .quantity input[type=number]::-webkit-outer-spin-button,
.af-qty__input .quantity input[type=number]::-webkit-inner-spin-button{
    -webkit-appearance: none;
    margin: 0;
}

/* Remove icon */
.af-remove{
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #111;
    text-decoration: none;
}
@media (hover:hover){.af-remove:hover{ opacity:.75; }}

/* Subtotal: prijs + excl. BTW op 1 regel */
.af-subtotal{
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 10px;
}
.af-subtotal__price{ font-weight: 700; color: #0b1b3f; }
.af-subtotal__note {
    color: #6a7a92;
    margin: 0;
    font-size: 11px;
    opacity: .55;
    text-decoration: underline;
}

/* Verder winkelen */
.af-cart__actions { padding-top: 18px; padding-bottom: 48px; }
.af-btn { display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 22px; border-radius: 10px; font-weight: 700; text-decoration: none; }

.af-btn--ghost { border: 2px solid #00184c; color: #00184c; background: #fff; }

@media (hover:hover){.af-btn--ghost:hover { background: #1539ab; border-color: #1539ab; color: #fff; }}

/* Totals */
.af-row-loading { opacity: .55; }

@media (max-width: 980px) {
    .af-cart__title { font-size: 28px; }
    /* minmax(0,1fr) i.p.v. 1fr: de track mag tot 0 krimpen zodat de kolom niet
       uitdijt tot de min-content van de rij (~320px) en over de rand loopt. */
    .af-cart__grid { grid-template-columns: minmax(0, 1fr); }
    /*.af-cart__head { display: none; }*/
    .af-cart__row { grid-template-columns: 1fr; gap: 10px; }
    .af-col-qty, .af-col-subtotal { text-align: left; display: none; }
    .af-qty { justify-content: flex-start; }
    .af-subtotal{ justify-content: flex-start; }
    .af-qty__pill{ width: 76px; height:35px; }
    .af-qty__btn{ height:35px; font-size:14px; }
    .af-qty__mid{ height:35px !important; }   /* !important: base-regel staat later in het bestand */
    .af-qty__display{ font-size: 14px !important; }   /* qty-getal kleiner (was 16px); !important want de base-regel staat later in het bestand */
    .af-qty__input .quantity input.qty{ width:80px!important; height:56px!important; font-size:34px!important; }


    .af-cart__head {
        display: flex;
        justify-content: space-between;
    }

    .af-cart__h.af-col-qty{ display: flex;}
}


.af-qty__mid{
    width: 60px;
    height: 40px;
    background: #fff;
    display:flex;
    align-items:center;
    justify-content:center;
}

.af-qty__display{
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    border-bottom: 2px solid #e9e9e9;
    border-top: 2px solid #e9e9e9;
    outline: none;
    padding: 0;
}

/* Hide native number spinners — we use custom +/- buttons */
.af-qty__display::-webkit-outer-spin-button,
.af-qty__display::-webkit-inner-spin-button{
    -webkit-appearance: none;
    margin: 0;
}
.af-qty__display[type="number"]{
    -moz-appearance: textfield;
}

@media (hover:hover){.af-qty__btn:hover {
    background: #1539ab;
    color: #fff;
}}



/* =========================================================
   TOTALS (netjes/klein zoals screenshot Winkelwagen.jpeg)
   Alleen toevoegen ONDERAAN je bestaande cart.css
========================================================= */

.af-cart__totals .cart_totals,
.af-cart__totals .woocommerce-cart-totals{
    background:#fff;
    border:1px solid #e9edf3;
    border-radius:14px;
    padding:18px;
    box-shadow:none;
}

/* Titel */
.af-cart__totals .cart_totals > h2,
.af-cart__totals .woocommerce-cart-totals > h2{
    margin:0 0 6px;
    font-size:14px;
    font-weight:800;
    color:#0b1b3f;
}

/* Note (italic) */
.af-cart__totals .af-totals__note{
    margin:0 0 12px;
    padding-bottom:12px;
    border-bottom:1px solid #e9edf3;
    font-size:12px;
    font-style:italic;
    color:#6a7a92;
}

/* Tabel */
.af-cart__totals .cart_totals table,
.af-cart__totals .woocommerce-cart-totals table{
    width:100%;
    border-collapse:collapse;
    margin:10px 0 0;
}

.af-cart__totals .cart_totals th,
.af-cart__totals .woocommerce-cart-totals th{
    text-align:left;
    padding:7px 0;
    font-size:13px;
    font-weight:600;
    color:#0b1b3f;
    border:0;
}

.af-cart__totals .cart_totals td,
.af-cart__totals .woocommerce-cart-totals td{
    text-align:right;
    padding:7px 0;
    font-size:13px;
    font-weight:800;
    color:#0b1b3f;
    border:0;
}

/* Blauwe "Totaal" balk */
.af-cart__totals .cart_totals tr.order-total th,
.af-cart__totals .cart_totals tr.order-total td,
.af-cart__totals .woocommerce-cart-totals tr.order-total th,
.af-cart__totals .woocommerce-cart-totals tr.order-total td{
    background:#e9eeff;
    padding:12px 12px;
}

.af-cart__totals .cart_totals tr.order-total th,
.af-cart__totals .woocommerce-cart-totals tr.order-total th{
    border-top-left-radius:10px;
    border-bottom-left-radius:10px;
    color:#1539ab;
    font-weight:800;
}

.af-cart__totals .cart_totals tr.order-total td,
.af-cart__totals .woocommerce-cart-totals tr.order-total td{
    border-top-right-radius:10px;
    border-bottom-right-radius:10px;
}

.af-cart__totals .cart_totals tr.order-total td .amount,
.af-cart__totals .woocommerce-cart-totals tr.order-total td .amount{
    color:#1539ab;
    font-weight:900;
}

/* Groene checkout knop */
.af-cart__totals .wc-proceed-to-checkout{
    margin:14px 0 0;
    padding:0;
}

.af-cart__totals .wc-proceed-to-checkout a.checkout-button{
    width:100%;
    height:54px;
    border-radius:10px;
    background:#18b11d;
    border:1px solid #18b11d;
    color:#fff;
    font-size:13px;
    font-weight:900;
    text-decoration:none;
    display:flex;
    align-items:center;
    justify-content:center;
    box-shadow:none;
}

@media (hover:hover){.af-cart__totals .wc-proceed-to-checkout a.checkout-button:hover{
    filter:brightness(.98);
}}

/* Offerte knop (outline) – eerst proberen via .af-totals__cta, anders pak 2e knop in totals */
.af-cart__totals .af-totals__cta a + a,
.af-cart__totals .af-totals__cta a.af-offerte,
.af-cart__totals a.af-offerte,
.af-cart__totals .af-offerte-btn{
    margin-top:10px;
    width:100%;
    height:54px;
    border-radius:10px;
    border:2px solid #00184c;
    color:#00184c;
    background:#fff;
    font-size:13px;
    font-weight:900;
    display:flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
}
@media (hover:hover){.af-cart__totals .af-totals__cta a + a:hover,
.af-cart__totals .af-totals__cta a.af-offerte:hover,
.af-cart__totals a.af-offerte:hover,
.af-cart__totals .af-offerte-btn:hover{
    background:#1539ab;
    border: 2px solid #1539ab;
    color:#fff;
}}



a.af-checkout-btn {
    display: flex;
    background: #13C614;
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    color: #fff;
    height: 54px;
    text-align: center;
    justify-content: center;
}

@media (hover:hover){.af-checkout-btn:hover {
    background: #011989;
}}

.af-totals__row.af-totals__row--total {
    background: #E6EAFF;
    justify-content: space-between;
    display: flex;
    color: #1539ab;
    border-radius: 8px;
    margin-top: 14px;
    margin-bottom: 14px;
    padding: 14px;
    flex-wrap: nowrap;
    height: 54px;
}



.af-cart__totals {
    border: 2px solid #ECECEC;
    padding: 38px;
    border-radius: 14px;
    position: sticky;
    top: 0;
}

/* Op mobiel minder padding in het totalen-blok (14px i.p.v. 38px). Border +
   radius blijven (staan hierboven, globaal). */
@media (max-width: 767px){
    .af-cart__totals{
        padding: 14px;
    }
}

h2.af-totals__title {
    font-size: 18px;
    margin-bottom: 14px;
}




.af-totals__row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    margin-bottom: 14px;
    margin-top: 14px;
}





/* Verberg mobile prijs op desktop */
.af-prod__price-mobile{
    display: none;
}

/* MOBILE layout: titel boven, daarna 1 rij: image | prijs | qty | verwijderen */
@media (max-width: 980px){

    /* Eén rij: thumb | prijs | qty | remove. Qty smaller (76px) + kleinere thumb
       (72px) + krappe gaps zodat alles ook op ~292px (320px scherm) past. */
    .af-cart__row{
        display: grid !important;
        grid-template-columns: 72px 1fr auto auto;
        grid-template-areas:
      "title  title  title  title"
      "thumb  price  qty    remove";
        column-gap: 10px;
        row-gap: 12px;
        align-items: center;
        padding: 22px 0;
        min-width: 0;
    }

    /* kolommen “flattenen” zodat we onderdelen kunnen plaatsen */
    .af-col-product,
    .af-col-qty{
        display: contents;
    }

    /* product blok ook flattenen */
    .af-prod{
        display: contents;
    }

    /* Naam boven, variatie-chips helemaal onderaan de rij (netter). meta
       display:contents zodat naam + chips los in het rij-grid vallen. */
    .af-prod__meta{
        display: contents;
    }
    .af-prod__name{
        grid-area: title;
    }
    .af-cart-variation-chips{
        grid-column: 1 / -1;   /* volle breedte onderaan */
        grid-row: 3;           /* onder thumb/prijs/qty/remove; impliciete rij =
                                  geen leeg gat bij simpele producten zonder chips */
        margin-top: 4px;
    }

    /* afbeelding links */
    .af-prod__thumb{
        grid-area: thumb;
    }

    /* prijs naast afbeelding */
    .af-prod__price-mobile{
        display: block;
        grid-area: price;
        font-weight: 700;
        font-size: 14px;
        color: #0b1b3f;
        justify-self: start;
        align-self: center;
    }

    /* qty en remove naast elkaar rechts */
    .af-qty{
        display: contents;
    }

    .af-qty__pill{
        grid-area: qty;
        justify-self: start;
    }

    .af-remove{
        grid-area: remove;
        justify-self: end;
        width: 44px;
        height: 44px;
    }

    /* subtotaal kolom verbergen op mobiel (je gebruikt nu de mobile prijs) */
    .af-col-subtotal{
        display: none !important;
    }

    /* Grid-items mogen krimpen tot de kolombreedte (min-width:0), anders dijen
       ze uit tot hun min-content en lopen ze over de rechterrand. */
    .af-cart__items,
    .af-cart__list,
    .af-cart__row,
    .af-prod__meta{
        min-width: 0;
    }
    .af-prod__name{
        overflow-wrap: anywhere;
    }

    /* Container-padding op mobiel 24 -> 14px: links/rechts consistent 14px,
       en meer ruimte voor de cart. */
    body.page-id-8 main#brx-content > section.brxe-section > .brxe-container{
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}


.af-totals__row.af-totals__row--total  small.includes_tax {
    display: none;
}


/* Variaties als chips (winkelwagen + afrekenen) */
.af-cart dl.variation,
.woocommerce-cart dl.variation,
.woocommerce-checkout dl.variation,
.woocommerce-checkout-review-order dl.variation,
.woocommerce-cart-form dl.variation{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:10px 0 0;
  width:100%;
  background:transparent;
  padding:0;
    zoom: 0.7;
}

.woocommerce-cart dl.variation dt,
.woocommerce-checkout dl.variation dt,
.woocommerce-checkout-review-order dl.variation dt,
.woocommerce-cart-form dl.variation dt{display:none !important;}

.woocommerce-cart dl.variation dd,
.woocommerce-checkout dl.variation dd,
.woocommerce-checkout-review-order dl.variation dd,
.woocommerce-cart-form dl.variation dd{
  margin:0 !important;
  border:2px solid var(--af-accent, #1539ab);
  border-radius:8px;
  overflow:hidden;
  background:#fff;
  min-width:140px;
}

.woocommerce-cart dl.variation dd p,
.woocommerce-checkout dl.variation dd p,
.woocommerce-checkout-review-order dl.variation dd p,
.woocommerce-cart-form dl.variation dd p{
  margin:0 !important;
  padding:10px 14px;
  font-weight:800;
  color:var(--af-accent, #1539ab);
  text-align:center;
  line-height:1.1;
}

.woocommerce-cart dl.variation dd::after,
.woocommerce-checkout dl.variation dd::after,
.woocommerce-checkout-review-order dl.variation dd::after,
.woocommerce-cart-form dl.variation dd::after{
  display:block;
  padding:8px 14px;
  font-size:12px;
  background:var(--af-accent, #1539ab);
  color:#fff;
  text-align:center;
  line-height:1.1;
}

/* Labels via WooCommerce dd classes */
dl.variation dd.variation-Breedteonderplaat::after{content:"Breedte onderplaat";}
dl.variation dd.variation-Hoogtezijwand::after{content:"Hoogte zijwand";}
dl.variation dd.variation-Lengte::after{content:"Lengte";}

@media (max-width:600px){
  .woocommerce-cart dl.variation dd,
  .woocommerce-checkout dl.variation dd,
  .woocommerce-checkout-review-order dl.variation dd,
  .woocommerce-cart-form dl.variation dd{min-width:120px;}
}


/* Dynamische variatiechips in winkelwagen */
.af-cart-variation-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    zoom: 0.7;
}

.af-cart-chip{
    display:inline-flex;
    flex-direction:column;
    min-width:125px;
    border:1.5px solid #1539ab;
    border-radius:16px;
    overflow:hidden;
    background:#fff;
}

.af-cart-chip__value{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:8px 14px;
    text-align:center;
    font-weight:800;
    font-size:14px;
    line-height:1.15;
    color:#1539ab;
    background:#eef1f8;
}

.af-cart-chip__label{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:34px;
    padding:8px 14px;
    text-align:center;
    font-size:11px;
    line-height:1.1;
    color:#fff;
    background:#1539ab;
}

@media (max-width: 980px){
    .af-cart-variation-chips{
        gap:10px;
    }

    .af-cart-chip{
        min-width:88px;
    }
}

/* =========================================================
 * Lege winkelwagen — zelfde opmaak als de gevulde pagina
 * ========================================================= */
.af-cart--empty{
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 14px 48px;
    text-align: center;
}
.af-cart--empty .af-cart__title{ margin-bottom: 12px; }
.af-cart__empty-text{
    margin: 0 0 24px;
    font-size: 16px;
    line-height: 1.5;
    color: #475569;
}
.af-cart__empty-actions{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.af-cart__empty-actions > a{ flex: 0 1 260px; }

@media (max-width: 600px){
    .af-cart__empty-actions > a{ flex: 1 1 100%; }
}

/* =========================================================
 * .af-totals draagt sinds de btw-toggle-fix óók de WooCommerce-klasse
 * .cart_totals. Dat is nodig: zonder die klasse kan WooCommerce de totalen
 * niet verversen na het omschakelen van de btw-weergave of na een
 * aantalswijziging.
 *
 * Bijeffect: de .cart_totals-regels hierboven (geschreven voor de originele
 * WooCommerce-markup) werden daardoor actief en zetten een tweede kader
 * binnen .af-cart__totals. De kaartopmaak hoort op .af-cart__totals te zitten,
 * dus die binnenste opmaak zetten we hier terug.
 * ========================================================= */
.af-cart__totals .af-totals.cart_totals{
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* De titel houdt zijn eigen maatvoering (de .cart_totals > h2-regel hierboven
   is bedoeld voor de standaard WooCommerce-tabel, niet voor dit blok). */
.af-cart__totals .af-totals.cart_totals > h2.af-totals__title{
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
    color: #0b1b3f;
}

/* =========================================================
 * Winkelwagen op een telefoon
 *
 * Gemeten op 390x844 voordat er iets aan gedaan is:
 * - de plus/min-knoppen waren 22x35px, te klein om te raken;
 * - er stond een tabelkop "Product | Aantal" boven één kolom kaarten;
 * - tussen de artikelen en het overzicht gaapte 72px leegte;
 * - het totaal en de bestelknop stonden pas onder aan de pagina.
 * ========================================================= */

@media (max-width: 980px){

    /* ---- Aantal: knoppen om aan te tikken ----
       44px is de ondergrens voor een betrouwbare tik. De knoppen zijn
       40px breed zodat de hele regel (thumb, prijs, aantal, prullenbak)
       ook op een 360px-scherm past. */
    .af-cart__row .af-qty__pill{
        width: 120px !important;
        height: 44px !important;
        border-radius: 10px;
    }
    .af-cart__row .af-qty__btn{
        width: 40px;
        height: 44px !important;
        font-size: 19px !important;
        line-height: 1;
    }
    .af-cart__row .af-qty__mid{
        width: 40px !important;
        height: 44px !important;
    }
    .af-cart__row .af-qty__display{ font-size: 16px !important; }

    /* ---- Tabelkop weg ----
       "Product | Aantal" hoort bij een tabel met kolommen. Op een telefoon
       staat er één kolom kaarten; de kop wijst dan nergens naar. */
    .af-cart__head{ display: none !important; }

    /* ---- Lucht eruit ---- */
    .af-cart__grid{ gap: 24px; }
    .af-cart__actions{ padding: 18px 0 0 !important; }
    .af-cart__row{ padding: 18px 0; }

    /* ---- Vaste balk onderaan ---- */
    .af-cart__stickybar{
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid #e3e9f4;
        box-shadow: 0 -8px 24px rgba(0, 24, 76, .12);
    }
    .af-cart__stickybar[hidden]{ display: none; }

    /* Zodra de echte bestelknop in beeld staat, schuift de balk weg. */
    .af-cart__stickybar{
        transition: transform .2s ease, opacity .2s ease;
    }
    .af-cart__stickybar.is-overbodig{
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

    .af-cart__stickybar-info{
        display: flex;
        flex-direction: column;
        gap: 1px;
        flex: 0 0 auto;
        min-width: 0;
    }
    .af-cart__stickybar-label{
        font-size: 11px;
        font-weight: 700;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: #6b7a99;
    }
    .af-cart__stickybar-total{
        font-size: 17px;
        font-weight: 800;
        color: #00184c;
        white-space: nowrap;
    }
    .af-cart__stickybar-btn{
        flex: 1 1 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 50px;
        padding: 0 16px;
        border-radius: 10px;
        background: #46b51b;
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        text-decoration: none;
        text-align: center;
    }
    .af-cart__stickybar-btn:hover,
    .af-cart__stickybar-btn:focus{ color: #fff; }
    .af-cart__stickybar-btn:focus-visible{
        outline: none;
        box-shadow: 0 0 0 3px rgba(70, 181, 27, .35);
    }

    /* Ruimte onderaan de pagina, zodat de balk niets afdekt. */
    body.woocommerce-cart main#brx-content{ padding-bottom: 86px; }
}

/* Boven 980px staat het overzicht naast de artikelen; dan is de balk
   overbodig. */
@media (min-width: 981px){
    .af-cart__stickybar{ display: none !important; }
}

@media (prefers-reduced-motion: reduce){
    .af-cart__stickybar{ transition: none; }
}

/* De transportkosten-regel stond cursief. Cursief leest trager en is hier
   een feit, geen terzijde - rechtop dus, met wat meer contrast zodat hij
   ook echt gelezen wordt. */
.af-cart__totals .af-totals__note{
    font-style: normal;
    font-size: 12.5px;
    line-height: 1.45;
    color: #5b6b86;
}
