/* Category cards share the existing quantity, price and remove actions. */
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card{--cart-tone:#526579;--cart-tint:#f5f7fa;--cart-line:#dce4ec;display:grid!important;grid-template-columns:minmax(0,3fr) minmax(0,2fr)!important;grid-template-rows:auto;gap:12px!important;align-items:start;margin:10px 0;padding:12px!important;border:1px solid var(--cart-line);border-left:3px solid var(--cart-tone);border-radius:16px;background:linear-gradient(125deg,var(--cart-tint),var(--card,#fff) 85%);box-shadow:0 2px 8px #143c6105}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card.cart-tone-blue{--cart-tone:#1766a8;--cart-tint:#edf6ff;--cart-line:#c5dff4}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card.cart-tone-orange{--cart-tone:#a8580d;--cart-tint:#fff6e9;--cart-line:#eed8b9}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card.cart-tone-purple{--cart-tone:#7546a3;--cart-tint:#f7f0ff;--cart-line:#ddcbed}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card.cart-tone-teal{--cart-tone:#087565;--cart-tint:#edfaf5;--cart-line:#bfdfd2}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card.cart-tone-pink{--cart-tone:#a73968;--cart-tint:#fff1f6;--cart-line:#edcbd9}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card>.cart-item-details{grid-column:1;grid-row:1;display:flex;flex-direction:column;gap:10px;min-width:0}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-main{grid-column:auto!important;grid-row:auto;display:flex;align-items:flex-start;gap:8px!important;min-width:0}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-product-photo{flex:0 0 32px;width:32px;height:32px;border-radius:9px;border-color:var(--cart-line);color:var(--cart-tone);background:var(--card,#fff)}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-category-icon{display:grid;place-items:center}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-category-icon svg{width:21px;height:21px}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-description{min-width:0;flex:1}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-description>b{font-size:14px!important;line-height:1.4;overflow-wrap:anywhere;word-break:normal}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-category-badge{display:inline-block;max-width:100%;box-sizing:border-box;margin-top:5px;border-radius:6px;padding:2px 5px;background:var(--card,#fff);color:var(--cart-tone);font-size:11px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-description .label{font-size:11px!important;line-height:1.45;margin-top:4px;overflow-wrap:anywhere}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .qty-control{grid-column:auto!important;grid-row:auto;display:grid;grid-template-columns:44px minmax(20px,1fr) 44px;gap:6px!important;align-items:center;justify-content:start!important;width:100%;min-width:0}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-sale-unit{grid-column:1/-1;max-width:none!important;width:100%;min-height:40px;margin:0;padding:7px 9px;font-size:13px;border-radius:9px}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .qty-btn{width:44px;height:44px;min-width:44px;min-height:44px;padding:4px;border-radius:10px;font-size:19px}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .qty-value{min-width:0;text-align:center;font-size:14px;overflow-wrap:anywhere}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card>.cart-price{grid-column:2!important;grid-row:1;display:flex!important;flex-direction:column;align-items:flex-end;justify-content:flex-start;gap:8px;min-width:0!important;text-align:right;border:0;padding:0}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-price>b{font-size:16px!important;line-height:1.4;white-space:normal;overflow-wrap:anywhere;max-width:100%}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-price>:is(.special-price-edit,.special-price-reset){font-size:12px!important;min-height:40px!important;padding:6px 8px!important;margin:0!important;max-width:100%;white-space:normal;border-radius:10px}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-price>.cart-remove{display:grid;place-items:center;width:40px;min-width:40px;height:40px;min-height:40px!important;padding:8px!important;margin:0!important;border:1px solid #f7d5d2;border-radius:10px;color:#b42318;background:#fff5f4}
#app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-remove svg{pointer-events:none}
@media(max-width:359px){
 #app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card{gap:8px!important;padding:10px!important}
 
 #app .app-shell:has(#posBarcodeInput) .pos-content>.cart .cart-item.cart-category-card .cart-price>b{font-size:14px!important}
}

/* Use the shared searchable picker for cart units. */
#app .app-shell:has(#posBarcodeInput) .cart-category-card .qty-control>.cart-unit-picker{grid-column:1/-1;min-width:0;width:100%;margin:0}
#app .app-shell:has(#posBarcodeInput) .cart-unit-picker>.dhun-select-trigger{min-height:44px;padding:9px 11px;border-radius:10px;border-color:var(--cart-line);background:var(--card,#fff);font-size:13px;gap:8px}
.cart-unit-picker>.dhun-select-popup{width:min(280px,calc(100vw - 24px));right:auto;text-align:left;font-size:14px}
.cart-unit-picker .dhun-select-query{font-size:16px}
.cart-unit-picker .dhun-select-option{min-height:44px}
