/* The product editor keeps frequent tasks visible and optional settings folded. */
#modal.product-editor { background:#f5f6f2; }
#modal.product-editor .modal-head { padding:18px 32px; background:#fff; border-color:#e1e7df; }
#modal.product-editor .modal-head h2 { font-size:22px; }
#modal.product-editor .modal-head p { font-size:13px; max-width:780px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#modal.product-editor .modal-body { max-width:1440px; padding:28px 32px 120px; }
.product-editor-layout { display:grid; grid-template-columns:210px minmax(0,1fr); gap:28px; align-items:start; }
.product-editor-nav { position:sticky; top:112px; display:grid; gap:6px; }
.product-editor-nav button { display:flex; align-items:center; gap:12px; border:1px solid transparent; padding:14px 12px; border-radius:9px; text-align:left; }
.product-editor-nav button>span { color:#94a092; font-size:12px; font-variant-numeric:tabular-nums; }
.product-editor-nav b { display:block; font-size:14px; font-weight:550; }
.product-editor-nav small { display:block; color:#889185; margin-top:5px; font-size:11px; }
.product-editor-nav button:hover { background:#edf1e9; }
.product-editor-nav button[aria-current] { border-color:#cddacb; background:#e6eee2; color:#315d49; }
.product-editor-nav button[aria-current]>span { color:#315d49; }
.product-editor-nav>p { color:#879182; font-size:12px; line-height:1.7; padding:16px 14px; }
.product-editor-content { display:grid; gap:22px; min-width:0; }
.product-editor-card { background:#fff; padding:26px; border:1px solid #e0e6dc; border-radius:12px; scroll-margin-top:110px; min-width:0; }
.product-section-heading { display:flex; align-items:center; gap:13px; padding-bottom:22px; margin-bottom:22px; border-bottom:1px solid #edf0e9; }
.product-section-heading>span { display:grid; place-items:center; width:34px; height:34px; border-radius:8px; background:#eef3e9; color:#67825e; font-size:12px; }
#modal.product-editor .product-section-heading h3 { font-size:18px; }
.product-section-heading p { color:#8a9485; font-size:12px; margin-top:5px; }
.product-section-heading>small { margin-left:auto; color:#899181; background:#f4f6ef; padding:4px 8px; border-radius:4px; }
#modal.product-editor label { font-size:14px; gap:9px; color:#43503d; }
#modal.product-editor input,#modal.product-editor select,#modal.product-editor textarea { font-size:14px; border-color:#dce3d6; min-height:42px; border-radius:7px; }
#modal.product-editor input[type=checkbox] { min-height:0; }
#modal.product-editor label>small { color:#899181; font-size:12px; font-weight:400; }
#modal.product-editor .notice,.product-field-hint { color:#849078; font-size:12px; line-height:1.8; }
.product-field-hint { margin:14px 0 24px; }
.product-editor-card>.product-media>h3:first-child,.product-editor-card>.body-editor>h3:first-child,.product-editor-card>.product-options>h3:first-child { display:none; }
.product-editor-card .body-editor-layout { grid-template-columns:minmax(0,1fr); gap:20px; }
.product-editor-card .body-preview { position:static; max-width:390px; }
.product-editor-card .product-media-grid { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); }
#modal.product-editor .product-video-first { display:flex; flex-direction:row; align-items:center; gap:9px; margin:16px 0 8px; }
#modal.product-editor .product-video-first input { width:16px; height:16px; margin:0; flex:none; accent-color:#315d49; }
.product-optional { border:1px solid #e4e9de; border-radius:8px; margin:14px 0; padding:0 18px; }
.product-optional>summary { cursor:pointer; padding:18px 0; font-size:14px; font-weight:550; }
.product-optional>summary>span { float:right; color:#8b9583; font-size:12px; font-weight:400; }
.product-optional[open]>summary { margin-bottom:18px; border-bottom:1px solid #edf0e8; }
.product-optional[open] { padding-bottom:20px; }
.product-optional>section>h3 { display:none; }
.product-editor-footer { position:fixed; z-index:5; bottom:0; left:0; right:0; background:#fff; border-top:1px solid #dfe5d9; padding:18px 32px; display:flex; align-items:center; justify-content:space-between; gap:20px; box-shadow:0 -5px 20px #263f2310; }
.product-save-note { color:#8a9382; font-size:12px; }
.product-editor-footer .form-error { margin:0; padding:0; font-size:13px; max-width:650px; }
.product-editor-footer .form-error:not(:empty) { margin-top:6px; }
.product-editor-actions { display:flex; align-items:center; gap:12px; flex-shrink:0; }
#modal.product-editor .product-editor-actions button { min-height:44px; font-size:14px; padding:11px 20px; border-radius:8px; }
.product-sku-block { margin-top:26px; padding-top:24px; border-top:1px solid #edf0e8; }
.product-sku-step { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 12px; }
#modal.product-editor .product-sku-step h4 { font-size:14px; margin:0; }
.product-sku-step small { color:#8a9480; }
#modal.product-editor [data-spec-group] { display:block; background:#f8faf5; border-color:#e0e7d9; padding:18px; }
.spec-group-head { display:flex; align-items:end; gap:12px; justify-content:space-between; margin-bottom:14px; }
.spec-group-head>label { flex:1; max-width:300px; }
.spec-group-actions { display:flex; align-items:center; gap:8px; }
.spec-group-actions button { padding:7px; font-size:12px; color:#7c8b71; }
.spec-group-actions button:last-child { color:#a16656; }
.spec-values-add { display:flex; align-items:center; gap:10px; margin-top:14px; }
.spec-values-add input { flex:1; min-width:0; }
#modal.product-editor .spec-value-tag { padding:7px 10px; font-size:13px; background:#eaf0e3; border:1px solid #dce6d2; border-radius:6px; }
.product-sku-buttons { display:flex; flex-wrap:wrap; gap:10px; margin:16px 0 24px; }
.product-sku-buttons button,.spec-values-add button { font-size:13px; border:1px solid #d6dfcd; border-radius:7px; padding:10px 14px; color:#486441; background:#fff; }
.product-sku-buttons button:last-child { background:#eaf0e3; }
.product-sku-empty { color:#909a85; padding:16px; background:#f8faf5; border:1px dashed #dce4d3; border-radius:8px; font-size:13px; line-height:1.8; }
.product-sku-table { border:1px solid #e3e8dc; border-radius:8px; }
.product-sku-table table { table-layout:fixed; width:100%; min-width:620px; }
.product-sku-table th { padding:13px 12px; font-size:12px; background:#f5f8f0; }
.product-sku-table td { padding:14px 12px; vertical-align:top; }
.product-sku-table th:first-child { width:25%; }
.product-sku-table th:nth-child(2),.product-sku-table th:nth-child(3) { width:16%; }
.product-sku-table th:nth-child(4) { width:23%; }
.product-sku-table th:last-child { width:20%; }
#sku-rows .sku-photo-picker { min-width:0; padding:0; border:0; background:transparent; }
.sku-photo-picker>summary { cursor:pointer; display:flex; align-items:center; gap:8px; color:#5f7754; font-size:12px; list-style:none; }
#sku-rows .sku-photo-picker .media-preview { height:42px; width:42px; min-height:0; border-radius:6px; flex-shrink:0; margin:0; }
#sku-rows .sku-photo-picker .media-preview img { width:42px; height:42px; max-width:42px; object-fit:cover; }
.sku-photo-picker .media-empty { font-size:0; height:42px; min-height:0; }
.sku-photo-picker .media-empty::after { content:'＋'; font-size:20px; }
.sku-photo-picker[open] { min-width:150px; }
.sku-photo-picker .upload-button { display:inline-flex; margin-top:12px; font-size:12px!important; }
.sku-photo-picker>details { margin-top:12px; font-size:12px; }
.sku-photo-picker .media-choices { grid-template-columns:repeat(2,minmax(0,1fr)); max-height:230px; }
.sku-row-actions { display:grid; gap:12px; justify-items:start; }
.sku-row-actions label { white-space:nowrap; display:flex; flex-direction:row; align-items:center; gap:6px!important; }
.sku-row-actions input[type=checkbox] { accent-color:#315d49; }
.sku-row-actions button { color:#a46956; font-size:12px; padding:0; }
.product-sku-block>[data-action=sku-add] { margin-top:14px; }
@media(max-width:1000px) {
 #modal.product-editor .modal-body { padding:20px 20px 130px; }
 .product-editor-layout { grid-template-columns:170px minmax(0,1fr); gap:18px; }
 .product-editor-nav button { padding:12px 8px; gap:8px; }
 .product-editor-nav small { font-size:10px; }
 .product-editor-card { padding:22px; }
 .product-editor-footer { padding:16px 20px; }
}
@media(max-width:700px) {
 #modal.product-editor .modal-head { padding:16px; }
 #modal.product-editor .modal-head p { max-width:75vw; }
 #modal.product-editor .modal-body { padding:16px 12px 140px; }
 .product-editor-layout { display:block; }
 .product-editor-nav { position:sticky; top:85px; z-index:3; display:flex; overflow:auto; gap:4px; padding:8px 0; margin-bottom:12px; background:#f5f6f2; }
 .product-editor-nav button { flex-shrink:0; padding:10px; }
 .product-editor-nav button>span,.product-editor-nav small,.product-editor-nav>p { display:none; }
 .product-editor-card { padding:20px 16px; scroll-margin-top:150px; }
 .product-section-heading { padding-bottom:17px; margin-bottom:18px; }
 .product-editor-footer { display:block; padding:12px 16px; }
 .product-save-note { display:none; }
 .product-editor-actions { justify-content:stretch; gap:8px; }
 #modal.product-editor .product-editor-actions button { flex:1; padding:10px 8px; white-space:normal; }
 .product-editor-footer .form-error:not(:empty) { margin:0 0 10px; }
 .spec-group-head { align-items:start; flex-wrap:wrap; }
 .spec-group-actions { margin-left:auto; }
 .product-optional>summary>span { float:none; display:block; margin:6px 0 0 16px; }
}

#spec-groups [data-spec-values]{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.spec-value-tag{display:block;min-width:150px;max-width:260px;padding:8px 10px;border:1px solid var(--border,#dce4df);border-radius:10px;background:#fff}.spec-value-title{display:flex;gap:16px;align-items:center;justify-content:space-between}.spec-value-title button{padding:4px 6px;min-height:28px}.spec-image-switch{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;white-space:nowrap}.spec-value-photo{display:none;margin-top:8px}.has-value-images .spec-value-photo{display:block}.spec-value-photo .media-preview{width:44px;height:44px}.product-sku-table [data-option-labels]{display:flex;flex-direction:column;gap:5px;min-width:150px}.product-sku-table [data-option-labels] span{font-size:12px;color:var(--muted)}.product-sku-table [data-option-labels] b{color:var(--ink,#182d24)}.product-sku-table .has-options [data-sku="name"]{display:none}
@media(max-width:700px){.spec-group-head{flex-wrap:wrap}.spec-value-tag{min-width:130px}.spec-group-actions{flex-wrap:wrap}}
.spec-value-title>b{min-width:0;overflow-wrap:anywhere;}
.spec-value-title>div{display:flex;flex:none;}
.spec-value-edit{display:grid;gap:8px;}
.spec-value-edit>div{display:flex;gap:8px;}
.spec-value-edit button{padding:5px 10px;border:1px solid #cbd7c4;border-radius:5px;}
.spec-value-title[hidden],.spec-value-edit[hidden]{display:none!important;}

.identity-photo,.goods-photo{display:inline-block;position:relative;flex-shrink:0}.identity-photo{width:32px;height:32px}.identity-photo img{position:absolute;inset:0}.goods-photo{width:44px;height:44px}.goods-photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.goods-photo .goods-placeholder{width:100%;height:100%;display:grid;place-items:center}

#modal.product-editor .spec-group-head>.spec-image-switch{flex:0 0 auto;max-width:none;align-self:center}#modal.product-editor .spec-image-switch input[type=checkbox]{width:16px;height:16px;min-height:0;margin:0;flex:none;accent-color:#315d49}

.product-video-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin-bottom:16px}.selected-video-row{min-width:0;padding:12px;border:1px solid #e0e6dc;border-radius:8px}.selected-video-row video{display:block;width:100%;height:200px;object-fit:contain;background:#f4f5ef}.selected-video-row .actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}.sku-stock-bulk{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:14px;margin:16px 0;background:#f4f7ef;border:1px solid #dce5d5;border-radius:8px}.sku-stock-bulk>label:not(.sku-select){display:flex;flex-direction:row;align-items:center}.sku-stock-bulk input[type=number]{width:140px}.sku-stock-bulk small,.sku-stock-bulk>span{font-size:12px;color:#77836d}#modal.product-editor .sku-select{display:flex;flex-direction:row;align-items:center;gap:6px;font-size:12px;margin-bottom:6px}#modal.product-editor .sku-select input{width:16px;height:16px;min-height:0;margin:0;accent-color:#315d49}
.review-editor{padding-top:16px}.review-batch{padding:20px;margin:18px 0;border:1px solid #dce3d6;border-radius:12px;background:#fff}.review-batch>header,.review-batch-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}.review-batch>small{color:#7f8878}.review-batch [hidden]{display:none!important}#modal.product-editor .review-checkbox{display:flex;flex-direction:row;align-items:center;gap:8px}#modal.product-editor .review-checkbox input{width:16px;height:16px;min-height:0;margin:0;flex:none}.review-library{background:#f4f6ef;padding:12px;border-radius:8px}.review-library summary{cursor:pointer;font-size:13px}.review-library>div{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}.review-library img{border-radius:50%;object-fit:cover}.review-batch input,.review-batch select{max-width:100%;min-width:0}.review-batch-footer{flex-wrap:wrap}.review-batch-footer span{font-size:13px;color:#64765e}
