.khm-commerce-cart > .woocommerce { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr); gap:var(--khm-gap); align-items:start; }
.khm-commerce-cart > .woocommerce > * { grid-column:1/-1; min-width:0; }
.khm-commerce-cart > .woocommerce > .woocommerce-cart-form { grid-column:1; }
.khm-commerce-cart > .woocommerce > .cart-collaterals { grid-column:2; }
.khm-commerce-cart .woocommerce-notices-wrapper:empty { display:none; }
.khm-commerce-cart .woocommerce-cart-form,.khm-commerce-cart .cart_totals { padding:var(--khm-pad); background:var(--khm-paper); border:1px solid var(--khm-rule); border-radius:var(--khm-corner); box-shadow:var(--khm-shadow); }
.khm-commerce-cart .woocommerce .cart-collaterals .cart_totals { width:100%; float:none; }
.khm-commerce-cart .woocommerce .cart-collaterals { position:sticky; top:calc(var(--khm-bar) + 24px); }
.admin-bar .khm-commerce-cart .cart-collaterals { top:calc(var(--khm-bar) + 56px); }
.khm-commerce-cart .woocommerce .woocommerce-cart-form table { margin:0; }
.khm-commerce-cart .woocommerce-cart-form thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.khm-commerce-cart .woocommerce-cart-form tr.cart_item { display:grid; grid-template-columns:clamp(70px,7vw,100px) minmax(0,1fr) auto; grid-template-areas:"photo name sum" "photo price remove" "photo qty remove"; column-gap:clamp(12px,1.7vw,24px); align-items:center; padding:18px 0; border-bottom:1px solid var(--khm-rule); }
.khm-commerce-cart .woocommerce-cart-form tr.cart_item:first-child { padding-top:0; }
.khm-commerce-cart .woocommerce table.shop_table .cart_item td { display:block; padding:0; border:0; text-align:start; background:none; }
.khm-commerce-cart .woocommerce table.shop_table .cart_item td::before { display:none; }
.khm-commerce-cart .product-thumbnail { grid-area:photo; }
.khm-commerce-cart .woocommerce .cart_item .product-thumbnail img { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; border-radius:14px; background:var(--khm-soft); padding:8px; }
.khm-commerce-cart .product-name { grid-area:name; font-weight:600; font-size:clamp(15px,1.15vw,18px); line-height:1.35; }
.khm-commerce-cart .product-name a { text-decoration:none; }
.khm-commerce-cart .product-name a:hover { text-decoration:underline; }
.khm-commerce-cart .product-name .variation { color:var(--khm-muted); font-size:12px; margin:4px 0; }
.khm-commerce-cart .product-price { grid-area:price; color:var(--khm-muted); font-size:13px; }
.khm-commerce-cart .product-subtotal { grid-area:sum; font-weight:650; justify-self:end; }
.khm-commerce-cart .product-quantity { grid-area:qty; margin-top:6px; }
.khm-commerce-cart .woocommerce .quantity .qty { width:80px; min-height:38px; padding:4px 8px; text-align:center; }
.khm-commerce-cart .product-remove { grid-area:remove; justify-self:end; }
.khm-commerce-cart .woocommerce a.remove { display:grid; place-items:center; width:36px; height:36px; color:var(--khm-muted)!important; border:1px solid var(--khm-rule); font-size:21px; font-weight:400; line-height:1; background:var(--khm-soft); }
.khm-commerce-cart .woocommerce a.remove:hover { color:#822f25!important; background:#f7eae7; }
.khm-commerce-cart .woocommerce table.shop_table td.actions { border:0; padding:20px 0 0; }
.khm-commerce-cart .woocommerce .actions .coupon { float:none; display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.khm-commerce-cart .woocommerce .actions .coupon input.input-text { width:auto; flex:1 1 125px; min-width:0; max-width:240px; margin:0; }
.khm-commerce-cart .woocommerce .actions .coupon .button { float:none; width:auto; }
.khm-commerce-cart .woocommerce .actions button[name="update_cart"] { margin-top:12px; }
.khm-commerce-cart .woocommerce .actions button.button { background:var(--khm-soft); border-color:var(--khm-rule); color:var(--khm-ink); }
.khm-commerce-cart .woocommerce .actions button.button:hover { background:var(--khm-action-fill,var(--khm-brand-primary));color:var(--khm-action-ink,var(--khm-on-primary)); }
.khm-commerce-cart .cart_totals table.shop_table :is(th,td) { padding:13px 0; }
.khm-commerce-cart .cart_totals td { text-align:end!important; }
.khm-commerce-cart .cart_totals .shipping td { text-align:start!important; }
.khm-commerce-cart .cart_totals .shipping th { width:30%; }
.khm-commerce-cart .cart_totals .order-total { font-size:18px; }
.khm-commerce-cart .woocommerce .wc-proceed-to-checkout { padding:0; }
.khm-commerce-cart .woocommerce .checkout-button { width:100%; margin:4px 0 0; }
.khm-commerce-cart .wc-empty-cart-message { padding:var(--khm-pad); border:1px solid var(--khm-rule); border-radius:var(--khm-corner); background:white; }
.khm-commerce-cart .wc-empty-cart-message > * { margin:0; }
.khm-commerce-cart:has(.wc-empty-cart-message) .khm-shop-link { display:none; }
@media(max-width:900px) {
 .khm-commerce-cart > .woocommerce { display:block; }
 .khm-commerce-cart .woocommerce .cart-collaterals { position:static; margin-top:18px; }
}
@media(max-width:768px) {
 .khm-commerce-cart .woocommerce .cart_item .product-thumbnail { display:block; }
 .khm-commerce-cart .woocommerce .shop_table_responsive tr.cart_item { display:grid; }
 .khm-commerce-cart .woocommerce table.shop_table_responsive .cart_item td { text-align:start!important; }
 .khm-commerce-cart .woocommerce .cart-collaterals .shop_table_responsive td::before { color:var(--khm-muted); margin-right:10px; }
 .khm-commerce-cart .woocommerce .cart-collaterals .shipping td { text-align:end!important; }
 .khm-commerce-cart .woocommerce .shop_table_responsive tr:nth-child(2n) td { background:transparent; }
}
@media(max-width:480px) {
 .khm-commerce-cart .woocommerce-cart-form tr.cart_item { grid-template-columns:68px minmax(0,1fr) 36px; grid-template-areas:"photo name remove" "photo price remove" "qty sum sum"; row-gap:6px; }
 .khm-commerce-cart .product-subtotal { align-self:end; padding-bottom:8px!important; }
 .khm-commerce-cart .woocommerce .quantity .qty { width:68px; }
 .khm-commerce-cart .woocommerce .actions .coupon { display:grid; grid-template-columns:minmax(0,1fr) auto; }
 .khm-commerce-cart .woocommerce .actions .coupon input.input-text { width:100%; }
}

/* Override the legacy #content skin of classic Woo only inside this shortcode. */
.khm-commerce-cart .woocommerce table.cart .coupon::before,.khm-commerce-cart .woocommerce table.cart .coupon::after { display:none; }
.khm-commerce-cart .woocommerce table.cart td.actions .coupon #coupon_code { float:none; width:auto; max-width:240px; min-width:0; margin:0; }
.khm-commerce-cart .woocommerce table.cart td.actions .coupon button[name="apply_coupon"] { float:none; width:auto; margin:0; white-space:nowrap; }
@media(max-width:768px) {
 .khm-commerce-cart .woocommerce table.cart tr.cart_item td.product-thumbnail { display:block!important; }
 .khm-commerce-cart .woocommerce table.cart td.actions .coupon #coupon_code { width:100%; max-width:none; }
}
@media(max-width:480px) {
 .khm-commerce-cart .khm-commerce-heading { flex-wrap:wrap; gap:6px 16px; }
 .khm-commerce-cart .khm-shop-link { white-space:nowrap; }
 .khm-commerce-cart .woocommerce table.cart td.actions .coupon { grid-template-columns:minmax(0,1fr) max-content; }
}
.khm-commerce-cart .woocommerce .actions .coupon::before,.khm-commerce-cart .woocommerce .actions .coupon::after { content:none!important; }
@media(max-width:480px) {
 .khm-commerce-cart table.cart td.actions .coupon #coupon_code { grid-area:1/1; width:100%!important; }
 .khm-commerce-cart table.cart td.actions .coupon button[name="apply_coupon"] { grid-area:1/2; width:auto!important; min-width:max-content; padding-inline:15px; }
}

/* Keep the cart heading stable while the variable font loads on narrow phones. */
@media (max-width: 410px) {
  .khm-commerce-cart .khm-commerce-heading { flex-direction: column; align-items: flex-start; }
}
