/* Shared, comfortable reading sizes for the shop and its operations console. */
:root{--bm-text-body:18px;--bm-text-title:32px;--bm-text-section:20px;--bm-text-label:18px;--bm-text-note:16px;--bm-text-action:17px;--bm-button-height:48px;--bm-control-height:48px}
:root{--bm-danger:#A43130}
html{color-scheme:light}html[data-color-mode=dark]{color-scheme:dark}
html[data-color-mode=dark]{--bm-paper:#171D19;--bm-ink:#F0F3EB;--bm-muted:#C1CABE;--bm-soft:#283229;--bm-field:#2B362D;--bm-white:#202A23;--bm-line:#465247;--bm-control-fill:#2B362D}
body,body:not(.merchant-admin){font-size:18px!important;line-height:1.75}
body .button{font-size:17px!important;min-height:48px;line-height:1.5}
body .button.compact{font-size:16px!important;min-height:44px}
body :is(.small,.muted.small,.notice,.status){font-size:16px!important;line-height:1.7}
body :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:18px;line-height:1.6}
body .field>span{font-size:18px}body .field small{font-size:16px}
body :is(.captcha-status,.auth-caption,.checkout-draft-note,.preview-note){font-size:16px!important;line-height:1.75}
body .brand small{display:none}
body.merchant-admin #overlays .product-sku-edit-table :is(input,select){height:48px;min-height:48px;font-size:18px!important;padding:8px}
body.merchant-admin #overlays .product-editor-tabs small{font-size:16px}
.trade-axis{font-size:16px}
body:not(.merchant-admin) .topbar .nav a{font-size:18px}
body:not(.merchant-admin) :is(.account-login,.user-link,.account-logout,.account-register){font-size:17px!important}
body:not(.merchant-admin) .topbar.shell{gap:30px}
body:not(.merchant-admin) :is(.store-category-rail h2,.electric-categories .button,.catalogue-controls,.display-controls .button,.seller-filter,.seller-filter select){font-size:17px!important}
body:not(.merchant-admin) :is(.store-ticker,.store-ticker .button,.electric-list-head,.electric-store-note,.footer-copy,.footer-right,.grid-product-meta){font-size:16px!important}
body:not(.merchant-admin) :is(.compact-product-info h3,.store-grid-card h3){font-size:20px;line-height:1.6}
body:not(.merchant-admin) :is(.compact-product-info p,.store-grid-card>.grid-product-description){font-size:16px;line-height:1.7}
body:not(.merchant-admin) .compact-product-row{grid-template-columns:44px minmax(0,1fr) 126px 120px!important;gap:20px!important;min-height:112px}
body:not(.merchant-admin) .compact-product-price strong{font-size:26px;white-space:nowrap}
body:not(.merchant-admin) .compact-product-buy .button{width:120px;white-space:nowrap}
body:not(.merchant-admin) .electric-list-head{grid-template-columns:minmax(0,1fr) 126px 120px;gap:20px}
body:not(.merchant-admin) :is(.compact-product-price small,.grid-product-bottom small,.catalogue-title>span,.hero-secondary){font-size:16px}
body:not(.merchant-admin) :is(.page-title p,.carousel-slide p,.rich-content,.detail-copy,.purchase-guide dd,.order-product-text .small){font-size:18px;line-height:1.8}
body:not(.merchant-admin) .page-title h1{font-size:32px;line-height:1.4}
body:not(.merchant-admin) :is(.panel h3,.auth-box h2){font-size:22px}
body:not(.merchant-admin) .hero-service-item strong{font-size:18px;line-height:1.5}
body:not(.merchant-admin) .hero-service-info{font-size:16px}
.store-preferences{display:flex;align-items:center;gap:8px;flex:none}
.language-control{display:flex;align-items:center;gap:6px;min-height:44px;padding:0 8px;background:var(--bm-soft);border-radius:4px}
.language-control>.icon{width:18px;height:18px;flex:none}
.language-control select{border:0;background:transparent;color:var(--bm-ink);font-size:16px!important;max-width:122px;padding:8px 18px 8px 0;min-height:44px;cursor:pointer}
body .appearance-button{width:44px;min-width:44px;min-height:44px;background:var(--bm-soft);padding:8px}
.theme-apply-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.merchant-content :is(th,td,.field>span,.field input,.field select,.field textarea){font-size:18px!important;line-height:1.65}
.merchant-content :is(p,li,.line-item){font-size:17px;line-height:1.75}
.merchant-content :is(.small,.muted,.field small,.settings-card>header p,.settings-help,.settings-nav p){font-size:16px!important}
.merchant-content :is(h3,h4,.settings-card h3){font-size:21px!important;line-height:1.5}
.merchant-content h2{font-size:26px!important}
.merchant-content .toolbar h1,.merchant-content .toolbar h2,.merchant-topbar h1{font-size:30px!important}
.merchant-nav a{font-size:18px!important;min-height:50px}
.merchant-nav section>small,.merchant-sidebar-footer small,.merchant-connected{font-size:15px!important}
.merchant-brand strong{font-size:22px!important}.merchant-brand small{font-size:15px;letter-spacing:0}
.merchant-content .field :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:48px}
.merchant-content :is(th,td){padding:17px 15px}
.merchant-content .stats strong{font-size:32px!important}
.product-bulk-bar{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:18px 20px;margin:22px 0;background:var(--bm-soft);border-radius:4px;flex-wrap:wrap}
.product-bulk-bar>div:first-child{display:flex;flex-direction:column;gap:2px}
.product-bulk-bar>div:first-child>span{font-size:16px;color:var(--bm-muted)}
.product-bulk-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.product-select-all{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:16px}
.product-selection-cell,.product-manager-table th:first-child{width:64px;text-align:center}
.product-manager-table input[type=checkbox]{width:20px;height:20px;accent-color:var(--bm-focus);cursor:pointer}
.product-manager-table{min-width:1120px}
.product-manager-table tr.is-selected{background:var(--bm-selected)}
.product-manager-table .admin-product-title{min-width:220px;align-items:flex-start;gap:14px}
.product-manager-table .admin-product-title strong{font-size:18px;line-height:1.6;white-space:normal}
.product-manager-table .admin-product-title p{margin:4px 0}
.product-manager-table .admin-product-title :is(p,small){font-size:16px!important}
.product-manager-table .admin-product-title>img{width:48px;height:48px;object-fit:contain;flex:none}
.product-manager-table .actions{min-width:220px;white-space:normal}
.product-manager-table .actions .button{margin:3px}
.product-sku-summary{min-width:150px;display:flex;flex-direction:column;gap:10px}
.product-sku-summary>span{font-size:17px}.product-sku-summary small{display:block;font-size:16px;color:var(--bm-muted)}
.product-bulk-preview{margin:18px 0;padding:14px 14px 14px 34px;background:var(--bm-soft);max-height:240px;overflow:auto}
.product-bulk-preview li{font-size:17px;line-height:1.75;margin:5px 0}
.product-sort-list{list-style:none;padding:0;margin:18px 0;max-height:360px;overflow:auto}
.product-sort-list li{display:flex;align-items:center;justify-content:space-between;gap:20px;background:var(--bm-soft);padding:14px;margin:8px 0}
.product-sort-list li>div:first-child{min-width:0;display:flex;flex-direction:column;gap:6px}
.product-sort-list li>div:last-child{display:flex;gap:6px;flex:none}
.product-sort-list span{font-size:16px;color:var(--bm-muted)}
.product-manager-table .product-selection-cell,.product-manager-table th:first-child{width:106px;min-width:106px}
.product-selection-cell{white-space:nowrap}
.product-drag-handle{display:inline-flex;align-items:center;justify-content:center;width:40px;height:44px;margin-right:8px;padding:0;border:1px solid transparent;background:transparent;color:var(--bm-muted);font-size:30px;line-height:1;cursor:grab;touch-action:none;user-select:none;vertical-align:middle;border-radius:4px}
.product-drag-handle:hover,.product-drag-handle:focus-visible{color:var(--bm-ink);background:var(--bm-soft);border-color:var(--bm-muted)}
.product-drag-handle:active{cursor:grabbing}
.product-drag-handle:disabled{cursor:wait;opacity:.45}
.product-reorder-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:18px 0;padding:16px 18px;background:var(--bm-soft);border-left:3px solid var(--bm-muted)}
.product-reorder-bar p{font-size:16px;color:var(--bm-muted);margin:6px 0 0;line-height:1.6}
.product-reorder-bar>div:last-child{display:flex;gap:10px;flex-shrink:0}
.product-reorder-bar.is-pending{border-left-color:var(--bm-accent)}
[data-sort-lock][inert]{opacity:.55}
.product-manager-table [inert]{opacity:.55}
.product-sort-list li{gap:12px;position:relative}
.product-sort-list li .product-drag-handle{flex:none;margin:0}
.product-sort-list .product-sort-title{display:flex;flex:1;flex-direction:column;min-width:0;gap:6px}
.product-sort-list .product-sort-title strong{overflow-wrap:anywhere}
.product-manager-table tr.is-dragging,.product-sort-list li.is-dragging{opacity:.4;pointer-events:none}
.product-manager-table tr.drop-before>td{box-shadow:inset 0 3px var(--bm-accent)}
.product-manager-table tr.drop-after>td{box-shadow:inset 0 -3px var(--bm-accent)}
.product-sort-list li.drop-before:before,.product-sort-list li.drop-after:after{content:'';position:absolute;left:0;right:0;height:3px;background:var(--bm-accent)}
.product-sort-list li.drop-before:before{top:-4px}.product-sort-list li.drop-after:after{bottom:-4px}
.product-drag-ghost{position:fixed;top:0;left:0;z-index:10000;max-width:250px;padding:12px 16px;pointer-events:none;background:var(--bm-ink);color:var(--bm-paper);border:1px solid var(--bm-accent);box-shadow:0 8px 24px #0003;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.product-is-dragging,body.product-is-dragging *{cursor:grabbing!important;user-select:none!important}
.inventory-preview{border-top:1px solid var(--bm-muted);padding-top:20px;margin-top:20px}
.inventory-preview-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}
.inventory-preview-counts>div{padding:16px;background:var(--bm-soft);display:flex;flex-direction:column;gap:8px}
.inventory-preview-counts strong{font-size:26px;color:var(--bm-ink)}
.inventory-preview-counts span{font-size:16px;color:var(--bm-muted)}
.inventory-low-stock{margin:16px 0;padding:16px;background:var(--bm-soft)}
.inventory-low-stock summary{cursor:pointer;font-size:18px;font-weight:600}
.merchant-content .inventory-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
.delivery-overview{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:12px 0 24px}
.delivery-overview>div:last-child{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
.delivery-overview p{font-size:18px;margin:10px 0 0}
@media(max-width:640px){.merchant-content .inventory-stats{grid-template-columns:1fr}.inventory-preview-counts{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.delivery-overview{align-items:flex-start;flex-direction:column}.delivery-overview>div:last-child{justify-content:flex-start}}
@media(max-width:640px){.product-reorder-bar{align-items:stretch;flex-direction:column;gap:12px;padding:14px}.product-reorder-bar>div:last-child .button{flex:1}.product-sort-list li{padding:10px;gap:8px}.product-sort-list .product-sort-title strong{font-size:17px}}
/* Dark mode uses the same semantic tokens and preserves the selected brand accent. */
html[data-color-mode=dark] body{background:var(--bm-paper)!important;color:var(--bm-ink)}
html[data-color-mode=dark] :is(.glass,.panel,.auth-box,.mobile-nav,.merchant-topbar,.merchant-content .settings-card,.store-grid-card,.compact-product-row){background:var(--bm-white)!important;color:var(--bm-ink)}
html[data-color-mode=dark] .compact-product-row:nth-child(2n){background:var(--bm-soft)!important}
html[data-color-mode=dark] :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background-color:var(--bm-control-fill)!important;color:var(--bm-ink)!important;border-color:var(--bm-line)!important}
html[data-color-mode=dark] :is(.shop-search-form,.product-readiness,.merchant-content .settings-nav,.notice,.product-sku-editor,.product-image-guide){background:var(--bm-soft);color:var(--bm-ink)}
html[data-color-mode=dark] .button:not(.primary):not(.danger):not(.text){background:var(--bm-soft);color:var(--bm-ink)}
html[data-color-mode=dark] .button:not(.primary):hover{background:var(--bm-selected)}
html[data-color-mode=dark] .icon.native-icon{filter:brightness(0) invert(1)!important}
html[data-color-mode=dark] .button.primary .icon.native-icon{filter:var(--bm-accent-icon)!important}
html[data-color-mode=dark] .cart-count{background:var(--bm-accent);color:var(--bm-on-accent)}
html[data-color-mode=dark] :is(th,td){border-color:var(--bm-line)}
html[data-color-mode=dark] .hero-service-item{color:var(--bm-ink)}
html[data-color-mode=dark] .language-control select{background:transparent!important}
html[data-color-mode=dark] :is(.electric-categories .button.active,.carousel-controls .button.active,.display-controls .button.active){background:var(--bm-accent)!important;color:var(--bm-on-accent)!important}
html[data-color-mode=dark] .display-controls .button.active .icon.native-icon{filter:var(--bm-accent-icon)!important}
html[data-color-mode=dark] .header-actions .account-register{color:var(--bm-ink)!important}
html[data-color-mode=dark] .icon.brand-icon[src$="/apple.svg"]{filter:brightness(0) invert(1)}
body input::placeholder,body textarea::placeholder{color:var(--bm-muted);opacity:1}
body:not(.merchant-admin) .compact-product-price small{display:block;margin-top:2px;white-space:nowrap}
@media(min-width:721px){
 html:not([lang=zh-CN]) body:not(.merchant-admin) .compact-product-row{grid-template-columns:44px minmax(0,1fr) 126px 150px!important}
 html:not([lang=zh-CN]) body:not(.merchant-admin) .compact-product-buy .button{width:150px}
 html:not([lang=zh-CN]) body:not(.merchant-admin) .electric-list-head{grid-template-columns:minmax(0,1fr) 126px 150px}
}
@media(min-width:721px) and (max-width:1100px){.carousel-slide h1{font-size:38px}.electric-hero-copy{padding:30px 26px}}
body .merchant-nav a.active{color:var(--bm-on-accent)!important}
html[data-color-mode=dark] .merchant-nav a.active .icon.native-icon{filter:var(--bm-accent-icon)!important}
html[data-color-mode=dark] :is(.merchant-content .stat,.product-editor-tabs,.product-editor .modal-head,.product-publish-actions,.draft-image,.product-form-body .image-upload-label,.product-form-body .icon-current){background:var(--bm-white)!important;color:var(--bm-ink)}
html[data-color-mode=dark] .merchant-content .readiness-details table{background:var(--bm-white)!important}
/* Theme complete subpanels and editor chrome, not only their outer cards. */
html[data-color-mode=dark]{--bm-danger:#FFB4AA;--bm-danger-soft:#432A29;--bm-success:#AFE2B6;--bm-success-soft:#253E2D;--bm-warning:#F0D18C;--bm-warning-soft:#423B25}
html[data-color-mode=dark] body.merchant-admin :is(.hero-admin-slide,.hero-slide-body,.hero-upload-card,.site-media-card){background:var(--bm-white);color:var(--bm-ink)}
html[data-color-mode=dark] .status.success{background:var(--bm-success-soft);color:var(--bm-success)}
html[data-color-mode=dark] .status.warning{background:var(--bm-warning-soft);color:var(--bm-warning)}
html[data-color-mode=dark] .status.error{background:var(--bm-danger-soft);color:var(--bm-danger)}
html[data-color-mode=dark] body.merchant-admin :is(.merchant-content,#overlays) .button.danger{color:var(--bm-danger)!important}
html[data-color-mode=dark] body.merchant-admin #overlays .sun-editor :is(.se-container,.se-wrapper,.se-wrapper-inner,.sun-editor-editable,.se-resizing-bar,.se-list-layer,.se-controller,.se-dialog-content){background:var(--bm-white)!important;color:var(--bm-ink)!important;border-color:var(--bm-line)!important}
html[data-color-mode=dark] body.merchant-admin #overlays .sun-editor :is(.se-toolbar,.se-btn-tray,.se-dialog-header,.se-dialog-footer){background:var(--bm-soft)!important;color:var(--bm-ink)!important;border-color:var(--bm-line)!important}
html[data-color-mode=dark] body.merchant-admin #overlays .sun-editor :is(.se-btn,.se-btn-list,.se-label,.se-char-counter){color:var(--bm-ink)!important}
html[data-color-mode=dark] body.merchant-admin #overlays .sun-editor :is(.se-btn,.se-btn-list):enabled:hover{background:var(--bm-selected)!important}
/* Shared order views and nested dialogs must follow the active mode too. */
.delivery pre{font-size:16px;line-height:1.75}
.icon-picker-tools .control,.icon-pagination .button{font-size:var(--bm-text-note)!important}
html[data-color-mode=dark] .order-steps li.done{background:var(--bm-success-soft);color:var(--bm-success)}
html[data-color-mode=dark] .order-steps li.needs-attention{background:var(--bm-warning-soft);color:var(--bm-warning)}
html[data-color-mode=dark] .order-next-step.needs-attention{color:var(--bm-warning)}
html[data-color-mode=dark] .icon-choice.selected{outline-color:var(--bm-focus)!important}
html[data-color-mode=dark] .product-thumb.selected{outline-color:var(--bm-focus)}
html[data-color-mode=dark] .trade-bar{stroke:var(--bm-focus);stroke-width:1}
.merchant-topbar>.appearance-button{display:inline-flex}
@media(max-width:1200px){body:not(.merchant-admin) .topbar.shell{gap:18px;flex-wrap:wrap;height:auto;min-height:96px;padding:16px 0!important}.topbar .nav{order:3;width:100%;height:auto;gap:28px;padding-bottom:5px}.header-actions{margin-left:auto!important}.brand small{display:none}}
@media(max-width:800px){
 :root{--bm-text-body:17px;--bm-text-label:17px;--bm-text-note:15px}
 body,body:not(.merchant-admin){font-size:17px!important}
 body:not(.merchant-admin) .topbar .nav a{font-size:17px}
 .merchant-content :is(th,td,.field>span,.field input,.field select,.field textarea){font-size:17px!important}
 .product-bulk-bar{padding:16px;gap:14px}.product-bulk-actions{width:100%}
 .product-bulk-actions>.button{flex:1 0 auto}
 .merchant-topbar h1{font-size:24px!important}
 body:not(.merchant-admin) .hero-service-item strong{font-size:16px}
}
@media(max-width:720px){
 .topbar.shell{justify-content:space-between}
 .header-actions{gap:8px!important;flex-wrap:wrap;justify-content:flex-end}
 .store-preferences{gap:4px}.language-control{padding:0 6px}.language-control>.icon{display:none}.language-control select{max-width:102px;font-size:16px!important}
 .header-actions .account-register{display:none}
 body:not(.merchant-admin) .brand{font-size:23px!important}
 body:not(.merchant-admin) :is(.compact-product-info h3,.store-grid-card h3){font-size:18px}
 body:not(.merchant-admin) :is(.compact-product-info p,.store-grid-card>.grid-product-description){font-size:16px}
 body:not(.merchant-admin) .compact-product-row{grid-template-columns:40px minmax(0,1fr) 94px!important;gap:10px!important;padding:16px 12px!important;min-height:120px}
 body:not(.merchant-admin) .compact-product-icon{grid-column:1;grid-row:1;width:36px;height:36px}
 body:not(.merchant-admin) .compact-product-info{grid-column:2;grid-row:1}
 body:not(.merchant-admin) .compact-product-price{grid-column:3;grid-row:1}
 body:not(.merchant-admin) .compact-product-price strong{font-size:22px}
 body:not(.merchant-admin) .compact-product-buy{grid-column:2/-1;grid-row:2}
 body:not(.merchant-admin) .compact-product-buy .button{width:100%;min-height:46px;font-size:17px!important}
 body:not(.merchant-admin) .electric-list-head{grid-template-columns:minmax(0,1fr) 94px;padding-left:12px;padding-right:12px}
 .electric-list-head>span:last-child{display:none}
 body:not(.merchant-admin) .carousel-slide p{font-size:17px}
 body:not(.merchant-admin) .hero-service-grid:not(.hero-service-feature){grid-template-columns:repeat(2,minmax(0,1fr));min-height:210px}
 body:not(.merchant-admin) .hero-service-item strong{font-size:16px}
 .hero-service-info{display:none}
 .topbar .nav{justify-content:flex-start;gap:20px;overflow-x:auto;flex-wrap:nowrap}
 .topbar .nav a{white-space:nowrap;flex:none}
}
@media(max-width:480px){
 .header-actions{width:100%;justify-content:space-between;order:2;margin:0!important}
 .store-preferences{margin-right:auto}.topbar .nav{order:3}
 body:not(.merchant-admin) .brand .brand-logo{width:40px!important;height:40px!important}
 .header-actions .cart-button{margin-left:auto}
 .store-preferences{position:absolute;right:0;top:18px;margin:0}
}

/* Narrow screens scroll dense data inside its own container, not the page. */
@media(max-width:800px){
 .merchant-topbar>div{min-width:0}
 .merchant-topbar h1{min-width:0;overflow-wrap:anywhere;line-height:1.4}
 .merchant-topbar>.button{flex-shrink:0}
 .merchant-content :is(.panel,.settings-card,.table-wrap,.trade-chart-wrap){min-width:0;max-width:100%}
 .merchant-content :is(.table-wrap,.trade-chart-wrap),body.merchant-admin #overlays :is(.table-wrap,.product-sku-table-scroll){width:100%;max-width:100%;margin-right:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--bm-muted) var(--bm-soft);-webkit-overflow-scrolling:touch}
 .merchant-content .table-wrap>table{min-width:680px}
 .merchant-content .table-wrap>.product-manager-table{min-width:1120px}
 .merchant-content :is(.toolbar-actions,.admin-list-filters,.order-filter-actions>div,.trade-controls,.row){flex-wrap:wrap;min-width:0}
 .merchant-content .toolbar-actions>.control{max-width:100%;flex:1 1 180px}
 .merchant-content .admin-list-filters>.field{flex:1 1 180px;min-width:0}
 .merchant-content .order-pagination,.merchant-content .order-pagination>div{min-width:0;max-width:100%;flex-wrap:wrap}
 .merchant-content :is(.toolbar-actions,.order-filter-actions,.trade-controls) .button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .merchant-content .settings-toggle-row{align-items:flex-start;flex-wrap:wrap}
 .merchant-content .settings-savebar{padding-bottom:max(16px,env(safe-area-inset-bottom))}
 .merchant-content .settings-page .hero-upload-card .button{white-space:normal;overflow-wrap:anywhere}
 .merchant-content .settings-page .hero-upload-grid{grid-template-columns:minmax(0,1fr)}
 .merchant-sidebar{max-width:calc(100vw - 24px);padding-bottom:max(18px,env(safe-area-inset-bottom))}
 body.merchant-admin #overlays .modal-backdrop{padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-bottom:max(12px,env(safe-area-inset-bottom))}
 body.merchant-admin #overlays .modal:not(.product-editor){min-width:0;width:min(650px,100%);max-height:calc(100vh - 24px);max-height:calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));padding:18px!important;overscroll-behavior-y:contain;scroll-padding-block:16px}
 body.merchant-admin #overlays .modal.wide:not(.product-editor){width:100%}
 body.merchant-admin #overlays .modal-head{gap:12px;align-items:flex-start}
 body.merchant-admin #overlays .modal-head h2{min-width:0;font-size:24px;overflow-wrap:anywhere;line-height:1.4}
 body.merchant-admin #overlays .modal-head>.button{flex:none;min-width:44px}
 body.merchant-admin #overlays .modal:not(.product-editor) :is(.form-grid,.row){min-width:0}
 body.merchant-admin #overlays .modal:not(.product-editor) .row{flex-wrap:wrap}
 body.merchant-admin #overlays .modal:not(.product-editor) :is(.field,.control){min-width:0;max-width:100%}
 body.merchant-admin #overlays .modal:not(.product-editor) [data-form=record]>.modal-actions{bottom:-18px}
 body.merchant-admin #overlays .modal-actions{flex-wrap:wrap;gap:8px}
 body.merchant-admin #overlays .modal-actions>.button{flex:1 1 140px;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 body.merchant-admin #overlays .product-editor-tabs{justify-content:flex-start;flex-wrap:nowrap;flex-shrink:0;min-width:0;max-width:100%;gap:24px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--bm-muted) var(--bm-soft)}
 body.merchant-admin #overlays .product-editor-tabs>.button{flex:none;white-space:nowrap;font-size:16px!important;min-height:52px!important}
 body.merchant-admin #overlays .product-editor-intro{flex-shrink:0}
 body.merchant-admin #overlays .product-form-body{min-width:0;overscroll-behavior-y:contain;scroll-padding-block:16px}
 body.merchant-admin #overlays .product-publish-actions{padding-bottom:max(16px,env(safe-area-inset-bottom));max-height:35dvh;overflow-y:auto}
 body.merchant-admin #overlays .product-publish-actions>span{flex:1 0 100%;margin:0}
}
@media(max-height:500px) and (max-width:1000px){
 body.merchant-admin #overlays .product-editor-intro{display:none}
 body.merchant-admin #overlays .product-editor .modal-head{padding-block:10px}
 body.merchant-admin #overlays .product-publish-actions>span{display:none}
}

/* Product selection and order records share a legible, overflow-safe layout. */
body:not(.merchant-admin) :is(.product-page,.checkout-page,.order-page) .two-column>.panel{min-width:0}
body:not(.merchant-admin) :is(.order-product-text h3,.product-page-title h1,.totals>span,.totals>strong){overflow-wrap:anywhere}
body:not(.merchant-admin) .totals{gap:16px;color:var(--bm-ink)}
body:not(.merchant-admin) .totals>:last-child{text-align:right;min-width:0}
body:not(.merchant-admin) .order-edit-link{display:inline-flex;align-items:center;min-height:44px;margin-bottom:12px;text-decoration:underline;text-underline-offset:4px}
body:not(.merchant-admin) .sku-options .button{max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:left;line-height:1.6}
body:not(.merchant-admin) .gallery-thumbnails{max-width:100%;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--bm-muted) var(--bm-soft)}
body:not(.merchant-admin) .gallery-thumbnails>.product-thumb{min-width:56px;min-height:56px}
body:not(.merchant-admin) .email-notify-option{min-height:44px;cursor:pointer}
body:not(.merchant-admin) :is(.email-notify-option,.checkout-columns .field:has(.check))>.check{width:20px;height:20px;min-width:20px;flex-shrink:0;accent-color:var(--bm-focus)}
body:not(.merchant-admin) .rich-content :is(pre,code){color:var(--bm-ink);font-size:16px;line-height:1.7}
@media(max-width:800px){
 body:not(.merchant-admin) :is(.product-page,.checkout-page,.order-page,.lookup-page){min-width:0}
 body:not(.merchant-admin) .product-page .buy-panel{padding:20px 16px!important}
 body:not(.merchant-admin) .product-page .buy-panel .row{flex-wrap:wrap;gap:10px}
 body:not(.merchant-admin) .product-page .quantity{gap:12px;max-width:100%}
 body:not(.merchant-admin) .product-page .quantity>.button{width:48px;min-width:48px;min-height:48px;padding:10px;flex:none}
 body:not(.merchant-admin) .product-page .quantity>input{width:88px;min-width:0;min-height:48px;flex:0 1 88px}
 body:not(.merchant-admin) .product-page .buy-panel .purchase-guide dl>div{grid-template-columns:minmax(0,1fr);gap:4px}
 body:not(.merchant-admin) :is(.checkout-page,.order-page) .order-product-line{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;align-items:start}
 body:not(.merchant-admin) :is(.checkout-page,.order-page) .order-product-info{gap:12px;min-width:0;align-items:flex-start}
 body:not(.merchant-admin) :is(.checkout-page,.order-page) .cart-thumbnail{width:48px;height:48px}
 body:not(.merchant-admin) :is(.checkout-page,.order-page) .order-product-price{margin-left:60px;font-size:22px}
 body:not(.merchant-admin) :is(.checkout-page,.order-page) .order-product-text h3{font-size:18px;line-height:1.6}
 body:not(.merchant-admin) .checkout-columns>.panel:last-child{padding:20px 16px!important}
 body:not(.merchant-admin) .checkout-page .field-row{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px}
 body:not(.merchant-admin) .checkout-page .field-row>.field{min-width:0;flex:1 1 180px;margin:0}
 body:not(.merchant-admin) .checkout-page .field-row>.button{flex:0 0 auto;min-height:48px;max-width:100%;white-space:normal}
 body:not(.merchant-admin) :is(.checkout-page,.lookup-page) :is(.field,.auth-box){min-width:0;max-width:100%}
 body:not(.merchant-admin) :is(.checkout-page,.lookup-page) .field :is(input,select,textarea){min-width:0;max-width:100%;font-size:18px}
 body:not(.merchant-admin) .order-page .payment-options{display:flex;gap:10px;flex-wrap:wrap}
 body:not(.merchant-admin) .order-page .payment-options>.button{flex:1 1 140px;max-width:100%;white-space:normal}
 body:not(.merchant-admin) .order-page .delivery{padding:16px;min-width:0}
 body:not(.merchant-admin) .order-page .delivery .row{flex-wrap:wrap;gap:8px}
 body:not(.merchant-admin) .order-page .delivery .row>.button{flex:1 1 120px}
 body:not(.merchant-admin) .rich-content :is(table,pre){max-width:100%;overscroll-behavior-x:contain}
}

/* Account pages use the same type and colour roles as the catalogue. */
body:not(.merchant-admin) .field{color:var(--bm-ink)}
body:not(.merchant-admin) .auth-tabs a{font-size:18px;color:var(--bm-muted);min-height:48px;display:flex;align-items:center;justify-content:center}
body:not(.merchant-admin) .auth-tabs a.active{background:var(--bm-accent);color:var(--bm-on-accent)}
body:not(.merchant-admin) .policy-links{font-size:16px;color:var(--bm-muted);flex-wrap:wrap;gap:10px 20px}
body:not(.merchant-admin) .policy-links a{display:inline-flex;align-items:center;min-height:44px;text-decoration:underline;text-underline-offset:4px}
body:not(.merchant-admin) .auth-box label.field:has(.check){font-size:16px;line-height:1.7;min-height:44px;cursor:pointer}
body:not(.merchant-admin) .auth-box .check{width:20px;height:20px;min-width:20px;flex:none;margin-top:4px}
body:not(.merchant-admin) :is(.auth-page,.member-page) :is(.field,h2,h3,.notice){overflow-wrap:anywhere}
body:not(.merchant-admin) .member-page .stats .stat{background:var(--bm-white);min-width:0}
body:not(.merchant-admin) .member-page .stat>span{font-size:16px;line-height:1.7}
body:not(.merchant-admin) .member-page .stat strong{font-size:28px;line-height:1.5;overflow-wrap:anywhere}
body:not(.merchant-admin) .member-page .resource-text{font-size:16px;line-height:1.75}
body:not(.merchant-admin) .member-page .two-column>.panel{min-width:0}
.member-tabs{position:relative}
body:not(.merchant-admin) .member-tabs a{font-size:17px;min-height:48px;display:inline-flex;align-items:center;padding:10px 16px}
@media(max-width:800px){
 body:not(.merchant-admin) :is(.auth-page,.member-page){min-width:0}
 body:not(.merchant-admin) .auth-page .auth-box{width:100%;max-width:480px;margin:20px auto;padding:24px 20px}
 body:not(.merchant-admin) .auth-page .auth-box :is(input,select,textarea){max-width:100%;min-width:0;font-size:18px}
 body:not(.merchant-admin) .auth-page .auth-box :is(.row,.policy-links){flex-wrap:wrap}
 body:not(.merchant-admin) .auth-page .auth-box .row>.button{max-width:100%;white-space:normal}
 body:not(.merchant-admin) .auth-page .auth-box .full-width{white-space:normal;overflow-wrap:anywhere}
 body:not(.merchant-admin) .auth-page .auth-tabs{gap:4px;margin-bottom:24px}
 body:not(.merchant-admin) .member-page .page-title{align-items:flex-start}
 body:not(.merchant-admin) .member-page .page-title>div{min-width:0;max-width:100%;overflow-wrap:anywhere}
 body:not(.merchant-admin) .member-tabs{flex-wrap:nowrap;gap:8px;max-width:100%;overflow-x:auto;margin-bottom:24px;padding:3px 0 8px;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--bm-muted) var(--bm-soft)}
 body:not(.merchant-admin) .member-tabs a{flex:none;white-space:nowrap;font-size:17px}
 body:not(.merchant-admin) .member-page .table-wrap{width:100%;max-width:100%;margin-right:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--bm-muted) var(--bm-soft)}
 body:not(.merchant-admin) .member-page .table-wrap>table{min-width:680px}
 body:not(.merchant-admin) .member-page :is(th,td){font-size:17px;line-height:1.7;padding:14px 12px}
 body:not(.merchant-admin) .member-page .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 body:not(.merchant-admin) .member-page .stat{padding:18px 14px}
 body:not(.merchant-admin) .member-page .stat strong{font-size:26px}
 body:not(.merchant-admin) .member-page :is(.field,.field-row){min-width:0}
 body:not(.merchant-admin) .member-page .field-row{flex-wrap:wrap;align-items:flex-end;gap:10px}
 body:not(.merchant-admin) .member-page .field-row>.field{flex:1 1 200px;min-width:0;margin:0}
 body:not(.merchant-admin) .member-page .field-row>.button{min-height:48px;max-width:100%;white-space:normal}
 body:not(.merchant-admin) .member-page .field :is(input,select,textarea){max-width:100%;min-width:0;font-size:18px}
 body:not(.merchant-admin) #overlays .modal{min-width:0;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overscroll-behavior-y:contain}
 body:not(.merchant-admin) #overlays .modal-head{gap:12px;align-items:flex-start}
 body:not(.merchant-admin) #overlays .modal-head h2{overflow-wrap:anywhere;min-width:0;line-height:1.4}
 body:not(.merchant-admin) #overlays .modal-head>.button{flex:none;min-width:44px}
 body:not(.merchant-admin) #overlays :is(.modal-actions,.modal .row){flex-wrap:wrap}
 body:not(.merchant-admin) #overlays .modal-actions>.button{flex:1 1 140px;max-width:100%;white-space:normal}
}

