/* ==========================================================================
   Banierhuis — Cart page card layout
   Scope: cart page only (enqueued only on is_cart()). Every single
   selector below is qualified under the unique wrapper ".capf-cart-page"
   (see woocommerce/cart/cart.php) — no bare/generic selector (.product,
   .price, .quantity, .cart, button, img, table) is used anywhere, and no
   !important is used. Nothing here can leak into Elementor, other
   WooCommerce templates, or the rest of the site.
   ========================================================================== */

.capf-cart-items {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 0 0px;
}

.capf-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 18px 22px;
    border-radius: 6px;
    border: 2px solid #F28C0B;
    background: #FAF2EA;
    position: relative;
    flex-wrap: wrap;          /* lets the Service Cheque strip sit full-width below thumbnail + body */
    row-gap: 14px;
}
.capf-cart-item__remove {
    padding-top: 0;
    position: absolute;
    right: 20px;
    top: 10px;
    display: block;
}

.capf-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 29px;
	height: 29px;
	border-radius: 50%;
	color: #1b3a5c;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
}

.capf-cart-item__remove-link:hover {
	opacity: 1;
	color: #a3271f;
}

.capf-cart-item__thumbnail {
    flex: 0 0 auto;
    width: 25%;
}

.capf-cart-item__thumbnail a {
	display: block;
}

.capf-cart-item__thumbnail img {
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: auto;      /* no forced square crop */
	object-fit: contain;     /* show the whole picture */
	display: block;
	border-radius: 6px;
}

.capf-cart-item__body {
	flex: 1 1 0;              /* was auto: keeps thumbnail + body on one row now that the card wraps */
	min-width: 0;
}

.capf-cart-item__name.product-name a {
	font-family: "capitana", Sans-serif;
    color: #123F60 !important;
    font-size: 24px;
    font-style: normal;
    font-weight: 500;
    line-height: 135%;
}

.capf-cart-item__name a {
	color: inherit;
	text-decoration: none;
}

.capf-cart-item__name a:hover {
	text-decoration: underline;
}
.capf-cart-item__name.product-name {
    margin: 12px 0;
}
.capf-cart-item__price {
	font-family: "capitana", Sans-serif;
	font-weight: 700;
	color: #1b3a5c;
	white-space: nowrap;
}
.woocommerce-cart  .elementor-widget-woocommerce-cart .woocommerce {
    font-family: "capitana", Sans-serif;
}

/* ---- Variation attributes (wc_get_formatted_cart_item_data output) ------ */

.capf-cart-item__meta .variation {
	margin: 8px 0 0;
	font-size: 13px;
	color: #4a5568;
}
.capf-cart-item__meta .variation dt,
.capf-cart-item__meta .variation dd {
	display: inline;
	margin: 0;
	font-weight: 400;
}
.capf-cart-item__meta .variation dt {
	font-weight: 600;
	color: #1b3a5c;
}
.capf-cart-item__meta .variation dd p {
	display: inline;
	margin: 0;
}
.capf-cart-item__meta .variation > * {
	display: block;
}
.capf-cart-item__meta .backorder_notification {
	margin: 6px 0 0;
	font-size: 12px;
	color: #a3271f;
}
.capf-cart-item__footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.capf-cart-item__footer {
    justify-content: space-between;
}
.capf-cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    font-family: "capitana", Sans-serif;
}
.capf-cart-item__quantity .capf-qty__label {
    color: #123F60;
    font-size: 13px;
    font-weight: 400;
}
.capf-qty {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.capf-qty .quantity {
    margin: 0;
}
.capf-qty__btn {
    appearance: none;
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #123F60;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.capf-qty__btn:hover:not(:disabled) {
    color: var( --e-global-color-primary );
    background: var( --e-global-color-effa189 );
}
.capf-qty__btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}
.capf-qty__btn:focus-visible,
.capf-qty input.qty:focus-visible {
    outline: 2px solid #F28C0B;
    outline-offset: 2px;
}
/* Hide any +/- another plugin/theme injects around the input; ours are .capf-qty__btn */
.capf-qty .quantity .plus,
.capf-qty .quantity .minus,
.capf-qty .quantity .qty-btn {
    display: none;
}
/* Cart is refreshing after a quantity change */
.capf-is-updating {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}
.capf-cart-item__quantity .quantity {
	display: inline-flex;
}
.capf-cart-item__quantity input.qty {
	width: 52px;
	height: 40px;
	padding: 6px;
	text-align: center;
	border: 0;
	border-radius: 6px;
	background: #fff;
	color: #123F60;
	font-size: 22px;
	font-weight: 500;
	-moz-appearance: textfield;
	appearance: textfield;
}
.capf-cart-item__quantity input.qty::-webkit-outer-spin-button,
.capf-cart-item__quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.capf-cart-item__subtotal {
    font-weight: 600;
    color: #F28C0B;
    font-size: 35px;
    text-align: left;
}
.capf-cart-item__brand {
    color: #F28C0B;
    font-family: Capitana;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 120%;
    text-transform: uppercase;
}
.capf-cart-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}
.capf-cart-coupon {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1 1 auto;
}

