.ce-actions,.ce-share,.ce-skus{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.ce-product-section,.ce-content-page{background:#fff;border:1px solid #e6e8eb;border-radius:10px;padding:28px;margin:20px 0}.ce-product-section h2{font-size:21px;margin:0 0 20px}.ce-product-section small{font-size:13px;color:#718096}.ce-skus button{border:1px solid #ddd;padding:12px 18px;border-radius:6px;text-align:left}.ce-skus small,.ce-review small{display:block;color:#7b8490;margin-top:6px}.ce-skus .selected,.ce-actions .selected{border-color:#f47721;color:#c7540b;background:#fff7ee}.ce-description{line-height:1.85;overflow-wrap:anywhere}.ce-description img,.ce-rich img{max-width:100%;height:auto}.ce-description table{border-collapse:collapse;width:100%}.ce-description th,.ce-description td{border:1px solid #ddd;padding:10px}.ce-review{padding:20px 0;border-bottom:1px solid #e8eaed}.ce-review-images{display:flex;gap:8px;flex-wrap:wrap}.ce-review-images img{width:90px;height:90px;object-fit:cover;border:1px solid #eee;border-radius:6px}.ce-share button,.ce-actions button{border-radius:5px;padding:9px 16px;border:1px solid #ddd}.ce-file-button{display:inline-flex;cursor:pointer;padding:9px 16px;background:#fff5ec;border:1px solid #f47721;color:#a64d17;border-radius:5px;margin:8px 0}.ce-upload-list{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.ce-upload-list>div{position:relative;border:1px solid #ddd;padding:5px;border-radius:6px;display:grid;grid-template-columns:1fr auto auto;gap:5px}.ce-upload-list img{width:105px;height:90px;object-fit:cover;grid-column:1/4}.ce-rich-editor{border:1px solid #d8dde3;border-radius:7px;overflow:hidden;margin:12px 0 22px}.ce-editor-toolbar{background:#f5f6f8;padding:7px;display:flex;gap:6px;align-items:center;flex-wrap:wrap}.ce-editor-toolbar button{padding:6px 12px;border:1px solid #d8dde3;border-radius:4px}.ce-rich{min-height:240px;max-height:650px;overflow:auto;padding:18px;line-height:1.7;outline:none}.ce-wide-form{max-width:900px}.ce-reward-row,.ce-menu-row,.ce-order-line{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;background:#f7f8fa;border:1px solid #e2e5e9;border-radius:7px;padding:16px;margin:12px 0}.ce-order-line{grid-template-columns:3fr 1fr auto}.ce-menu-row{grid-template-columns:repeat(3,minmax(0,1fr))}.ce-rewards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.ce-rewards-grid article{border:1px solid #f3d5ba;padding:20px;border-radius:8px}.ce-balance{display:flex;align-items:baseline;gap:15px;color:#c65b19}.ce-balance strong{font-size:44px}.ce-list-price{color:#89909a;margin:6px 0;font-size:13px}.ce-custom-nav{background:white;border-bottom:1px solid #ddd;position:relative;z-index:20}.ce-custom-nav ul,.ce-custom-footer ul{list-style:none;padding:0;margin:0}.ce-custom-nav>ul{display:flex;flex-wrap:wrap}.ce-custom-nav li{position:relative}.ce-custom-nav a,.ce-custom-nav button{display:block;padding:14px 20px;color:#253044;text-decoration:none}.ce-custom-nav li>ul{display:none;position:absolute;top:100%;left:0;min-width:170px;background:#fff;box-shadow:0 8px 24px #0002}.ce-custom-nav li li>ul{left:100%;top:0}.ce-custom-nav li:hover>ul,.ce-custom-nav li:focus-within>ul{display:block}.ce-replaced-nav>:not(.all-categories){display:none}.ce-custom-footer{padding:24px 0}.ce-custom-footer>ul{display:flex;gap:40px;flex-wrap:wrap}.ce-custom-footer a,.ce-custom-footer button{display:block;text-decoration:none;padding:6px 0;color:inherit}.ce-custom-footer ul ul{padding-left:12px;color:#78818e}.ce-content-page{min-height:400px}.ce-content-page h1{margin:24px 0}.ce-order-line .mg-field select{width:100%}#ce-admin-order,#ce-product{min-width:min(800px,80vw)}.cat-detail-thumbs{flex-wrap:wrap}.cat-detail-thumbs button{width:65px;height:65px}.cat-detail-thumbs img{width:100%;height:100%;object-fit:cover}
.commerce-product .cat-detail-info{min-width:0}.commerce-product .cat-detail-info h1,.commerce-product .cat-detail-codes{overflow-wrap:anywhere}.commerce-product .cat-detail-summary{line-height:1.8;overflow-wrap:anywhere}.commerce-product .cat-detail-thumbs button{border-color:#e1e5e9;background:#fff}.commerce-product .cat-detail-thumbs button.selected{border-color:var(--cat-orange)}.commerce-product .cat-detail-thumbs img{object-fit:contain}.ce-product-tools{display:flex;align-items:flex-start;gap:20px;margin-top:16px;font-size:12px;color:#8a949d}.ce-product-tools>button,.ce-product-tools summary{padding:4px 0;cursor:pointer}.ce-product-tools details{position:relative}.ce-product-tools .ce-share{position:absolute;top:100%;left:0;width:230px;background:#fff;border:1px solid #e5e8eb;padding:12px;box-shadow:0 6px 18px #2631350d;z-index:4;margin:6px 0}.ce-product-tools .ce-share button{font-size:12px;padding:6px 9px}.ce-inline-skus{display:flex;gap:8px;flex-wrap:wrap}.ce-inline-skus button{border:1px solid #dfe4e8;background:#fff;font-size:12px;padding:8px 14px;overflow-wrap:anywhere}.ce-inline-skus .cat-option-selected{border-color:var(--cat-orange);color:#d96516;background:#fff8f2}.commerce-product .cat-detail-tabs{overflow-x:auto;overflow-y:hidden;white-space:nowrap}.commerce-product .cat-detail-tabs button{flex-shrink:0}.commerce-product .cat-info-panel{min-height:220px;overflow-x:auto}.commerce-product .cat-info-panel small{font-size:12px;color:#8b959e}.commerce-product .ce-description{font-size:14px;color:#606d77;max-width:100%;overflow-wrap:anywhere}.commerce-product .ce-description img{display:block;max-width:100%;height:auto;margin:16px auto}.commerce-product .ce-description table{display:block;max-width:100%;overflow-x:auto}.commerce-product .ce-description h1{font-size:22px}.commerce-product .ce-description h2{font-size:18px}.commerce-product .ce-description h3{font-size:16px}.commerce-product .ce-description .cat-parameter-table{display:table}.commerce-product .ce-actions{margin:16px 0}.ce-product-inquiry{border-top:1px solid #eceef0;padding:15px 0;margin-top:16px;font-size:12px}.ce-product-inquiry>summary{color:#c66a28;cursor:pointer;font-size:13px}.ce-product-inquiry form{margin-top:16px}.ce-product-inquiry .mg-field{font-size:12px;margin-bottom:14px}.ce-product-inquiry .mg-field input,.ce-product-inquiry .mg-field textarea{padding:9px;font-size:12px}.ce-product-inquiry .primary{font-size:12px;padding:10px 18px}
@media(max-width:760px){.ce-product-section,.ce-content-page{padding:18px;margin:12px 0}.ce-menu-row,.ce-reward-row{grid-template-columns:1fr 1fr}.ce-order-line{grid-template-columns:1fr}.ce-rewards-grid{grid-template-columns:1fr}.ce-custom-nav{overflow:visible}.ce-custom-nav a,.ce-custom-nav button{padding:12px;font-size:13px}.ce-custom-footer{padding:20px}.ce-custom-nav li>ul{min-width:130px}.ce-review-images img{width:70px;height:70px}#ce-admin-order,#ce-product{min-width:0}.ce-rich{min-height:180px}.ce-share button{padding:8px;font-size:12px}.commerce-product .cat-info-panel{padding:20px 16px}.commerce-product .cat-detail-tabs button{padding:13px 16px}.commerce-product .cat-detail-support{display:block}.ce-inline-skus button{min-height:40px}.ce-product-tools .ce-share{left:auto;right:0}}

.commerce-product .ce-guest-price{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:20px;align-items:center;padding:18px}.commerce-product .ce-guest-price strong{font-size:20px;line-height:1.5}.commerce-product .ce-guest-price p{font-size:12px;margin:5px 0 0}.commerce-product .ce-guest-price button{grid-column:2;grid-row:1/3;align-self:center;font-size:12px;padding:10px 18px}

/* 代客下单：加宽弹窗，头部与按钮固定、表单区独立滚动，避免被窄框裁切 */
dialog[open]:has(#ce-admin-order){width:min(1080px,calc(100% - 32px));max-width:1080px;max-height:calc(100dvh - 36px);display:flex;flex-direction:column;overflow:hidden;padding:24px 30px}
dialog:has(#ce-admin-order) #detail-content{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
dialog:has(#ce-admin-order) .dialog-head{flex:0 0 auto;margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #e6e8eb}
dialog:has(#ce-admin-order) .dialog-head h2{font-size:20px}
#ce-admin-order{display:flex;flex-direction:column;flex:1 1 auto;min-height:0}
dialog:has(#ce-admin-order) #detail-content,dialog:has(#ce-admin-order) .ce-order-body,#ce-admin-order .mg-field,#ce-admin-order .ce-order-line>*{min-width:0}
#ce-admin-order select,#ce-admin-order input,#ce-admin-order textarea{max-width:100%}
#ce-admin-order .ce-order-body{flex:1 1 auto;min-height:0;overflow:auto;padding-right:8px;overscroll-behavior:contain}
#ce-admin-order>.note{margin-top:0}
#ce-admin-order .mg-form-grid{gap:16px}
#ce-admin-order [data-ce-add-order-line]{margin:2px 0 18px}
.ce-order-line{grid-template-columns:minmax(0,2.4fr) minmax(96px,0.6fr) auto;align-items:end;gap:14px}
.ce-order-line .mg-field{min-width:0;margin-bottom:0}
.ce-order-line select{width:100%;max-width:100%;text-overflow:ellipsis}
.ce-order-line>button{align-self:end;padding:10px 16px;border:1px solid #ddd;border-radius:5px;background:#fff;white-space:nowrap;color:#586268}
#ce-admin-order .ce-actions{flex:0 0 auto;position:static;background:#fff;border-top:1px solid #e6e8eb;padding:12px 0 2px;margin:14px 0 0;justify-content:flex-end}
@media(max-width:760px){dialog:has(#ce-admin-order){padding:18px}.ce-order-line{grid-template-columns:1fr}}

/* 采购助手：清单上传识别 */
.assistant-upload{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.assistant-upload .outline{padding:10px 18px;border:1px dashed #d5dbe1;border-radius:6px;background:#fcfdfe;color:#c7540b;font-size:13px;cursor:pointer}
.assistant-upload .outline:hover,.assistant-upload .outline:focus-visible{border-color:#f47721;background:#fff7ee}
.upload-note{flex:1;min-width:180px;font-size:12px;line-height:1.6;color:#718096}
.upload-note.is-error{color:#c0392b}

/* 采购助手：清单输入（支持粘贴/拖入截图）与动作按钮 */
.assistant-composer{margin:0 0 14px}
.composer-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 10px;flex-wrap:wrap}
.composer-head .field-title{font-size:14px;color:#586268}
.composer-paste{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#96a0a7}
.composer-paste kbd{font:inherit;font-size:11px;line-height:1;padding:3px 5px;border:1px solid #e2e6e9;border-bottom-width:2px;border-radius:4px;background:#f7f8f9;color:#5b666e}
.composer-box{position:relative}
.composer-box textarea{display:block;width:100%;min-height:158px;resize:vertical;padding:14px 16px;border:1px solid #dfe4e7;border-radius:6px;background:#fcfdfe;font-size:14px;line-height:1.9;transition:border-color .15s,box-shadow .15s,background .15s}
.composer-box textarea:focus{outline:none;border-color:#f0a877;background:#fff;box-shadow:0 0 0 3px rgba(255,106,0,.09)}
.composer-box textarea::placeholder{color:#aab3b9}
.composer-box.is-busy textarea{opacity:.5;cursor:progress}
.composer-drop{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:center;gap:6px;border:1px dashed #ef9a55;border-radius:6px;background:rgba(255,245,236,.95);color:#b3520c;font-size:13px;text-align:center;pointer-events:none}
.composer-drop b{font-size:15px}
.composer-drop span{font-size:12px;color:#93705a}
.composer-box.is-dragover .composer-drop{display:flex}
.assistant-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 16px;padding:0 0 16px;border-bottom:1px dashed #e8ebee}
.assistant-tools .upload-note{flex:1 1 180px;min-width:0;margin:0;text-align:right;font-size:12px;color:#8a949b}
.tool-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 13px;border:1px solid #e2e6e9;border-radius:6px;background:#fff;color:#3f4a51;font-size:13px;line-height:1;cursor:pointer;transition:border-color .15s,color .15s,background .15s}
.tool-btn:hover,.tool-btn:focus-visible{border-color:#f0b183;background:#fffaf5;color:#c7540b}
.tool-btn .ico{font-size:13px;color:#c7540b}
.llm-action{display:inline-flex;align-items:center;gap:7px;padding:8px 13px;border:1px solid #f0d0b3;border-radius:6px;background:#fffaf4;color:#a9530c;font-size:13px;line-height:1;cursor:pointer;transition:border-color .15s,background .15s}
.llm-action:hover:not(:disabled){border-color:#eb9a56;background:#fff4e8}
.llm-action .llm-badge{font-size:13px;line-height:1}
.llm-action small{font-size:11px;color:#a9835f;font-weight:400}
.llm-action.is-ready{border-color:#cfe5d9;background:#f4fbf7;color:#2f6b52}
.llm-action.is-ready:hover:not(:disabled){border-color:#9fceb7;background:#ecf7f1}
.llm-action.is-ready small{color:#5f8a75}
.llm-action.is-off{border-color:#e6e9ec;background:#fafafa;color:#8a949b}
.llm-action.is-off .llm-badge{color:#b0b8bd}
.llm-action.is-guest{border-style:dashed;border-color:#f0c9a4;background:#fffaf4;color:#b3520c}
.llm-action.is-guest .llm-badge{color:#e07f2c}
.llm-action.is-guest:hover{border-color:#e2934a;background:#fff3e7;color:#a04a09}
.llm-action:disabled{cursor:not-allowed;opacity:.75}
.assistant-actions{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.action-hint{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:12px;color:#8a949b}
.action-hint code{font:inherit;padding:2px 6px;border-radius:4px;background:#f4f5f6;color:#5b666e}
.action-hint .link-btn{font-size:12px;color:#bf5c18;background:none;border:0;padding:2px 0;border-bottom:1px dashed #e8b48c;cursor:pointer}
.action-hint .link-btn:hover{border-bottom-style:solid}
.action-buttons{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.action-buttons .llm-action,.action-buttons .action-primary{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
.action-buttons .llm-action{padding:0 18px}
.action-primary{padding:0 30px;font-size:14px}
.llm-summary{display:flex;flex-wrap:wrap;gap:10px 24px;margin:0 0 18px;padding:14px 16px;border:1px solid #ececec;border-radius:8px;background:#fafafa;font-size:13px;color:#4b5563}
.llm-summary b{color:#111418;font-weight:600}
.llm-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}
.llm-help{margin-top:24px;padding-top:16px;border-top:1px dashed #e5e7eb;font-size:13px;color:#4b5563}
.llm-help h3{margin:0 0 8px;font-size:14px;color:#111418}
.llm-help p{margin:0 0 8px;line-height:1.75}
@media(max-width:760px){.composer-box textarea{min-height:132px}.assistant-tools .upload-note{flex-basis:100%;text-align:left}.assistant-actions{align-items:stretch}.action-buttons{width:100%;justify-content:stretch}.action-buttons .llm-action,.action-buttons .action-primary{flex:1 1 100%}}

/* 商品卡：品牌+名称单行省略、型号单行省略、价格收敛、去掉包装行 */
.product-card h3{font-size:14px;font-weight:600;line-height:1.5;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-card .spec{font-size:12.5px;line-height:1.5;color:#8b949a;margin:0 0 9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-card .tag{font-size:11px;padding:3px 7px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-card .product-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}
.product-card .price{margin:0;font-size:16px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.product-card .price small{font-size:11px}
.product-card .product-foot .add{flex:0 0 auto;width:30px;height:30px;padding:0;font-size:19px;line-height:1;display:inline-flex;align-items:center;justify-content:center}
.hm-mobile .product-card h3{font-size:13px;line-height:1.45}
.hm-mobile .product-card .spec{font-size:11.5px;margin-bottom:7px}
.hm-mobile .product-card .tag{font-size:10.5px;padding:2px 6px}
.hm-mobile .product-card .price{font-size:15px}
.hm-mobile .product-card .product-foot{margin-top:7px}
.hm-mobile .product-card .product-foot .add{width:28px;height:28px;font-size:18px}

/* 商品中心网格卡：标题单行省略、价格收敛不换行 */
.cat-product-grid .cat-product-title{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:0}
.cat-product-grid .cat-product-title b{font-weight:600}
.cat-product-grid .cat-price{flex-wrap:wrap;align-items:baseline;gap:2px 6px}
.cat-product-grid .cat-price strong{font-size:17px;letter-spacing:-.2px;white-space:nowrap}
.cat-product-grid .cat-price span{font-size:11px;color:#9aa2a8}
.cat-product-grid .cat-price small{font-size:11px;color:#9aa2a8;flex:1 0 100%;line-height:1.4}
.hm-mobile .product-card .price{font-size:13.5px}
.hm-mobile .product-card .price small{font-size:10px}
.hm-mobile .product-card .product-foot{gap:6px}
.hm-mobile .product-card .product-foot .add{width:26px;height:26px;font-size:17px}

/* ===== 富文本编辑器 v2：现代工具栏 ===== */
.ce-rich-editor{position:relative;margin:12px 0 22px;border:1px solid #e3e7eb;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s,box-shadow .15s}
.ce-rich-editor:focus-within{border-color:#f2b184;box-shadow:0 0 0 3px rgba(232,89,12,.09)}
.ce-rich-editor .ce-editor-toolbar{display:flex;align-items:center;gap:2px;flex-wrap:wrap;padding:6px 7px;background:linear-gradient(180deg,#fcfdfe,#f4f7f9);border-bottom:1px solid #e7ebef;border-radius:9px 9px 0 0}
.ce-rich-editor .ce-tb-group{display:inline-flex;align-items:center;gap:1px}
.ce-rich-editor .ce-tb-sep{width:1px;height:18px;background:#e1e6ea;margin:0 5px;flex:0 0 auto}
.ce-rich-editor .ce-tb-spacer{flex:1 1 auto;min-width:6px}
.ce-rich-editor .ce-tb{position:relative;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:6px;background:transparent;color:#46525a;cursor:pointer;flex:0 0 auto;transition:background .12s,color .12s}
.ce-rich-editor .ce-tb svg{width:17px;height:17px;display:block}
.ce-rich-editor .ce-tb:hover{background:#e9edf1;color:#141a1e}
.ce-rich-editor .ce-tb[aria-pressed="true"]{background:#ffe9db;color:#b4460a;box-shadow:inset 0 0 0 1px #f7c8a8}
.ce-rich-editor .ce-tb[aria-expanded="true"]{background:#e9edf1;color:#141a1e}
.ce-rich-editor .ce-tb-wrap{position:relative;display:inline-flex}
.ce-rich-editor .ce-tb-color svg{transform:translateY(-3px)}
.ce-rich-editor .ce-color-bar{position:absolute;left:7px;right:7px;bottom:4px;height:3px;border-radius:2px;box-shadow:0 0 0 1px rgba(16,24,40,.07)}
.ce-rich-editor .ce-tb-select{height:30px;max-width:112px;padding:0 20px 0 8px;border:1px solid transparent;border-radius:6px;background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b767e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 4px center;background-size:12px;font-size:12.5px;color:#3f4a51;cursor:pointer;appearance:none;-webkit-appearance:none}
.ce-rich-editor .ce-tb-select:hover{background-color:#e9edf1}
.ce-rich-editor .ce-tb-select:focus{outline:none;border-color:#f0b183;background-color:#fff}
.ce-rich-editor .ce-tb-size{max-width:88px}
.ce-rich-editor .ce-rich{min-height:200px;max-height:min(58vh,620px);overflow:auto;padding:18px 20px;font-size:14px;line-height:1.85;color:#22282c;background:#fff;outline:none;border-radius:0}
.ce-rich-editor .ce-rich:empty::before{content:attr(data-placeholder);color:#a9b2b9;pointer-events:none}
.ce-rich-editor .ce-rich p{margin:0 0 .7em}
.ce-rich-editor .ce-rich p:last-child{margin-bottom:0}
.ce-rich-editor .ce-rich h2{font-size:19px;line-height:1.5;margin:1.1em 0 .5em;font-weight:650;color:#141a1e}
.ce-rich-editor .ce-rich h3{font-size:16.5px;line-height:1.55;margin:1em 0 .45em;font-weight:650;color:#141a1e}
.ce-rich-editor .ce-rich h4{font-size:15px;line-height:1.6;margin:1em 0 .4em;font-weight:650;color:#20272b}
.ce-rich-editor .ce-rich ul,.ce-rich-editor .ce-rich ol{margin:.4em 0 .85em;padding-left:1.45em}
.ce-rich-editor .ce-rich li{margin:.22em 0}
.ce-rich-editor .ce-rich blockquote{margin:.9em 0;padding:10px 14px;border-left:3px solid #f0a877;background:#fffaf5;color:#5a666e;border-radius:0 6px 6px 0}
.ce-rich-editor .ce-rich pre{margin:.9em 0;padding:12px 14px;background:#f6f8fa;border:1px solid #e6eaee;border-radius:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;line-height:1.7;white-space:pre-wrap;overflow:auto}
.ce-rich-editor .ce-rich a{color:#c2530e;text-decoration:underline;text-underline-offset:2px}
.ce-rich-editor .ce-rich img{display:block;max-width:100%;height:auto;border-radius:8px}
.ce-rich-editor .ce-rich figure{margin:14px 0}
.ce-rich-editor .ce-rich hr{border:0;border-top:1px solid #e4e8ec;margin:18px 0}
.ce-rich-editor .ce-rich table{border-collapse:collapse;width:100%;margin:12px 0;font-size:13.5px}
.ce-rich-editor .ce-rich th,.ce-rich-editor .ce-rich td{border:1px solid #e0e5e9;padding:8px 10px;text-align:left;vertical-align:top}
.ce-rich-editor .ce-rich th{background:#f5f8fa;font-weight:600}
.ce-rich-editor .ce-rich.is-drag{background:#fffaf5;box-shadow:inset 0 0 0 2px #f0a877}
.ce-rich-editor .ce-editor-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 10px;border-top:1px solid #eef1f4;background:#fbfcfd;border-radius:0 0 9px 9px;font-size:11.5px;color:#9aa3aa}
.ce-rich-editor .ce-foot-count{flex:0 0 auto}
.ce-rich-editor .ce-foot-tip{flex:1 1 auto;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ce-rich-editor .ce-foot-btn{flex:0 0 auto;border:1px solid transparent;background:none;color:#7c868d;font-size:11.5px;padding:3px 7px;border-radius:5px;cursor:pointer}
.ce-rich-editor .ce-foot-btn:hover{background:#eef1f4;color:#b4460a}
.ce-rich-editor .ce-pop{position:absolute;top:calc(100% + 6px);left:0;z-index:60;width:238px;padding:10px;border:1px solid #e4e8ec;border-radius:10px;background:#fff;box-shadow:0 16px 36px rgba(16,24,40,.16);font-size:12.5px}
.ce-rich-editor .ce-pop[hidden]{display:none}
.ce-rich-editor .ce-pop-title{margin:0 0 8px;font-size:11.5px;color:#98a1a8}
.ce-rich-editor .ce-swatches{display:grid;grid-template-columns:repeat(10,1fr);gap:5px}
.ce-rich-editor .ce-swatch{width:100%;aspect-ratio:1/1;padding:0;border:1px solid rgba(16,24,40,.12);border-radius:5px;cursor:pointer}
.ce-rich-editor .ce-swatch:hover{box-shadow:0 0 0 2px #fff,0 0 0 3.5px #f0a877}
.ce-rich-editor .ce-pop-custom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px;color:#7b858c}
.ce-rich-editor .ce-pop-custom input[type=color]{width:46px;height:24px;padding:1px;border:1px solid #e4e8ec;border-radius:5px;background:#fff;cursor:pointer}
.ce-rich-editor .ce-pop-input{width:100%;height:32px;padding:0 9px;border:1px solid #e4e8ec;border-radius:7px;font-size:12.5px;color:#2f3a41;background:#fff}
.ce-rich-editor .ce-pop-input:focus{outline:none;border-color:#f0a877;box-shadow:0 0 0 2px rgba(232,89,12,.1)}
.ce-rich-editor .ce-pop-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:9px}
.ce-rich-editor .ce-pop-ok{height:30px;padding:0 14px;border:0;border-radius:7px;background:#e8590c;color:#fff;font-size:12.5px;cursor:pointer}
.ce-rich-editor .ce-pop-ok:hover{background:#d04f08}
.ce-rich-editor .ce-pop-ghost{height:30px;padding:0 6px;border:0;background:none;color:#8a949b;font-size:12px;cursor:pointer}
.ce-rich-editor .ce-pop-ghost:hover{color:#c0392b}
.ce-rich-editor .ce-pop-tip{font-size:11.5px;color:#a2abb2}
.ce-rich-editor .ce-pop-file{display:block;padding:14px 10px;border:1px dashed #dfe4e9;border-radius:8px;background:#fafbfc;color:#5b666e;font-size:12.5px;text-align:center;cursor:pointer}
.ce-rich-editor .ce-pop-file:hover{border-color:#f0a877;background:#fffaf5;color:#b4460a}
.ce-rich-editor .ce-pop-row{display:flex;gap:8px}
.ce-rich-editor .ce-pop-row label{flex:1;display:flex;flex-direction:column;gap:4px;font-size:11.5px;color:#8a949b}
.ce-rich-editor .ce-pop-row input{height:30px;padding:0 8px;border:1px solid #e4e8ec;border-radius:6px;font-size:12.5px;background:#fff}
.ce-rich-editor.is-fullscreen{position:fixed;inset:16px;z-index:2147483000;margin:0;display:flex;flex-direction:column;border-radius:12px;background:#fff;box-shadow:0 24px 64px rgba(16,24,40,.32)}
.ce-rich-editor.is-fullscreen .ce-rich{flex:1 1 auto;min-height:0;max-height:none}
html.ce-lock,html.ce-lock body{overflow:hidden!important}
@media(max-width:820px){
 .ce-rich-editor .ce-tb{width:28px;height:28px}
 .ce-rich-editor .ce-tb svg{width:16px;height:16px}
 .ce-rich-editor .ce-tb-sep{margin:0 3px}
 .ce-rich-editor .ce-tb-select{max-width:86px;font-size:12px;padding-right:18px}
 .ce-rich-editor .ce-tb-size{max-width:74px}
 .ce-rich-editor .ce-foot-tip{display:none}
 .ce-rich-editor .ce-rich{padding:14px 14px;min-height:170px}
}
.ce-rich-editor .ce-pop.is-up{top:auto;bottom:calc(100% + 6px)}
.ce-rich-editor.is-compact .ce-rich{min-height:112px;max-height:240px}

/* 前台商品详情：支持新编辑器产出的引用/代码/表格/列表 */
.ce-description blockquote{margin:14px 0;padding:10px 14px;border-left:3px solid #f0a877;background:#fffaf5;color:#5a666e;border-radius:0 6px 6px 0}
.ce-description pre{margin:14px 0;padding:12px 14px;border:1px solid #e6eaee;border-radius:8px;background:#f6f8fa;font-size:12.5px;line-height:1.7;white-space:pre-wrap;overflow:auto}
.ce-description figure{margin:16px 0}
.ce-description hr{border:0;border-top:1px solid #e6e8eb;margin:20px 0}
.ce-description ul,.ce-description ol{padding-left:1.5em;margin:.6em 0}
.ce-description li{margin:.2em 0}
.commerce-product .ce-description h4{font-size:14.5px;font-weight:600;margin:1em 0 .4em}

/* ===== 商品推荐设置（商品详情页“其他商品”） ===== */
.ce-seg{display:inline-flex;gap:4px;padding:4px;margin:14px 0 4px;background:#f2f3f5;border-radius:10px}
.ce-seg button{border:0;background:transparent;padding:8px 14px;border-radius:8px;font-size:13px;color:#4b5563;cursor:pointer;line-height:1.2}
.ce-seg button:hover{color:#111}
.ce-seg button.active{background:#fff;color:var(--cat-orange,#f97316);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.ce-rec-rows{display:flex;flex-direction:column;gap:10px;margin:12px 0}
.ce-rec-row{display:flex;align-items:flex-end;gap:10px;padding:10px 12px;border:1px solid #e5e7eb;border-radius:10px;background:#fafafa}
.ce-rec-row .mg-field{flex:1;margin:0}
.ce-rec-row .danger-link{flex:none;padding:8px 2px;white-space:nowrap}
@media (max-width:640px){
  .ce-seg{display:flex;width:100%}
  .ce-seg button{flex:1;padding:9px 8px;font-size:12.5px}
  .ce-rec-row{flex-wrap:wrap;align-items:stretch}
  .ce-rec-row .mg-field{flex:1 1 100%}
}

/* ===== 商品组：列表合并 + 详情页规格切换（京东式） ===== */
.cat-group-note{margin:2px 0 0;font-size:12px;line-height:1.45;color:#8a9099}
.cat-spec-count{display:inline-flex;align-items:center;padding:0 6px;height:17px;border-radius:3px;background:#fff3e9;border:1px solid #f6d2b4;color:#d96516;font-size:11px;white-space:nowrap}
.cat-group-note b{color:#d96516;font-weight:600}
.cat-variants{display:flex;flex-wrap:wrap;gap:8px}
.cat-variant{display:inline-flex;align-items:center;justify-content:center;min-width:76px;padding:9px 16px;white-space:nowrap;border:1px solid #dfe4e8;border-radius:8px;background:#fff;cursor:pointer;line-height:1.3;text-align:left;transition:border-color .15s,background .15s,color .15s}
.cat-variant b{font-size:13px;font-weight:600;color:#1f2329}
.cat-variant span{font-size:12px;color:#8a9099}
.cat-variant:hover{border-color:#f4a15f}
.cat-variant.selected{border-color:var(--cat-orange,#f47721);background:#fff7f1;box-shadow:inset 0 0 0 1px var(--cat-orange,#f47721)}
.cat-variant.selected b{color:#d96516}
.cat-variant-note{display:block;margin-top:8px;font-size:12px;color:#8a9099}
.mg-variant-badge{display:inline-block;margin-left:8px;padding:1px 7px;border:1px solid #f0b27a;border-radius:10px;background:#fff6ee;color:#d96516;font-size:11px;font-style:normal;white-space:nowrap;vertical-align:middle}
@media (max-width:640px){
  .cat-variant{min-width:0;flex:0 0 auto;padding:9px 14px}
  .cat-variant b{font-size:12.5px}
  .cat-variant span{font-size:11.5px}
}
.cat-add.cat-choose-spec{background:#fff;border-style:dashed;font-weight:600}
.cat-add.cat-choose-spec:hover{border-style:solid;background:#fff7f1}
.ce-product-tags{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}
.ce-product-tags span{padding:3px 9px;border:1px solid #f2ddca;border-radius:12px;background:#fff8f2;color:#b3652a;font-size:11px;line-height:1.5}
.pe-product-video-link{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0 0;font-size:12px;color:#8b959e}
.pe-product-video-link b{font-weight:600;color:#5f6c77}
.pe-product-video-link a{color:#d06518;text-decoration:none}
.pe-product-video-link a:hover{text-decoration:underline}
.pe-product-video-link small{color:#a3abb2;font-size:11px}

/* 兜底：已关闭的 dialog 不得参与布局（:has() 给 dialog 设 display 会覆盖 UA 的 dialog:not([open]){display:none}） */
dialog:not([open]){display:none!important}

/* ===== 源码模式（粘贴外部 HTML / SVG） ===== */
.ce-tb.ce-tb-source{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;font-weight:600;letter-spacing:.5px}
.ce-rich-editor.is-source .ce-editor-toolbar .ce-tb:not([data-ce-cmd="source"]):not([data-ce-cmd="fullscreen"]),
.ce-rich-editor.is-source .ce-tb-select,
.ce-rich-editor.is-source .ce-tb-sep,
.ce-rich-editor.is-source .ce-tb-wrap{opacity:.35;pointer-events:none}
.ce-source{display:block;width:100%;min-height:260px;margin:0;padding:14px 16px;border:0;border-top:1px solid #f1d9c6;outline:0;resize:vertical;background:#fffdfa;color:#3b4a54;font:12.5px/1.7 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;tab-size:2;white-space:pre;overflow:auto}
.ce-rich-editor.is-source .ce-editor-foot{background:#fff8f1}
.ce-rich-editor.is-source .ce-foot-tip::after{content:" · 正在源码模式，点击 </> 切回可视化"}
.ce-rich[hidden]{display:none}
.ce-description svg{max-width:100%;height:auto;display:block;margin:10px auto}
.ce-description table{max-width:100%}
