/* Customer-only styles; merchant controls keep their existing layout. */
body.customer-only .toast{display:none}
.production-loading>.app-shell,.production-loading>.topbar{visibility:hidden}
.commerce-production [hidden],.commerce-production .variant-builder,.commerce-production .image-input{display:none!important}
#store-dialog {padding:0;border:0;width:min(1120px,96vw);max-height:94dvh;border-radius:16px;background:#faf9f6;color:#242824;overflow:hidden}
.c-shell {height:min(880px,94dvh);display:flex;flex-direction:column;background:#faf9f6;color:#242824;overflow:hidden;font-family:'Segoe UI','Microsoft JhengHei',sans-serif;font-size:16px;line-height:1.65}
.c-shell *{box-sizing:border-box;min-width:0}.c-shell [hidden]{display:none!important}
.c-shell button,.c-shell input,.c-shell select,.c-shell textarea{font:inherit;touch-action:manipulation}
.c-shell button{cursor:pointer;min-height:44px;padding:8px 16px;border:1px solid #d6d8d3;border-radius:8px;color:#303a32;background:#fff}
.c-shell button:hover{border-color:#d84226;background:#fff2eb}.c-shell button:disabled{opacity:.55;cursor:not-allowed}
.c-shell :is(button,a,input,select,textarea):focus-visible{outline:3px solid #aa391c;outline-offset:3px}
.c-shell h1{font-size:clamp(25px,3vw,34px);line-height:1.3;letter-spacing:-.025em;margin:8px 0 18px}.c-shell h1 small{font-size:16px;color:#677068;font-weight:400}
.c-shell h2{font-size:19px;line-height:1.5;margin:20px 0 8px}.c-shell p{margin:8px 0 16px}.c-muted{color:#626b63;font-size:14px}
.c-header{flex:none;display:flex;align-items:center;gap:8px;border-bottom:1px solid #e0e1db;background:#fff;padding:12px 24px}
.c-header .c-brand{margin-right:auto;padding-left:0;border:0;color:#b6361c;font-size:20px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.c-header button b{background:#ba3a21;color:white;border-radius:50%;padding:2px 7px}
.c-header>button:not(.c-brand){flex-shrink:0;white-space:nowrap}.c-header .c-brand{flex:1}
.c-main{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px 32px;scroll-padding:20px}
.c-intro{padding:6px 0 16px;border-bottom:1px solid #dddcd3;margin-bottom:18px}.c-intro h1{margin:3px 0 9px}.c-intro p{margin-bottom:4px}.c-eyebrow{font-size:12px;letter-spacing:.1em;color:#a43f27;font-weight:700}
.c-search{display:block;font-size:14px;font-weight:650}.c-shell input,.c-shell select,.c-shell textarea{display:block;width:100%;min-height:48px;padding:10px 12px;background:#fff;color:#242824;border:1px solid #bfc5bd;border-radius:8px;margin:6px 0 2px;font-size:16px}
.c-shell input[type=radio]{display:inline-block;width:18px;min-height:18px;height:18px;margin:0 8px 0 0;accent-color:#bf3c20}
.c-categories{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0}.c-categories button{border-radius:24px;min-height:40px;font-size:14px;padding:5px 16px}.c-categories button[aria-pressed=true],.c-options button[aria-pressed=true]{background:#b83b21;border-color:#b83b21;color:#fff}
#c-list-count{color:#697268;font-size:13px;margin-bottom:12px}
.c-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 18px}
.c-shell .c-card{padding:0;border:0;background:transparent;text-align:left;display:flex;flex-direction:column;gap:4px;align-items:stretch;border-radius:0}
.c-card-photo,.c-main-photo{display:block;aspect-ratio:1;background:#e7e5de;border-radius:10px;overflow:hidden;position:relative}
.c-card-photo img,.c-main-photo img,.c-mini-photo img,.c-thumbs img{display:block;width:100%;height:100%;object-fit:cover}
.c-no-image{display:flex;width:100%;height:100%;align-items:center;justify-content:center;text-align:center;font-size:13px;letter-spacing:.04em;color:#6b6c65;background:#e9e7df}
.c-card strong{font-size:16px;line-height:1.4;overflow-wrap:anywhere;margin-top:7px}.c-card small{font-size:13px;color:#616b63}.c-price,.c-big-price{font-weight:750;color:#a93b21;font-variant-numeric:tabular-nums}.c-big-price{font-size:26px}
.c-shell .c-primary{display:inline-flex;align-items:center;justify-content:center;min-height:48px;background:#c74022;color:#fff;border:1px solid #c74022;border-radius:8px;text-decoration:none;padding:10px 20px;font-weight:700;text-align:center}
.c-shell .c-primary:hover{background:#a8331b}.c-shell .c-back{border:0;background:transparent;padding-left:0;color:#5d675f;margin-bottom:12px}
.c-detail{display:grid;grid-template-columns:1fr 1fr;gap:36px}.c-thumbs{display:flex;gap:8px;margin-top:12px}.c-thumbs button{padding:0;width:60px;height:60px;overflow:hidden}.c-thumbs [aria-pressed=true]{outline:2px solid #b83b21}
.c-description p{white-space:pre-line;overflow-wrap:anywhere}.c-shell fieldset{margin:16px 0;border:0;padding:0;min-width:0}.c-shell legend{font-weight:700;margin-bottom:8px}.c-options{display:flex;gap:8px;flex-wrap:wrap}
.c-quantity,.c-line-actions{display:flex;gap:8px;align-items:center}.c-quantity output{min-width:36px;text-align:center}.c-quantity{margin:16px 0}.c-line-actions button{padding:5px 13px}.c-line-actions{margin-top:10px}
.c-cart-lines{display:grid;gap:18px}.c-cart-line{display:grid;grid-template-columns:90px 1fr;gap:18px;padding:16px 0;border-bottom:1px solid #dcdfd7}.c-cart-line p{font-size:14px;color:#646d62;margin:3px 0}.c-mini-photo{display:block;width:90px;height:100px;border-radius:8px;overflow:hidden}
#c-promo-form{display:flex;align-items:end;gap:8px;margin-top:20px;flex-wrap:wrap}#c-promo-form label{flex:1;min-width:160px}.c-totals{padding:18px 0;margin:18px 0;border-top:1px solid #d3d7cc;border-bottom:1px solid #d3d7cc}.c-totals>div{display:flex;justify-content:space-between;gap:12px;padding:4px 0}.c-total{color:#9f331c;font-size:20px}.c-totals p{font-size:14px;color:#626b63}.c-totals strong,.c-totals span{font-variant-numeric:tabular-nums}
.c-main>form,.c-main>.c-complete{max-width:680px;margin-inline:auto}.c-main label{display:block}.c-shell label+label{margin-top:14px}.c-delivery{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}.c-delivery label{padding:12px;border:1px solid #bfc5bd;border-radius:8px;background:#fff;margin:0!important}.c-delivery small{display:block;margin-left:26px;font-size:13px}.c-delivery label:has(:checked){border:2px solid #bb3b21;background:#fff4ed}
.c-address{display:grid;grid-template-columns:1fr 1fr;gap:12px}.c-address label{margin:0!important}.c-address p{grid-column:1/-1}.c-shell details{border-top:1px solid #d3d7cc;padding:14px 0}.c-shell summary{cursor:pointer;font-weight:700;min-height:44px}
.c-field-error,#c-checkout-error,#c-promo-error{display:block;color:#a5231b;font-size:14px}.c-field-error:empty{display:none}.c-shell [aria-invalid=true]{border-color:#a5231b}
.c-action-bar{flex:none;display:flex;justify-content:space-between;gap:18px;align-items:center;padding:14px 24px max(14px,env(safe-area-inset-bottom));border-top:1px solid #d6d9d0;background:#fff;box-shadow:0 -5px 18px #212a2108}.c-action-bar>span{font-size:19px;font-weight:750;white-space:nowrap}.c-action-bar button{min-width:170px}
.c-nav{flex:none;display:grid;grid-template-columns:repeat(4,1fr);padding:4px 12px max(4px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #d6d9d0}.c-nav button{border:0;font-size:14px;font-weight:600}.c-nav [aria-current=page]{color:#ac321a;background:#fff0e9}
.c-footer{display:flex;gap:4px;flex-wrap:wrap;justify-content:center;padding:24px 0 6px;margin-top:32px;border-top:1px solid #e0e2db}.c-footer button{border:0;background:transparent;font-size:13px;color:#5f695f}
#c-notice:empty{display:none}#c-notice{flex:none;padding:10px 24px;background:#fff2df;font-size:14px;max-height:120px;overflow:auto}#c-notice button{min-height:36px;font-size:14px;padding:4px 8px}.c-empty{padding:28px 12px;text-align:center}.c-order-number{overflow-wrap:anywhere;font-family:monospace;background:#eee;padding:12px;user-select:all}.c-complete{max-width:680px}.c-complete .c-primary{display:flex;margin:20px 0}
body.customer-only{background:#faf9f6}body.customer-only>.topbar,body.customer-only>.app-shell,body.customer-only>.skip-link{display:none}body.customer-only #store-dialog{display:block;position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;border-radius:0}body.customer-only .c-shell{height:100dvh;max-width:1200px;margin:auto}
.c-merchant-editor{border-top:1px solid #ccc;padding-top:22px;margin-top:24px}.c-merchant-editor form{display:grid;gap:12px}.c-merchant-editor label{display:grid;gap:6px}.c-merchant-editor textarea{min-height:90px;width:100%}.c-merchant-editor input,.c-merchant-editor select{min-height:44px;width:100%}.c-merchant-editor small{font-size:13px}.c-merchant-editor .c-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.c-merchant-editor [role=status]{white-space:pre-line}
@media(max-width:650px){#store-dialog{width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh;inset:0;margin:0;border-radius:0}.c-shell{height:100dvh}.c-header{padding:8px 16px;gap:4px}.c-header .c-brand{font-size:18px}.c-header>button{padding:8px 10px}.c-main{padding:16px}.c-intro{padding:0 0 12px;margin-bottom:12px}.c-intro h1{font-size:24px}.c-intro p{font-size:14px}.c-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 14px}.c-card strong{font-size:15px}.c-detail{grid-template-columns:1fr;gap:18px}.c-main-photo{max-height:320px;aspect-ratio:1.12}.c-description h2{margin-top:24px}.c-action-bar{padding:10px 16px max(10px,env(safe-area-inset-bottom));gap:12px}.c-action-bar>span{font-size:17px}.c-action-bar button{min-width:155px}.c-nav{padding-inline:4px}.c-nav button{font-size:13px;padding:8px 3px;min-height:48px}.c-delivery,.c-address{grid-template-columns:1fr}.c-mini-photo{width:70px;height:86px}.c-cart-line{grid-template-columns:70px 1fr;gap:12px}.c-merchant-editor .c-settings-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.c-shell *{scroll-behavior:auto!important;transition:none!important}}
.c-image-editor{border:1px solid var(--line,#d9d9d9);padding:16px;margin:12px 0;min-width:0;border-radius:12px}
.c-image-editor legend{font-weight:700;padding:0 6px}
.c-image-editor p{font-size:13px;line-height:1.6}
.c-image-upload input{display:block;width:100%;max-width:100%;margin-top:8px;min-height:44px}
.c-image-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
.c-image-tile{min-width:0;display:grid;gap:6px}
.c-image-tile img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:8px;background:#f1f1f1}
.c-image-tile span{font-size:13px;font-weight:650}
.c-image-tile>div{display:flex;flex-wrap:wrap;gap:6px}
.c-image-tile button{min-height:44px;padding:8px 10px;border:1px solid #bbb;border-radius:7px;background:transparent;color:inherit;cursor:pointer}
.c-image-editor :focus-visible{outline:3px solid #fa4c2f;outline-offset:3px}
.commerce-live-code-help{display:block;font-size:13px;line-height:1.6;color:var(--muted,#697268);font-weight:400}
/* STORE-LIVE-002 review: the live-code help line made its grid row taller; the label beside it stretched its input. */
#product-form .form-grid>label,.c-merchant-editor .c-settings-grid>label{align-content:start}
/* Older than STORE-LIVE-002 (desktop only): the four row actions were put in the 36px column of the hidden "..." button,
   so they were squeezed into one character per line over the status text. */
@media (min-width:821px){.table-head,.inventory-row{grid-template-columns:minmax(200px,2fr) minmax(80px,1fr) 62px 84px 200px}}