.capf-cart-coupon input.input-text {
	padding: 10px 12px;
	border: 1px solid #e3ddd2;
	border-radius: 6px;
	color: #1b3a5c;
	flex: 1 1 220px;
	max-width: 260px;
}

.capf-cart-actions button.button {
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 700;
	border: 1px solid #1b3a5c;
	background: #fff;
	color: #1b3a5c;
	cursor: pointer;
}

.capf-cart-actions button.capf-update-cart {
	background-color: #e8791a;
	background: #e8791a;
	border-color: #e8791a;
	color: #1b3a5c;
	margin-left: auto;
	font-size: 14px;
	line-height: 1.2;
	opacity: 1;
	text-indent: 0;
}
.capf-cart-layout {
	display: flex;
	align-items: flex-start;
	gap: 28px;
	flex-wrap: wrap;
}
.capf-cart-form {
	flex: 1;
	min-width: 0;
}
.capf-cart-collaterals {
	flex: 1;
	min-width: 0;
}
.cart-collaterals {
	margin-top: 0;
}
.cart_totals {
    padding: 30px;
    position: sticky;
    border-radius: 6px;
    background: #FFF;
}

.cart_totals h2 {
	color: #1b3a5c;
	font-size: 18px;
	margin-top: 0;
}

.cart_totals .order-total .woocommerce-Price-amount {
	color: #e8791a;
	font-weight: 700;
}

.woocommerce-cart button.button.capf-update-cart {
    display: none;
}
.woocommerce-cart .e-shop-table.e-cart-section {
    border: none;
    padding: 0;
    background-color: #FAF2EA;
}

.woocommerce-cart span.capf-variation-attr {
    border-radius: 6px;
    border: 1px solid #E8D9C8;
    padding: 5px;
    color: #123F60;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: 210%;
}
.woocommerce-cart .capf-variation-attrs {display: inline-flex;gap: 5px;flex-wrap: wrap;}
span.bc-qunt-count {
    color: #8E8E8E;
    font-family: Capitana;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    position: relative;
    top: -8px;
}
.woocommerce-cart .woocommerce a.remove img {
    width: 29px;
}
.woocommerce-cart .e-cart-totals.e-cart-section {
    padding: 0;
    border: none !important;
}

.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce .cart-collaterals .cart_totals h2 {
    color: #123F60;
    font-size: 24px;
    font-style: normal;
    font-weight: 600;
    line-height: 135%;
}
.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce .cart_totals table.shop_table td:before {
    color: #123F60;
    font-size: 16.5px;
    font-style: normal;
    font-weight: 300 !important;
    line-height: 170%;
}
.woocommerce-cart .cart-subtotal span.woocommerce-Price-amount.amount {
    color: #123F60 !important;
    text-align: right;
    font-size: 16.5px !important;
    font-style: normal;
    font-weight: 600 !important;
    line-height: 170%;
}
/* ==========================================================================
   Sidebar "Overzicht" — Figma: Bezorg of afhalen + info lines + total
   (markup: cart-totals.php / cart-shipping.php). No JS: WooCommerce's own
   update_shipping_method AJAX re-renders .cart_totals; :has() gives the
   instant selected state before the response arrives.
   ========================================================================== */

