/* Maeve-inspired two-panel shopping bag; native dialog provides modal focus containment. */
html.bag-open,html.bag-open body{overflow:hidden;overscroll-behavior:none}
#bag-dialog{--bag-cream:#fff5e6;--bag-yellow:#f5ce55;--bag-blue:#8099e4;position:fixed;inset:0 0 0 auto;margin:0;padding:0;width:min(780px,94vw);max-width:none;height:100dvh;max-height:none;border:0;border-left:2px solid var(--ink);border-radius:0;background:var(--bag-cream);overflow:hidden;color:var(--ink);box-shadow:-16px 0 50px #17181326}
#bag-dialog[open]{animation:bag-arrive .3s cubic-bezier(.2,.75,.3,1)}
#bag-dialog::backdrop{background:#24221f80;backdrop-filter:none;animation:bag-shade .25s ease}
.bag-drawer-layout{display:grid;grid-template-columns:184px minmax(0,1fr);height:100%;min-height:0}
.bag-main{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;grid-column:2;grid-row:1}
#bag-dialog .bag-heading{padding:20px 22px 12px;gap:12px;flex-shrink:0}
#bag-dialog .bag-heading h2{font-family:var(--hand-ui-font);font-weight:var(--hand-ui-weight);font-size:clamp(24px,2.8vw,35px);line-height:1.25;display:flex;align-items:center;gap:10px;margin:0}
#bag-dialog .bag-count{background:#83ad63;border:2px solid var(--ink);color:var(--ink);font:700 17px 'DM Sans',sans-serif;display:inline-flex;justify-content:center;align-items:center;min-width:34px;height:34px;padding:0 6px;border-radius:43% 55% 45% 50%;transform:rotate(-8deg)}
#bag-dialog .bag-close{width:44px;height:44px;flex-shrink:0;font:36px/1 'DM Sans',sans-serif;border-radius:50%;border:1.5px solid transparent;background:transparent}
#bag-dialog .bag-close:hover{background:var(--bag-yellow);border-color:var(--ink)}
.bag-scroll{overflow:auto;overscroll-behavior:contain;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:#e98550 var(--bag-cream)}
.bag-tagline{margin:0 22px 20px;padding:11px 16px;border:1.5px solid var(--ink);border-radius:13px 9px 12px 10px;background:var(--bag-yellow);font-size:14px;display:flex;align-items:center;gap:10px}
.bag-tagline span{font-size:25px;line-height:1;color:#944684}
#bag-dialog .bag-item{padding:0;display:grid;grid-template-columns:136px minmax(0,1fr);gap:0;border-top:1px solid var(--ink);border-bottom:0;min-width:0}
#bag-dialog .bag-item:last-child{border-bottom:1px solid var(--ink)}
.bag-product-photo{display:flex;align-items:center;justify-content:center;background:#fbfbf6;border-right:1px solid var(--ink);min-height:170px;padding:12px;overflow:hidden}
.bag-product-photo img,.bag-rec-photo img{display:block;width:100%;height:100%;max-height:155px;object-fit:contain;mix-blend-mode:multiply}
.bag-product-photo img,.bag-rec-photo img{transform:scale(var(--product-detail-subject-scale,.92));transform-origin:center}
.bag-product-photo .object-drawing,.bag-rec-photo .object-drawing{width:100%;height:130px}
#bag-dialog .bag-item-body{text-align:left;padding:15px 15px 10px;min-width:0}
.bag-item-title{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
#bag-dialog .bag-item h3{font-family:var(--hand-ui-font);font-size:19px;font-weight:var(--hand-ui-weight);line-height:1.35;overflow-wrap:anywhere}
.bag-item-title strong{font-size:14px;flex-shrink:0;font-variant-numeric:tabular-nums}
#bag-dialog .bag-item p{font-size:11px;line-height:1.55;color:#605747;margin-top:6px;overflow-wrap:anywhere}
#bag-dialog .bag-item .bag-item-error{color:#9a3125;font-weight:600}
.bag-item-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}
.bag-quantity{display:flex;align-items:center;border:1.5px solid var(--ink);background:#fffaf2;border-radius:40px;flex-shrink:0}
#bag-dialog .bag-quantity button{width:38px;min-height:38px;padding:0;font-size:21px;text-decoration:none;border-radius:50%}
.bag-quantity output{min-width:24px;text-align:center;font-size:13px;font-variant-numeric:tabular-nums}
#bag-dialog button:disabled{opacity:.4;cursor:not-allowed}
#bag-dialog .bag-remove{min-height:38px;line-height:1.4;text-underline-offset:4px}
.bag-list-end{padding:7px 20px;text-align:right}
.bag-list-end button{font-size:11px;text-decoration:underline;text-underline-offset:3px;min-height:36px}
.bag-note{margin:8px 22px 22px;border-top:1px solid #b6aa94;border-bottom:1px solid #b6aa94}
.bag-note summary{cursor:pointer;display:flex;justify-content:space-between;gap:10px;padding:14px 0;font-size:13px;list-style:none}
.bag-note summary::-webkit-details-marker{display:none}.bag-note[open] summary span{transform:rotate(45deg)}
.bag-note textarea{width:100%;resize:vertical;min-height:76px;max-height:150px;padding:10px;border:1px solid var(--ink);border-radius:8px;background:#fffaf2;color:var(--ink);font-family:inherit;font-size:13px;line-height:1.6}
.bag-status{margin:0;font-size:12px;line-height:1.5;flex-shrink:0;background:#eee5c4}.bag-status:not(:empty){padding:8px 22px}
#bag-note-status{font-size:11px;min-height:20px;margin:4px 0}
.bag-footer{flex-shrink:0;padding:14px 22px max(12px,env(safe-area-inset-bottom));background:var(--bag-yellow);border-top:2px solid var(--ink)}
#bag-dialog .bag-total{padding:0 0 12px;display:flex;justify-content:space-between;gap:12px;font-size:17px}
.bag-savings{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin-bottom:7px}
.bag-checkout{width:100%;padding:12px 18px;background:var(--bag-cream);border:2px solid var(--ink);border-radius:30px 26px 31px 25px;display:flex;justify-content:space-between;gap:16px;align-items:center;font-family:var(--hand-ui-font);font-size:20px;line-height:1.4;box-shadow:2px 2px 0 var(--ink)}
.bag-checkout:hover:enabled{background:white;transform:translateY(-1px)}
.bag-preview-note{font-size:11px;line-height:1.6;text-align:center;margin-top:9px;color:#514731}
.bag-continue{display:block;margin:3px auto 0;min-height:32px;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.bag-footer-error{font-size:12px;line-height:1.5;color:#8b261b;margin-bottom:10px}
.bag-recommendations{background:var(--bag-blue);border-right:2px solid var(--ink);padding:20px 12px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#eb8b4d var(--bag-blue);grid-column:1;grid-row:1;min-width:0;min-height:0}
.bag-recommendations h3{font-family:var(--hand-ui-font);font-size:17px;line-height:1.4;margin:0 0 18px;font-weight:var(--hand-ui-weight)}
.bag-recommendation{margin-bottom:24px;min-width:0}
.bag-rec-photo{height:145px;display:flex;justify-content:center;align-items:center;padding:10px;border:1.5px solid var(--ink);border-radius:12px 8px 14px 9px;background:var(--bag-cream);overflow:hidden}
.bag-recommendation h4{font-size:12px;line-height:1.5;font-weight:500;margin:8px 0 4px;overflow-wrap:anywhere}
.bag-recommendation p{font-size:12px;margin-bottom:8px;font-weight:600}
.bag-rec-button{background:var(--bag-yellow);border:1.5px solid var(--ink);border-radius:22px;display:flex;justify-content:space-between;align-items:center;gap:6px;width:100%;padding:8px 10px;min-height:40px;font-size:12px;line-height:1.4}
.bag-rec-button:hover{background:#ffe799}
.bag-empty{text-align:center;padding:45px 24px 60px}.bag-empty-icon{display:flex;align-items:center;justify-content:center;width:100px;height:100px;background:#ecd994;border:2px solid var(--ink);border-radius:50%;margin:0 auto 22px;transform:rotate(-9deg)}
.bag-empty-icon svg{width:44px;height:51px}.bag-empty h3{font-size:21px;margin-bottom:25px}.bag-photo-placeholder{font-size:11px;letter-spacing:.08em}
.bag-review-notice{margin:0 22px 20px;padding:14px;background:#e4ebce;border:1.5px solid var(--ink);border-radius:10px;font-size:13px;line-height:1.7}.bag-back{text-decoration:underline;text-underline-offset:3px;min-height:40px;margin-bottom:4px}
#bag-dialog :is(button,a,summary,textarea):focus-visible{outline:3px solid #7438a0;outline-offset:3px}
@keyframes bag-arrive{from{transform:translateX(100%)}to{transform:translateX(0)}}
@keyframes bag-shade{from{background:#24221f00}to{background:#24221f80}}
@media(max-width:650px){
 #bag-dialog{width:100%;border-left:0}
 .bag-drawer-layout{display:flex;flex-direction:column;position:relative}
 .bag-main{display:contents}
 #bag-dialog .bag-heading{order:0;padding:14px 16px 8px;background:var(--bag-cream)}
 #bag-dialog .bag-heading h2{font-size:25px}
 .bag-scroll{order:1;flex:1;padding-bottom:0}
 .bag-status{order:1}
 .bag-footer{order:3;padding:12px 16px max(10px,env(safe-area-inset-bottom))}
 .bag-recommendations{order:2;flex:none;max-height:185px;padding:10px 16px;border-right:0;border-top:1.5px solid var(--ink);overflow-x:auto}
 .bag-recommendations h3{font-size:15px;margin-bottom:8px}
 .bag-recommendation-list{display:flex;gap:12px;overflow:auto;scrollbar-width:thin}
 .bag-recommendation{flex:0 0 215px;display:grid;grid-template-columns:75px 1fr;grid-template-rows:auto auto auto;gap:2px 10px;margin:0 0 5px}
 .bag-rec-photo{height:105px;padding:7px;grid-row:1/4}
 .bag-recommendation h4{font-size:11px;margin:0;line-height:1.4}
 .bag-recommendation p{font-size:11px;margin:2px 0}
 .bag-rec-button{font-size:11px;min-height:34px;padding:5px 9px;align-self:end}
 .bag-tagline{margin:4px 16px 14px;padding:8px 12px;font-size:12px}
 #bag-dialog .bag-item{grid-template-columns:100px minmax(0,1fr)}
 .bag-product-photo{padding:9px;min-height:160px}
 #bag-dialog .bag-item-body{padding:12px}
 #bag-dialog .bag-item h3{font-size:17px}
 .bag-item-title{gap:8px;flex-wrap:wrap}
 .bag-item-title strong{font-size:13px}
 .bag-note{margin:8px 16px 16px}
 .bag-quantity output{min-width:22px}
 #bag-dialog .bag-quantity button{width:32px}
 .bag-checkout{font-size:18px;padding:10px 16px}
 .bag-preview-note{font-size:10px}
 .bag-empty{padding:25px 16px}
 .bag-empty-icon{width:72px;height:72px;margin-bottom:15px}
 .bag-empty h3{font-size:18px;margin-bottom:15px}
}
@media(prefers-reduced-motion:reduce){#bag-dialog[open],#bag-dialog::backdrop{animation:none}}
