=== Beautyxia ===
Contributors: webixia
Tags: face analyzer, face analysis, skin care, woocommerce, product chatbot
Requires at least: 5.0
Tested up to: 7.0
Stable tag: 1.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered face analysis tool with a product chatbot and WooCommerce recommendations based on skin type and concerns.

== Description ==

Beautyxia is a cutting-edge AI tool designed for beauty and skincare retailers.
It allows users to upload a photo or use their webcam to receive a professional-grade facial analysis instantly.
The plugin identifies key skin characteristics and automatically suggests matching products from your WooCommerce store.
Each recommended product includes a built-in AI chatbot so shoppers can ask questions about the product before purchasing, increasing conversion rates through personalization.

= Key Features =
* **AI Analysis:** Detects skin type (Oily, Dry, Normal), eye color, and acne severity.
* **Product Chatbot:** Each recommended product card has a chat button that opens an AI-powered conversation about that specific product.
* **WooCommerce Integration:** Recommends products based on the specific issues detected during analysis.
* **Multilingual:** Full support for English, French, and Arabic.
* **Editor Support:** Includes a custom Gutenberg Block and an Elementor Widget.
* **Privacy-Focused:** Includes a built-in consent management checkbox for users.

**Note:** This plugin requires an active WooCommerce installation to provide product recommendations.

== Installation ==

1. Upload the `beautyxia` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **beautyxia > Settings** to enter your API Key and connect your shop.
4. Use the shortcode `[beautyxia]` on any page, or find the "beautyxia Face Analyser" widget in Elementor or Gutenberg.

== Frequently Asked Questions ==

= Does this plugin store my customers' photos?
=
No. Photos are processed in real-time by the BeautyAI engine for analysis and are not stored permanently on your WordPress server.

= Do I need an API Key? =
Yes. To perform the AI analysis, you must connect the plugin to the BeautyAI backend via the settings page.

= How does the product recommendation work? =
The plugin searches your WooCommerce store for products tagged with skin types (e.g., "Oily") or conditions (e.g., "Acne") that match the user's results.

== Screenshots ==

1. The Face Analysis interface with webcam and upload options.
2. Personalized skin analysis results display.
3. WooCommerce product recommendations with chatbot buttons.
4. Deep Detection: Identifies various facial issues for a complete skin profile.
5. The product chatbot modal in action.

== Third-Party Service Disclosure ==

This plugin communicates with a third-party service for two purposes:

**1. AI Face Analysis**
* **Service Name:** BeautyAI Analysis Engine
* **Service URL:** https://beautyai.duckdns.org
* **Function:** Receives the user-uploaded image via an encrypted HTTPS connection, processes it using AI models to identify skin type, eye colour, and acne severity, and returns a JSON report.
Images are processed in-memory and are not stored.
* **Privacy Policy:** https://beautyai.duckdns.org/privacy-policy/

**2. Product Chatbot**
* **Service Name:** BeautyAI Product Chat Engine
* **Service URL:** https://beautyai.duckdns.org
* **Function:** Receives the product title, product description, optional anonymised skin-analysis context (skin type and acne level — no images), and the user's chat message.
Returns a conversational AI reply about the product. No personally identifiable information is transmitted.
* **Privacy Policy:** https://beautyai.duckdns.org/privacy-policy/

Data is only sent to these endpoints when a user explicitly triggers an action (clicks "Analyse Face" or sends a chat message) and has given consent via the on-screen checkbox.

== Changelog ==

= 1.0.1=
* Removed static beauty tips feature.
* Added AI-powered product chatbot: each recommended product now has a chat button that opens a conversational modal powered by the BeautyAI engine.
* Exposed skin-analysis context (`skin_type`, `acne_pred`) to the chatbot for personalised responses.
* Added product description to AJAX product payload for richer chatbot context.
* Accessibility improvements: ARIA roles, keyboard navigation (Esc to close), and screen-reader labels added to the chatbot modal.

= 1.0.0 =
* Initial release.
* Added AJAX product loading for better performance.
* Added security nonces and data sanitization.
* Added Elementor and Gutenberg compatibility.

== Upgrade Notice ==

= 1.0.2 =
Supports WordPress 7.0

= 1.0.3 =
*added premium producrts system
now using the tag 'beautyxia_premium' in a product will make it appear in the top of the recommended products 