/* Cells that carry their own label: kill the responsive td::before label. */
.capf-cart-totals td.capf-shipping-cell,
.capf-cart-totals td.capf-info-cell,
.capf-cart-totals .bhc-delivery-note-row td {
    display: block;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    border: 0;
    text-align: left;
}
.capf-cart-totals td.capf-shipping-cell::before,
.capf-cart-totals td.capf-info-cell::before,
.capf-cart-totals .bhc-delivery-note-row td::before {
    display: none !important;
    content: none !important;
}

/* Heading */
.capf-cart-totals .capf-shipping-heading {
    margin: 0px 0 16px;
    color: #123F60;
    font-size: 16.5px;
    font-weight: 400;
    line-height: 170%;
}

/* Option list */
.woocommerce-cart .capf-cart-totals ul#shipping_method {
    display: block;
    margin: 0 !important;
    padding: 0;
    list-style: none;
}

/* Option card */
.woocommerce-cart .capf-cart-totals #shipping_method li.capf-ship-option {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 18px 0 !important;
    padding: 18px 14px 20px 18px !important;
    border: 1px solid #E8D9C8 !important;
    border-radius: 8px !important;
    background: #FFF !important;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}
/* Selected: server-rendered class (after AJAX) + :has() (instant on click) */
.woocommerce-cart .capf-cart-totals #shipping_method li.capf-ship-option.is-selected,
.woocommerce-cart .capf-cart-totals #shipping_method li.capf-ship-option:has(input.shipping_method:checked) {
    background: #F8F0E7 !important;
    border-color: #F8F0E7 !important;
}
.woocommerce-cart .capf-cart-totals #shipping_method li.capf-ship-option::before,
.woocommerce-cart .capf-cart-totals #shipping_method li.capf-ship-option::after {
    display: none !important;
    content: none !important;
}

/* Radio: orange ring, orange dot when selected */
.woocommerce-cart .capf-cart-totals #shipping_method li input.shipping_method {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 20px;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 1px 0 0 !important;
    padding: 0 !important;
    border: 1.5px solid #F28C0B !important;
    border-radius: 50% !important;
    background: #FFF !important;
    box-shadow: none;
    cursor: pointer;
}
.woocommerce-cart .capf-cart-totals #shipping_method li input.shipping_method:checked {
    background: #F28C0B !important;
    box-shadow: inset 0 0 0 5px #FFF;
}
.woocommerce-cart .capf-cart-totals #shipping_method li input.shipping_method:focus-visible {
    outline: 2px solid #123F60;
    outline-offset: 2px;
}

