# Plan Refinement Instructions

Please revise the implementation plan with the following changes:

---

## 1. Block Visibility Strategy (Free vs Pro)

**Change the approach**: Don't hide the block from free users. Instead:

- Show the AI Image Generator block to ALL users (free and pro)
- For **free users**: Display the block with a "Pro Feature" badge/overlay and an upgrade CTA
- For **pro users**: Full functionality enabled

This serves as an upsell opportunity and lets free users discover the feature exists.

---

## 2. Smart Dimension Detection

**Update the dimension/size logic**:

- Detect the current block's container width where the image will be inserted
- Automatically select the **closest matching dimension** from the available aspect ratios/sizes
- Use this as the default selection (user can still override manually)

Example logic:
```
Container width 800px, height 600px → Auto-select 4:3 landscape
Container width 400px, height 600px → Auto-select 2:3 portrait
```

---

## 3. Use Plain CSS (Not SCSS)

**Simplify the styling approach**:

- Use plain `.css` files instead of `.scss`
- No build step required for styles
- Keep it consistent with simpler WordPress plugin development

---

## 4. Premium Check Implementation

**Use the correct Freemius function**:

Replace any custom Pro checks with Freemius's built-in method:

```php
// PHP - Use this pattern throughout
if ( aifig_fs()->is__premium_only() ) {
    // Pro-only code
}

// Or for checking if user has active license
if ( aifig_fs()->can_use_premium_code() ) {
    // User has valid pro license
}
```

```javascript
// JavaScript - Pass this from PHP via wp_localize_script
const isPro = aifigBlockData.isPremium; // Set from PHP
```

Make sure all Pro feature gates use `is__premium_only()` for code separation and `can_use_premium_code()` for runtime checks.

---

## Summary of Changes

| Original Plan | Revised Approach |
|---------------|------------------|
| Hide block from free users | Show block to all, gate functionality with Pro badge |
| Fixed dimension selection | Auto-detect closest dimension to container size |
| SCSS stylesheets | Plain CSS files |
| Custom Pro checks | Use `is__premium_only()` and `can_use_premium_code()` |

---

Please update the architecture and implementation code to reflect these requirements.
