.product-editor{width:min(1120px,96vw);max-width:96vw;padding:24px;background:var(--surface);max-height:94dvh;overflow:auto}.product-editor::backdrop{background:#39281980}.product-editor .modal-heading{margin-bottom:4px}.product-editor-layout{display:grid;grid-template-columns:minmax(230px, .85fr) minmax(320px,1.2fr);gap:24px;margin-top:20px}.product-picker{display:flex;flex-direction:column;gap:10px;min-width:0}.editable-product-list{max-height:65dvh;overflow:auto;padding:2px}.editable-product{display:flex;align-items:center;gap:12px;width:100%;padding:12px;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;margin-bottom:8px;cursor:pointer;min-height:78px;color:var(--ink);font:inherit}.editable-product:hover,.editable-product.selected{border-color:var(--orange);background:var(--sand)}.editable-product.selected{outline:2px solid var(--orange);outline-offset:-2px}.editable-product img{width:54px;height:54px;object-fit:cover;border-radius:10px;flex-shrink:0}.editable-product>span:nth-child(2){flex:1;min-width:0}.editable-product strong,.editable-product small{display:block;overflow-wrap:anywhere}.product-stock{font-size:12px;font-weight:800;color:#315d3d;background:#edf3e9;border-radius:20px;padding:5px 8px;white-space:nowrap}.product-stock.sold-out{color:#864d17;background:#f6e4cc}.product-edit-detail{min-width:0}.product-edit-fields{border:0;padding:0;margin:0;min-width:0;display:grid;gap:12px}.product-edit-fields h3,.product-edit-fields p{margin:0}.product-edit-preview{display:flex;gap:20px;align-items:center;padding:16px;background:var(--sand);border-radius:18px}.product-edit-preview>img{width:145px;height:145px;object-fit:cover;border-radius:14px;background:var(--surface)}.product-edit-preview>div{display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-width:0}.product-edit-preview strong{font-size:21px;overflow-wrap:anywhere}.product-edit-preview>div>span:nth-child(2){font-size:22px;font-weight:850;color:var(--accent-ink)}.photo-picker{padding:12px;border:1px dashed var(--orange);border-radius:12px;background:var(--surface)}.photo-picker input{font-size:14px;margin-top:6px;padding:6px;max-width:100%}.product-edit-fields .small-note{font-size:13px;line-height:1.5}.product-edit-fields label{display:grid;gap:5px;font-weight:800}.product-edit-fields .product-availability{display:flex;gap:12px;align-items:center;padding:16px;background:var(--sand);border-radius:12px}.product-availability input{width:22px;height:22px;accent-color:var(--orange)}.product-editor-footer{position:sticky;bottom:-24px;display:flex;align-items:center;gap:10px;background:var(--surface);padding:16px 0;border-top:1px solid var(--line);margin-top:18px;flex-wrap:wrap}.product-editor-footer>span{flex:1;min-width:100px}.product-editor-footer .button{min-height:46px}.product-menu-control{margin-top:18px}.product-card.unavailable{opacity:.75}.product-card.unavailable .product-stock{display:inline-block;margin-top:8px}
@media(max-width:720px){.product-editor{padding:16px}.product-editor-layout{grid-template-columns:1fr;gap:18px}.editable-product-list{display:flex;max-height:none;overflow-x:auto;gap:8px}.editable-product{min-width:230px;margin:0}.editable-product .product-stock{display:none}.product-edit-preview>img{width:120px;height:120px}.product-editor-footer{bottom:-16px}.product-picker{gap:8px}.product-editor .modal-heading h2{font-size:26px}}

/* Keep the full form compact; only the catalog list scrolls on larger screens. */
.product-editor .small-note{padding:0;background:transparent;border:0}.product-editor .eyebrow{margin:0}.product-editor-layout{margin-top:14px}.product-edit-fields{gap:9px}.product-edit-preview{padding:12px}.product-edit-preview>img{width:112px;height:112px}.photo-picker{padding:8px 12px}.product-edit-fields .photo-picker{display:flex;flex-direction:row;align-items:center;gap:12px;flex-wrap:wrap}.photo-picker input{flex:1;min-width:200px;margin:0;min-height:36px}.product-edit-fields .button.small{min-height:34px;padding:6px 12px;justify-self:start}.product-edit-fields .product-availability{padding:10px 12px}.product-editor-footer{padding:10px 0;margin-top:12px}.product-editor .modal-heading{margin-bottom:8px}
@media(max-width:720px){.product-editor{width:96vw}.product-edit-fields input,.product-picker input,.product-picker select{font-size:16px}.product-edit-preview>img{width:105px;height:105px}.product-menu-control{margin-top:6px;min-height:36px;padding:6px 14px}}
.product-edit-fields .product-availability{flex-direction:row;justify-content:flex-start;min-height:44px}.product-edit-fields .product-availability input{flex:0 0 22px;margin:0}.product-editor>.modal-heading{position:sticky;top:-24px;z-index:2;background:var(--surface);padding:10px 0}.product-editor .product-editor-footer .small-note{line-height:1.4}
@media(max-width:720px){.product-editor>.modal-heading{top:-16px}}

.cover-editor{margin:14px 0;border:1px solid var(--line);border-radius:14px;background:var(--sand);padding:12px 16px}.cover-editor>summary{font-size:17px;font-weight:850;cursor:pointer;min-height:32px}.cover-fields{border:0;margin:12px 0 0;padding:0;display:grid;grid-template-columns:minmax(200px,.9fr) minmax(220px,1.1fr);gap:12px 20px;align-items:center}.cover-fields>p:first-child{grid-column:1/-1;margin:0}.cover-preview{width:100%;aspect-ratio:3/2;object-fit:contain;border-radius:14px;grid-row:2/5}.cover-fields .photo-picker{grid-column:2}.cover-fields .small-note{line-height:1.5}.cover-fields .button{justify-self:start}.cover-actions{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.cover-actions>span{margin-right:auto}.cover-actions .button{min-height:44px}
@media(max-width:720px){.cover-fields{grid-template-columns:1fr}.cover-preview{grid-row:auto;max-height:250px}.cover-fields .photo-picker{grid-column:auto}.cover-actions{justify-content:stretch}.cover-actions .button{flex:1}}

/* On a phone, choose a product before opening its form. Drafts survive Back. */
.product-picker-back{display:none}
@media(max-width:720px){
 .panel-body .product-editor .editable-product-list{display:block;max-height:none;overflow:visible;padding:3px}
 .panel-body .product-editor .editable-product{min-width:0;width:100%;margin:0 0 8px;padding:10px;gap:10px}
 .panel-body .product-editor .editable-product .product-stock{display:block;font-size:10px;padding:4px 6px}
 .panel-body .product-editor .editable-product img{width:48px;height:48px}
 .panel-body .product-editor .editable-product strong{font-size:15px}
 .panel-body .product-editor .product-edit-detail{display:none}
 .panel-body .product-editor.editing-product .product-edit-detail{display:block}
 .panel-body .product-editor.editing-product>.muted,
 .panel-body .product-editor.editing-product>.cover-editor,
 .panel-body .product-editor.editing-product .product-picker{display:none}
 .panel-body .product-picker-back{display:inline-flex;margin-bottom:16px;min-height:44px}
 .panel-body .product-edit-fields .button.small{min-height:44px}
 .panel-body .photo-picker input{min-width:0;width:100%;flex-basis:100%;font-size:16px;min-height:44px}
 .panel-body .product-editor-footer{display:grid;grid-template-columns:1fr;gap:8px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
 .panel-body .product-editor-footer>span{grid-column:1/-1}
 .panel-body .cover-actions{display:grid;grid-template-columns:1fr;gap:8px}
 .panel-body .cover-actions>span{margin:0}
 .panel-body .cover-actions>.button{width:100%}
 .panel-body .cover-editor>summary{min-height:44px}
 .panel-body .product-edit-preview{gap:12px}
 .panel-body .product-edit-preview>img{width:90px;height:90px}
 .panel-body .product-edit-preview strong{font-size:18px}
}

.panel-body .product-edit-fields .button.small{min-height:44px}

.product-picker-message{display:none}
@media(max-width:720px){.product-picker-message:not([hidden]){display:block}}