/* Label: text left, badge right */
.woocommerce-cart .capf-cart-totals #shipping_method li label.capf-ship-option__label {
    display: flex !important;
    flex: 1 1 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
    color: #123F60 !important;
    cursor: pointer;
}
.capf-ship-option__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.capf-ship-option__title {
    color: #123F60;
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.3;
}
.capf-ship-option__sub {
    color: #123F60;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.4;
    margin-top: 10px;
}
.capf-ship-option__badge {
    flex: 0 0 auto;
    margin-top: 1px;
    padding: 8px 10px;
    border-radius: 20px;
    background: #F1E6DA;
    color: #123F60;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}
.capf-ship-option.is-free .capf-ship-option__badge {
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: 10.5px;
}
/* wc_price() inside the badge: undo the global orange 35px price style */
.woocommerce-cart .capf-cart-totals .capf-ship-option__badge .woocommerce-Price-amount.amount,
.woocommerce-cart .capf-cart-totals .capf-ship-option__badge .woocommerce-Price-currencySymbol {
    float: none;
    padding: 0;
    background: none;
    color: #123F60 !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    line-height: 1.4;
	text-transform: uppercase;
}

/* Delivery-area note (plugin row) */
.capf-cart-totals .bhc-delivery-note {
    margin: 4px 0 0;
    color: #123F60;
    font-size: 13.5px;
    line-height: 1.5;
}

/* Info-only lines */
.capf-cart-totals tr.capf-info-row td.capf-info-cell {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 7px;
    padding-bottom: 7px;
    color: #123F60;
    font-size: 16.5px;
    font-weight: 300;
    line-height: 1.5;
}
/* ~17px air between the last info row and the divider above Totaal */
.capf-cart-totals tr.capf-info-row:has(+ tr:not(.capf-info-row)) td.capf-info-cell {
    padding-bottom: 24px;
}
.capf-cart-totals .capf-info-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.capf-cart-totals .capf-info-value,
.capf-cart-totals .capf-info-value .woocommerce-Price-amount.amount,
.woocommerce-cart .capf-cart-totals .capf-info-value .woocommerce-Price-amount.amount {
    color: #123F60 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5;
    text-align: right;
    white-space: nowrap;
}
/* "Gratis, mee met uw fiets" is orange in Figma */
.woocommerce-cart .capf-cart-totals tr.capf-info-row.is-free .capf-info-value {
    color: #F28C0B !important;
}
/* Battery tooltip (plugin's .bhc-tooltip behaviour, repositioned for the sidebar) */
.capf-cart-totals .capf-info-tooltip {
    display: inline-flex;
    align-items: center;
    cursor: help;
}
.capf-cart-totals .capf-info-tooltip img {
    display: block;
    width: 20px;
    height: 20px;
}
.capf-cart-totals .capf-info-tooltip .bhc-tooltip-text {
    left: auto;
    right: -12px;
    bottom: calc(100% + 8px);
    width: 240px;
    max-width: 70vw;
    padding: 10px 12px;
    background: #123F60;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
}

/* Sidebar frame + "Overzicht" spacing (Figma: 36px left / 30px right, 34px top) */
.capf-cart-totals.cart_totals {
    padding: 34px 30px 34px 36px;
}
.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce .cart-collaterals .capf-cart-totals h2 {
    margin: 0 0 22px;
}
.capf-cart-totals tr.cart-subtotal th,
.capf-cart-totals tr.cart-subtotal td {
    padding-top: 6px;
    padding-bottom: 6px;
    border: 0;
}
/* Trust list: 38px row pitch, 20px checkbox */
.capf-cart-totals ul.capf-cart-totals-trust {
    margin: 18px 0 0;
    padding-top: 22px;
}
.capf-cart-totals li.capf-cart-totals-trust__item {
    margin-bottom: 14px;
}
.capf-cart-totals li.capf-cart-totals-trust__item img {
    width: 20px;
    height: 20px;
    top: 5px;
}

/* Divider above the total */
.capf-cart-totals tr.order-total th,
.capf-cart-totals tr.order-total td {
    border-top: 1px solid #E8D9C8;
    padding-top: 18px;
}


.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce .woocommerce-shipping-destination {
    color: #123F60;
    margin-bottom: 0;
}
.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce a:not(.add_to_cart_button):not(.restore-item):not(.wc-backward):not(.wc-forward) {
    color: #F28C0B;
}
.woocommerce-cart span.woocommerce-Price-amount.amount {
    color: #F28C0B !important;
    text-align: right;
    font-size: 35px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}
.woocommerce-cart span.capf-cart-totals__incl-vat {
    color: #8E8E8E;
    font-size: 15px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
}
.woocommerce-cart tr.order-total td:before {
    position: relative;
    top: 15px;
}
.woocommerce-cart .wc-proceed-to-checkout.capf-cart-totals-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center;
    width: 100% !important;
    padding-bottom: 0 !important;
    margin: 0 0 30px 0;
    justify-content: space-between;
}
.woocommerce-cart .wc-proceed-to-checkout.capf-cart-totals-actions a {
    margin: 0 !important;
    width: auto !important;
    flex: 1 1 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

a.checkout-button.button.alt.wc-forward {
    border-radius: 3px;
    background: #F28C0B;
    padding: 12px 15px;
    color: #123F60;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 1.32px;
    text-transform: uppercase;
    margin-right: 10px !important;
}

a.capf-continue-shopping-button.button {
    border-radius: 3px;
    border: 1px solid #123F60;
    background: #FFF;
    color: #123F60 !important;
    text-align: center;
    font-family: Capitana;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    letter-spacing: 1.32px;
    text-transform: uppercase;
    padding: 11px 15px;
}
ul.capf-cart-totals-trust {
    border-top: 1px solid #E8D9C8;
    padding-top: 15px;
    list-style: none;
    padding-left: 0;
}
li.capf-cart-totals-trust__item img {
    width: 24px;
    height: 24px;
    position: relative;
    top: 4px;
}
span.capf-cart-totals-trust__text {
    color: #123F60;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 170%; /* 23.8px */
}
li.capf-cart-totals-trust__item {
    margin-bottom: 8px;
}

/* ---- Service Cheque strip per cart item ---------------------------------- */
.capf-cart-item__cheque {
    flex: 0 0 100%;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 6px;
    background: #F6E9D9;
    color: #123F60;
}
.capf-cart-item__cheque-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16.5px;
    line-height: 135%;
}
.capf-cart-item__cheque-title {
    font-weight: 500;
}
.capf-cart-item__cheque-value {
    font-weight: 300;
}
.capf-cart-item__cheque-note {
    display: flex;
    flex: 0 0 auto;
    width: 165px;
    gap: 10px;
    align-items: flex-start;
    color: #000000;
    font-size: 12px;
    font-weight: 300;
    line-height: 150%;
}
/* Info icon = popup trigger (JS reads its data-cheque) */
.capf-cart-item__cheque-note img.serc-chque-info-cart {
    display: block !important;
    flex: 0 0 auto;
    cursor: pointer;
}
.capf-cart-item__cheque-note img.serc-chque-info-cart:focus-visible {
    outline: 2px solid #F28C0B;
    outline-offset: 2px;
    border-radius: 50%;
}
.capf-cart-item__quantity button.capf-qty__btn { 
    padding:  0 !important;
    border: none;
    font-size: 18px;
}
.capf-cart-item__quantity input.qty {
    background: #fff !important;
    border: none !important;
    text-align: center !important;
    width: 26px !important;
    height: 26px !important;
}

@media (max-width: 767px) {
    .capf-cart-item__cheque {
        flex-wrap: wrap;
    }
    .capf-cart-item__cheque-note {
        flex: 0 0 100%;
        width: auto;
    }
}

@media (max-width: 767px) {
    .capf-cart-item__footer { gap: 12px; }
    .capf-cart-item__quantity { margin-left: 0; width: 100%; justify-content: space-between; }
}


/* ==========================================================================
   "Gewenste vestiging" field (inc/bh-preferred-branch.php)
   ========================================================================== */
.capf-cart-totals .bh-pb { margin: 4px 0 18px; }
.capf-cart-totals .bh-pb__label {
	display: block;
	margin: 0 0 8px;
	color: #123F60;
	font-size: 16.5px;
	font-weight: 400;
	line-height: 170%;
}
.capf-cart-totals .bh-pb__control {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid #E8D9C8;
	border-radius: 6px;
	background-color: #FFF;
	color: #123F60;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 170%;
	box-shadow: none;
}
.capf-cart-totals .bh-pb__control:focus {
	outline: none;
	border-color: #F28C0B;
}
.capf-cart-totals .bh-pb__control::placeholder { color: rgba(18, 63, 96, 0.70); font-weight: 300; }
