/* Cart and checkout share a reading width. Columns respond to the space the page actually gives them. */
:where(.woocommerce-cart,.woocommerce-checkout) main {
    --nfx-order-gap: clamp(16px,2.3vw,34px);
    --nfx-order-pad: clamp(14px,1.7vw,26px);
    --nfx-order-paper: var(--nfx-ui-card,#fff);
    --nfx-order-line: color-mix(in srgb,var(--nfx-ui-text,#342f2d) 13%,var(--nfx-order-paper));
    --nfx-order-edge: 0 5px 24px -12px rgb(43 39 37 / 18%);
}
.nfxp-commerce-flow > .wp-block-post-content { width: 100%; max-width: none; }
:where(.woocommerce-cart,.woocommerce-checkout) main .woocommerce:has(:is(.nfxp-cart-columns,.nfxp-checkout-order)),
:where(.woocommerce-cart,.woocommerce-checkout) main :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) {
    container: nfx-order / inline-size;
    width: 100%; max-width: 100%; margin-inline: auto;
}
.nfxp-cart-columns, form.checkout:has(> .nfxp-checkout-order) {
    display: grid; grid-template-columns: minmax(0,1fr);
    align-items: start; gap: var(--nfx-order-gap);
}
.nfxp-cart-columns > *, form.checkout:has(> .nfxp-checkout-order) > * { min-width: 0; grid-column: 1 / -1; margin-block: 0; }
.nfxp-cart-columns .cart-collaterals { display: contents; }
.nfxp-cart-columns .cart-collaterals::before, .nfxp-cart-columns .cart-collaterals::after { display: none; }
.nfxp-cart-columns .cart-collaterals > * { grid-column: 1 / -1; }
.nfxp-cart-columns .cart-collaterals .cart_totals,
.nfxp-cart-columns .cart-collaterals .cross-sells {
    float: none; width: 100%; min-width: 0; margin: 0;
}
.nfxp-cart-columns .cart_totals { order: 1; }
.nfxp-cart-columns .cross-sells { order: 2; }
.woocommerce .nfxp-cart-columns .cross-sells ul.products {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(12px,2vw,26px);
}
.woocommerce .nfxp-cart-columns .cross-sells ul.products::before,
.woocommerce .nfxp-cart-columns .cross-sells ul.products::after { display: none; }
.woocommerce .nfxp-cart-columns .cross-sells ul.products > li.product { float: none; width: auto; margin: 0; }
@container nfx-order (min-width: 600px) {
    .woocommerce .nfxp-cart-columns .cross-sells ul.products { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
.nfxp-cart-columns form.woocommerce-cart-form, .nfxp-cart-columns .cart_totals,
.nfxp-checkout-customer, .nfxp-checkout-order {
    background: var(--nfx-order-paper); border: 1px solid var(--nfx-order-line);
    border-radius: var(--nfx-radius,12px); padding: var(--nfx-order-pad);
    box-shadow: var(--nfx-order-edge);
}
.nfxp-cart-columns form.woocommerce-cart-form { container: nfx-cart-list / inline-size; }
.woocommerce .nfxp-cart-columns table.shop_table,
.woocommerce .nfxp-checkout-order table.shop_table {
    width: 100%; margin: 0; border: 0; border-collapse: collapse; font-variant-numeric: tabular-nums;
}
.woocommerce .nfxp-cart-columns .shop_table :is(th,td),
.woocommerce .nfxp-checkout-order .shop_table :is(th,td) {
    padding: .8em .45em; border-width: 0 0 1px; border-color: var(--nfx-order-line); vertical-align: middle;
}
.woocommerce .nfxp-cart-columns .woocommerce-cart-form__contents thead th:first-child,
.woocommerce .nfxp-cart-columns .cart_totals th, .woocommerce .nfxp-checkout-order .shop_table th:first-child { padding-inline-start: 0; }
.woocommerce .nfxp-cart-columns .shop_table td:last-child,
.woocommerce .nfxp-checkout-order .shop_table td:last-child { padding-inline-end: 0; }
.woocommerce .nfxp-cart-columns table.cart .product-thumbnail img { display: block; width: clamp(44px,7vw,72px); max-width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: var(--nfx-ui-surface,#faf8f5); border-radius: 6px; }
.nfxp-cart-columns .product-name a { font-weight: 550; text-decoration: none; }
.nfxp-cart-columns .product-name a:hover { text-decoration: underline; }
.nfxp-cart-columns .product-remove a.remove { display: inline-grid; place-items: center; min-width: 32px; min-height: 36px; }
.woocommerce .nfxp-cart-columns table.cart td.actions { border: 0; padding: 1em 0 0; }
.woocommerce .nfxp-cart-columns table.cart td.actions .coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.woocommerce .nfxp-cart-columns table.cart td.actions .coupon .input-text { width: min(10em,100%); margin: 0; }
.nfxp-cart-columns :is(.button,input.qty), .nfxp-checkout-order button.button { min-height: 44px; }
.nfxp-cart-columns .cart_totals h2, .nfxp-checkout-order > h3, .nfxp-checkout-customer h3 {
    margin: 0 0 .85em; font-size: clamp(1.12rem,1.45vw,1.42rem); line-height: 1.35; letter-spacing: -.02em;
}
.woocommerce .nfxp-cart-columns .cart_totals table td,
.woocommerce .nfxp-checkout-order table .product-total,
.woocommerce .nfxp-checkout-order tfoot td { text-align: end; overflow-wrap: anywhere; }
.nfxp-cart-columns .cart_totals .order-total, .nfxp-checkout-order .order-total { font-size: 1.06em; }
.nfxp-cart-columns .wc-proceed-to-checkout { padding: 1em 0 0; }
.woocommerce .nfxp-cart-columns .checkout-button, .woocommerce .nfxp-checkout-order #place_order {
    display: block; width: 100%; min-height: 46px; margin: 0; padding: .85em 1.05em;
    border-radius: var(--nfx-radius,8px); background: var(--nfx-ui-button,var(--nfx-product-wine,#733249));
    color: var(--nfx-ui-button-text,#fff); text-align: center; font-weight: 650;
}
.nfxp-checkout-customer #customer_details { display: grid; grid-template-columns: minmax(0,1fr); gap: 1.15rem; width: 100%; }
.nfxp-checkout-customer #customer_details::before, .nfxp-checkout-customer #customer_details::after { display: none; }
.woocommerce .nfxp-checkout-customer #customer_details > :is(.col-1,.col-2) { float: none; width: 100%; min-width: 0; }
.nfxp-checkout-customer .form-row { min-width: 0; }
.nfxp-checkout-customer #ship-to-different-address label { font-size: 1rem; }
.woocommerce .nfxp-checkout-order #payment { margin-top: 1.15em; border-radius: var(--nfx-radius,8px); background: var(--nfx-ui-surface,#faf8f5); }
.nfxp-checkout-order #payment :is(.payment_methods,.place-order) { padding: .9rem; }
.nfxp-checkout-order #payment .payment_box { font-size: .93em; overflow-wrap: anywhere; }
.nfxp-commerce-flow .woocommerce form :where(input.input-text,select,textarea) {
    width: 100%; max-width: 100%; border: 1px solid #aab6bf; border-radius: var(--nfx-radius); padding: .7em .85em;
}
.nfxp-commerce-flow .woocommerce .quantity input.qty { width: 4.2em; }
.nfxp-commerce-flow :where(.woocommerce-error,.woocommerce-message,.woocommerce-info) { overflow-wrap: anywhere; }
@container nfx-order (min-width: 820px) {
    .nfxp-cart-columns { grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); }
    .nfxp-cart-columns > .woocommerce-cart-form { grid-area: 1 / 1; }
    .woocommerce .nfxp-cart-columns .cross-sells ul.products { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .nfxp-cart-columns .cart-collaterals .cart_totals { grid-area: 1 / 2; }
    form.checkout:has(> .nfxp-checkout-customer):has(> .nfxp-checkout-order) { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
    form.checkout:has(> .nfxp-checkout-order) > .nfxp-checkout-customer { grid-column: 1; }
    form.checkout:has(> .nfxp-checkout-customer) > .nfxp-checkout-order { grid-column: 2; }
    :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) .wc-block-components-sidebar-layout {
        display: grid; grid-template-columns: minmax(0,1.65fr) minmax(0,1fr); align-items: start; gap: var(--nfx-order-gap);
    }
    .wp-block-woocommerce-checkout .wc-block-components-sidebar-layout { grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); }
    .wc-block-components-sidebar-layout > :is(.wc-block-components-main,.wc-block-components-sidebar) {
        min-width: 0; width: 100%; padding-inline: 0; margin-inline: 0;
    }
    .wc-block-components-sidebar-layout > .wc-block-components-main { grid-area: 1 / 1; }
    .wc-block-components-sidebar-layout > .wc-block-components-sidebar {
        grid-area: 1 / 2; border: 1px solid var(--nfx-order-line); border-radius: var(--nfx-radius);
        background: var(--nfx-order-paper); padding: var(--nfx-order-pad); box-shadow: var(--nfx-order-edge);
    }
}
@container nfx-order (width < 820px) {
    :is(.wp-block-woocommerce-cart,.wp-block-woocommerce-checkout) .wc-block-components-sidebar-layout {
        display: flex; flex-direction: column; gap: 1rem;
    }
    .wc-block-components-sidebar-layout > :is(.wc-block-components-main,.wc-block-components-sidebar) {
        width: 100%; padding-inline: 0; margin-inline: 0;
    }
}
@media (max-width: 768px) {
    @container nfx-cart-list (width > 630px) {
        .woocommerce .nfxp-cart-columns table.cart thead { display: table-header-group; }
        .woocommerce .nfxp-cart-columns table.cart tr { display: table-row; }
        .woocommerce .nfxp-cart-columns table.cart tr :is(th,td) { display: table-cell; text-align: start !important; }
        .woocommerce .nfxp-cart-columns table.cart tr td::before { display: none; }
    }
}
@container nfx-cart-list (max-width: 630px) {
    .woocommerce .nfxp-cart-columns .woocommerce-cart-form__contents :is(thead,.cart_item)::before,
    .woocommerce .nfxp-cart-columns table.cart thead { display: none; }
    .woocommerce .nfxp-cart-columns table.cart .cart_item {
        display: grid; grid-template-columns: clamp(42px,12%,62px) minmax(0,1fr) minmax(0,1fr) 36px;
        grid-template-areas: 'thumb name name remove' 'thumb price price remove' 'thumb qty subtotal subtotal';
        align-items: center; gap: 4px 8px; padding-block: .9rem; border-bottom: 1px solid var(--nfx-order-line);
    }
    .woocommerce .nfxp-cart-columns table.cart .cart_item td {
        display: block; padding: 0; border: 0; background: transparent; text-align: start !important;
    }
    .woocommerce .nfxp-cart-columns table.cart .cart_item td::before { display: none; }
    .woocommerce .nfxp-cart-columns .product-thumbnail { grid-area: thumb; align-self: start; }
    .nfxp-cart-columns .product-name { grid-area: name; }
    .nfxp-cart-columns .product-remove { grid-area: remove; justify-self: end; }
    .nfxp-cart-columns .product-price { grid-area: price; color: var(--nfx-ui-muted,#5d5552); font-size: .9em; }
    .nfxp-cart-columns .product-quantity { grid-area: qty; }
    .nfxp-cart-columns .product-subtotal { grid-area: subtotal; justify-self: end; }
    .woocommerce .nfxp-cart-columns table.cart .cart_item td.product-subtotal::before { display: block; float: none; content: attr(data-title); font-size: .76em; color: var(--nfx-ui-muted,#5d5552); }
    .woocommerce .nfxp-cart-columns table.cart td.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; }
    .woocommerce .nfxp-cart-columns table.cart td.actions .coupon { float: none; padding: 0; }
    .woocommerce .nfxp-cart-columns table.cart td.actions .button { width: auto; margin: 0; }
    .woocommerce .nfxp-cart-columns table.cart td.actions .coupon input { min-width: 0; }
}
.wp-block-woocommerce-cart .wc-block-cart__main { container: nfx-block-cart-list / inline-size; }
@container nfx-block-cart-list (max-width: 600px) {
    .wp-block-woocommerce-cart table.wc-block-cart-items { width: 100%; }
    .wp-block-woocommerce-cart table.wc-block-cart-items tbody { display: block; }
    .wp-block-woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
        display: grid; grid-template-columns: clamp(42px,15%,64px) minmax(0,1fr);
        grid-template-areas: 'photo details' 'photo total'; gap: .45em clamp(9px,2vw,15px);
    }
    .wp-block-woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__image {
        grid-area: photo; padding: 0; align-self: start;
    }
    .wp-block-woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__product {
        grid-area: details; min-width: 0; padding: 0;
    }
    .wp-block-woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row > .wc-block-cart-item__total {
        grid-area: total; min-width: 0; padding: 0; justify-content: start; text-align: start;
    }
    .wp-block-woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
        flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: .55em;
    }
}
@media (max-width:767px) {
    .nfxp-commerce-flow .wc-block-components-text-input input,
    .nfxp-commerce-flow .woocommerce form :is(input.input-text,select,textarea) { min-width: 0; font-size: max(16px,1rem); }
}
