# Project Rules

These rules apply to the entire WordPress project.

## Core and Third-Party Code

- Never modify WordPress core.
- Never modify WooCommerce core.
- Never edit third-party plugin source files.
- Do not install additional plugins without explicit approval.

## Custom Code Architecture

- Keep custom presentation code in our custom theme or child theme.
- Keep ecommerce and business functionality in our custom plugin.
- Use WooCommerce APIs and hooks.
- Never directly manipulate WooCommerce database tables.
- Follow WordPress coding standards.

## Products and Orders

- Manage products through WooCommerce.
- Never hardcode product IDs, names, prices, images, or variations.
- Support WooCommerce simple and variable products.
- Maintain compatibility with future payment gateways by using WooCommerce's standard checkout, order, and payment APIs and hooks.
- Do not change existing data unless specifically instructed.

## Security

- Sanitize all input.
- Escape all output using the appropriate context-specific escaping functions.
- Use and verify WordPress nonces for state-changing requests. Nonces do not replace authorization checks.

## Frontend

- Support responsive and mobile layouts.
- Keep JavaScript minimal and dependency-light.
- Do not use Bootstrap or Tailwind.
- Supplied screenshots are visual references only.
