.setup{display:grid;grid-template-columns:140px 1fr;gap:30px;background:white;border:1px solid #dce2ef;padding:22px;border-radius:14px;margin-bottom:28px}.setup p{font-size:12px;margin:0 0 12px}.setup h3{margin-bottom:8px}#categories{display:flex;flex-wrap:wrap;gap:8px}#categories button[aria-pressed=true]{background:#08268f;color:white;border-color:#08268f}.actions{display:flex;gap:8px;flex-wrap:wrap}.intro{gap:20px}.deck{--labelheight:110px}.shelfScroll{padding-top:16px}.shelfHead{align-items:center}.shelfHead>div:last-child{text-align:right;line-height:1.65}.productKey{display:flex;flex-wrap:wrap;gap:8px;padding:14px 20px 20px;background:#fafbfe}.productKey>div{padding:8px 10px;border:1px solid #e1e6ef;border-radius:8px;background:white;font-size:11px}.productKey span{display:block;color:#64718c;margin-top:4px}.label{font-size:10px}.label b{overflow-wrap:normal}.stats{margin-bottom:12px}.shelf{margin-bottom:26px}@media(max-width:700px){.setup{grid-template-columns:1fr;gap:10px}.intro{display:block}.shelfHead{align-items:flex-start}.shelfHead>div:last-child{font-size:11px}header{padding:20px}.label{font-size:8px}}

/* Generated V1-style empty shelf; original product images remain separate. */
.shelfScroll{background:#fff;padding:28px 30px 30px;overflow:auto}
.deck{align-items:flex-start;padding:0 0 36px;--labelheight:100px;min-height:calc(var(--artheight) + 12px)}
.deck::before,.deck::after{display:none}
.shelfBackdrop{position:absolute;z-index:0;pointer-events:none;left:-14px;top:0;width:calc(100% + 28px);height:var(--artheight);max-width:none}
.packs{margin-bottom:8px}
.label{background:linear-gradient(#fff6d4,#fff1bd);border:1px solid #eee1b1;border-radius:3px;color:#173e42;font-size:11px;padding:8px 3px;line-height:1.35}
.label b{color:#173e42;margin-bottom:5px}
.label em{font-size:9px}
.pack{filter:drop-shadow(2px 2px 2px #30415b18)}
.unknown .pack{outline:none}
.categoryStart:before{content:"";position:absolute;left:-2px;top:8px;height:calc(var(--packheight) - 8px);border-left:1px solid #b9c8ca}
.productDetails{border-top:1px solid #edf0f0}
.productDetails summary{cursor:pointer;padding:12px 20px;font-size:12px;color:#365b61}
.productKey small{display:block;margin-bottom:5px;color:#547579}
.productKey b{display:block}

.deck{min-height:calc(var(--packheight) + 150px)}
.shelfBackdrop{height:800px;top:calc(var(--packheight) - 504px)}
.label{height:90px;min-height:90px}

.shelfScroll{overflow-y:hidden}.shelfBackdrop{clip-path:inset(0 0 0 0)}

.label{font-size:var(--labelfont,11px);line-height:1.22}.label b{margin-bottom:4px}

/* Spacing revision: fixed display scale, visible-pack footprints and sliced shelf artwork. */
.deck{min-height:calc(var(--packheight) + 160px);padding-bottom:36px}
.shelfBackdrop{position:absolute;left:-16px;top:calc(var(--packheight) - 8px);width:calc(100% + 32px);height:150px;border:solid transparent;border-width:16px 18px 34px;border-image-source:url('assets/empty-shelf-v1-style.png');border-image-slice:440 22 90 22 fill;border-image-width:16px 18px 34px;border-image-repeat:stretch;clip-path:none;z-index:0}
.packs{margin-bottom:12px}
.label{height:100px;min-height:100px;line-height:1.3;font-size:var(--labelfont,11px);overflow-wrap:anywhere}
.categoryStart:before{left:-2px;top:0;border-left:1px solid #c2cbcb}
.shelfScroll{padding-bottom:20px}

.shelfBackdrop{border-image-slice:475 22 160 22 fill;height:150px;border-width:16px 18px 34px}.shelfScroll{scrollbar-color:#b4bdc7 #f1f3f5}


/* Named sections and physical-looking dividers on shared shelves. */
.shelfScroll{padding-top:64px}
.categoryBands{position:absolute;top:-40px;left:0;display:flex;align-items:stretch;width:100%;height:30px}
.categoryBand{flex:none;background:#e7eef1;border-top:3px solid #247278;border-radius:3px;color:#174b50;font-size:12px;font-weight:bold;display:flex;align-items:center;justify-content:center;text-align:center;padding:2px 5px;line-height:1.05}
.categoryStart:before{content:"";position:absolute;left:-13px;top:-8px;height:calc(var(--packheight) + 124px);width:5px;border:0;border-radius:3px;background:linear-gradient(90deg,#6a9096,#bed0d2 65%,#66878b);box-shadow:2px 1px 4px #314f5033;z-index:4}

/* Clear shelf hierarchy and accessible navigation. */
.shelfHead{background:#142b49;color:#fff;padding:22px 24px;gap:28px;border-bottom:4px solid #ef7626;font-size:14px}
.shelfHead strong{font-size:26px;line-height:1.25;color:#fff;margin-bottom:9px;font-weight:750}
.shelfHead>div:first-child{flex:1;min-width:0}
.shelfHead>div:last-child{flex:none;color:#e5edf7;font-size:13px}
.shelfHead>div:last-child b{color:#fff;font-size:15px}
.shelf{scroll-margin-top:20px}
.shelfScroll{padding-top:118px}
.categoryBands{top:-94px;height:78px}
.categoryBand{background:#173e49;color:#fff;border-top:4px solid #ef7626;border-radius:6px;font-size:20px;line-height:1.15;padding:8px 6px;overflow-wrap:normal}
.categoryBand[style*="width:"]{font-size:clamp(16px,1.5vw,20px)}
#categories button{font-size:14px;font-weight:600;min-height:44px;padding:11px 15px}
#categories button[aria-pressed=true]{background:#142b49;color:#fff;border-color:#142b49;box-shadow:inset 0 -3px #ef7626}
.actions button{font-weight:600;min-height:44px}
button:focus-visible,a:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #ef7626;outline-offset:3px}
.shelfJump{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 24px;padding:0;background:none;border:0}
.shelfJump a{display:block;background:white;color:#142b49;border:1px solid #bccadb;border-radius:7px;padding:10px 13px;text-decoration:none;font-size:13px;font-weight:600}
.shelfJump a:hover{background:#142b49;color:#fff}
.shelfJumpLabel{width:100%;font-size:14px;font-weight:bold;color:#142b49;margin-bottom:2px}
@media(max-width:700px){.shelfHead{flex-direction:column;align-items:flex-start;gap:10px;padding:18px}.shelfHead strong{font-size:23px}.shelfHead>div:last-child{text-align:left}.categoryBand{font-size:16px}}
@media print{.shelfJump{display:none}.shelfHead,.categoryBand{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

.categoryToolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:10px}.categoryToolbar h3{margin:0}.categoryToolbar button{font-size:13px;font-weight:600;min-height:40px;border-color:#8c9fb6;color:#142b49}

/* Selected pharmacy class stays visible beside each shelf title. */
.shelfHead .shelfTitle{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px}
.classBadge{display:inline-block;flex:none;padding:6px 12px;border-radius:6px;background:#ffcb72;color:#142b49;font-size:16px;font-weight:800;line-height:1.25;white-space:nowrap;letter-spacing:.2px}
@media(max-width:700px){.classBadge{font-size:14px;padding:5px 10px}}

.productPicker{background:white;border:1px solid #c9d4df;border-radius:12px;padding:18px 22px;margin-bottom:24px}
.productPicker summary{cursor:pointer;color:#142b49;font-size:17px;font-weight:700}
.productPicker p{font-size:13px;margin:14px 0}
.productTools{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.productTools button{min-height:42px;font-weight:600}
.productSearchLabel{flex:1;min-width:230px;margin:0}
.productSearchLabel input{width:100%;margin-top:6px}
#productOptions{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;max-height:360px;overflow:auto;padding:3px}
.productOption{display:flex;align-items:flex-start;gap:10px;margin:0;padding:12px;background:#f6f8fb;border:1px solid #dce3ec;border-radius:8px;cursor:pointer}
.productOption:has(input:checked){background:#e9f3f2;border-color:#527e83}
.productOption input{flex:none;width:18px;height:18px;margin:1px 0 0;accent-color:#173e49}
.productOption b{font-size:13px;line-height:1.4}
.productOption small{display:block;margin-top:6px}
@media print{.productPicker{display:none}}

#heroProducts{font-weight:700;border:2px solid #173e49}#heroProducts[aria-pressed="true"]{background:#173e49;color:white}

/* Physical shelf ordering remains left-to-right in both pack languages. */
.deck,.categoryBands{direction:ltr}

/* Pharmacy class: single-choice buttons matching the category buttons. */
.setup{grid-template-columns:190px 1fr}
.classPicker h3{margin:0 0 10px}
#classes{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
#classes button{font-size:18px;font-weight:800;min-height:52px;padding:8px 10px;color:#142b49;border-color:#8c9fb6}
#classes button[aria-checked=true]{background:#142b49;color:#fff;border-color:#142b49;box-shadow:inset 0 -4px #ef7626}
@media(max-width:700px){#classes{grid-template-columns:repeat(4,1fr)}}

/* Phone layout (laptop unchanged). */
@media(max-width:700px){
 main{padding-left:12px;padding-right:12px}
 header{padding:18px 16px}header h1{font-size:30px;margin:4px 0}header p{font-size:14px;margin:0}
 .setup{grid-template-columns:1fr;gap:18px;padding:16px;border-radius:12px;margin-bottom:16px}
 #classes{grid-template-columns:repeat(4,1fr);gap:6px}
 #classes button{min-height:48px;font-size:17px}
 .categoryToolbar{flex-wrap:nowrap;gap:10px}.categoryToolbar h3{font-size:16px}.categoryToolbar button{min-height:36px;font-size:12px;padding:6px 10px;white-space:nowrap}
 #categories{gap:6px}
 #categories button{font-size:13px;min-height:40px;padding:8px 11px}
 .productPicker{padding:14px 16px;margin-bottom:16px}.productPicker summary{font-size:15px}
 .intro h2{font-size:22px;margin-bottom:4px}.intro p{font-size:13px}
 .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}
 .actions button{min-height:44px;font-size:13px;padding:8px 6px}
 .actions #heroProducts{grid-column:1/-1}
 .stats{grid-template-columns:repeat(2,1fr);gap:8px}
 .notice{font-size:12px}
 .shelfJump{flex-wrap:nowrap;overflow-x:auto;margin:12px -12px 18px;padding:0 12px 6px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
 .shelfJumpLabel{display:none}
 .shelfJump a{flex:none;white-space:nowrap;font-size:12px;padding:9px 11px;scroll-snap-align:start}
 .shelf{border-radius:12px;margin-bottom:18px}
 .shelfHead{padding:14px 16px;gap:6px;font-size:13px}
 .shelfHead strong{font-size:19px;margin-bottom:6px}
 .classBadge{font-size:13px;padding:4px 9px}
 .shelfHead>div:last-child{font-size:12px;line-height:1.5}.shelfHead>div:last-child b{font-size:13px}
 .shelfScroll{padding:62px 16px 14px}
 .categoryBands{top:-50px;height:40px}
 .categoryBand,.categoryBand[style*="width:"]{font-size:12px;padding:4px;border-top-width:3px;border-radius:4px;line-height:1.1}
 .categoryStart:before{width:4px;height:calc(var(--packheight) + 104px)}
 .deck{min-height:calc(var(--packheight) + 130px)}
 .label{height:84px;min-height:84px;padding:5px 2px;line-height:1.2}
 .productDetails summary{padding:12px 16px}
 .productKey{padding:10px 12px 14px}.productKey>div{flex:1 1 100%}
}

/* Download buttons. */
#downloadPdf,#downloadImage{background:#142b49;color:#fff;border-color:#142b49}
#downloadPdf:disabled,#downloadImage:disabled{opacity:.65;cursor:progress}
@media(max-width:700px){.actions #export{grid-column:1/-1}}
