sushilideaclan01 commited on
Commit
a1baa8d
·
1 Parent(s): 365a483
Files changed (2) hide show
  1. data/auto_insurance.py +105 -316
  2. services/generator.py +105 -35
data/auto_insurance.py CHANGED
@@ -1,21 +1,16 @@
1
  """
2
- Auto Insurance - Complete Psychological Arsenal
3
- All strategies: fear, urgency, savings, authority, loss aversion, etc.
4
- Updated with winning ad patterns from high-converting creative analysis.
5
  """
6
 
7
  # ============================================================================
8
- # SECTION 1: PSYCHOLOGICAL STRATEGIES
9
  # ============================================================================
10
 
11
  STRATEGIES = {
12
- # ------------------------------------------------------------------------
13
- # Winning Strategies (High-Converting Patterns)
14
- # ------------------------------------------------------------------------
15
-
16
  "accusation_opener": {
17
  "name": "Accusation Opener",
18
- "description": "Direct accusation triggers immediate loss aversion - 'OVERPAYING?' style",
19
  "hooks": [
20
  "OVERPAYING?",
21
  "Still Overpaying For Car Insurance?",
@@ -30,19 +25,11 @@ STRATEGIES = {
30
  "Throwing Money Away Every Month?",
31
  "Your Premium Is Too High. Here's Proof.",
32
  ],
33
- "visual_styles": [
34
- "person holding insurance bill, frustrated expression, accusatory",
35
- "frustrated driver looking at renewal notice, red 'OVERPAYING?' text",
36
- "money flying away from car, loss visualization",
37
- "comparison of high vs low price with red X on high price",
38
- "person counting money with worried expression",
39
- "wallet being emptied at gas station, coins and bills falling out",
40
- ],
41
  },
42
-
43
  "curiosity_gap": {
44
  "name": "Curiosity Gap",
45
- "description": "Open loop with 'THIS' or 'Instead' demands click - highest CTR pattern",
46
  "hooks": [
47
  "Drivers Are Ditching Their Auto Insurance & Doing This Instead",
48
  "Thousands of drivers are dropping their insurance after THIS",
@@ -57,19 +44,11 @@ STRATEGIES = {
57
  "After Seeing THIS, You'll Never Overpay Again",
58
  "One Simple Change Saves Thousands",
59
  ],
60
- "visual_styles": [
61
- "driver looking at odometer or dashboard, candid documentary",
62
- "collage with driver's license and insurance card",
63
- "person reading document with surprised expression",
64
- "group of drivers with knowing expressions",
65
- "person pointing at hidden information, reveal moment",
66
- "before/after document comparison with circled numbers",
67
- ],
68
  },
69
-
70
  "specific_price_anchor": {
71
  "name": "Specific Price Anchor",
72
- "description": "Oddly specific prices ($47.33 not $50) create instant believability",
73
  "hooks": [
74
  "Car Insurance for as low as $29/month",
75
  "Auto Insurance with coverage as low as $29/month",
@@ -83,19 +62,11 @@ STRATEGIES = {
83
  "Switch And Pay Just $63/month",
84
  "Rates Starting At $27.50/month",
85
  ],
86
- "visual_styles": [
87
- "giant price number $29 in teal/bold color, age buttons below",
88
- "clean white background, price dominant, age selector: 18-35, 36-55, 56+",
89
- "BLACK FRIDAY style with specific price and gold balloons",
90
- "price comparison showing crossed-out high price, new low price",
91
- "calculator interface showing specific savings number",
92
- "insurance card or policy showing exact monthly amount",
93
- ],
94
  },
95
-
96
  "before_after_proof": {
97
  "name": "Before/After Proof",
98
- "description": "Specific savings numbers with visual proof creates social proof",
99
  "hooks": [
100
  "WAS: $1,842 → NOW: $647",
101
  "How I Dropped My Premium By $1,195/year",
@@ -109,19 +80,11 @@ STRATEGIES = {
109
  "Went From Overpaying To Saving Big",
110
  "The 5-Minute Switch That Saved Me $1,200",
111
  ],
112
- "visual_styles": [
113
- "real driver 30-55 holding document with circled numbers, testimonial",
114
- "before/after price bar: red 'WAS' vs green 'NOW'",
115
- "split screen: old bill vs new bill with circles",
116
- "person giving thumbs up with savings numbers visible",
117
- "calculator or phone showing savings calculation",
118
- "happy driver reviewing lower insurance bill in car",
119
- ],
120
  },
121
-
122
  "quiz_interactive": {
123
  "name": "Quiz/Interactive",
124
- "description": "Quiz format drives engagement and self-selection",
125
  "hooks": [
126
  "What Year Is Your Car?",
127
  "Tap Your Age To Calculate Your New Rate",
@@ -136,19 +99,11 @@ STRATEGIES = {
136
  "Quick Quiz: How Much Can You Save?",
137
  "Select Your State To See Rates",
138
  ],
139
- "visual_styles": [
140
- "iPhone Notes app dark mode with checkboxes: 2010 or older, 2010-2020, 2020+",
141
- "age selector buttons: 18-35 (yellow), 36-55 (blue), 56+ (red)",
142
- "quiz interface with multiple choice options",
143
- "clean UI with 'Tap below to see your rate'",
144
- "interactive calculator mockup",
145
- "state selection dropdown or map interface",
146
- ],
147
  },
148
-
149
  "authority_transfer": {
150
  "name": "Authority Transfer",
151
- "description": "Transfer trust from government/institutions - highest trust pattern",
152
  "hooks": [
153
  "State Farm & GEICO Competitors Bring Savings!",
154
  "Sponsored by Major Insurance Providers",
@@ -163,19 +118,11 @@ STRATEGIES = {
163
  "Official Notice: Rate Reduction Program",
164
  "State Insurance Commission Announces Savings",
165
  ],
166
- "visual_styles": [
167
- "official seal, government document aesthetic",
168
- "driver's license with official badge background",
169
- "official letterhead style with seal and formal typography",
170
- "state capitol building with official banner",
171
- "government form aesthetic with checkboxes",
172
- "DMV or insurance commission seal visible",
173
- ],
174
  },
175
-
176
  "identity_targeting": {
177
  "name": "Identity Targeting",
178
- "description": "Direct demographic callout creates instant self-selection",
179
  "hooks": [
180
  "Drivers Won't Have To Pay More Than $39 A Month",
181
  "Drivers Over 50: Check Your Eligibility",
@@ -190,19 +137,11 @@ STRATEGIES = {
190
  "Senior Citizen Auto Insurance Rates",
191
  "Safe Drivers Turning 65 This Year",
192
  ],
193
- "visual_styles": [
194
- "four diverse driver faces in portrait style, dignified, relatable",
195
- "real senior driver in their car, trustworthy",
196
- "driver looking at camera, confident expression",
197
- "multiple drivers of different ages, inclusive",
198
- "senior holding insurance card, testimonial style",
199
- "mature hands on steering wheel or holding keys",
200
- ],
201
  },
202
-
203
  "insider_secret": {
204
  "name": "Insider Secret",
205
- "description": "Exclusivity and hidden knowledge framing",
206
  "hooks": [
207
  "The Easiest Way To Cut Car Insurance Bills",
208
  "What Insurance Companies Don't Want You To Know",
@@ -217,23 +156,11 @@ STRATEGIES = {
217
  "Hidden Discount Most People Miss",
218
  "The Backdoor To Lower Rates",
219
  ],
220
- "visual_styles": [
221
- "person whispering or revealing secret, documentary candid",
222
- "document being unveiled or revealed",
223
- "insider/whistleblower aesthetic, anonymous feel",
224
- "magnifying glass over insurance policy",
225
- "hidden text being exposed or highlighted",
226
- "person looking over shoulder, sharing secret",
227
- ],
228
  },
229
-
230
- # ------------------------------------------------------------------------
231
- # Core Psychological Strategies
232
- # ------------------------------------------------------------------------
233
-
234
  "fear_based": {
235
  "name": "Fear-Based",
236
- "description": "Trigger fear of accidents, tickets, and worst-case scenarios",
237
  "hooks": [
238
  "One accident could bankrupt you",
239
  "Are you one fender-bender away from financial ruin?",
@@ -248,19 +175,11 @@ STRATEGIES = {
248
  "The average car accident costs $57,000",
249
  "Are you gambling with your family's future?",
250
  ],
251
- "visual_styles": [
252
- "car accident scene with vintage film grain, documentary footage",
253
- "damaged car on roadside with old VHS quality",
254
- "police lights flashing, aged documentary photography",
255
- "worried driver after minor accident, candid shot",
256
- "tow truck removing damaged vehicle, old news footage aesthetic",
257
- "hospital bills on dashboard, vintage feel",
258
- ],
259
  },
260
-
261
  "urgency_scarcity": {
262
  "name": "Urgency & Scarcity",
263
- "description": "Create time pressure and limited availability",
264
  "hooks": [
265
  "Rates increasing in 48 hours",
266
  "Last chance for 2024 pricing",
@@ -275,18 +194,11 @@ STRATEGIES = {
275
  "Act now or pay 30% more next month",
276
  "Final warning: rates going up",
277
  ],
278
- "visual_styles": [
279
- "countdown timer graphic, urgent red colors",
280
- "calendar with deadline circled",
281
- "clock showing almost midnight",
282
- "red URGENT stamp on documents",
283
- "limited time banner, expiring offer",
284
- ],
285
  },
286
-
287
  "social_proof_fomo": {
288
  "name": "Social Proof & FOMO",
289
- "description": "Show others are doing it, create fear of missing out",
290
  "hooks": [
291
  "2,437 drivers in your area switched THIS WEEK",
292
  "Your neighbors are saving. Are you?",
@@ -301,18 +213,11 @@ STRATEGIES = {
301
  "The insurance your neighbors trust",
302
  "Smart drivers are making the switch",
303
  ],
304
- "visual_styles": [
305
- "happy drivers in neighborhood, protected",
306
- "map showing covered drivers in area",
307
- "crowd of satisfied customers",
308
- "testimonial collage of happy drivers",
309
- "5-star rating badges, trust indicators",
310
- ],
311
  },
312
-
313
  "guilt_shame": {
314
  "name": "Guilt & Shame",
315
- "description": "Trigger guilt about family responsibility",
316
  "hooks": [
317
  "Can you look your family in the eye without coverage?",
318
  "Your kids are counting on you",
@@ -327,18 +232,11 @@ STRATEGIES = {
327
  "Every mile without coverage is a risk to your family",
328
  "What kind of driver are you?",
329
  ],
330
- "visual_styles": [
331
- "parent looking worried with kids in backseat",
332
- "family photo with protective imagery",
333
- "father looking at damaged car, regret",
334
- "mother with child, concerned expression",
335
- "car seat in damaged vehicle, emotional impact",
336
- ],
337
  },
338
-
339
  "greed_savings": {
340
  "name": "Greed & Savings",
341
- "description": "Appeal to desire to save money and get more",
342
  "hooks": [
343
  "You're overpaying by $1,147/year",
344
  "Stop throwing money away",
@@ -353,19 +251,11 @@ STRATEGIES = {
353
  "Get more coverage for less money",
354
  "Stop wasting money on overpriced insurance",
355
  ],
356
- "visual_styles": [
357
- "stack of cash, money savings",
358
- "piggy bank overflowing with coins",
359
- "comparison chart showing savings",
360
- "happy driver reviewing lower bills in car",
361
- "calculator showing big savings number",
362
- "wallet with money, financial freedom",
363
- ],
364
  },
365
-
366
  "authority_trust": {
367
  "name": "Authority & Trust",
368
- "description": "Leverage expert credibility and insider knowledge",
369
  "hooks": [
370
  "Former agent reveals the truth",
371
  "Industry insider secret exposed",
@@ -379,16 +269,8 @@ STRATEGIES = {
379
  "Trusted by millions of drivers",
380
  "Licensed in all 50 states",
381
  ],
382
- "visual_styles": [
383
- "professional insurance agent, trustworthy",
384
- "A+ rating badge, gold seal",
385
- "official documents, certificates",
386
- "expert in business attire",
387
- "trust badges, security icons",
388
- "newspaper headline style, exposed",
389
- ],
390
  },
391
-
392
  "loss_aversion": {
393
  "name": "Loss Aversion",
394
  "description": "Emphasize what they stand to lose",
@@ -406,16 +288,8 @@ STRATEGIES = {
406
  "Everything you own could be at risk",
407
  "Your assets, your peace of mind, your security",
408
  ],
409
- "visual_styles": [
410
- "before/after accident comparison",
411
- "damaged car in lot, total loss",
412
- "family photo with worried expression",
413
- "empty driveway where car used to be",
414
- "lawsuit papers on dashboard",
415
- "bank account with zero balance",
416
- ],
417
  },
418
-
419
  "anchoring": {
420
  "name": "Anchoring",
421
  "description": "Compare high value to low cost",
@@ -431,18 +305,11 @@ STRATEGIES = {
431
  "$1.00/day protects $100,000 in assets",
432
  "Cheaper than your streaming subscription",
433
  ],
434
- "visual_styles": [
435
- "scale comparing cost vs value",
436
- "coffee cup vs car comparison",
437
- "small price tag vs big protection",
438
- "simple math equation graphic",
439
- "price comparison infographic",
440
- ],
441
  },
442
-
443
  "simplicity": {
444
  "name": "Simplicity & Ease",
445
- "description": "Emphasize how easy it is to get covered",
446
  "hooks": [
447
  "Get covered in 3 minutes",
448
  "One click. Full protection.",
@@ -457,18 +324,11 @@ STRATEGIES = {
457
  "The lazy driver's insurance solution",
458
  "Why is getting insurance still this hard? (It isn't anymore)",
459
  ],
460
- "visual_styles": [
461
- "person on phone in car, relaxed",
462
- "simple 3-step process graphic",
463
- "checkmark, done, complete icons",
464
- "happy person with phone showing quote",
465
- "clean, minimal interface screenshot",
466
- ],
467
  },
468
-
469
  "comparison_envy": {
470
  "name": "Comparison & Envy",
471
- "description": "Compare to others who are better protected",
472
  "hooks": [
473
  "Your coworker pays less and gets more coverage",
474
  "Why are smart drivers switching?",
@@ -481,18 +341,11 @@ STRATEGIES = {
481
  "Don't be the only unprotected driver",
482
  "Your neighbor's accident was covered. Would yours be?",
483
  ],
484
- "visual_styles": [
485
- "two cars side by side, one protected",
486
- "neighbor comparison graphic",
487
- "protected driver vs exposed driver",
488
- "happy driver vs worried driver",
489
- "community showing coverage differences",
490
- ],
491
  },
492
-
493
  "transformation": {
494
  "name": "Transformation & Peace",
495
- "description": "Show the transformation from worry to peace",
496
  "hooks": [
497
  "From worried to worry-free in 5 minutes",
498
  "Drive confidently knowing you're covered",
@@ -505,139 +358,75 @@ STRATEGIES = {
505
  "Worry-free driving starts here",
506
  "Breathe easy. You're protected.",
507
  ],
508
- "visual_styles": [
509
- "relaxed driver on peaceful road",
510
- "person driving peacefully",
511
- "before/after: worried vs happy driver",
512
- "open road, secure feeling",
513
- "family enjoying road trip, not worrying",
514
- ],
515
  },
516
  }
517
 
518
  # ============================================================================
519
- # SECTION 2: HIGH-CONVERTING VISUAL LIBRARY
 
 
520
  # ============================================================================
521
 
522
- PROTECTION_SAFETY_VISUALS = [
523
- "driver confidently behind wheel, daylight",
524
- "car parked safely in driveway, protected",
525
- "parent with kids buckled safely in backseat",
526
- "calm driving while storm clouds in distance",
527
- "hands on steering wheel, confident grip",
528
- "car + checkmark overlay, protected",
529
- ]
530
-
531
- ACCIDENT_FEAR_VISUALS = [
532
- "half image: safe car / damaged car",
533
- "minor fender bender, manageable damage",
534
- "cracked windshield close-up",
535
- "dented bumper on roadside",
536
- "flat tire by highway",
537
- "damaged car blurred in background, intact one sharp",
538
- ]
539
-
540
- FAMILY_SAFETY_VISUALS = [
541
- "parents with kids in car seats, secure",
542
- "child buckled in backseat safely",
543
- "family loading car for road trip",
544
- "parent checking mirrors with kids inside",
545
- "multi-generational family in SUV",
546
  ]
547
 
548
- FIRST_TIME_DRIVER_VISUALS = [
549
- "teenager holding new driver's license",
550
- "new driver with keys, excited",
551
- "first car purchase, proud moment",
552
- "SOLD sign outside dealership",
553
- "young driver + nervous parent",
554
  ]
555
 
556
- VEHICLE_ASSET_VISUALS = [
557
- "beautiful car at sunset",
558
- "clean driveway + new car parked",
559
- "car with subtle price tag icon",
560
- "car loan documents overlay",
561
- "before/after car detailing shots",
562
  ]
563
 
564
- PROBLEM_RISK_VISUALS = [
565
- "minor fender bender damage",
566
- "cracked windshield repair",
567
- "tire blowout on highway",
568
- "hail damage on hood",
569
- "parking lot door ding",
570
- "weather damage to vehicle",
571
  ]
572
 
573
- RELIEF_VISUALS = [
574
- "sunlight after rain over car",
575
- "driver relaxing after safe arrival",
576
- "family safe after road trip",
577
- "car with insurance card visible",
578
- "coffee in car, peaceful morning commute",
579
  ]
580
 
581
- FINANCIAL_VISUALS = [
582
- "official-looking insurance documents",
583
- "phone with insurance app open",
584
- "car + savings icon",
585
- "insurance card on dashboard",
586
- "calculator + paperwork in car",
587
  ]
588
 
589
- COMPARISON_CHOICE_VISUALS = [
590
- "insured vs uninsured driver split",
591
- "cheap insurance vs proper coverage",
592
- "umbrella over car vs rain",
593
- "shield vs hazard symbol",
594
  ]
595
 
596
- MINIMAL_SYMBOLIC_VISUALS = [
597
- "simple car icon + shield",
598
- "line-art car with lock",
599
- "car inside protective bubble",
600
- "steering wheel with checkmark",
601
- "key + car silhouette",
602
  ]
603
 
604
- LIFESTYLE_VISUALS = [
605
- "morning commute, peaceful drive",
606
- "weekend road trip with family",
607
- "car parked at scenic overlook",
608
- "daily routine, coffee and drive",
609
- "highway aerial shot, traffic flow",
610
- ]
611
-
612
- TEXT_FIRST_VISUALS = [
613
- "text overlay: 'This driver is insured. Are you?'",
614
- "text overlay: 'Most drivers are underinsured.'",
615
- "text overlay: 'Hope is not a plan.'",
616
- "text overlay: 'One accident can change everything.'",
617
- ]
618
-
619
- SEASONAL_VISUALS = [
620
- "rain driving (wet road safety)",
621
- "summer heat (breakdown risk)",
622
- "winter snow conditions",
623
- "road trip season",
624
- ]
625
-
626
- HIGH_CONVERTING_VISUAL_LIBRARY = (
627
- PROTECTION_SAFETY_VISUALS +
628
- ACCIDENT_FEAR_VISUALS +
629
- FAMILY_SAFETY_VISUALS +
630
- FIRST_TIME_DRIVER_VISUALS +
631
- VEHICLE_ASSET_VISUALS +
632
- PROBLEM_RISK_VISUALS +
633
- RELIEF_VISUALS +
634
- FINANCIAL_VISUALS +
635
- COMPARISON_CHOICE_VISUALS +
636
- MINIMAL_SYMBOLIC_VISUALS +
637
- LIFESTYLE_VISUALS +
638
- TEXT_FIRST_VISUALS +
639
- SEASONAL_VISUALS
640
- )
641
 
642
  # ============================================================================
643
  # SECTION 3: CREATIVE ELEMENTS
@@ -698,7 +487,7 @@ for strategy in STRATEGIES.values():
698
  ALL_VISUAL_STYLES = []
699
  for strategy in STRATEGIES.values():
700
  ALL_VISUAL_STYLES.extend(strategy["visual_styles"])
701
- ALL_VISUAL_STYLES.extend(HIGH_CONVERTING_VISUAL_LIBRARY)
702
 
703
  # ============================================================================
704
  # SECTION 5: DATA EXPORT
@@ -717,14 +506,10 @@ def get_niche_data():
717
  "copy_templates": COPY_TEMPLATES,
718
  "niche_guidance": """
719
  NICHE-SPECIFIC REQUIREMENTS (AUTO INSURANCE):
720
- - Focus on REALISTIC driving scenarios and protection
721
- - Show real situations: safe driving, accidents, family safety, financial protection
722
- - Use authentic emotions: fear of accidents, relief of coverage, family responsibility, savings
723
- - Target pain points: high premiums, accident fears, coverage gaps, legal requirements
724
- - Messaging must feel URGENT but trustworthy
725
- - Visual concepts: real drivers, real cars, real protection scenarios, savings proof
726
- - AVOID: extreme accident scenes, fear-mongering, unrealistic scenarios
727
- - AVOID: generic stock photos, overly dramatic crash imagery
728
  """,
729
  "price_config": {
730
  "guidance": "Consider using oddly specific prices (e.g., $29.00 or $67.33 instead of $30 or $70) if the ad format calls for it. Typical range: $29-$150/month. Only include if it enhances believability and fits the ad format.",
@@ -741,17 +526,21 @@ NICHE-SPECIFIC REQUIREMENTS (AUTO INSURANCE):
741
  },
742
  "image_guidance": """
743
  NICHE REQUIREMENTS (AUTO INSURANCE):
744
- - Show REAL drivers, cars, and protection scenarios
745
- - Include authentic elements: vehicles, roads, documents, savings proof
746
- - People should look like real drivers (diverse, relatable)
747
- - Accident/coverage imagery should feel realistic but not gratuitous
748
- - AVOID: extreme crash imagery, fear-mongering, generic stock photos
749
  """,
750
  "image_niche_guidance_short": """
751
- NICHE: Auto Insurance
752
- - Show real drivers, cars, and protection scenarios
753
- - People should be diverse, relatable drivers
754
- - Realistic but not gratuitous accident/coverage imagery""",
755
- "prompt_sanitization_replacements": [],
756
- "visual_library": {},
 
 
 
 
757
  }
 
1
  """
2
+ Auto Insurance - Ad-format creatives only.
3
+ Strategies kept for copy (hooks); visuals come from AD_FORMAT_VISUAL_LIBRARY only.
 
4
  """
5
 
6
  # ============================================================================
7
+ # SECTION 1: STRATEGIES (hooks for copy; visuals from visual_library only)
8
  # ============================================================================
9
 
10
  STRATEGIES = {
 
 
 
 
11
  "accusation_opener": {
12
  "name": "Accusation Opener",
13
+ "description": "Direct accusation - overpaying style",
14
  "hooks": [
15
  "OVERPAYING?",
16
  "Still Overpaying For Car Insurance?",
 
25
  "Throwing Money Away Every Month?",
26
  "Your Premium Is Too High. Here's Proof.",
27
  ],
28
+ "visual_styles": [],
 
 
 
 
 
 
 
29
  },
 
30
  "curiosity_gap": {
31
  "name": "Curiosity Gap",
32
+ "description": "Open loop - THIS / Instead demands click",
33
  "hooks": [
34
  "Drivers Are Ditching Their Auto Insurance & Doing This Instead",
35
  "Thousands of drivers are dropping their insurance after THIS",
 
44
  "After Seeing THIS, You'll Never Overpay Again",
45
  "One Simple Change Saves Thousands",
46
  ],
47
+ "visual_styles": [],
 
 
 
 
 
 
 
48
  },
 
49
  "specific_price_anchor": {
50
  "name": "Specific Price Anchor",
51
+ "description": "Oddly specific prices create believability",
52
  "hooks": [
53
  "Car Insurance for as low as $29/month",
54
  "Auto Insurance with coverage as low as $29/month",
 
62
  "Switch And Pay Just $63/month",
63
  "Rates Starting At $27.50/month",
64
  ],
65
+ "visual_styles": [],
 
 
 
 
 
 
 
66
  },
 
67
  "before_after_proof": {
68
  "name": "Before/After Proof",
69
+ "description": "Savings numbers with visual proof",
70
  "hooks": [
71
  "WAS: $1,842 → NOW: $647",
72
  "How I Dropped My Premium By $1,195/year",
 
80
  "Went From Overpaying To Saving Big",
81
  "The 5-Minute Switch That Saved Me $1,200",
82
  ],
83
+ "visual_styles": [],
 
 
 
 
 
 
 
84
  },
 
85
  "quiz_interactive": {
86
  "name": "Quiz/Interactive",
87
+ "description": "Quiz format drives engagement",
88
  "hooks": [
89
  "What Year Is Your Car?",
90
  "Tap Your Age To Calculate Your New Rate",
 
99
  "Quick Quiz: How Much Can You Save?",
100
  "Select Your State To See Rates",
101
  ],
102
+ "visual_styles": [],
 
 
 
 
 
 
 
103
  },
 
104
  "authority_transfer": {
105
  "name": "Authority Transfer",
106
+ "description": "Transfer trust from government/institutions",
107
  "hooks": [
108
  "State Farm & GEICO Competitors Bring Savings!",
109
  "Sponsored by Major Insurance Providers",
 
118
  "Official Notice: Rate Reduction Program",
119
  "State Insurance Commission Announces Savings",
120
  ],
121
+ "visual_styles": [],
 
 
 
 
 
 
 
122
  },
 
123
  "identity_targeting": {
124
  "name": "Identity Targeting",
125
+ "description": "Demographic callout for self-selection",
126
  "hooks": [
127
  "Drivers Won't Have To Pay More Than $39 A Month",
128
  "Drivers Over 50: Check Your Eligibility",
 
137
  "Senior Citizen Auto Insurance Rates",
138
  "Safe Drivers Turning 65 This Year",
139
  ],
140
+ "visual_styles": [],
 
 
 
 
 
 
 
141
  },
 
142
  "insider_secret": {
143
  "name": "Insider Secret",
144
+ "description": "Exclusivity and hidden knowledge",
145
  "hooks": [
146
  "The Easiest Way To Cut Car Insurance Bills",
147
  "What Insurance Companies Don't Want You To Know",
 
156
  "Hidden Discount Most People Miss",
157
  "The Backdoor To Lower Rates",
158
  ],
159
+ "visual_styles": [],
 
 
 
 
 
 
 
160
  },
 
 
 
 
 
161
  "fear_based": {
162
  "name": "Fear-Based",
163
+ "description": "Fear of accidents and worst-case scenarios",
164
  "hooks": [
165
  "One accident could bankrupt you",
166
  "Are you one fender-bender away from financial ruin?",
 
175
  "The average car accident costs $57,000",
176
  "Are you gambling with your family's future?",
177
  ],
178
+ "visual_styles": [],
 
 
 
 
 
 
 
179
  },
 
180
  "urgency_scarcity": {
181
  "name": "Urgency & Scarcity",
182
+ "description": "Time pressure and limited availability",
183
  "hooks": [
184
  "Rates increasing in 48 hours",
185
  "Last chance for 2024 pricing",
 
194
  "Act now or pay 30% more next month",
195
  "Final warning: rates going up",
196
  ],
197
+ "visual_styles": [],
 
 
 
 
 
 
198
  },
 
199
  "social_proof_fomo": {
200
  "name": "Social Proof & FOMO",
201
+ "description": "Others are doing it, fear of missing out",
202
  "hooks": [
203
  "2,437 drivers in your area switched THIS WEEK",
204
  "Your neighbors are saving. Are you?",
 
213
  "The insurance your neighbors trust",
214
  "Smart drivers are making the switch",
215
  ],
216
+ "visual_styles": [],
 
 
 
 
 
 
217
  },
 
218
  "guilt_shame": {
219
  "name": "Guilt & Shame",
220
+ "description": "Family responsibility trigger",
221
  "hooks": [
222
  "Can you look your family in the eye without coverage?",
223
  "Your kids are counting on you",
 
232
  "Every mile without coverage is a risk to your family",
233
  "What kind of driver are you?",
234
  ],
235
+ "visual_styles": [],
 
 
 
 
 
 
236
  },
 
237
  "greed_savings": {
238
  "name": "Greed & Savings",
239
+ "description": "Desire to save money",
240
  "hooks": [
241
  "You're overpaying by $1,147/year",
242
  "Stop throwing money away",
 
251
  "Get more coverage for less money",
252
  "Stop wasting money on overpriced insurance",
253
  ],
254
+ "visual_styles": [],
 
 
 
 
 
 
 
255
  },
 
256
  "authority_trust": {
257
  "name": "Authority & Trust",
258
+ "description": "Expert credibility and trust",
259
  "hooks": [
260
  "Former agent reveals the truth",
261
  "Industry insider secret exposed",
 
269
  "Trusted by millions of drivers",
270
  "Licensed in all 50 states",
271
  ],
272
+ "visual_styles": [],
 
 
 
 
 
 
 
273
  },
 
274
  "loss_aversion": {
275
  "name": "Loss Aversion",
276
  "description": "Emphasize what they stand to lose",
 
288
  "Everything you own could be at risk",
289
  "Your assets, your peace of mind, your security",
290
  ],
291
+ "visual_styles": [],
 
 
 
 
 
 
 
292
  },
 
293
  "anchoring": {
294
  "name": "Anchoring",
295
  "description": "Compare high value to low cost",
 
305
  "$1.00/day protects $100,000 in assets",
306
  "Cheaper than your streaming subscription",
307
  ],
308
+ "visual_styles": [],
 
 
 
 
 
 
309
  },
 
310
  "simplicity": {
311
  "name": "Simplicity & Ease",
312
+ "description": "How easy it is to get covered",
313
  "hooks": [
314
  "Get covered in 3 minutes",
315
  "One click. Full protection.",
 
324
  "The lazy driver's insurance solution",
325
  "Why is getting insurance still this hard? (It isn't anymore)",
326
  ],
327
+ "visual_styles": [],
 
 
 
 
 
 
328
  },
 
329
  "comparison_envy": {
330
  "name": "Comparison & Envy",
331
+ "description": "Compare to others better protected",
332
  "hooks": [
333
  "Your coworker pays less and gets more coverage",
334
  "Why are smart drivers switching?",
 
341
  "Don't be the only unprotected driver",
342
  "Your neighbor's accident was covered. Would yours be?",
343
  ],
344
+ "visual_styles": [],
 
 
 
 
 
 
345
  },
 
346
  "transformation": {
347
  "name": "Transformation & Peace",
348
+ "description": "Worry to peace transformation",
349
  "hooks": [
350
  "From worried to worry-free in 5 minutes",
351
  "Drive confidently knowing you're covered",
 
358
  "Worry-free driving starts here",
359
  "Breathe easy. You're protected.",
360
  ],
361
+ "visual_styles": [],
 
 
 
 
 
 
362
  },
363
  }
364
 
365
  # ============================================================================
366
+ # SECTION 2: AD FORMAT VISUALS (reference-style ad graphics)
367
+ # High-converting auto insurance ad layouts: official notification, social post,
368
+ # table/infographic, before-after, coverage tiers, car brand grid, gift card CTA, savings/urgency.
369
  # ============================================================================
370
 
371
+ OFFICIAL_NOTIFICATION_FORMAT = [
372
+ "official notification style: dark blue background, government-style header with seal or badge, bold headline like 'You\'ve been approved for' with program name in red, body text about eligibility (ZIP code, vehicle, age), 'no credit check required' highlighted, three horizontal rate buttons at bottom: Liability Only $X/mo, Liability+Collision $X/mo, Full Coverage $X/mo, clean sans-serif typography, professional ad graphic",
373
+ "government-style ad: circular seal top-left, 'Department' or official entity name in white, main offer headline in red, eligibility line and no-credit-check callout, three rounded red or blue CTA buttons with coverage type and monthly price each, dark blue background, high contrast",
374
+ "official relief program ad: header with USA or state seal, 'SNAP AUTO RELIEF' or similar program name, approval message, 'Choose your rate below' with three tier buttons (Liability, Liability+Collision, Full Coverage) showing monthly prices, no credit check badge or text",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  ]
376
 
377
+ SOCIAL_POST_EMBED_FORMAT = [
378
+ "social media post style: tweet or X post layout with profile picture, handle, verified checkmark, short tweet text at top, embedded white rectangular card below containing logo (eagle/seal), entity name with checkmark, headline about subsidized auto insurance, bold '$X/mo' and 'DUI-free drivers' or similar, 'Show More' link style, engagement bar at bottom with comment/retweet/like/view counts",
379
+ "viral announcement graphic: social feed UI with avatar and username, main post text, embedded announcement card with official logo, bold offer text (e.g. subsidized auto insurance as low as $19/mo), eligibility line, clean card design on white, engagement metrics (7K comments, 100K likes, 15M views)",
380
+ "Twitter-style ad: profile circle, @handle, timestamp, tweet copy, large embedded card with seal/logo, program name, body text with key phrases bolded, CTA or link, likes and retweets count at bottom",
 
 
381
  ]
382
 
383
+ SENIORS_TABLE_FORMAT = [
384
+ "seniors cost table: title 'CAR INSURANCE FOR SENIORS COST IN 2024' in blue uppercase, two-column table with 'Age' column (55-69 and 70+ in bold purple on light purple), right column listing coverage types (Liability, Comprehensive, Collision, Usage-Based, Roadside) with yellow 'See Prices' button per row, light purple/lavender table background, clean grid, professional infographic",
385
+ "age-group rate table: bold title, left column age brackets (55-69, 70+), right column coverage options each with rounded yellow See Prices button, purple and blue color scheme, horizontal dividers, modern table layout for auto insurance",
386
+ "senior drivers rate card: headline about senior car insurance cost, table rows for age groups and coverage types, prominent See Prices buttons, lavender background, sans-serif, structured like a comparison or rate finder",
 
 
387
  ]
388
 
389
+ BEFORE_AFTER_SPLIT_FORMAT = [
390
+ "before-after savings ad: brand name at top (e.g. AmericanCar Quote), 'Auto Insurance' headline, two semi-transparent boxes side by side labeled Before $186/mo and After $39/mo with same coverage 50/100/50, split car graphic below (one half plain silver, other half dynamic blue/black geometric design), blurred cityscape background, 'Calculate Payment' button at bottom with arrow, terms line",
391
+ "transformation ad: before/after monthly price comparison boxes, sports car image split vertically (before side plain, after side styled), urban skyline blur, single CTA button, clean modern design, blue accent color",
392
+ "savings comparison graphic: Before and After price boxes with crossed-out high price and new low price, car as visual metaphor (half plain half premium look), Calculate Payment or Get Quote CTA, professional ad layout",
 
 
 
393
  ]
394
 
395
+ COVERAGE_TIERS_PANELS_FORMAT = [
396
+ "three coverage panels: logo and slogan at top (e.g. Wal-Mart of Auto Insurance), 'GET YOUR QUOTES IN 60 SEC' with flags or accent, three horizontal white rounded panels each with wave/teal bottom shape: left 'Liability Only' From $X/mo, center 'Liability+Collision' From $X/mo, right 'Full Coverage' From $X/mo, below 'Tap Your Age Group' with age buttons 20s 30s 40s 50s 60s 70s+, clean white background, dashed border frame",
397
+ "coverage tier cards: brand headline, three equal panels with coverage type and 'From $X/mo' in bold, light blue or teal wave design at bottom of each card, age selector row of small bordered buttons, minimal professional layout",
398
+ "rate comparison ad: company name and tagline, three options in card layout with liability only, liability+collision, full coverage and monthly from-prices, tap your age group with decade buttons, white and teal/blue color scheme",
 
 
399
  ]
400
 
401
+ CAR_BRAND_GRID_FORMAT = [
402
+ "car brand selector ad: top section solid teal or light blue-green with 'Liability coverage' and large '$18/Month', 'TAP THE BRAND OF YOUR CAR' in bold, bottom section 4x5 grid of car brand boxes (white, thin orange/gold border), each box logo and name (Porsche, Hyundai, Jeep, Kia, Land Rover, Mazda, Mercedes, BMW, Nissan, Ram, GMC, Subaru, Buick, Chevrolet, Suzuki, Tesla, Toyota, VW, Audi, OTHER with generic car icon), cream or off-white background, clean interactive-style layout",
403
+ "vehicle make selector: prominent price and coverage type at top, call to action to tap brand, grid of 20 car manufacturer logos and names in bordered boxes, last box OTHER with red sedan icon, teal header and light background",
404
+ "brand grid rate ad: liability price headline, tap your car brand CTA, grid of auto brand logos with names, rounded or rectangular boxes, one generic OTHER option, professional lead-gen style graphic",
 
 
405
  ]
406
 
407
+ GIFT_CARD_CTA_FORMAT = [
408
+ "gift card offer ad: white background, red car icon left and gift card icon right of headline 'GET A QUOTE, GET A GIFT CARD!', yellow banner 'FIRST 25 CALLERS ONLY!', three green checkmark bullets (NO PURCHASE NECESSARY, SUPER FAST & FRIENDLY QUOTE, POTENTIAL TO SAVE HUNDREDS), 'CALL TODAY:' and large phone number, 'LOCAL AGENCY - CITY, ST' in smaller text, company logo bottom right (e.g. lighthouse with sun and waves, company name in blue), clean direct-response flyer style",
409
+ "quote incentive ad: main offer Get a Quote Get a Gift Card with car and gift card icons, urgency bar First 25 Callers Only, benefit list with green checkmarks, Call Today and phone number prominent, agency name and location, logo at bottom, white clean layout, bold blue text",
410
+ "direct response ad: headline with icons, limited-time yellow bar, three checkmark benefits, call-to-action and phone number, local agency line, branded logo corner, professional insurance agency flyer look",
 
411
  ]
412
 
413
+ SAVINGS_URGENCY_FORMAT = [
414
+ "savings urgency ad: bright yellow background, main headline '73% of Drivers Are Paying Too Much - Are You?' with 73% in bold red and rest in black, subline 'Switch and start saving on your auto insurance today', large '$59' in red with '/mo' for full coverage, green 'CONTACT US' button with 3D bevel, red octagonal 'STOP OVERPAYING' graphic with hand icon, bold sans-serif, high contrast, centered layout",
415
+ "urgency graphic: solid yellow background, statistic headline (e.g. 73% paying too much), switch and save line, full coverage from $X/mo with price emphasized in red, green CTA button, stop-sign style STOP OVERPAYING element, black and red text, punchy direct-response style",
416
+ "overpaying ad: yellow canvas, bold percentage and question headline, savings message, prominent low monthly price in red, green Contact Us or Get Quote button, red stop hand or STOP OVERPAYING badge, minimal elements, maximum impact",
 
 
417
  ]
418
 
419
+ # Categories for generator's visual library (strategy -> format mapping uses these keys)
420
+ AD_FORMAT_VISUAL_LIBRARY = {
421
+ "official_notification_style": OFFICIAL_NOTIFICATION_FORMAT,
422
+ "social_post_style": SOCIAL_POST_EMBED_FORMAT,
423
+ "seniors_table_style": SENIORS_TABLE_FORMAT,
424
+ "before_after_style": BEFORE_AFTER_SPLIT_FORMAT,
425
+ "coverage_tiers_style": COVERAGE_TIERS_PANELS_FORMAT,
426
+ "car_brand_grid_style": CAR_BRAND_GRID_FORMAT,
427
+ "gift_card_cta_style": GIFT_CARD_CTA_FORMAT,
428
+ "savings_urgency_style": SAVINGS_URGENCY_FORMAT,
429
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
 
431
  # ============================================================================
432
  # SECTION 3: CREATIVE ELEMENTS
 
487
  ALL_VISUAL_STYLES = []
488
  for strategy in STRATEGIES.values():
489
  ALL_VISUAL_STYLES.extend(strategy["visual_styles"])
490
+ # Visuals for images come from visual_library (AD_FORMAT_VISUAL_LIBRARY) only
491
 
492
  # ============================================================================
493
  # SECTION 5: DATA EXPORT
 
506
  "copy_templates": COPY_TEMPLATES,
507
  "niche_guidance": """
508
  NICHE-SPECIFIC REQUIREMENTS (AUTO INSURANCE):
509
+ - Use ad-format creatives: official notification, social post embed, rate table, before/after, coverage tiers, car brand grid, gift card CTA, savings/urgency.
510
+ - Copy supports headlines and CTAs that match these formats (rates, eligibility, phone number, age/car selectors).
511
+ - Messaging: urgent but trustworthy; clear value (savings, low monthly rate, no credit check, fast quote).
512
+ - AVOID: long-form storytelling; generic lifestyle shots; extreme fear or crash imagery.
 
 
 
 
513
  """,
514
  "price_config": {
515
  "guidance": "Consider using oddly specific prices (e.g., $29.00 or $67.33 instead of $30 or $70) if the ad format calls for it. Typical range: $29-$150/month. Only include if it enhances believability and fits the ad format.",
 
526
  },
527
  "image_guidance": """
528
  NICHE REQUIREMENTS (AUTO INSURANCE):
529
+ - Use ONLY these ad formats: official notification, social post card, seniors/rate table, before/after split, coverage tier panels, car brand grid, gift card CTA, savings/urgency. No other layouts (e.g. no in-car dashboard or screen-in-car mockups).
530
+ - Include headline, prices/rates, and CTA or buttons as specified in the format. Clean, modern layout; clear typography; high contrast where appropriate.
531
+ - People, faces, and cars are OPTIONAL: only when the format explicitly calls for them (e.g. split car in before/after, profile in social post, car logos in grid). Most formats are layout and text only.
532
+ - NO fake or made-up brand/company names (no gibberish); use generic labels only (e.g. Compare Providers, See Rates) or omit. NO in-car dashboard mockups, car interior screens, or headshots on displays.
533
+ - AVOID: documentary/lifestyle photography; crash or fear imagery; generic stock scenes; adding people or vehicles when the format does not specify them.
534
  """,
535
  "image_niche_guidance_short": """
536
+ NICHE: Auto Insurance (ad-format graphics only)
537
+ - Rate cards, comparison layouts, CTAs, coverage tiers, car brand grid
538
+ - Headline and price/rate text as part of design
539
+ - People, faces, and cars only when the format specifies them""",
540
+ "prompt_sanitization_replacements": [
541
+ (r"\belderly\b", "person"),
542
+ (r"\bsenior(s)?\b", "driver"),
543
+ (r"\bold people\b", "drivers"),
544
+ ],
545
+ "visual_library": AD_FORMAT_VISUAL_LIBRARY,
546
  }
services/generator.py CHANGED
@@ -332,8 +332,29 @@ class AdGenerator:
332
  # Fallback to strategy visuals
333
  return []
334
 
335
- # Map strategies to visual categories
336
- strategy_to_category = {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  "accusation_opener": ["problem_risk", "disaster_fear"],
338
  "curiosity_gap": ["text_first", "minimal_symbolic"],
339
  "price_focused": ["comparison_choice", "mortgage_bank"],
@@ -344,12 +365,18 @@ class AdGenerator:
344
  "fear_based": ["disaster_fear", "problem_risk"],
345
  "relief": ["relief", "protection_safety"],
346
  }
 
 
 
 
 
347
 
348
  # Normalize strategy name
349
  strategy_key = strategy_name.lower().replace(" ", "_").replace("-", "_")
350
 
351
- # Get relevant categories
352
- categories = strategy_to_category.get(strategy_key, list(visual_library.keys()))
 
353
 
354
  # Select visuals from relevant categories
355
  selected_visuals = []
@@ -577,7 +604,8 @@ DECISION: You decide whether to include these numbers based on:
577
  If including numbers: Use them naturally and make them oddly specific (e.g., "47 lbs" not "50 lbs") for believability.
578
  If NOT including numbers: Focus on emotional transformation, lifestyle benefits, and outcomes without specific metrics."""
579
  else:
580
- numbers_section = f"""=== NUMBERS GUIDANCE (HOME INSURANCE) ===
 
581
  You may include specific prices/numbers if they enhance the ad's believability and fit the format:
582
  - Price Guidance: {price_guidance}
583
  - Before Price: {niche_numbers['before']}
@@ -593,7 +621,7 @@ DECISION: You decide whether to include prices/numbers based on:
593
  If including prices: Use oddly specific amounts (e.g., "$97.33/month" not "$100/month") for maximum believability.
594
  If NOT including prices: Focus on emotional benefits, problem-solution framing, curiosity gaps, and trust without specific dollar amounts."""
595
 
596
- # Headline formulas from number_config type (data-driven)
597
  if num_type == "weight_loss":
598
  headline_formulas = """=== PROVEN WINNING HEADLINE FORMULAS (WEIGHT LOSS) ===
599
 
@@ -628,6 +656,41 @@ WITHOUT NUMBERS (use if no numbers section):
628
  - "FDA-Approved Weight Loss"
629
  - "Doctor-Prescribed. Clinically Proven."
630
  - "What Doctors Prescribe Their Own Families\""""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
631
  else:
632
  headline_formulas = """=== PROVEN WINNING HEADLINE FORMULAS (HOME INSURANCE) ===
633
 
@@ -642,7 +705,7 @@ WITH NUMBERS (use if numbers section provided):
642
 
643
  WITHOUT NUMBERS (use if no numbers section):
644
  1. THE ACCUSATION: Direct accusation about overpaying
645
- - "OVERPAYING?"
646
  - "Still Underinsured?"
647
  - "Wasting Money On Insurance?"
648
 
@@ -780,8 +843,9 @@ Create a SCROLL-STOPPING Facebook ad for {niche.replace("_", " ").upper()} using
780
  - CRITICAL: Use ONLY {framework_data.get('name', framework)} format - DO NOT mix with other formats
781
  - {f"If chat-style framework (e.g. iMessage, WhatsApp): Include 2-4 readable, coherent messages related to {niche.replace('_', ' ').title()}. Use the headline or a variation as one message." if 'chat_style' in framework_data.get('tags', []) else ""}
782
  - {f"If document-style framework (e.g. memo, email): Include readable, properly formatted text related to {niche.replace('_', ' ').title()}." if 'document_style' in framework_data.get('tags', []) else ""}
783
- - FOR GLP-1: Use VARIETY - show different visual types: quiz interfaces, doctor/medical settings, person on scale, mirror reflections, lifestyle moments, confidence scenes, testimonial portraits, celebrity references, or before/after (only when strategy calls for it) use diverse visual concepts.
784
- - FOR HOME INSURANCE: Show person with document, savings proof, home setting
 
785
 
786
  === PSYCHOLOGICAL PRINCIPLES ===
787
  - Loss Aversion: Make them feel what they're losing/missing
@@ -865,6 +929,9 @@ Generate the ad copy now for {niche.replace("_", " ").upper()}. Make it look lik
865
  # Get color palette from visuals.py based on trigger/mood
866
  color_palette = get_color_palette(visual_mood.lower().replace(" ", "_").replace("-", "_"))
867
 
 
 
 
868
  # Text styling options for variety - natural text in scene (NO overlays/banners)
869
  text_positions = [
870
  "naturally integrated into the scene",
@@ -885,8 +952,15 @@ Generate the ad copy now for {niche.replace("_", " ").upper()}. Make it look lik
885
  ]
886
  text_color = random.choice(text_colors)
887
 
888
- # Niche-specific image guidance (use visuals.py if available, else niche data)
889
- if niche_visual_guidance_data and isinstance(niche_visual_guidance_data, dict):
 
 
 
 
 
 
 
890
  niche_image_guidance = f"""
891
  NICHE REQUIREMENTS ({niche.replace("_", " ").title()}):
892
  SUBJECTS: {', '.join(niche_visual_guidance_data.get('subjects', []))}
@@ -1008,22 +1082,16 @@ NO text overlays, decorative elements, borders, banners, or overlays.
1008
  === VISUAL SCENE ===
1009
  {image_brief}
1010
 
1011
- === CRITICAL: PEOPLE AND FACES ===
1012
- If this image includes people or faces, they MUST look like real, original people with:
1013
- - Photorealistic faces with natural skin texture, visible pores, and realistic skin imperfections
1014
- - Natural facial asymmetry (no perfectly symmetrical faces)
1015
- - Unique, individual facial features (not generic or model-like)
1016
- - Natural expressions with authentic micro-expressions
1017
- - Realistic skin tones with natural variations and undertones
1018
- - Natural hair texture with individual strands
1019
- - Faces that look like real photographs of real people, NOT AI-generated portraits
1020
- - Avoid any faces that look synthetic, fake, or obviously computer-generated
1021
 
1022
- IMPORTANT: Do NOT display numbers, prices, dollar amounts, or savings figures in the image unless they naturally appear as part of the scene (like on a document someone is holding, or a sign in the background). Focus on the visual scene and people, not numerical information. Numbers should be in the ad copy, not the image.
 
 
1023
 
1024
  === VISUAL SPECIFICATIONS ===
1025
- STYLE: {visual_style} - rendered in vintage documentary aesthetic
1026
- MOOD: {visual_mood} - nostalgic, authentic, trustworthy
1027
  CAMERA: {camera_angle} - documentary/candid feel
1028
  LIGHTING: {lighting} - natural, not studio-polished
1029
  COMPOSITION: {composition}
@@ -1037,10 +1105,10 @@ Apply these effects IF they fit the natural aesthetic (not required):
1037
  - Natural lighting variations
1038
  - Authentic imperfections (if they occur naturally)
1039
 
1040
- === AUTHENTICITY REQUIREMENTS ===
1041
  PEOPLE (if present):
1042
  - Real people, NOT models
1043
- - Age appropriate for target demographic (40-70)
1044
  - Everyday clothes (not styled)
1045
  - Natural expressions (not posed smiles)
1046
  - Relatable, trustworthy appearance
@@ -1070,7 +1138,7 @@ DOCUMENTS (if present):
1070
  - Real-looking bills, statements, cards
1071
  - Visible numbers and text
1072
  - Red circles around key information
1073
- - Slightly crumpled or worn
1074
 
1075
  === NEGATIVE PROMPTS (AVOID) ===
1076
  - NO clean, modern, HD digital look
@@ -1097,9 +1165,11 @@ DOCUMENTS (if present):
1097
  - NO decorative elements that frame the image
1098
  - NO news-style chyrons or tickers
1099
  - NO graphic design elements that look like they were added on top
1100
- - NO numbers, prices, dollar amounts, or savings figures displayed prominently
1101
- - NO text overlays with numerical information
1102
- - Focus on the natural scene only, no added presentation elements or numbers
 
 
1103
  - NO mixing multiple framework formats (e.g., NO WhatsApp + memo, NO iMessage + document)
1104
  - NO gibberish, placeholder text, or random characters in chat bubbles or documents
1105
  - NO "lorem ipsum", placeholder text, or meaningless character strings
@@ -1109,15 +1179,15 @@ DOCUMENTS (if present):
1109
  - Text should appear ONCE only, not multiple times in the image
1110
 
1111
  === OUTPUT ===
1112
- Create a scroll-stopping image that feels authentic and organic. {'Include the headline text ONCE as specified above - do NOT duplicate it.' if include_text_overlay else 'Focus on the visual scene without text.'} The image should feel like real content - NOT like a designed advertisement.
1113
 
1114
  CRITICAL REQUIREMENTS:
1115
- - NO decorative borders, frames, or boxes
1116
- - NO banners, badges, or logos in corners
1117
- - NO overlay boxes or rectangular overlays
1118
  - NO duplicate text - any text should appear ONLY ONCE
1119
  - NO repeating the same message in different formats
1120
- - Focus on the natural, authentic scene only
1121
  - If text is included, show it in ONE location only, not multiple places"""
1122
 
1123
  # Refine and clean the prompt before sending (pass niche for demographic fixes)
 
332
  # Fallback to strategy visuals
333
  return []
334
 
335
+ # Map strategies to visual categories (niche-specific for auto_insurance ad formats)
336
+ auto_insurance_strategy_categories = {
337
+ "accusation_opener": ["savings_urgency_style", "gift_card_cta_style"],
338
+ "curiosity_gap": ["social_post_style", "coverage_tiers_style"],
339
+ "specific_price_anchor": ["coverage_tiers_style", "official_notification_style", "car_brand_grid_style"],
340
+ "before_after_proof": ["before_after_style", "savings_urgency_style"],
341
+ "quiz_interactive": ["car_brand_grid_style", "coverage_tiers_style", "seniors_table_style"],
342
+ "authority_transfer": ["official_notification_style", "social_post_style"],
343
+ "identity_targeting": ["seniors_table_style", "coverage_tiers_style", "gift_card_cta_style"],
344
+ "insider_secret": ["social_post_style", "coverage_tiers_style"],
345
+ "fear_based": ["before_after_style", "savings_urgency_style"],
346
+ "urgency_scarcity": ["savings_urgency_style", "gift_card_cta_style"],
347
+ "social_proof_fomo": ["social_post_style", "gift_card_cta_style"],
348
+ "guilt_shame": ["before_after_style", "gift_card_cta_style"],
349
+ "greed_savings": ["savings_urgency_style", "before_after_style", "gift_card_cta_style"],
350
+ "authority_trust": ["official_notification_style", "gift_card_cta_style"],
351
+ "loss_aversion": ["before_after_style", "savings_urgency_style"],
352
+ "anchoring": ["coverage_tiers_style", "official_notification_style"],
353
+ "simplicity": ["car_brand_grid_style", "coverage_tiers_style"],
354
+ "comparison_envy": ["before_after_style", "coverage_tiers_style"],
355
+ "transformation": ["before_after_style", "gift_card_cta_style"],
356
+ }
357
+ default_strategy_to_category = {
358
  "accusation_opener": ["problem_risk", "disaster_fear"],
359
  "curiosity_gap": ["text_first", "minimal_symbolic"],
360
  "price_focused": ["comparison_choice", "mortgage_bank"],
 
365
  "fear_based": ["disaster_fear", "problem_risk"],
366
  "relief": ["relief", "protection_safety"],
367
  }
368
+ strategy_to_category = (
369
+ auto_insurance_strategy_categories
370
+ if niche == "auto_insurance"
371
+ else default_strategy_to_category
372
+ )
373
 
374
  # Normalize strategy name
375
  strategy_key = strategy_name.lower().replace(" ", "_").replace("-", "_")
376
 
377
+ # Get relevant categories (only use categories that exist in this niche's library)
378
+ requested = strategy_to_category.get(strategy_key, list(visual_library.keys()))
379
+ categories = [c for c in requested if c in visual_library] or list(visual_library.keys())
380
 
381
  # Select visuals from relevant categories
382
  selected_visuals = []
 
604
  If including numbers: Use them naturally and make them oddly specific (e.g., "47 lbs" not "50 lbs") for believability.
605
  If NOT including numbers: Focus on emotional transformation, lifestyle benefits, and outcomes without specific metrics."""
606
  else:
607
+ niche_label = niche.replace("_", " ").upper()
608
+ numbers_section = f"""=== NUMBERS GUIDANCE ({niche_label}) ===
609
  You may include specific prices/numbers if they enhance the ad's believability and fit the format:
610
  - Price Guidance: {price_guidance}
611
  - Before Price: {niche_numbers['before']}
 
621
  If including prices: Use oddly specific amounts (e.g., "$97.33/month" not "$100/month") for maximum believability.
622
  If NOT including prices: Focus on emotional benefits, problem-solution framing, curiosity gaps, and trust without specific dollar amounts."""
623
 
624
+ # Headline formulas: niche-specific so copy matches the niche (no home-insurance formulas for auto, etc.)
625
  if num_type == "weight_loss":
626
  headline_formulas = """=== PROVEN WINNING HEADLINE FORMULAS (WEIGHT LOSS) ===
627
 
 
656
  - "FDA-Approved Weight Loss"
657
  - "Doctor-Prescribed. Clinically Proven."
658
  - "What Doctors Prescribe Their Own Families\""""
659
+ elif niche == "auto_insurance":
660
+ headline_formulas = """=== PROVEN WINNING HEADLINE FORMULAS (AUTO INSURANCE) ===
661
+
662
+ WITH NUMBERS (use if numbers section provided):
663
+ 1. THE SPECIFIC PRICE ANCHOR: Oddly specific = believable
664
+ - "Car Insurance for as low as $29/month"
665
+ - "Drivers Won't Have To Pay More Than $39 A Month"
666
+
667
+ 2. THE BEFORE/AFTER PROOF: Savings with evidence
668
+ - "WAS: $1,842 → NOW: $647"
669
+ - "The Easiest Way To Cut Car Insurance Bills"
670
+
671
+ WITHOUT NUMBERS (use if no numbers section):
672
+ 1. THE ACCUSATION: Direct accusation about overpaying
673
+ - "OVERPAYING?"
674
+ - "Still Overpaying For Car Insurance?"
675
+ - "Wasting Money On Auto Insurance?"
676
+
677
+ 2. THE CURIOSITY GAP: Open loop that demands click
678
+ - "Drivers Are Ditching Their Auto Insurance & Doing This Instead"
679
+ - "Thousands of drivers are dropping insurance after THIS"
680
+ - "Why Are Drivers Switching?"
681
+
682
+ 3. THE IDENTITY CALLOUT: Target demographics (drivers, not "seniors" or "homeowners")
683
+ - "Drivers Over 50: Check Your Eligibility"
684
+ - "Safe Drivers: Check Your Rate"
685
+
686
+ 4. THE AUTHORITY TRANSFER: Government/institutional trust
687
+ - "State Program Cuts Insurance Costs"
688
+ - "Official: Safe Drivers Qualify For Reduced Rates"
689
+
690
+ 5. THE EMOTIONAL BENEFIT: Focus on outcomes
691
+ - "Protect What Matters Most"
692
+ - "Finally, Peace of Mind On The Road"
693
+ - "Drive Confident Knowing You're Covered\""""
694
  else:
695
  headline_formulas = """=== PROVEN WINNING HEADLINE FORMULAS (HOME INSURANCE) ===
696
 
 
705
 
706
  WITHOUT NUMBERS (use if no numbers section):
707
  1. THE ACCUSATION: Direct accusation about overpaying
708
+ - "OVERPAYING?"
709
  - "Still Underinsured?"
710
  - "Wasting Money On Insurance?"
711
 
 
843
  - CRITICAL: Use ONLY {framework_data.get('name', framework)} format - DO NOT mix with other formats
844
  - {f"If chat-style framework (e.g. iMessage, WhatsApp): Include 2-4 readable, coherent messages related to {niche.replace('_', ' ').title()}. Use the headline or a variation as one message." if 'chat_style' in framework_data.get('tags', []) else ""}
845
  - {f"If document-style framework (e.g. memo, email): Include readable, properly formatted text related to {niche.replace('_', ' ').title()}." if 'document_style' in framework_data.get('tags', []) else ""}
846
+ - FOR AUTO INSURANCE: Describe ONLY one of these ad-format layouts: official notification (seal, rate buttons), social post card, rate/seniors table, before/after split (price boxes + split car if any), coverage tier panels, car brand grid, gift card CTA, or savings/urgency (yellow, CONTACT US). Do NOT describe testimonial portraits, couples, speech bubbles, quote bubbles, or people holding documents. Do NOT describe elderly or senior people. Typography, layout, prices, and buttons only. All text in the image must be readable and correctly spelled (e.g. OVERPAYING not OVERDRPAYING); no gibberish.
847
+ - FOR HOME INSURANCE: Show person with document, savings proof, home setting. People 30-60, relatable homeowners.
848
+ - FOR GLP-1: Use VARIETY - show different visual types: quiz interfaces, doctor/medical settings, person on scale, mirror reflections, lifestyle moments, confidence scenes, testimonial portraits, celebrity references, or before/after (only when strategy calls for it). People aged 30-50, not elderly.
849
 
850
  === PSYCHOLOGICAL PRINCIPLES ===
851
  - Loss Aversion: Make them feel what they're losing/missing
 
929
  # Get color palette from visuals.py based on trigger/mood
930
  color_palette = get_color_palette(visual_mood.lower().replace(" ", "_").replace("-", "_"))
931
 
932
+ # Auto insurance ad-format graphics: allow headline + prices/rates/CTA as part of layout
933
+ is_auto_insurance_ad_format = niche == "auto_insurance"
934
+
935
  # Text styling options for variety - natural text in scene (NO overlays/banners)
936
  text_positions = [
937
  "naturally integrated into the scene",
 
952
  ]
953
  text_color = random.choice(text_colors)
954
 
955
+ # Niche-specific image guidance (for auto_insurance: no forced subjects/props; people and cars optional)
956
+ if niche == "auto_insurance":
957
+ niche_data = self._get_niche_data(niche)
958
+ niche_image_guidance = (niche_data.get("image_guidance", "") + """
959
+
960
+ PEOPLE, FACES, AND CARS ARE OPTIONAL. Only include them when the VISUAL SCENE description explicitly mentions them. Most ad formats are typography, layout, and buttons only.
961
+ NO fake or made-up brand/company names (no gibberish); use generic text only or omit. NO in-car dashboard mockups or screens inside car interiors; stick to the 8 defined ad formats only."""
962
+ )
963
+ elif niche_visual_guidance_data and isinstance(niche_visual_guidance_data, dict):
964
  niche_image_guidance = f"""
965
  NICHE REQUIREMENTS ({niche.replace("_", " ").title()}):
966
  SUBJECTS: {', '.join(niche_visual_guidance_data.get('subjects', []))}
 
1082
  === VISUAL SCENE ===
1083
  {image_brief}
1084
 
1085
+ {"=== AUTO INSURANCE AD GRAPHIC (rate card / comparison / CTA layout) ===" if is_auto_insurance_ad_format else ""}
1086
+ {"Follow the VISUAL SCENE description exactly. Use ONLY these defined formats: official notification, social post card, rate/seniors table, before/after split, coverage tier panels, car brand grid, gift card CTA, savings/urgency. Include headline, prices, rates, and CTA or button text as specified. Do NOT add people, faces, or cars unless the VISUAL SCENE explicitly asks for them. Do NOT create in-car dashboard mockups, screens inside car interiors, or headshots on displays. Do NOT include fake or made-up brand/company names (no gibberish like Alcata, MiCass, etc.); use generic text only (e.g. 'Compare Providers', 'See Rates') or omit brand names. Render as a clean, modern ad graphic with clear typography and layout." if is_auto_insurance_ad_format else ""}
 
 
 
 
 
 
 
 
1087
 
1088
+ {"=== PEOPLE, FACES, CARS: OPTIONAL ===\nOnly include people, faces, or vehicles if the VISUAL SCENE description specifically mentions them. Most auto insurance ad formats are typography and layout only - no people or cars needed." if is_auto_insurance_ad_format else "=== CRITICAL: PEOPLE AND FACES ===\nIf this image includes people or faces, they MUST look like real, original people with:\n- Photorealistic faces with natural skin texture, visible pores, and realistic skin imperfections\n- Natural facial asymmetry (no perfectly symmetrical faces)\n- Unique, individual facial features (not generic or model-like)\n- Natural expressions with authentic micro-expressions\n- Realistic skin tones with natural variations and undertones\n- Natural hair texture with individual strands\n- Faces that look like real photographs of real people, NOT AI-generated portraits\n- Avoid any faces that look synthetic, fake, or obviously computer-generated"}
1089
+
1090
+ {"- For this ad graphic layout, headline and price/rate text are part of the design; include them as specified in VISUAL SCENE." if is_auto_insurance_ad_format else "IMPORTANT: Do NOT display numbers, prices, dollar amounts, or savings figures in the image unless they naturally appear as part of the scene (like on a document someone is holding, or a sign in the background). Focus on the visual scene and people, not numerical information. Numbers should be in the ad copy, not the image."}
1091
 
1092
  === VISUAL SPECIFICATIONS ===
1093
+ STYLE: {visual_style} - {"clean modern ad graphic, professional layout" if is_auto_insurance_ad_format else "rendered in vintage documentary aesthetic"}
1094
+ MOOD: {visual_mood} - {"trustworthy, clear, high-contrast" if is_auto_insurance_ad_format else "nostalgic, authentic, trustworthy"}
1095
  CAMERA: {camera_angle} - documentary/candid feel
1096
  LIGHTING: {lighting} - natural, not studio-polished
1097
  COMPOSITION: {composition}
 
1105
  - Natural lighting variations
1106
  - Authentic imperfections (if they occur naturally)
1107
 
1108
+ {"=== AUTHENTICITY (only if image includes people/cars per VISUAL SCENE) ===\nIf you included people or vehicles, they should look realistic. Otherwise focus on layout and typography only." if is_auto_insurance_ad_format else """=== AUTHENTICITY REQUIREMENTS ===
1109
  PEOPLE (if present):
1110
  - Real people, NOT models
1111
+ - Age appropriate for niche (home insurance: 30-60 relatable homeowners; GLP-1: 30-50; auto insurance: only if format requires, avoid elderly/senior look)
1112
  - Everyday clothes (not styled)
1113
  - Natural expressions (not posed smiles)
1114
  - Relatable, trustworthy appearance
 
1138
  - Real-looking bills, statements, cards
1139
  - Visible numbers and text
1140
  - Red circles around key information
1141
+ - Slightly crumpled or worn"""}
1142
 
1143
  === NEGATIVE PROMPTS (AVOID) ===
1144
  - NO clean, modern, HD digital look
 
1165
  - NO decorative elements that frame the image
1166
  - NO news-style chyrons or tickers
1167
  - NO graphic design elements that look like they were added on top
1168
+ {"- NO numbers, prices, dollar amounts, or savings figures displayed prominently (except for auto insurance ad graphic layouts where they are part of the design)" if not is_auto_insurance_ad_format else "- For ad graphic layouts, numbers and prices are part of the design; ensure they are readable and correct"}
1169
+ {"- NO text overlays with numerical information" if not is_auto_insurance_ad_format else ""}
1170
+ {"- Focus on the ad layout: clear headline, prices/rates, and CTA as specified in VISUAL SCENE" if is_auto_insurance_ad_format else "- Focus on the natural scene only, no added presentation elements or numbers"}
1171
+ {"- NO fake, made-up, or gibberish brand or company names (e.g. no Alcata, MiCass, ECavelos); use only generic labels like 'Compare Providers' or omit" if is_auto_insurance_ad_format else ""}
1172
+ {"- NO in-car dashboard mockups, car interior screens, or displays inside vehicles; NO headshots or faces on screens" if is_auto_insurance_ad_format else ""}
1173
  - NO mixing multiple framework formats (e.g., NO WhatsApp + memo, NO iMessage + document)
1174
  - NO gibberish, placeholder text, or random characters in chat bubbles or documents
1175
  - NO "lorem ipsum", placeholder text, or meaningless character strings
 
1179
  - Text should appear ONCE only, not multiple times in the image
1180
 
1181
  === OUTPUT ===
1182
+ {"Create a scroll-stopping auto insurance ad graphic. Follow the VISUAL SCENE layout exactly: headline, rates/prices, and CTA or buttons as specified. Use only the 8 defined formats. No fake brand names; no in-car dashboard or screen mockups; no headshots on displays. Clean typography and layout only." if is_auto_insurance_ad_format else f"Create a scroll-stopping image that feels authentic and organic. {'Include the headline text ONCE as specified above - do NOT duplicate it.' if include_text_overlay else 'Focus on the visual scene without text.'} The image should feel like real content - NOT like a designed advertisement."}
1183
 
1184
  CRITICAL REQUIREMENTS:
1185
+ {"- Use only the defined ad format from VISUAL SCENE. No dashboard/screen-in-car mockups. No made-up brand names. Borders and buttons only where the format specifies." if is_auto_insurance_ad_format else "- NO decorative borders, frames, or boxes"}
1186
+ - NO banners, badges, or logos in corners (unless part of the described ad layout)
1187
+ {"- Buttons, rate cards, and panels as described in VISUAL SCENE are part of the design." if is_auto_insurance_ad_format else "- NO overlay boxes or rectangular overlays"}
1188
  - NO duplicate text - any text should appear ONLY ONCE
1189
  - NO repeating the same message in different formats
1190
+ {"- Focus on the ad layout and typography as described in VISUAL SCENE." if is_auto_insurance_ad_format else "- Focus on the natural, authentic scene only"}
1191
  - If text is included, show it in ONE location only, not multiple places"""
1192
 
1193
  # Refine and clean the prompt before sending (pass niche for demographic fixes)