=== ChatBot IA para Tiendas Online ===
Contributors: reycob38
Tags: chatbot, ai, ecommerce, gemini, sales assistant
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.12
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI sales assistant for online stores that answers product, price, and availability questions using Google Gemini.

== Description ==

ChatBot IA para Tiendas Online adds a floating chat widget that helps visitors ask about products, prices, stock, and store details.

The store administrator can configure:

* A Google AI Studio / Gemini API key.
* Store name.
* Seller name.
* Welcome message.
* Primary color.
* Gemini model name.
* Additional instructions for the assistant.

When a visitor writes a message, the plugin checks the store catalog and sends the visitor message, recent conversation context, and a relevant product summary to Gemini so it can generate a helpful response.

The default model is optimized for free API keys and concise answers. Stores with more traffic can use a paid Google AI Studio API key for higher stability, better limits, and stronger models.

= External service =

This plugin connects to Google Gemini API / Google AI Studio to generate AI responses.

Data sent to the service:

* The message written by the visitor.
* Recent conversation history.
* A relevant product summary from the store, including product name, price, stock, link, and a shortened description.
* Instructions configured by the administrator.

The plugin does not send data to Reycob and does not require a Reycob account.

Service documentation:
https://ai.google.dev/gemini-api/docs

Google privacy policy:
https://policies.google.com/privacy

Google terms:
https://policies.google.com/terms

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the ZIP file from the WordPress admin.
2. Activate the plugin.
3. Go to ChatBot IA in the WordPress admin menu.
4. Add your Google AI Studio / Gemini API key.
5. Configure the seller name, welcome message, primary color, Gemini model, and assistant instructions.

== Frequently Asked Questions ==

= Do I need an API key? =

Yes. The administrator must add their own Google AI Studio / Gemini API key.

= Can I use a free API key? =

Yes. The recommended default model is selected for free API keys and short, precise answers. A paid API key is recommended for production stores with higher traffic because it provides better stability and higher usage limits.

= Which Gemini model should I choose? =

Use Gemini 3.1 Flash-Lite for most stores and free API keys. Use Gemini 3.1 Flash for balanced performance. Use Gemini 3.5 Flash when you have billing enabled and want a stronger model.

= Does the plugin send data to Reycob? =

No. The plugin does not send data to Reycob.

= Does the plugin require an active store? =

Yes. The plugin is designed for online stores with published products.

== Changelog ==

= 1.0.12 =
* Improved product discovery with singular, plural, and synonym search variants.
* Added better matching for common audio terms such as speaker, loudspeaker, and microphone.

= 1.0.11 =
* Changed the default model to Gemini 3.1 Flash-Lite for better free API key stability.
* Replaced the model text field with a guided model dropdown.
* Reduced catalog context, chat history, and output length to lower token usage.
* Added clearer admin guidance about free and paid Google AI Studio API keys.

= 1.0.10 =
* Updated the default Gemini model for new API keys.
* Added a configurable Gemini model setting.
* Improved the send button contrast and default chat accent color.
* Improved the user-facing message shown when Gemini returns an API error.

= 1.0.9 =
* Removed the partial SKU meta query to avoid slow query warnings.

= 1.0.8 =
* Replaced custom direct database queries with WordPress API product lookups.

= 1.0.7 =
* Updated the readme text to standard English for WordPress.org checks.
* Normalized file line endings.
* Added caching for custom product lookup queries.

= 1.0.6 =
* Corrected the WordPress.org contributor username.
* Moved styles and scripts to files loaded with wp_enqueue_style() and wp_enqueue_script().
* Replaced cURL with the WordPress HTTP API.
* Improved sanitization and validation of chat history.

= 1.0.5 =
* Renamed the icon file to comply with allowed file names.
* Added sanitization for all saved admin options.

= 1.0.4 =
* Removed Plugin URI from the plugin header to comply with WordPress.org automated review.

= 1.0.3 =
* Added a dedicated WordPress admin menu for easier access.
* Added a quick guide for creating a Google AI Studio API key.
* Added logo and Reycob credit on the settings screen.

= 1.0.2 =
* Rebuilt the plugin from the original working version.
* Adjusted plugin name, text domain, and readme for WordPress.org.
