/* ============================================================
   AA Cart Quantity Toggle +/- Enhancements  v1.2.6
   ============================================================ */

/* ---- Hide native WooCommerce × remove link (all screens) ---- */
.woocommerce-cart-form td.product-remove,
.woocommerce-cart-form a.remove {
    display: none !important;
}

/* ---- Hide Update cart button — triggered automatically (all screens) ---- */
body.amb-auto-cart .woocommerce-cart-form button[name="update_cart"] {
    display: none !important;
}

/* ---- Quantity wrapper (all screens) ---- */
.woocommerce-cart-form .quantity,
.woocommerce-cart .quantity {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* ---- +/- buttons (all screens) ---- */
.woocommerce-cart-form .amb-qty-btn,
.woocommerce-cart .amb-qty-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    line-height: 1 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    background: #f5f5f5 !important;
    border: 1px solid rgba(0,0,0,0.18) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    user-select: none !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s !important;
}

.woocommerce-cart-form .amb-qty-btn:hover,
.woocommerce-cart .amb-qty-btn:hover {
    background: #e8e8e8 !important;
    color: #000 !important;
}

.woocommerce-cart-form .amb-qty-btn:focus-visible,
.woocommerce-cart .amb-qty-btn:focus-visible {
    outline: 2px solid #f15a22 !important;
    outline-offset: 1px !important;
    position: relative !important;
    z-index: 1 !important;
}

.woocommerce-cart-form .amb-qty-btn:disabled,
.woocommerce-cart .amb-qty-btn:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ---- Quantity input (all screens) ---- */
.woocommerce-cart-form .quantity input.qty,
.woocommerce-cart .quantity input.qty {
    width: 52px !important;
    height: 36px !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 4px !important;
    border: 1px solid rgba(0,0,0,0.18) !important;
    border-radius: 6px !important;
    background: #fff !important;
    font-size: 15px !important;
    -moz-appearance: textfield !important;
    box-sizing: border-box !important;
}

.woocommerce-cart-form .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart-form .quantity input.qty::-webkit-inner-spin-button,
.woocommerce-cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* ---- Trash remove state
   Default state: icon matches the normal +/- button colour.
   Hover/focus state: icon turns red and the button gets a subtle red cue.
   The path/polyline rules protect against theme CSS overriding SVG strokes.
---- */
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash,
.woocommerce-cart .amb-qty-btn.amb-qty-trash {
    color: #333 !important;
    background: #f5f5f5 !important;
}

.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash svg,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash svg,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash svg,
.woocommerce-cart .amb-qty-btn.amb-qty-trash svg,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash svg path,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash svg path,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash svg path,
.woocommerce-cart .amb-qty-btn.amb-qty-trash svg path,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash svg polyline,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash svg polyline,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash svg polyline,
.woocommerce-cart .amb-qty-btn.amb-qty-trash svg polyline {
    color: currentColor !important;
    stroke: currentColor !important;
    fill: none !important;
}

.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:hover,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:hover,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:focus,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:focus,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:hover,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:hover,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:focus,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:focus {
    background: #fff7f7 !important;
    color: #cc0000 !important;
    border-color: #cc0000 !important;
}

.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:hover svg,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:hover svg,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:focus svg,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:focus svg,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:hover svg,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:hover svg,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:focus svg,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:focus svg,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:hover svg path,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:hover svg path,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:focus svg path,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:focus svg path,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:hover svg path,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:hover svg path,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:focus svg path,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:focus svg path,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:hover svg polyline,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:hover svg polyline,
.woocommerce-cart-form .quantity .amb-qty-btn.amb-qty-trash:focus svg polyline,
.woocommerce-cart .quantity .amb-qty-btn.amb-qty-trash:focus svg polyline,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:hover svg polyline,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:hover svg polyline,
.woocommerce-cart-form .amb-qty-btn.amb-qty-trash:focus svg polyline,
.woocommerce-cart .amb-qty-btn.amb-qty-trash:focus svg polyline {
    color: #cc0000 !important;
    stroke: #cc0000 !important;
    fill: none !important;
}

