FIRST JACK V9 — CART PRODUCT TOOLS, CART EXIT COUPONS AND EDITABLE FOOTER

WHAT'S NEW
- The shopping bag has an Add another product picker with size selection, like checkout. It also works when the bag is empty.
- Each cart item has a visible Delete button with a trash icon. Existing quantity controls, stock limits and cart persistence remain.
- Cart exit offers are independent of checkout exit offers. Admin Coupons has two checkboxes: Offer when shopper exits cart, and Offer when shopper exits checkout. The newest active, eligible offer for that context is selected.
- Closing a nonempty cart with Close, Escape or the backdrop can display its eligible coupon. Customers can copy the code, use it and continue to checkout, or leave the cart. Leaving preserves the bag. Empty carts do not show an offer.
- Use coupon & checkout carries the coupon into checkout and validates/applies it on the server automatically. The server still checks expiry, limits, stock and discount eligibility when placing the final order. Changing checkout products clears the discount until it is applied again.
- Footer based on the supplied reference: round Facebook, Instagram and WhatsApp icons, a two-column Quick Navigate section, six editable navigation items, and an underlined Explore Collection link.
- Footer heading, navigation labels, URLs, collection button and visibility are editable in Website Settings, with separate English and Bengali labels. Social URLs/numbers use the existing Store identity fields.
- Blank navigation URLs show plain text. Clear both language labels to hide an item. Blog, Terms & Conditions and Privacy Policy are labels until you enter their actual page URLs; this update does not create or invent those pages or policies.
- Removed duplicate legacy social icons alongside the new footer. Existing rotating banner, saved checkout, customer records/exports, IP controls and coupon features remain.

UPGRADE FROM V8
Back up your files/database. Preserve your LIVE ai/.env, ai/config/db.php, .htaccess and existing uploads.
Replace/upload:
  index.html
  assets/ (merge, preserving uploaded files)
  theme-enhancements.js
  ai/store-settings.php
  ai/assets/js/coupons.js
  ai/api/coupons.php
  ai/api/store_settings.php
  ai/api/storefront.php
  ai/config/coupons.php
  ai/config/storefront.php

For older versions, also follow the V7/V8 file lists. Files in this ZIP contain the latest combined implementation. source/storefront contains editable source; it is not needed for runtime hosting.
The new coupon column is added automatically without removing existing coupons or usage history. Your database account needs its normal CREATE/ALTER rights.
Purge hosting/CDN cache once, reload the admin panel and open the storefront with ?v=9.

CONFIGURE
1. Admin > Coupons > Create/Edit: enable Offer when shopper exits cart. The checkout checkbox remains separate. Save the coupon.
2. Admin > Settings > Website Settings > Footer & quick navigation: edit headings, six link labels/URLs and the collection button. Save changes.
3. Website Settings > Store identity: configure Facebook, Instagram and WhatsApp to show their social icons.
Settings refresh on the website within 30 seconds.
Exit offers apply to the site's cart popup. Closing the browser tab cannot display a custom offer.

VALIDATION
Production build, JavaScript syntax and PHP syntax checks passed. Isolated PHP 8.3/MariaDB integration checks cover the V8 coupon-table upgrade, independent exit flags, legacy coupon requests, enable/disable behavior, exit-context validation, safe footer URL validation and settings persistence.
Chromium checks at 320, 390, 768 and 1440px cover admin checkbox persistence, editable footer settings, six navigation items, round social icons, no duplicated social row, cart product/size selection, deletion, quantity controls, empty-cart protection, cart exit/copy, coupon carry into checkout, correct discounted order totals, continuous keyboard typing, saved carts after leaving, checkout-offer separation and horizontal overflow.
Checks use isolated test data. The update has not been deployed to your live hosting or tested on a physical iPhone.

REBUILD
cd source/storefront
npm ci
npm run build
python3 scripts/package-storefront.py