.member-order-filters{display:grid;grid-template-columns:minmax(220px,1fr) 170px 140px auto;align-items:start;gap:16px}
.member-order-filters>.field{min-width:0;margin:0}
.member-order-filters>div{display:flex;flex-wrap:wrap;gap:8px;padding-top:34px}
body:not(.merchant-admin) .member-order-filters .field :is(input,select){min-width:0;font-size:18px;min-height:48px}
.member-order-count{font-size:16px;margin:24px 0 12px;line-height:1.7}
.member-order-number{display:block;font-size:17px;font-weight:500;overflow-wrap:anywhere;min-width:200px}
.member-order-items{display:block;max-width:400px;white-space:normal;overflow-wrap:anywhere;font-size:16px;line-height:1.7;color:var(--bm-muted);margin-top:8px}
.member-order-pagination{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:16px;margin-top:24px}
.member-order-pagination>span{font-size:16px;color:var(--bm-muted)}
.member-order-pagination>div{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:1100px){.member-order-filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.member-order-filters>div{padding-top:32px}}
@media(max-width:640px){.member-order-filters{grid-template-columns:minmax(0,1fr);gap:16px}.member-order-filters>div{padding-top:0}.member-order-filters>div>.button{flex:1}.member-order-pagination{align-items:flex-start;flex-direction:column}}

