NEXORA STORE — V13 PRODUCT SAVE / VISIBLE ERROR FIX
===============================================

Found in V12 code: admin/product_form.php stores a save failure in $error,
then requires admin/_header.php, which reassigns $error to a flash message.
This overwrote the actual failure, making Create Product look like a silent refresh.

V13 changes:
1. Product save errors use a separate $productSaveError variable so they are
   displayed prominently at top and bottom. Text/stock entries stay in the form.
2. Product row commits BEFORE optional emoji-settings or stock-cache sync.
   Secondary failures become warnings instead of undoing the core product save.
3. Cleaner database schema/encoding/duplicate-key error messages.
4. No database migrations required to install this code patch.

HOW TO INSTALL
- Back up existing PHP files and MySQL database before deploying.
- V12 installation: replace admin/product_form.php and includes/functions.php.
- If older V11 or earlier: use complete V13 ZIP.
- Clear PHP opcode cache if enabled, reload Admin > Add Product, and retry.
- After saving, check Products list for your new product. If a RED save error
  appears, send only the exact visible error text/screenshot. Do not share DB
  credentials. That message reveals the specific failure of the live database.

NOTE: Offline PHP syntax was checked. Live database/hosting cannot be accessed
from this environment, so its original SQL error has not been directly verified.
