/* Product creation shares the existing menu tokens and keeps the action visible. */
.menu-context-actions { display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-end;gap:10px; }
.menu-context-actions .menu-add-product { min-height:36px;padding:6px 12px;font-size:13px;white-space:nowrap; }
.menu-add-product>span { font-size:20px;font-weight:400;line-height:1; }
#product-create-dialog { width:min(860px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;overflow:hidden;color:var(--ink); }
#product-create-form { display:flex;flex-direction:column;max-height:calc(100dvh - 34px);min-height:0; }
.product-create-heading { display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;border-bottom:1px solid var(--line);flex:none; }
.product-create-heading h2 { font-size:21px;line-height:1.333;font-weight:600; }
.product-create-heading p { margin-top:4px;font-size:13px;color:var(--muted); }
.product-create-heading .icon-button { width:40px;height:40px;border-radius:10px; }
.product-create-body { display:grid;grid-template-columns:192px minmax(0,1fr);align-items:start;gap:16px 24px;min-height:0;padding:20px 24px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable; }
.product-create-photo { display:flex;flex-direction:column;align-items:stretch;gap:10px;min-width:0; }
.product-photo-preview { display:flex;flex-direction:column;justify-content:center;align-items:center;gap:10px;aspect-ratio:1;border:1px dashed #89948b;border-radius:12px;background:var(--surface-200);overflow:hidden;color:var(--muted);font-size:12px; }
.product-photo-preview .icon { width:36px;height:36px; }
.product-photo-preview img { display:block;width:100%;height:100%;object-fit:contain; }
.product-photo-picker { position:relative;display:flex;align-items:center;justify-content:center;min-height:40px;overflow:hidden;border:1px solid #89948b;border-radius:9px;background:#fff;color:var(--ink);font-size:13px;cursor:pointer; }
.product-photo-picker:focus-within { outline:2px solid var(--focus);outline-offset:2px; }
.product-photo-picker>input { position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;cursor:pointer; }
.product-photo-picker:has(input:disabled) { opacity:.65;cursor:wait; }
.product-create-photo p { color:var(--muted);font-size:12px;line-height:1.5; }
.product-create-photo .product-photo-name { color:var(--ink-2);overflow-wrap:anywhere; }
.product-create-photo .text-button { min-height:32px;padding:4px;font-size:12px; }
.product-create-fields { display:grid;gap:12px;min-width:0; }
.product-create-fields label { font-size:12px;color:var(--ink-2); }
.product-create-fields label>span[aria-hidden] { color:var(--danger-ink); }
.product-create-fields input:not([type=checkbox]),.product-create-fields select,.product-create-fields textarea { width:100%;min-height:40px;margin-top:5px;padding:8px 10px;border-color:#89948b;font-size:14px;line-height:1.43; }
.product-create-fields input::placeholder,.product-create-fields textarea::placeholder { color:var(--muted); }
.product-create-fields #product-price { font-variant-numeric:tabular-nums; }
.product-create-fields textarea { min-height:64px;resize:vertical; }
.product-create-fields label small { margin-top:4px;font-size:12px;line-height:1.4; }
.product-create-fields label .product-field-error { color:var(--danger-ink); }
.product-create-fields [aria-invalid=true] { border-color:var(--danger-ink); }
.product-field-pair { display:grid;grid-template-columns:1fr 1fr;align-items:start;gap:12px; }
.product-create-flags { display:flex;flex-wrap:wrap;gap:8px 20px; }
.product-create-flags label { display:inline-flex;align-items:center;gap:8px;min-height:36px;color:var(--ink); }
.product-create-flags input { width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--brand); }
.product-create-message { flex:none;margin:0 24px 12px;padding:10px 12px;border:1px solid var(--brand-line);border-radius:9px;background:var(--brand-50);color:var(--brand-ink);font-size:13px;line-height:1.54;overflow-wrap:anywhere; }
.product-create-message.is-error { border-color:#e3b4ac;background:var(--danger-50);color:#9b302a; }
.product-create-footer { display:flex;align-items:center;justify-content:flex-end;flex:none;gap:10px;padding:14px 24px;border-top:1px solid var(--line);background:#fff; }
.product-create-footer>span { margin-inline-end:auto;max-width:250px;color:var(--muted);font-size:12px;line-height:1.4; }
.product-create-footer .button { min-height:42px;font-size:13px; }
@media(max-width:900px) {
  .menu-context-actions { justify-content:flex-start; }
  .product-create-body { grid-template-columns:160px minmax(0,1fr);gap:16px;padding:16px 20px; }
  .product-create-heading { padding:16px 20px; }
  .product-create-footer { padding:12px 20px; }
}
@media(max-width:620px) {
  .product-create-body { grid-template-columns:1fr; }
  .product-create-photo { display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px 12px; }
  .product-photo-preview { grid-row:span 4; }
  .product-create-footer { flex-wrap:wrap; }
  .product-create-footer>span { flex-basis:100%;max-width:none; }
}
@media(pointer:coarse) {
  .product-create-fields input:not([type=checkbox]),.product-create-fields select,.product-create-fields textarea { font-size:16px; }
}

/* Removing a product is reversible; old orders keep their saved contents. */
.menu-product .menu-remove { display:inline-flex;align-items:center;justify-content:flex-start;gap:7px;min-height:36px;margin-top:4px;padding:6px 0;border-top:1px solid var(--line);border-radius:0;color:var(--danger-ink);font-size:12px;text-align:left; }
.menu-product .menu-remove .icon { width:17px;height:17px; }
.menu-product .menu-archive-note { margin:4px 0;color:var(--muted);font-size:12px; }
.menu-product .menu-restore { min-height:40px; }
