/* Colour category catalog and compact cart, shared by desktop and phones. */
.tone-blue{--tile-tint:#eaf4ff;--tile-colour:#075ca8;--tile-line:#bfdbfe}
.tone-green{--tile-tint:#eaf8ee;--tile-colour:#166534;--tile-line:#bbebca}
.tone-purple{--tile-tint:#f3edff;--tile-colour:#6b36b4;--tile-line:#ded0fa}
.tone-orange{--tile-tint:#fff1e2;--tile-colour:#9a4300;--tile-line:#ffd5a7}
.tone-rose{--tile-tint:#fff0f4;--tile-colour:#a82b58;--tile-line:#f6c9d8}
.tone-teal{--tile-tint:#e8f7f5;--tile-colour:#06685f;--tile-line:#b8e4de}
#orderView .category{display:inline-flex;align-items:center;gap:7px;border:1px solid transparent;border-radius:12px;background:var(--tile-tint);color:var(--tile-colour);font-weight:750;min-height:42px}
#orderView .category svg{width:17px;height:17px;flex-shrink:0}
#orderView .category.active{background:var(--tile-colour);color:#fff;box-shadow:0 3px 8px #17324d12}
#orderView .product-grid:not(.list-mode){grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:11px}
#orderView .product-grid:not(.list-mode) .product-card{padding:0;gap:0;min-height:205px;border-radius:14px}
#orderView .product-card{position:relative;border:1px solid #d9e3ee;border-radius:14px;padding:0;gap:0;background:#fff;overflow:hidden;box-shadow:0 3px 10px #18364b07;transition:border-color .15s,box-shadow .15s}
#orderView .product-card:hover{border-color:var(--tile-line);box-shadow:0 5px 15px #18364b14}
#orderView .product-card.mobile-selected{border:2px solid #0878bf;background:#fff;box-shadow:0 0 0 2px #0878bf0c}
#orderView .product-category-band{display:flex;align-items:center;gap:6px;min-height:29px;padding:5px 10px;background:var(--tile-tint);color:var(--tile-colour);font-size:11px;font-weight:750;padding-right:34px;overflow-wrap:anywhere}
#orderView .product-category-band svg{width:15px;height:15px;flex-shrink:0}
#orderView .product-visual{height:96px;margin:0;background:linear-gradient(145deg,var(--tile-tint),#fff);border-radius:0;display:grid;place-items:center;position:relative;padding:8px}
#orderView .product-photo{width:100%;height:80px;object-fit:contain;background:transparent;border-radius:8px}
#orderView .product-placeholder{height:100%;width:100%;display:grid;place-items:center;color:var(--tile-colour);background:transparent;gap:0}
#orderView .product-placeholder svg{width:48px;height:48px;background:var(--tile-tint);padding:8px;border-radius:14px}
#orderView .product-details{padding:10px 11px 5px;flex:1;min-width:0}
#orderView .product-card strong{font-size:14px;line-height:1.35;display:block;overflow-wrap:anywhere}
#orderView .product-card small:empty{display:none}
#orderView .product-card small{font-size:10px;line-height:1.35;color:#64748b}
#orderView .product-card footer{padding:3px 11px 10px;display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:space-between}
#orderView .product-grid:not(.list-mode) .product-card .price,#orderView .product-card .price{font-size:17px;font-weight:850;color:#075ca8;white-space:nowrap}
#orderView .stock{font-size:10px;line-height:1.35;padding:3px 6px;border-radius:7px;background:#eaf8ee;color:#166534;overflow-wrap:anywhere}
#orderView .stock.stock-empty{background:#fff1e2;color:#9a4300}
#orderView .stock.stock-service{background:#eef2f7;color:#52637a}
.mobile-product-count{display:grid;place-items:center;position:absolute;right:7px;top:6px;min-width:24px;height:24px;padding:0 5px;border-radius:20px;background:#0878bf;color:#fff;font-size:12px;font-weight:800}
#orderView .product-grid.list-mode .product-card{display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;padding:7px 38px 7px 8px;border:1px solid #d9e3ee;border-left:4px solid var(--tile-colour);gap:8px;min-height:76px}
#orderView .list-mode .product-category-band{display:none}
#orderView .product-grid.list-mode .product-visual,#orderView .product-grid.list-mode .product-photo{height:52px;width:52px;border-radius:9px;padding:3px}
#orderView .list-mode .product-placeholder svg{width:44px;height:44px}
#orderView .list-mode .product-details{padding:0}
#orderView .list-mode .product-card footer{padding:0;flex-direction:column;align-items:flex-end}
#orderView .cart-line{display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:3px 9px;margin:9px 0;padding:10px;border:1px solid #e1e8f0;border-radius:12px;background:#fff;align-items:start}
#orderView .cart-line-content,#orderView .cart-line-content>div:not(.cart-thumb){display:contents}
#orderView .cart-thumb{display:grid;grid-column:1;grid-row:1/4;width:42px;height:54px;place-items:center;background:var(--tile-tint);color:var(--tile-colour);border-radius:9px;overflow:hidden}
#orderView .cart-thumb img{width:100%;height:100%;object-fit:contain;padding:3px}
#orderView .cart-thumb svg{width:27px;height:27px}
#orderView .cart-line h3{grid-column:2;grid-row:1;font-size:13px;line-height:1.4;overflow-wrap:anywhere;margin:0}
#orderView .line-total{grid-column:3;grid-row:1;font-size:13px;line-height:1.4;white-space:nowrap;padding:0}
#orderView .cart-unit-price{grid-column:2/4;grid-row:2;margin:0;font-size:11px;display:flex;align-items:center;flex-wrap:wrap;gap:3px;min-width:0}
#orderView .cart-discount-btn{font-size:11px;min-height:32px;padding:0 6px}
#orderView .qty-control{grid-column:2/4;grid-row:3;gap:5px;margin:0;flex-wrap:nowrap}
#orderView .qty-control button{width:34px;min-height:36px;flex-shrink:0;border-radius:8px}
#orderView .qty-control input{width:49px;min-height:36px;font-size:14px;padding:3px}
#orderView .qty-control .remove{width:36px;margin-left:auto;padding:5px;color:#c52d43}
#orderView .remove svg{width:18px;height:18px;vertical-align:middle}
#orderView .service-description{grid-column:2/4;grid-row:4;min-width:0;margin:0}
#orderView .service-description button{justify-self:start;background:#eef4fa;color:#075985;min-height:34px;font-size:11px;padding:0 10px}
#orderView .service-description-preview{overflow-wrap:anywhere}
@media(max-width:600px){
 #orderView .product-grid:not(.list-mode){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #orderView .product-grid:not(.list-mode) .product-card{padding:0;gap:0;min-height:190px;border-radius:13px}
 #orderView .product-category-band{font-size:11px;padding-left:9px;min-height:28px}
 #orderView .product-visual{height:82px}
 #orderView .product-photo{height:68px}
 #orderView .product-details{padding:8px 9px 4px}
 #orderView .product-card footer{padding:3px 9px 9px}
 #orderView .product-grid:not(.list-mode) .product-card .price{font-size:16px}
 #orderView .product-card .stock{font-size:10px}
 #orderView .category{padding:0 12px;min-height:44px}
 #orderView .cart-line{grid-template-columns:36px minmax(0,1fr) auto;gap:3px 7px;padding:9px;margin:8px 0}
 #orderView .cart-thumb{display:grid;width:36px;height:48px}
 #orderView .cart-line h3,#orderView .line-total{font-size:13px}
 #orderView .qty-control button,#orderView .qty-control input{min-height:44px}
 #orderView .qty-control button{width:37px}
 #orderView .qty-control .remove{width:44px}
 #orderView .cart-unit-price{font-size:11px}
 #orderView .service-description button{min-height:40px}
}

/* Admin-enabled price entry stays open in a dedicated desktop rail. */
@media(min-width:601px){
 #orderView .price-keypad-active .price-entry{background:linear-gradient(160deg,#edf7ff,#f4f0ff);border:1px solid #c8dff1;border-radius:15px;padding:14px;box-shadow:0 4px 12px #12304b09}
 #orderView .price-keypad-active .price-entry details summary{display:none}
 #orderView .price-keypad-active .price-entry details[open] .price-keypad{position:static;top:auto;right:auto;width:100%;max-width:none;padding:0;margin:0;background:transparent;border:0;box-shadow:none;gap:8px}
 #orderView .price-keypad-active .price-keypad button{min-height:54px;font-size:23px;font-weight:800;border:1px solid #bbd7ec;border-radius:11px;background:#fff;color:#075ca8;box-shadow:0 3px 0 #cee0ee;transition:background .1s,transform .1s}
 #orderView .price-keypad-active .price-keypad button:hover{background:#e0f1ff;border-color:#73afe0}
 #orderView .price-keypad-active .price-keypad button:active{transform:translateY(2px);box-shadow:0 1px 0 #cee0ee;background:#cce7ff}
 #orderView .price-keypad-active .price-keypad button:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
 #orderView .price-keypad-active .price-keypad [data-key="0"]{background:#087d8c;border-color:#087d8c;color:#fff;box-shadow:0 3px 0 #06616e}
 #orderView .price-keypad-active .price-keypad [data-key="."]{background:#efe6ff;color:#6b36b4;border-color:#d6c6ed}
 #orderView .price-keypad-active .price-keypad [data-key="back"]{background:#ffedf0;color:#b42342;border-color:#efc8d0}
 #orderView .price-keypad-active #priceEntryAmount{font-size:24px;font-weight:800;text-align:right;color:#123452;border:2px solid #a8cde8;background:#fff;min-height:56px}
 #orderView .price-keypad-active #priceEntryAmount::placeholder{font-size:16px;font-weight:600;color:#64748b}
 #orderView .price-keypad-active .price-entry-row label{font-size:13px;color:#075985}
 #orderView .price-keypad-active #clearEntryPrice{background:#e1eaf5;color:#24465e;min-height:42px;font-size:12px;font-weight:750}
}
@media(min-width:901px){
 #orderView .catalog.price-keypad-active{display:grid;grid-template-columns:210px minmax(0,1fr);align-content:start;gap:0 14px}
 #orderView .catalog.price-keypad-active>.search-row{grid-column:2;grid-row:1}
 #orderView .catalog.price-keypad-active>.catalog-tools{grid-column:2;grid-row:2}
 #orderView .catalog.price-keypad-active>.category-list{grid-column:2;grid-row:3}
 #orderView .catalog.price-keypad-active>.product-grid{grid-column:2;grid-row:4}
 #orderView .catalog.price-keypad-active>#productEmpty{grid-column:2;grid-row:5}
 #orderView .price-keypad-active #priceEntryPanel{grid-column:1;grid-row:1/6;position:sticky;top:84px;align-self:start;display:flex;flex-direction:column;gap:14px;min-width:0;margin:0}
 #orderView .price-keypad-active .price-entry-row{display:grid;width:100%;gap:8px}
 #orderView .price-keypad-active .price-entry p{font-size:12px;line-height:1.5}
 #orderView .price-keypad-active .price-entry details{width:100%}
}
@media(min-width:601px) and (max-width:900px){
 #orderView .price-keypad-active #priceEntryPanel{display:grid;grid-template-columns:minmax(0,1fr) 210px;gap:10px}
 #orderView .price-keypad-active .price-entry-row{grid-column:1;grid-row:1;align-self:start;display:grid}
 #orderView .price-keypad-active .price-entry p{grid-column:1;grid-row:2;align-self:start}
 #orderView .price-keypad-active .price-entry details{grid-column:2;grid-row:1/3}
}

/* Quick sale tiles: text first; uploaded images are optional small thumbnails. */
#orderView .product-grid:not(.list-mode){grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:8px}
#orderView .product-grid:not(.list-mode) .product-card{min-height:102px;padding:8px 9px 8px 10px;gap:4px;border-radius:10px;border-left:4px solid var(--tile-colour);justify-content:flex-start;background:linear-gradient(115deg,#fff,var(--tile-tint))}
#orderView .product-card.mobile-selected{border:2px solid #0878bf;border-left:4px solid #0878bf}
#orderView .product-grid:not(.list-mode) .product-category-band{padding:0 23px 0 0;min-height:13px;font-size:10px;background:transparent;color:var(--tile-colour);line-height:1.3}
#orderView .product-grid:not(.list-mode) .product-details{padding:0;flex:0 0 auto}
#orderView .product-grid:not(.list-mode) .product-card strong{font-size:13px;line-height:1.35}
#orderView .product-grid:not(.list-mode) .product-card.has-product-photo .product-details{padding-right:40px}
#orderView .product-grid:not(.list-mode) .product-visual{position:absolute;right:7px;top:25px;width:34px;height:42px;padding:0;border-radius:5px;background:transparent}
#orderView .product-grid:not(.list-mode) .product-photo{width:34px;height:42px;background:transparent;border-radius:4px}
#orderView .product-grid:not(.list-mode) .product-card footer{margin-top:auto;padding:0;gap:3px;align-items:center}
#orderView .product-grid:not(.list-mode) .product-card .price{font-size:16px;line-height:1.3}
#orderView .product-card .stock{padding:2px 4px;font-size:9px}
#orderView .product-card small{font-size:9px;margin-top:3px}
#orderView .product-grid.list-mode .product-card:not(.has-product-photo){grid-template-columns:minmax(0,1fr) auto}
#orderView .product-grid.list-mode .product-card{min-height:64px}
#orderView .cart-line:not(.has-cart-photo){grid-template-columns:minmax(0,1fr) auto}
#orderView .cart-line:not(.has-cart-photo) h3{grid-column:1}
#orderView .cart-line:not(.has-cart-photo) .line-total{grid-column:2}
#orderView .cart-line:not(.has-cart-photo) .cart-unit-price,#orderView .cart-line:not(.has-cart-photo) .qty-control,#orderView .cart-line:not(.has-cart-photo) .service-description{grid-column:1/-1}
@media(max-width:600px){
 #orderView .product-grid:not(.list-mode){grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 #orderView .product-grid:not(.list-mode) .product-card{min-height:98px;padding:8px 8px 8px 9px;gap:4px;border-radius:10px}
 #orderView .product-grid:not(.list-mode) .product-card strong{font-size:13px}
 #orderView .product-grid:not(.list-mode) .product-card .price{font-size:15px}
 #orderView .product-grid:not(.list-mode) .product-card.has-product-photo .product-details{padding-right:34px}
 #orderView .product-grid:not(.list-mode) .product-visual,#orderView .product-grid:not(.list-mode) .product-photo{width:29px;height:38px}
 #orderView .product-card .stock{font-size:9px}
 #orderView .product-grid.list-mode .product-card:not(.has-product-photo){grid-template-columns:minmax(0,1fr) auto}
}

/* Larger uploaded photos, with room for names and prices beside them. */
#orderView .product-grid:not(.list-mode) .product-card.has-product-photo{min-height:128px}
#orderView .product-grid:not(.list-mode) .product-card.has-product-photo .product-details{padding-right:66px}
#orderView .product-grid:not(.list-mode) .product-visual,#orderView .product-grid:not(.list-mode) .product-photo{width:60px;height:76px}
#orderView .product-grid:not(.list-mode) .product-visual{top:23px;right:7px}
#orderView .product-grid.list-mode .product-card.has-product-photo{grid-template-columns:64px minmax(0,1fr) auto;min-height:78px}
#orderView .product-grid.list-mode .product-visual,#orderView .product-grid.list-mode .product-photo{width:60px;height:64px}
@media(max-width:600px){
 #orderView .product-grid:not(.list-mode) .product-card.has-product-photo{min-height:124px}
 #orderView .product-grid:not(.list-mode) .product-card.has-product-photo .product-details{padding-right:58px}
 #orderView .product-grid:not(.list-mode) .product-visual,#orderView .product-grid:not(.list-mode) .product-photo{width:52px;height:70px}
 #orderView .product-grid:not(.list-mode) .product-visual{top:23px;right:6px}
}