/* ---- Coupon button styling ----
   Match the visual treatment of the +/- quantity buttons.
---- */
.woocommerce-cart button[name="apply_coupon"],
.woocommerce-cart input[name="apply_coupon"],
.woocommerce-page.woocommerce-cart button[name="apply_coupon"],
.woocommerce-page.woocommerce-cart input[name="apply_coupon"],
.woocommerce .coupon button[name="apply_coupon"],
.woocommerce .coupon input[name="apply_coupon"] {
    color: #333 !important;
    background: #f5f5f5 !important;
    border: 1px solid rgba(0,0,0,0.18) !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-align: center !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.woocommerce-cart button[name="apply_coupon"]:hover,
.woocommerce-cart button[name="apply_coupon"]:focus,
.woocommerce-cart input[name="apply_coupon"]:hover,
.woocommerce-cart input[name="apply_coupon"]:focus,
.woocommerce-page.woocommerce-cart button[name="apply_coupon"]:hover,
.woocommerce-page.woocommerce-cart button[name="apply_coupon"]:focus,
.woocommerce-page.woocommerce-cart input[name="apply_coupon"]:hover,
.woocommerce-page.woocommerce-cart input[name="apply_coupon"]:focus,
.woocommerce .coupon button[name="apply_coupon"]:hover,
.woocommerce .coupon button[name="apply_coupon"]:focus,
.woocommerce .coupon input[name="apply_coupon"]:hover,
.woocommerce .coupon input[name="apply_coupon"]:focus {
    color: #000 !important;
    background: #e8e8e8 !important;
    border-color: rgba(0,0,0,0.28) !important;
    box-shadow: none !important;
}

/* ---- Merged product cell (all screens) ---- */
.amb-product-cell {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.amb-thumb-wrap {
    flex: 0 0 80px !important;
    width: 80px !important;
}

.amb-thumb-wrap img.amb-product-thumb {
    display: block !important;
    width: 80px !important;
    height: auto !important;
    border-radius: 4px !important;
}

.amb-name-wrap {
    flex: 1 1 auto !important;
    word-break: break-word !important;
}

/* ---- Fallback wrapper ---- */
.amb-qty-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* ================================================================
   DESKTOP — hide empty thumbnail/remove cells + set column widths
   ================================================================ */

@media (min-width: 768px) {

    /* Hide the now-empty standalone thumbnail cell on desktop only */
    .woocommerce-cart-form table.shop_table td.product-thumbnail,
    .woocommerce-cart-form table.shop_table th.product-thumbnail {
        display: none !important;
        width: 0 !important;
        padding: 0 !important;
    }

    /* Remove column: hidden, no space */
    .woocommerce-cart-form table.shop_table .product-remove {
        display: none !important;
        width: 0 !important;
        padding: 0 !important;
    }

    /* Fixed layout so % column widths are honoured */
    .woocommerce-cart-form table.shop_table {
        table-layout: fixed !important;
        width: 100% !important;
    }

    /* Product — merged image + name */
    .woocommerce-cart-form table.shop_table th.product-name,
    .woocommerce-cart-form table.shop_table td.product-name {
        width: 50% !important;
        vertical-align: middle !important;
    }

    /* Price */
    .woocommerce-cart-form table.shop_table th.product-price,
    .woocommerce-cart-form table.shop_table td.product-price {
        width: 15% !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

    /* Quantity */
    .woocommerce-cart-form table.shop_table th.product-quantity,
    .woocommerce-cart-form table.shop_table td.product-quantity {
        width: 20% !important;
        text-align: center !important;
        vertical-align: middle !important;
    }

    /* Subtotal */
    .woocommerce-cart-form table.shop_table th.product-subtotal,
    .woocommerce-cart-form table.shop_table td.product-subtotal {
        width: 15% !important;
        text-align: right !important;
        vertical-align: middle !important;
    }

} /* end @media desktop */

/* ================================================================
   MOBILE — keep the product row visible and keep image + name together
   ================================================================ */

@media (max-width: 767px) {

    /* Compatibility fallback for themes that output product name as a <th> */
    .woocommerce table.shop_table_responsive tr th.product-name,
    .woocommerce-page table.shop_table_responsive tr th.product-name {
        display: block !important;
        text-align: left !important;
        width: 100% !important;
    }

    /* Force the merged cell to flex so image and name sit side by side */
    .woocommerce-cart-form td.product-name .amb-product-cell,
    .woocommerce-cart td.product-name .amb-product-cell,
    .woocommerce-cart-form th.product-name .amb-product-cell,
    .woocommerce-cart th.product-name .amb-product-cell {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .woocommerce-cart-form td.product-name .amb-thumb-wrap,
    .woocommerce-cart td.product-name .amb-thumb-wrap,
    .woocommerce-cart-form th.product-name .amb-thumb-wrap,
    .woocommerce-cart th.product-name .amb-thumb-wrap {
        display: block !important;
        flex: 0 0 60px !important;
        width: 60px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .woocommerce-cart-form td.product-name .amb-thumb-wrap img.amb-product-thumb,
    .woocommerce-cart td.product-name .amb-thumb-wrap img.amb-product-thumb,
    .woocommerce-cart-form th.product-name .amb-thumb-wrap img.amb-product-thumb,
    .woocommerce-cart th.product-name .amb-thumb-wrap img.amb-product-thumb {
        display: block !important;
        width: 60px !important;
        height: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-width: none !important;
    }

    .woocommerce-cart-form td.product-name .amb-name-wrap,
    .woocommerce-cart td.product-name .amb-name-wrap,
    .woocommerce-cart-form th.product-name .amb-name-wrap,
    .woocommerce-cart th.product-name .amb-name-wrap {
        display: block !important;
        flex: 1 1 auto !important;
    }



    /* Hide the duplicate/default WooCommerce coupon form in the main cart table on mobile.
       Keep the coupon form inside Basket totals/cart_totals visible. */
    .woocommerce-cart-form table.shop_table td.actions .coupon,
    .woocommerce-cart-form table.shop_table_responsive td.actions .coupon,
    .woocommerce-cart-form .actions > .coupon {
        display: none !important;
    }

    /* Coupon layout: stop the button being squeezed on mobile. */
    .woocommerce-cart .coupon,
    .woocommerce-page.woocommerce-cart .coupon,
    .woocommerce-cart .cart-collaterals .coupon,
    .woocommerce-page.woocommerce-cart .cart-collaterals .coupon,
    .woocommerce-cart .cart_totals .coupon,
    .woocommerce-page.woocommerce-cart .cart_totals .coupon {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .woocommerce-cart .coupon .input-text,
    .woocommerce-page.woocommerce-cart .coupon .input-text,
    .woocommerce-cart .coupon input[name="coupon_code"],
    .woocommerce-page.woocommerce-cart .coupon input[name="coupon_code"] {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart button[name="apply_coupon"],
    .woocommerce-cart input[name="apply_coupon"],
    .woocommerce-page.woocommerce-cart button[name="apply_coupon"],
    .woocommerce-page.woocommerce-cart input[name="apply_coupon"],
    .woocommerce .coupon button[name="apply_coupon"],
    .woocommerce .coupon input[name="apply_coupon"] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 46px !important;
        padding: 0 18px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }
} /* end @media mobile */

/* ================================================================
   MOBILE POLISH — product rows + Basket totals alignment
   Mirrors the tighter mock-up layout without changing desktop.
   ================================================================ */

@media (max-width: 767px) {

    /* Keep the cart table tidy on mobile and remove the empty legacy cells. */
    .woocommerce-cart-form table.shop_table,
    .woocommerce-cart-form table.shop_table_responsive {
        width: 100% !important;
        border: 0 !important;
        border-collapse: collapse !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item,
    .woocommerce-cart-form table.shop_table tr.cart_item {
        display: block !important;
        margin: 0 0 22px !important;
        padding: 0 !important;
        border-top: 2px solid rgba(0,0,0,0.16) !important;
        border-bottom: 0 !important;
        background: #fff !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-remove,
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-thumbnail,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-remove,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-thumbnail {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* Product title/image row. */
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-name,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-name {
        display: block !important;
        width: 100% !important;
        padding: 12px 10px 14px !important;
        border-top: 0 !important;
        border-bottom: 1px solid rgba(0,0,0,0.14) !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-name::before,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-name::before {
        content: none !important;
        display: none !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-name .amb-product-cell,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-name .amb-product-cell {
        width: 100% !important;
        min-height: 62px !important;
        gap: 12px !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-name .amb-thumb-wrap,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-name .amb-thumb-wrap {
        flex: 0 0 58px !important;
        width: 58px !important;
        text-align: center !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-name .amb-thumb-wrap img.amb-product-thumb,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-name .amb-thumb-wrap img.amb-product-thumb {
        width: 58px !important;
        max-width: 58px !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-name .amb-name-wrap,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-name .amb-name-wrap {
        font-weight: 700 !important;
        line-height: 1.25 !important;
        color: #111 !important;
    }

    /* Price / quantity / subtotal rows: label left, value/control right. */
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-price,
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-quantity,
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-subtotal,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-price,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-quantity,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-subtotal {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 16px !important;
        width: 100% !important;
        min-height: 48px !important;
        padding: 10px 12px !important;
        border-top: 0 !important;
        border-bottom: 1px solid rgba(0,0,0,0.14) !important;
        text-align: right !important;
        box-sizing: border-box !important;
        background: #fff !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-price::before,
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-quantity::before,
    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-subtotal::before,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-price::before,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-quantity::before,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-subtotal::before {
        display: block !important;
        float: none !important;
        margin: 0 !important;
        padding: 0 !important;
        font-weight: 700 !important;
        color: #111 !important;
        text-align: left !important;
        white-space: nowrap !important;
        content: attr(data-title) ":" !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr.cart_item td.product-quantity .quantity,
    .woocommerce-cart-form table.shop_table tr.cart_item td.product-quantity .quantity {
        margin-left: auto !important;
    }

    /* Empty cart button follows the product rows as a full-width action. */
    .woocommerce-cart-form .actions .empty-cart,
    .woocommerce-cart-form .actions .button.empty-cart,
    .woocommerce-cart-form button[name="empty_cart"],
    .woocommerce-cart-form input[name="empty_cart"],
    .woocommerce-cart-form a.empty-cart,
    .woocommerce-cart-form a.amb-empty-cart,
    .woocommerce-cart-form .amb-empty-cart {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-height: 32px !important;
        margin: 10px 0 8px !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    /* Basket totals card spacing.
       Keep the Basket totals card/content the same usable width as the product section above. */
    .woocommerce-cart .cart-collaterals,
    .woocommerce-page.woocommerce-cart .cart-collaterals {
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        margin: 24px 0 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals,
    .woocommerce-page.woocommerce-cart .cart_totals {
        width: 100% !important;
        max-width: none !important;
        float: none !important;
        clear: both !important;
        margin: 0 !important;
        padding: 20px 10px 0 !important;
        background: #fafafa !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals h2,
    .woocommerce-page.woocommerce-cart .cart_totals h2 {
        margin: 0 0 22px !important;
        padding: 0 !important;
        font-size: 26px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
        text-align: left !important;
    }

    .woocommerce-cart .cart_totals table.shop_table,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table,
    .woocommerce-cart .cart_totals table.shop_table tbody,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody {
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border: 0 !important;
        border-collapse: collapse !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(0,0,0,0.08) !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr.cart-discount,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr.cart-discount,
    .woocommerce-cart .cart_totals table.shop_table tbody tr.woocommerce-shipping-totals,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr.woocommerce-shipping-totals,
    .woocommerce-cart .cart_totals table.shop_table tbody tr.tax-rate,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr.tax-rate,
    .woocommerce-cart .cart_totals table.shop_table tbody tr.order-total,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr.order-total {
        background: #f5f5f5 !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr th,
    .woocommerce-cart .cart_totals table.shop_table tbody tr td,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr th,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr td {
        display: block !important;
        width: auto !important;
        padding: 12px !important;
        border: 0 !important;
        line-height: 1.35 !important;
        background: transparent !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr th,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr th {
        flex: 0 0 auto !important;
        max-width: 44% !important;
        text-align: left !important;
        font-weight: 700 !important;
        color: #111 !important;
        white-space: nowrap !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr td,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr td {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        text-align: right !important;
        color: #111 !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr td::before,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr td::before {
        content: none !important;
        display: none !important;
    }

    /* Coupon discount row should sit on one line where possible. */
    .woocommerce-cart .cart_totals table.shop_table tbody tr.cart-discount th,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr.cart-discount th {
        max-width: 56% !important;
    }

    .woocommerce-cart .cart_totals table.shop_table tbody tr.cart-discount td,
    .woocommerce-page.woocommerce-cart .cart_totals table.shop_table tbody tr.cart-discount td {
        white-space: nowrap !important;
    }

    /* Shipping options align neatly on the right, with Collection below Delivery. */
    .woocommerce-cart .cart_totals .woocommerce-shipping-methods,
    .woocommerce-page.woocommerce-cart .cart_totals .woocommerce-shipping-methods {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        text-align: right !important;
    }

    .woocommerce-cart .cart_totals .woocommerce-shipping-methods li,
    .woocommerce-page.woocommerce-cart .cart_totals .woocommerce-shipping-methods li {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap !important;
    }

    .woocommerce-cart .cart_totals .woocommerce-shipping-methods input,
    .woocommerce-page.woocommerce-cart .cart_totals .woocommerce-shipping-methods input {
        margin: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Keep the visible Basket totals coupon form lined up with the card width. */
    .woocommerce-cart .cart_totals .coupon,
    .woocommerce-page.woocommerce-cart .cart_totals .coupon {
        width: 100% !important;
        max-width: none !important;
        margin: 12px 0 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals .coupon input[name="coupon_code"],
    .woocommerce-page.woocommerce-cart .cart_totals .coupon input[name="coupon_code"],
    .woocommerce-cart .cart_totals .coupon button[name="apply_coupon"],
    .woocommerce-page.woocommerce-cart .cart_totals .coupon button[name="apply_coupon"],
    .woocommerce-cart .cart_totals .coupon input[name="apply_coupon"],
    .woocommerce-page.woocommerce-cart .cart_totals .coupon input[name="apply_coupon"] {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals .wc-proceed-to-checkout,
    .woocommerce-page.woocommerce-cart .cart_totals .wc-proceed-to-checkout {
        width: 100% !important;
        max-width: none !important;
        margin: 16px 0 0 !important;
        padding: 0 0 12px !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button,
    .woocommerce-page.woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}