.member-ledger-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;gap:16px;margin-bottom:18px}
.member-ledger-filters>.field{min-width:0;margin:0}
.member-ledger-filters>div{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:8px}
body:not(.merchant-admin) .member-ledger-filters .field :is(input,select){min-width:0;max-width:100%;font-size:18px;min-height:48px}
body:not(.merchant-admin) .member-ledger-totals{grid-template-columns:repeat(3,minmax(0,1fr))}
.ledger-amount{font-size:18px;white-space:nowrap;font-weight:500;font-variant-numeric:tabular-nums}
.ledger-amount.income{color:var(--bm-success,#326447)}
.ledger-amount.expense{color:var(--bm-danger)}
.ledger-reference{display:block;max-width:340px;overflow-wrap:anywhere;white-space:normal;font-size:16px;line-height:1.7}
@media(max-width:1000px){.member-ledger-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.member-ledger-filters{grid-template-columns:minmax(0,1fr)}.member-ledger-filters>div>.button{flex:1}body:not(.merchant-admin) .member-ledger-totals{grid-template-columns:minmax(0,1fr)}}

@media(max-width:640px){body:not(.merchant-admin) .member-ledger-totals .stat{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px}body:not(.merchant-admin) .member-ledger-totals .stat strong{font-size:24px;margin:0}}

/* Order lookup: one frame for the search form and its matching order records. */
body:not(.merchant-admin) .lookup-page{max-width:1184px;padding-top:40px;padding-bottom:64px}
body:not(.merchant-admin) .lookup-page>.page-title{max-width:none;margin:0 0 32px;text-align:left}
body:not(.merchant-admin) .lookup-page>.page-title h1{font-size:32px;letter-spacing:-.6px}
.lookup-layout{display:grid;grid-template-columns:340px minmax(0,1fr);align-items:start;gap:32px}
body:not(.merchant-admin) .lookup-search-panel{position:sticky;top:24px;padding:28px;min-width:0;margin:0;background:var(--bm-white)}
body:not(.merchant-admin) .lookup-search-panel h2{font-size:22px;font-weight:500;line-height:1.5;margin:0 0 26px}
.lookup-form .field{margin-bottom:22px;min-width:0}
.lookup-form .field>span{font-weight:500;font-size:17px;line-height:1.6;margin-bottom:10px}
body:not(.merchant-admin) .lookup-form .field input{width:100%;min-width:0;max-width:100%;min-height:52px;font-size:18px;background:var(--bm-field)!important;color:var(--bm-ink);padding:13px 14px}
.lookup-form .field small{margin-top:9px;font-size:16px;line-height:1.6}
.lookup-form .button{min-height:52px;margin-top:4px;justify-content:space-between;padding-inline:18px}
.lookup-form input:-webkit-autofill{box-shadow:0 0 0 1000px var(--bm-field) inset!important;-webkit-text-fill-color:var(--bm-ink);caret-color:var(--bm-ink)}
.lookup-member-link{font-size:16px;color:var(--bm-muted);line-height:1.8;margin:24px 0 0}
.lookup-member-link a,.lookup-results-limit a{color:var(--bm-link);text-decoration:underline;text-underline-offset:4px}
.lookup-results{min-width:0}
.lookup-feedback{min-height:382px;padding:36px;background:var(--bm-soft);display:flex;flex-direction:column;justify-content:center}
.lookup-feedback h2{font-size:24px;font-weight:500;line-height:1.5;margin:0 0 12px}
.lookup-feedback p{font-size:17px;line-height:1.8;color:var(--bm-muted);margin:0;max-width:38em;overflow-wrap:anywhere}
.lookup-feedback dl{margin:30px 0 0;display:grid;gap:22px}
.lookup-feedback dt{font-size:17px;font-weight:500;line-height:1.6;margin:0 0 5px}
.lookup-feedback dd{font-size:16px;line-height:1.8;color:var(--bm-muted);margin:0}
.lookup-feedback.loading-state{min-height:240px}
.lookup-feedback.error-state{min-height:280px;background:var(--bm-white)}
.lookup-feedback.error-state h2{color:var(--bm-danger)}
.lookup-feedback .lookup-feedback-note{margin-top:18px}
.lookup-results-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:12px;margin:0 0 18px}
.lookup-results-heading h2{font-size:22px;font-weight:500;line-height:1.5;margin:0}
.lookup-results-heading>span{font-size:16px;color:var(--bm-muted)}
.lookup-result-list{display:grid;gap:14px}
.lookup-result{display:grid;grid-template-columns:minmax(0,1fr) 168px;align-items:center;gap:24px;padding:24px;background:var(--bm-white)}
.lookup-result-main{min-width:0}
.lookup-order-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;font-size:15px;color:var(--bm-muted);line-height:1.7;margin:0 0 16px}
.lookup-order-meta strong{font-size:16px;font-weight:400;color:var(--bm-muted);overflow-wrap:anywhere}
.lookup-order-meta time{flex-basis:100%;font-size:15px}
.lookup-order-items{padding:0;margin:0;list-style:none;display:grid;gap:12px}
.lookup-order-items h3{font-size:18px;font-weight:500;line-height:1.6;margin:0;overflow-wrap:anywhere}
.lookup-order-items p{font-size:16px;color:var(--bm-muted);line-height:1.7;margin:4px 0 0;overflow-wrap:anywhere}
.lookup-result-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:14px 10px;min-width:0}
body:not(.merchant-admin) .lookup-result-actions .status{font-size:15px!important;padding:4px 8px}
.lookup-result-amount{font-size:22px;line-height:1.5;font-weight:500;max-width:100%;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.lookup-result-actions>.button{flex:1 0 100%;min-height:46px;width:100%;font-size:17px}
.lookup-results-limit{font-size:16px;line-height:1.8;color:var(--bm-muted);margin:20px 0 0}
@media(max-width:1000px){.lookup-layout{grid-template-columns:300px minmax(0,1fr);gap:24px}body:not(.merchant-admin) .lookup-search-panel{padding:24px}.lookup-result{grid-template-columns:minmax(0,1fr);gap:20px}.lookup-result-actions{gap:12px}.lookup-result-amount{text-align:right;margin-left:auto}.lookup-result-actions>.button{flex:0 0 auto;width:auto}}
@media(max-width:760px){body:not(.merchant-admin) .lookup-page{padding-top:24px;padding-bottom:40px}.lookup-layout{grid-template-columns:minmax(0,1fr);gap:28px}body:not(.merchant-admin) .lookup-page>.page-title{margin-bottom:24px}body:not(.merchant-admin) .lookup-search-panel{position:static;padding:24px 20px}.lookup-feedback{padding:28px 24px;min-height:0}.lookup-feedback h2{font-size:22px}.lookup-feedback dl{margin-top:24px;gap:18px}.lookup-result{padding:22px 20px}.lookup-order-meta{margin-bottom:14px}}
@media(max-width:420px){.lookup-result-actions{gap:14px}.lookup-result-actions>.button{flex:1 0 100%;width:100%}.lookup-result-amount{font-size:24px}}
@media(max-height:650px){body:not(.merchant-admin) .lookup-search-panel{position:static}}

/* Order detail continues the lookup page's content frame and reading hierarchy. */
body:not(.merchant-admin) .order-page{max-width:1184px;padding-top:24px;padding-bottom:64px}
body:not(.merchant-admin) .order-page .order-back-link{margin:0 0 20px;padding:0;min-height:36px}
body:not(.merchant-admin) .order-page>.page-title{margin-bottom:28px;align-items:flex-start}
body:not(.merchant-admin) .order-page>.page-title h1{font-size:32px}
body:not(.merchant-admin) .order-page .order-progress{padding:28px;margin:0 0 28px;background:var(--bm-white)}
body:not(.merchant-admin) .order-page .order-reference{flex-direction:row;align-items:center;gap:20px;margin-bottom:24px}
body:not(.merchant-admin) .order-page .order-reference span{font-size:16px;margin-bottom:6px}
body:not(.merchant-admin) .order-page .order-reference strong{font-size:21px;font-weight:500;letter-spacing:0}
body:not(.merchant-admin) .order-page .order-steps{gap:12px;margin-bottom:22px}
body:not(.merchant-admin) .order-page .order-steps li{padding:16px;background:var(--bm-soft);color:var(--bm-muted)}
body:not(.merchant-admin) .order-page .order-steps li.done{background:transparent;color:var(--bm-muted)}
body:not(.merchant-admin) .order-page .order-steps li.done strong{color:var(--bm-ink)}
body:not(.merchant-admin) .order-page .order-steps li.current{background:var(--bm-selected);color:var(--bm-ink)}
body:not(.merchant-admin) .order-page .order-steps li.needs-attention{background:var(--bm-warning-soft,#FBEFC5);color:var(--bm-warning,#8D5D08)}
body:not(.merchant-admin) .order-page .order-steps span{font-size:15px;line-height:1.6}
body:not(.merchant-admin) .order-page .order-steps strong{font-size:18px;line-height:1.6;font-weight:500}
body:not(.merchant-admin) .order-page .order-next-step{margin:0;align-items:flex-start;gap:12px;font-size:17px;line-height:1.8}
.order-detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:start}
.order-main,.order-sidebar{display:grid;gap:24px;min-width:0}
body:not(.merchant-admin) .order-detail-layout .panel{min-width:0;margin:0;padding:28px}
.order-section-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-bottom:20px}
body:not(.merchant-admin) .order-detail-layout h2{font-size:22px;font-weight:500;line-height:1.5;margin:0}
.order-section-heading>span{font-size:16px;color:var(--bm-muted)}
body:not(.merchant-admin) .order-products-panel .order-product-line{margin:0;padding:18px 0;border:0;gap:18px;min-width:0}
body:not(.merchant-admin) .order-products-panel .cart-thumbnail{width:52px;height:52px;background:var(--bm-soft)}
body:not(.merchant-admin) .order-products-panel .order-product-info{align-items:flex-start;gap:14px}
body:not(.merchant-admin) .order-products-panel .order-product-text h3{font-size:19px;font-weight:500;line-height:1.6;margin:0;overflow-wrap:anywhere}
body:not(.merchant-admin) .order-products-panel .order-product-text .small{font-size:16px;line-height:1.8;margin:6px 0 0}
body:not(.merchant-admin) .order-products-panel .order-product-price{font-size:22px;font-weight:500}
.order-summary-amount{display:block;font-size:36px;font-weight:500;line-height:1.4;margin:14px 0 24px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.order-facts{display:grid;gap:16px;margin:26px 0 0}
.order-facts>div{min-width:0}
.order-facts dt{font-size:16px;color:var(--bm-muted);line-height:1.6;margin-bottom:4px}
.order-facts dd{font-size:17px;line-height:1.8;margin:0;overflow-wrap:anywhere}
.order-payment-area{margin-top:24px;padding-top:22px}
.order-payment-deadline{font-size:16px;line-height:1.8;color:var(--bm-muted);margin:0 0 20px}
body:not(.merchant-admin) .order-payment-area h3{font-size:18px;font-weight:500;margin:0}
body:not(.merchant-admin) .order-payment-area .payment-options{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:16px 0}
body:not(.merchant-admin) .order-payment-area .payment-options>.button{width:100%;min-height:48px;white-space:normal}
body:not(.merchant-admin) .order-page .delivery{margin:18px 0 0;padding:20px;background:var(--bm-soft);border:0;border-radius:2px;min-width:0}
body:not(.merchant-admin) .order-page .order-delivery-heading h3{font-size:18px;font-weight:500;line-height:1.6;margin:0;overflow-wrap:anywhere}
.order-delivery-heading>span{display:block;font-size:16px;line-height:1.7;color:var(--bm-muted);margin-top:5px;overflow-wrap:anywhere}
body:not(.merchant-admin) .order-page .delivery pre{font-size:16px;line-height:1.8;padding:16px;margin:16px 0;border:0;background:var(--bm-white);white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
body:not(.merchant-admin) .order-page .delivery .row{flex-wrap:wrap;gap:10px}
.order-delivery-empty{font-size:17px;line-height:1.8;color:var(--bm-muted);background:var(--bm-soft);padding:22px;margin:0;overflow-wrap:anywhere}
.order-event-list{list-style:none;display:grid;gap:24px;margin:24px 0 0;padding:0}
.order-event-list li{min-width:0}
.order-event-list time{font-size:15px;line-height:1.7;color:var(--bm-muted)}
.order-event-list p{font-size:17px;line-height:1.8;margin:5px 0 0;overflow-wrap:anywhere}
.order-help-actions{display:grid;gap:10px;margin-top:28px}
.order-help-actions>.button{white-space:normal}
@media(max-width:1000px){.order-detail-layout{grid-template-columns:minmax(0,1fr) 300px;gap:24px}body:not(.merchant-admin) .order-detail-layout .panel{padding:24px}}
@media(max-width:800px){.order-detail-layout{display:flex;flex-direction:column;gap:24px}.order-main,.order-sidebar{display:contents}.order-products-panel{order:0}.order-summary-panel{order:1}.order-delivery-panel{order:2}.order-activity-panel{order:3}body:not(.merchant-admin) .order-detail-layout .panel{width:100%;padding:24px 20px}body:not(.merchant-admin) .order-page .order-progress{padding:24px 20px}body:not(.merchant-admin) .order-page .order-reference{align-items:flex-start;flex-direction:column;gap:14px}body:not(.merchant-admin) .order-page .order-reference strong{font-size:20px}body:not(.merchant-admin) .order-page .order-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}body:not(.merchant-admin) .order-page .order-steps li{padding:12px}body:not(.merchant-admin) .order-page .order-next-step{flex-wrap:wrap;font-size:17px}body:not(.merchant-admin) .order-products-panel .order-product-price{margin-left:66px;font-size:22px}body:not(.merchant-admin) .order-payment-area .payment-options{grid-template-columns:repeat(2,minmax(0,1fr))}body:not(.merchant-admin) .order-page .delivery{padding:16px}.order-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.order-facts>.order-fact-email{grid-column:1/-1}}
@media(max-width:420px){body:not(.merchant-admin) .order-payment-area .payment-options{grid-template-columns:minmax(0,1fr)}.order-facts{grid-template-columns:minmax(0,1fr)}}

body:not(.merchant-admin) .order-products-panel .order-product-price{min-width:0;white-space:normal;overflow-wrap:anywhere;text-align:right}
@media(max-width:800px){body:not(.merchant-admin) .order-products-panel .order-product-price{text-align:left}}

/* Reuse the real selected cover in compact rows without enlarging the catalogue. */
.compact-product-icon>.admin-product-image{display:block;width:100%;height:100%;min-width:0;border:0;border-radius:0;object-fit:contain;background:transparent}

/* Product art is composed for one landscape slot across desktop, mobile and details. */
:root{--bm-product-cover-ratio:16/10}
body:not(.merchant-admin) .grid-product-cover{aspect-ratio:var(--bm-product-cover-ratio);max-height:none}
body:not(.merchant-admin) .grid-product-cover .product-cover-image{object-fit:contain}
body:not(.merchant-admin) .gallery-main{aspect-ratio:var(--bm-product-cover-ratio);max-height:none;padding:0}
body:not(.merchant-admin) .gallery-main img{max-height:none;object-fit:contain}

/* Product-specific detail fields keep long values readable at every width. */
body:not(.merchant-admin) .service-spec dl>div{align-items:start;gap:16px}
body:not(.merchant-admin) .service-spec dd{color:var(--ink);min-width:0;overflow-wrap:anywhere;white-space:pre-line}
.product-extra-fields{border-top:1px solid var(--line);margin-top:22px;padding-top:18px}
.product-extra-fields>summary{cursor:pointer;font-size:18px;line-height:1.6;font-weight:550;min-height:44px}
.product-extra-fields>p{font-size:16px;line-height:1.7;color:var(--muted);margin:8px 0 14px}

/* Keep verified checkout totals and savings legible in both theme modes. */
body:not(.merchant-admin) .checkout-price-summary{margin-top:20px;font-variant-numeric:tabular-nums}
body:not(.merchant-admin) .checkout-price-summary .totals{padding:11px 0}
body:not(.merchant-admin) .checkout-price-summary .totals.final{border-top:1px solid var(--line);margin-top:8px;padding-top:18px}
body:not(.merchant-admin) .checkout-price-summary .totals.final strong{font-size:30px;line-height:1.3}
body:not(.merchant-admin) .checkout-savings{font-size:17px;font-weight:550;color:var(--ink);text-align:right;margin:8px 0 16px}
body:not(.merchant-admin) .checkout-pricing-note{line-height:1.8;margin-top:14px}
body:not(.merchant-admin) .checkout-quote-error{color:var(--error,#a73730);font-size:16px;line-height:1.7;margin:12px 0}

/* One gallery, with the same reading order for visuals, keyboard and mobile. */
body:not(.merchant-admin) .product-columns{display:grid;grid-template-areas:"gallery buy" "details buy";grid-template-rows:min-content 1fr;column-gap:32px;row-gap:0;align-items:start}
body:not(.merchant-admin) .product-columns.without-gallery{grid-template-areas:"details buy";grid-template-rows:auto}
body:not(.merchant-admin) .product-columns>.product-gallery-panel{grid-area:gallery;padding-bottom:0;min-width:0}
body:not(.merchant-admin) .product-columns>.buy-panel{grid-area:buy;align-self:start}
body:not(.merchant-admin) .product-columns>.product-detail-panel{grid-area:details;min-width:0;align-self:stretch}
body:not(.merchant-admin) .product-gallery-panel .product-gallery{margin-bottom:0}
body:not(.merchant-admin) .product-detail-panel .detail-head{margin-top:0}
@media(min-width:801px) and (max-width:1150px){body:not(.merchant-admin) .product-columns{column-gap:22px}}
@media(max-width:800px){
 body:not(.merchant-admin) .product-columns{grid-template-columns:minmax(0,1fr);grid-template-areas:"gallery" "buy" "details";grid-template-rows:auto;gap:16px}
 body:not(.merchant-admin) .product-columns.without-gallery{grid-template-areas:"buy" "details";grid-template-rows:auto}
 body:not(.merchant-admin) .product-columns>.product-gallery-panel{padding:16px;order:0}
 body:not(.merchant-admin) .product-columns>.buy-panel{position:static;order:1}
 body:not(.merchant-admin) .product-columns>.product-detail-panel{order:2}
 body:not(.merchant-admin) .product-gallery-panel .gallery-main{width:100%;max-height:none}
 body:not(.merchant-admin) .product-gallery-panel .product-gallery{max-width:none;margin:0}
 body:not(.merchant-admin) .product-gallery-panel .gallery-thumbnails{margin-top:12px}
}

/* A mobile shortcut returns to the existing SKU form and never submits it. */
.mobile-purchase-bar{display:none}
@media(max-width:800px){
 body:not(.merchant-admin):has(.mobile-purchase-bar){padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
 body:not(.merchant-admin) .mobile-purchase-bar{display:flex;position:fixed;z-index:25;inset:auto 0 0;align-items:center;justify-content:space-between;gap:16px;padding:12px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));background:var(--bm-white);color:var(--bm-ink);border-top:1px solid var(--bm-line)}
 body:not(.merchant-admin) .mobile-purchase-bar[hidden]{display:none}
 .mobile-purchase-summary{min-width:0;flex:1}
 .mobile-purchase-summary>span{display:block;font-size:16px;line-height:1.5;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:var(--bm-muted)}
 .mobile-purchase-summary>strong{display:block;font-size:25px;line-height:1.4;font-weight:550;font-variant-numeric:tabular-nums}
 .mobile-purchase-summary small{font-size:16px;font-weight:400;color:var(--bm-muted)}
 body:not(.merchant-admin) .mobile-purchase-bar>.button{min-height:48px;flex:none;padding:12px 20px;font-size:17px;white-space:nowrap}
 #product-purchase-options{scroll-margin-top:24px}
}

/* Recent visits use current catalogue data, in a compact strip on phones. */
body:not(.merchant-admin) .recent-products{margin-top:32px;margin-bottom:32px;min-width:0}
.recent-products-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
body:not(.merchant-admin) .recent-products-heading h2{font-size:24px;line-height:1.5;font-weight:550;margin:0}
body:not(.merchant-admin) .recent-products-heading>.button{min-height:44px;padding:8px 0;font-size:16px}
.recent-products-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.recent-product{display:grid;grid-template-columns:80px minmax(0,1fr);gap:14px;align-items:center;min-width:0;padding:16px;background:var(--bm-white);color:var(--bm-ink)}
.recent-product-cover{display:flex;align-items:center;justify-content:center;aspect-ratio:16/10;background:var(--bm-field);overflow:hidden}
.recent-product-cover :is(img,.icon){width:100%;height:100%;object-fit:contain}
.recent-product-info{min-width:0}
.recent-product-info>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;font-size:18px;line-height:1.6;font-weight:500}
.recent-product-price{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:6px;font-size:18px;font-variant-numeric:tabular-nums}
.recent-product-price small{font-size:16px;color:var(--bm-muted)}
.recent-product:hover .recent-product-info>strong{text-decoration:underline;text-underline-offset:4px}
.recent-product:focus-visible{outline:2px solid var(--bm-focus);outline-offset:3px}
@media(min-width:801px) and (max-width:1150px){.recent-products-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){
 body:not(.merchant-admin) .recent-products{margin-top:24px;margin-bottom:24px}
 body:not(.merchant-admin) .recent-products-heading h2{font-size:22px}
 .recent-products-list{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-x:contain;scrollbar-width:thin;padding:4px 4px 10px}
 .recent-product{flex:0 0 min(88%,320px);grid-template-columns:72px minmax(0,1fr);gap:12px;padding:12px;scroll-snap-align:start}
}

/* Retain the cover geometry when a product image cannot load. */
.store-grid-card,.compact-product-row,.seller-card{position:relative}
body:not(.merchant-admin) .card-share-button{position:absolute;z-index:2;right:10px;top:10px;width:36px;min-width:36px;height:36px;min-height:36px;padding:8px;background:var(--bm-white);color:var(--bm-ink)}
.compact-product-info h3{padding-right:38px}
.product-sold{font-size:16px;line-height:1.6;color:var(--bm-muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.buy-panel .product-sold{display:block;margin-bottom:8px}
.compact-product-info p{display:inline;margin-right:12px}
.product-heading-actions{display:flex;align-items:center;gap:12px;flex-shrink:0}
.product-page-title{gap:16px;flex-wrap:wrap}
.footer-share-button{white-space:nowrap;min-height:44px}
.shop-share-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.8fr);gap:32px;align-items:center}
.shop-share-preview{display:grid;place-items:center;min-height:320px;background:var(--bm-field);max-height:72vh;overflow:hidden;aspect-ratio:3/4}
.shop-share-preview img{display:block;width:100%;height:100%;object-fit:contain}
.shop-share-tools{min-width:0}
.shop-share-tools h3{font-size:26px;line-height:1.5;overflow-wrap:anywhere}
.shop-share-tools>p{line-height:1.8;margin:16px 0}
.shop-share-tools input{font-size:16px;min-width:0;width:100%}
.shop-share-tools .stack{margin-top:20px}
.member-favorites{min-width:0}
.member-favorites>div>h2{font-size:26px;line-height:1.5}
.favorite-product-list{display:grid;gap:10px;margin-top:18px}
.favorite-product-row{display:grid;grid-template-columns:84px minmax(0,1fr) auto;align-items:center;gap:18px;padding:16px;background:var(--bm-white);min-width:0}
.favorite-product-cover{display:flex;align-items:center;justify-content:center;width:84px;height:56px;background:var(--bm-field);overflow:hidden}
.favorite-product-cover :is(img,.product-image-unavailable){width:100%;height:100%;object-fit:contain}
.favorite-product-info{min-width:0}
.favorite-product-info h3{font-size:18px;line-height:1.6;font-weight:500;overflow-wrap:anywhere}
.favorite-product-info p{font-size:16px;line-height:1.6;color:var(--bm-muted);margin-top:3px}
.favorite-product-meta{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:5px}
.favorite-product-meta strong{font-size:21px;font-variant-numeric:tabular-nums}
.favorite-product-actions{display:flex;gap:8px;align-items:center}
.favorite-product-actions .button{min-height:44px}
@media(max-width:720px){
 .shop-share-layout{grid-template-columns:minmax(0,1fr);gap:20px}
 .shop-share-preview{width:min(100%,360px);margin:auto;max-height:none}
 .favorite-product-row{grid-template-columns:72px minmax(0,1fr);gap:12px;padding:12px}
 .favorite-product-cover{width:72px;height:48px;align-self:start}
 .favorite-product-actions{grid-column:1/-1;justify-content:flex-end}
 .favorite-product-actions>a{flex:1}
 .product-heading-actions{width:100%;justify-content:flex-end}
}
img[data-product-image][hidden]{display:none!important}
.product-image-unavailable{display:grid!important;place-items:center;box-sizing:border-box;padding:6px;overflow-wrap:anywhere;white-space:normal;text-align:center;font-size:14px;line-height:1.5;background:var(--bm-field);color:var(--bm-muted)}
.compact-product-icon>.product-image-unavailable,.recent-product-cover>.product-image-unavailable{font-size:11px}
.gallery-main>.product-image-unavailable{width:100%;height:100%;min-height:160px}
.product-thumb>.product-image-unavailable{width:100%;height:100%;font-size:11px;padding:2px}
.image-lightbox.product-image-unavailable{width:100%;min-height:240px}

/* Phone catalogue: show the real landscape cover, then price and one clear action. */
@media(max-width:720px){
 body:not(.merchant-admin) .compact-product-row{grid-template-columns:80px minmax(0,1fr) 128px!important;gap:12px!important;padding:14px 12px!important;min-height:0}
 body:not(.merchant-admin) .compact-product-icon{grid-column:1;grid-row:1;align-self:start;width:80px;height:50px}
 body:not(.merchant-admin) .compact-product-icon .icon{width:44px;height:44px;object-fit:contain}
 body:not(.merchant-admin) .compact-product-icon:focus-visible{outline:2px solid var(--bm-focus);outline-offset:3px}
 body:not(.merchant-admin) .compact-product-info{grid-column:2/-1;grid-row:1}
 body:not(.merchant-admin) .compact-product-price{grid-column:1/3;grid-row:2;text-align:left;min-width:0}
 body:not(.merchant-admin) .compact-product-price small{display:inline;margin-left:8px}
 body:not(.merchant-admin) .compact-product-buy{grid-column:3;grid-row:2;align-self:center}
 body:not(.merchant-admin) .compact-product-buy .button{width:100%;min-height:48px}
 body:not(.merchant-admin) .electric-list-head{display:none}
 body:not(.merchant-admin) .catalogue-toolbar{margin-bottom:8px}
 body:not(.merchant-admin) .catalogue-tools-row{gap:4px;margin-bottom:8px}
 body:not(.merchant-admin) .catalogue-controls{min-width:0;row-gap:4px}
 body:not(.merchant-admin) .catalogue-controls :is(.stock-filter,select){min-height:44px}
 body:not(.merchant-admin) .electric-filter-summary:has(p:empty):has(button[hidden]){display:none}
}
@media(max-width:360px){
 body:not(.merchant-admin) .topbar .store-preferences{position:static;margin:0;flex-shrink:0}
}
