/* Only Add/Edit Barang; preserve shared forms elsewhere. */
.product-edit-page .product-edit-form{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start;padding:20px;min-width:0}
.product-edit-form>.scan-result,.product-edit-form>.online-product-card{grid-column:1/-1}
.product-edit-form .product-form-section{min-width:0;border:1px solid var(--border,#e0e7ef);border-radius:14px;padding:16px;background:var(--card,#fff)}
.product-edit-form .product-form-section h3{font-size:15px;line-height:1.4;margin:0 0 16px;color:var(--text,#17324d)}
.product-edit-form .product-form-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start;min-width:0}
.product-edit-form .product-form-field{display:flex;flex-direction:column;gap:7px;min-width:0}
.product-edit-form .product-form-field>label{display:block;margin:0;font-size:12px;font-weight:650;line-height:1.4}
.product-edit-form .product-form-field>.field{width:100%;min-width:0;min-height:44px;margin:0;box-sizing:border-box}
.product-edit-form .product-form-field>.label{margin:0;line-height:1.6;font-size:11px}
.product-edit-form .product-form-field[data-field="pricingMode"],.product-edit-form .product-form-field[data-field="pn"],.product-edit-form .product-form-pack{grid-column:1/-1}
.product-edit-form .product-form-pack{min-width:0;box-shadow:none;margin:0;padding:14px!important;background:var(--soft,#f5f9ff)}
.product-edit-form .product-form-pack>.label{margin:7px 0 14px;line-height:1.6}
.product-edit-form .product-form-photo{min-width:0;margin:0;padding:0}
.product-edit-form .product-form-photo>label{display:block;margin-bottom:10px;font-weight:650}
.product-edit-form .product-photo-preview{height:190px;min-height:0;max-height:230px;overflow:hidden;display:grid;place-items:center}
.product-edit-form .product-photo-preview img{width:100%;height:100%;max-height:190px;object-fit:contain}
.product-edit-form .product-photo-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.product-edit-form .product-photo-actions button{min-height:42px;padding:9px 6px;margin:0;font-size:12px}
.product-edit-form #removeProductPhoto,.product-edit-form #useOnlinePhoto{grid-column:1/-1}
.product-edit-form .product-form-actions{grid-column:1/-1;display:flex;justify-content:flex-end;padding-top:6px;border-top:1px solid var(--border,#e0e7ef)}
.product-edit-form .product-form-actions #savep{min-height:46px;margin:8px 0 0}
.product-edit-form .roll-config:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:8px}
.product-edit-form [hidden]{display:none!important}
@media(min-width:360px){.product-edit-form .product-form-identity>.product-form-fields,.product-edit-form .product-form-pricing>.product-form-fields,.product-edit-form .product-form-inventory>.product-form-fields,.product-edit-form .product-form-pack-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(min-width:640px){.product-edit-form .product-form-fields{grid-template-columns:repeat(2,minmax(0,1fr))}.product-edit-form .product-form-actions #savep{width:auto;min-width:220px}}
@media(min-width:1100px){
 .product-edit-page .product-edit-form{grid-template-columns:minmax(200px,260px) minmax(0,1fr);gap:20px;padding:24px}
 .product-edit-form .product-form-photo{grid-column:1;grid-row:span 3;position:sticky;top:110px}
 .product-edit-form .product-form-section{grid-column:2}
 .product-edit-form .product-form-fields,.product-edit-form .product-form-pricing>.product-form-fields,.product-edit-form .product-form-inventory>.product-form-fields{grid-template-columns:repeat(3,minmax(0,1fr))}
 .product-edit-form .product-form-pack-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:639px){.product-edit-page .product-edit-form{padding:14px;gap:14px}.product-edit-form .product-form-section{padding:12px}.product-edit-form .field{font-size:16px}.product-edit-form .product-form-field[data-field="markupPercent"]{grid-column:1/-1;grid-row:2}.product-edit-form .product-form-photo{max-width:440px;width:100%;justify-self:center}}

/* Keep the category picker wide on phones and pair the two item codes. */
@media(max-width:639px){
 .product-edit-form .product-form-field[data-field="pcat"]{grid-column:1/-1}
}
@media(min-width:1100px){
 .product-edit-form .product-form-field[data-field="pricingMode"]{grid-column:auto}
 .product-edit-form .product-form-field[data-field="pn"]{grid-column:span 2}
 .product-edit-form .product-form-identity:has(#rollConfig:not([hidden])) :is([data-field="pricingMode"],[data-field="pn"]){grid-column:1/-1}
}
