// 1Radar v3 — mock data

const BRANDS_V3 = [
  {
    id: 'b1', name: 'Monarch Paris', handle: '@monarchparis', country: 'fr', verified: true,
    active: 24, total: 142, spend: 18420, ctr: 2.4, cpm: 12.4,
    fbPages: 2, avgFbLikes: 89400, salesLast30d: 142000,
    visitorsLast6m: [28000, 32000, 29000, 35000, 41000, 38000],
    topCountries: [{ c: 'fr', pct: 58 }, { c: 'us', pct: 24 }, { c: 'uk', pct: 10 }],
    products: [{ name: 'Silk Blazer', sales: 1240, revenue: 186000 }, { name: 'Trench Coat', sales: 980, revenue: 147000 }, { name: 'Linen Trousers', sales: 820, revenue: 82000 }],
    trustpilot: { score: 4.6, total: 1840 },
  },
  {
    id: 'b2', name: 'Glossier', handle: '@glossier', country: 'us', verified: true,
    active: 56, total: 412, spend: 84200, ctr: 3.1, cpm: 9.20,
    fbPages: 5, avgFbLikes: 412000, salesLast30d: 682000,
    visitorsLast6m: [142000, 158000, 134000, 176000, 210000, 198000],
    topCountries: [{ c: 'us', pct: 62 }, { c: 'uk', pct: 18 }, { c: 'fr', pct: 12 }],
    products: [{ name: 'Cloud Paint Blush', sales: 8420, revenue: 294700 }, { name: 'Stretch Concealer', sales: 6130, revenue: 183900 }, { name: 'Balm Dotcom', sales: 5240, revenue: 94320 }],
    trustpilot: { score: 4.2, total: 12400 },
  },
  {
    id: 'b3', name: 'Maison Margiela', handle: '@maisonmargiela', country: 'fr', verified: true,
    active: 12, total: 88, spend: 32100, ctr: 1.8, cpm: 17.6,
    fbPages: 3, avgFbLikes: 214000, salesLast30d: 264000,
    visitorsLast6m: [48000, 52000, 44000, 61000, 58000, 67000],
    topCountries: [{ c: 'fr', pct: 44 }, { c: 'de', pct: 28 }, { c: 'uk', pct: 16 }],
    products: [{ name: 'Tabi Boots', sales: 920, revenue: 460000 }, { name: 'Replica Fragrance', sales: 1840, revenue: 201600 }, { name: 'Glass Slip-On', sales: 640, revenue: 192000 }],
    trustpilot: { score: 4.1, total: 3210 },
  },
  {
    id: 'b4', name: 'Bobbi Brown', handle: '@bobbibrown', country: 'us', verified: true,
    active: 33, total: 220, spend: 41500, ctr: 2.6, cpm: 11.2,
    fbPages: 4, avgFbLikes: 186000, salesLast30d: 328000,
    visitorsLast6m: [68000, 74000, 62000, 82000, 91000, 84000],
    topCountries: [{ c: 'us', pct: 56 }, { c: 'uk', pct: 22 }, { c: 'fr', pct: 14 }],
    products: [{ name: 'Skin Foundation', sales: 3420, revenue: 215460 }, { name: 'Intensive Serum Foundation', sales: 2180, revenue: 163500 }, { name: 'Luxe Lip Color', sales: 4200, revenue: 104580 }],
    trustpilot: { score: 4.4, total: 6840 },
  },
  {
    id: 'b5', name: 'Sézane', handle: '@sezane', country: 'fr', verified: true,
    active: 19, total: 134, spend: 22800, ctr: 2.9, cpm: 10.8,
    fbPages: 2, avgFbLikes: 124000, salesLast30d: 186000,
    visitorsLast6m: [38000, 44000, 41000, 52000, 58000, 54000],
    topCountries: [{ c: 'fr', pct: 61 }, { c: 'us', pct: 20 }, { c: 'uk', pct: 12 }],
    products: [{ name: 'Breton Shirt', sales: 2840, revenue: 199600 }, { name: 'Brigitte Trousers', sales: 1620, revenue: 97200 }, { name: 'Appartement Bag', sales: 480, revenue: 115200 }],
    trustpilot: { score: 4.7, total: 8420 },
  },
  {
    id: 'b6', name: 'Aēsop', handle: '@aesopskincare', country: 'uk', verified: true,
    active: 8, total: 64, spend: 9420, ctr: 2.1, cpm: 14.5,
    fbPages: 2, avgFbLikes: 78400, salesLast30d: 76000,
    visitorsLast6m: [14000, 16000, 13000, 18000, 22000, 20000],
    topCountries: [{ c: 'uk', pct: 38 }, { c: 'us', pct: 32 }, { c: 'fr', pct: 18 }],
    products: [{ name: 'Resurrection Hand Balm', sales: 3240, revenue: 162000 }, { name: 'Geranium Leaf Cleanser', sales: 1820, revenue: 109200 }, { name: 'Parsley Seed Serum', sales: 840, revenue: 109200 }],
    trustpilot: { score: 4.5, total: 5840 },
  },
  {
    id: 'b7', name: 'Le Labo', handle: '@lelabofragrances', country: 'fr', verified: true,
    active: 5, total: 41, spend: 6800, ctr: 1.7, cpm: 19.8,
    fbPages: 1, avgFbLikes: 54200, salesLast30d: 54000,
    visitorsLast6m: [9000, 10000, 8000, 12000, 14000, 13000],
    topCountries: [{ c: 'fr', pct: 42 }, { c: 'us', pct: 30 }, { c: 'uk', pct: 16 }],
    products: [{ name: 'Santal 33', sales: 1240, revenue: 248000 }, { name: 'Rose 31', sales: 840, revenue: 168000 }, { name: 'Bergamote 22', sales: 620, revenue: 99200 }],
    trustpilot: { score: 4.8, total: 2410 },
  },
  {
    id: 'b8', name: 'Off-White', handle: '@off____white', country: 'us', verified: true,
    active: 41, total: 312, spend: 67200, ctr: 2.2, cpm: 13.4,
    fbPages: 4, avgFbLikes: 342000, salesLast30d: 542000,
    visitorsLast6m: [98000, 112000, 94000, 134000, 158000, 142000],
    topCountries: [{ c: 'us', pct: 48 }, { c: 'fr', pct: 26 }, { c: 'uk', pct: 16 }],
    products: [{ name: 'Arrow Industrial Belt', sales: 2840, revenue: 369200 }, { name: 'Odsy-1000 Sneaker', sales: 1240, revenue: 434000 }, { name: 'Wire Keychain', sales: 4820, revenue: 96400 }],
    trustpilot: { score: 3.9, total: 4200 },
  },
  {
    id: 'b9', name: 'Acne Studios', handle: '@acnestudios', country: 'de', verified: true,
    active: 17, total: 122, spend: 14200, ctr: 2.0, cpm: 12.9,
    fbPages: 3, avgFbLikes: 108000, salesLast30d: 114000,
    visitorsLast6m: [22000, 26000, 21000, 30000, 36000, 32000],
    topCountries: [{ c: 'de', pct: 35 }, { c: 'us', pct: 30 }, { c: 'uk', pct: 20 }],
    products: [{ name: 'Tote Bag', sales: 1840, revenue: 184000 }, { name: 'Mohair Sweater', sales: 620, revenue: 99200 }, { name: 'Baker Cap', sales: 2840, revenue: 113600 }],
    trustpilot: { score: 4.3, total: 3840 },
  },
];

const AD_THUMBS = [
  // pleasant gradients used as ad creative placeholders
  'linear-gradient(135deg,#FFB088,#D34A35)',
  'linear-gradient(160deg,#5DADE2,#1A5276)',
  'linear-gradient(135deg,#6EE7B7,#047857)',
  'linear-gradient(180deg,#1F2937,#0F172A)',
  'linear-gradient(135deg,#F472B6,#9D174D)',
  'linear-gradient(135deg,#FCD34D,#B45309)',
  'linear-gradient(180deg,#A78BFA,#312E81)',
  'linear-gradient(135deg,#FCA5A5,#7F1D1D)',
  'linear-gradient(160deg,#94A3B8,#1E293B)',
  'linear-gradient(135deg,#FBBF24,#92400E)',
  'linear-gradient(135deg,#67E8F9,#0E7490)',
  'linear-gradient(180deg,#F87171,#991B1B)',
];

// Meta ad anatomy — primary text (caption above), link headline, link
// description and CTA button, plus the long-form body kept for AI context.
const PRIMARY_TEXTS = [
  '🌿 Discover our new AW25 capsule — refined silhouettes built around quiet luxury. Each piece is crafted in small batches in our Paris atelier.',
  '⚡ Up to 40% off everything — but only for the next 12 hours. Bestsellers are flying off the shelves, don\'t wait.',
  '✨ The Founders\' Edit is back in stock. The pieces our team wears every day, hand-picked for the new season.',
  '👗 Behind the seams: how a single piece travels from sketch to your wardrobe. A 6-week journey, made transparent.',
  '🌸 A new fragrance, distilled in Grasse from white florals and warm vetiver. Subtle, confident, instantly recognizable.',
  '🚚 Free shipping on every order above 90€ — no code needed. Plus free returns, always.',
  '💬 Why our customers keep coming back: 4.8/5 from 12,000+ reviews. Quality you can feel from the first wear.',
  '🤝 A limited collaboration with three of our favorite makers. Only available this week, only here.',
  '🎯 Three ways to wear it: from desk to dinner. A versatile core piece your wardrobe has been missing.',
  '☀️ Late summer essentials, curated for the in-between season. Lightweight tailoring, soft knits, easy color.',
  '🧥 A capsule of 7 pieces designed for daily wear — mix-and-match for two weeks of effortless outfits.',
  '⏰ Last chance — sizes are running out. Once they\'re gone, they\'re gone for good.',
];

const HEADLINES = [
  'New AW25 Collection',
  '40% Off — 12h Left',
  'Founders\' Edit Restocked',
  'See How It\'s Made',
  'Discover the Fragrance',
  'Free Shipping Above 90€',
  'Loved by 12,000+ Clients',
  'Limited Collab — This Week',
  'Shop the Look',
  'Late Summer Essentials',
  'The 7-Piece Capsule',
  'Almost Sold Out',
];

const DESCRIPTIONS = [
  'Crafted in small batches in our Paris atelier · Free returns',
  'Bestsellers from 39€ · Free shipping above 90€',
  'Limited stock — once they\'re gone, they\'re gone',
  'A 6-week transparent journey, sketch to delivery',
  'White florals & warm vetiver · Distilled in Grasse',
  'No code needed · Free returns within 30 days',
  '4.8/5 from over 12,000 verified reviews',
  'Only this week, only here · Numbered editions',
  'From desk to dinner · Three styling ideas inside',
  'Lightweight tailoring & soft knits for the in-between',
  'Mix & match for two weeks of effortless outfits',
  'Sizes running out fast · Last chance to grab yours',
];

const CTAS = ['Shop Now', 'Learn More', 'Buy Now', 'Sign Up', 'Get Offer'];

const ADS_V3 = Array.from({ length: 36 }).map((_, i) => {
  const brand = BRANDS_V3[i % BRANDS_V3.length];
  const heights = [380, 460, 520, 340, 420, 580, 360, 440, 500, 400, 480, 520];
  const types = ['Image', 'Video', 'Carousel'];
  const platforms = ['meta', 'tiktok', 'instagram', 'youtube'];
  return {
    id: 'ad' + (i + 1),
    brand: brand.name,
    brandId: brand.id,
    handle: brand.handle,
    country: brand.country,
    primaryText: PRIMARY_TEXTS[i % PRIMARY_TEXTS.length],
    headline:    HEADLINES[i % HEADLINES.length],
    description: DESCRIPTIONS[i % DESCRIPTIONS.length],
    cta:         CTAS[i % CTAS.length],
    // Legacy fields kept for screens that still consume them (modal, mock).
    title: HEADLINES[i % HEADLINES.length],
    body:  PRIMARY_TEXTS[i % PRIMARY_TEXTS.length],
    type: types[i % 3],
    platform: platforms[i % 4],
    thumb: AD_THUMBS[i % AD_THUMBS.length],
    h: heights[i % heights.length],
    daysActive: 3 + (i * 7) % 90,
    estSpend: 1200 + ((i * 437) % 18000),
    reach: 12000 + ((i * 8741) % 880000),
    cpm: (4 + (i * 1.3) % 18).toFixed(2),
    ctr: (1 + (i * 0.4) % 5).toFixed(2),
    saved: i % 7 === 0,
    new: i % 5 === 0,
  };
});

const COUNTRIES = [
  { c: 'fr', name: 'France' },
  { c: 'us', name: 'United States' },
  { c: 'uk', name: 'United Kingdom' },
  { c: 'de', name: 'Germany' },
];

const PRODUCT_DATA_RAW = [
  { name: 'Silk Blazer',               brand: 'Monarch Paris',   brandId: 'b1', country: 'fr', category: 'Fashion',   price: 150, sales: 1240, revenue: 186000, rating: 4.6, reviews: 284,  daysListed: 45,  badge: 'Trending', description: 'Refined tailoring from our Paris atelier. Crafted in 100% silk for an effortless silhouette.' },
  { name: 'Trench Coat',               brand: 'Monarch Paris',   brandId: 'b1', country: 'fr', category: 'Fashion',   price: 280, sales: 980,  revenue: 147000, rating: 4.7, reviews: 198,  daysListed: 72,  badge: null,       description: 'The iconic trench, reimagined for the modern wardrobe. Waterproof canvas, tailored fit.' },
  { name: 'Linen Trousers',            brand: 'Monarch Paris',   brandId: 'b1', country: 'fr', category: 'Fashion',   price: 100, sales: 820,  revenue: 82000,  rating: 4.4, reviews: 156,  daysListed: 30,  badge: 'New',      description: 'Relaxed-fit trousers in breathable washed linen. Perfect for warm weather days.' },
  { name: 'Cloud Paint Blush',         brand: 'Glossier',        brandId: 'b2', country: 'us', category: 'Beauty',    price: 35,  sales: 8420, revenue: 294700, rating: 4.5, reviews: 3840, daysListed: 180, badge: 'Trending', description: 'Soft, blendable gel-cream blush that gives a natural, dewy flush of colour.' },
  { name: 'Stretch Concealer',         brand: 'Glossier',        brandId: 'b2', country: 'us', category: 'Beauty',    price: 30,  sales: 6130, revenue: 183900, rating: 4.3, reviews: 2410, daysListed: 120, badge: null,       description: 'Buildable coverage that moves with your skin. Available in 40 shades.' },
  { name: 'Balm Dotcom',               brand: 'Glossier',        brandId: 'b2', country: 'us', category: 'Beauty',    price: 18,  sales: 5240, revenue: 94320,  rating: 4.8, reviews: 5200, daysListed: 200, badge: null,       description: 'Universal skin salve for lips and skin. Original formula in 10 scents.' },
  { name: 'Tabi Boots',                brand: 'Maison Margiela', brandId: 'b3', country: 'fr', category: 'Fashion',   price: 500, sales: 920,  revenue: 460000, rating: 4.6, reviews: 420,  daysListed: 90,  badge: null,       description: 'The iconic split-toe silhouette. Chunky block heel, ankle-height, premium leather.' },
  { name: 'Replica Fragrance',         brand: 'Maison Margiela', brandId: 'b3', country: 'fr', category: 'Fragrance', price: 110, sales: 1840, revenue: 201600, rating: 4.7, reviews: 980,  daysListed: 150, badge: 'Trending', description: 'A collection of fragrances capturing a specific moment, place or memory.' },
  { name: 'Glass Slip-On',             brand: 'Maison Margiela', brandId: 'b3', country: 'fr', category: 'Fashion',   price: 300, sales: 640,  revenue: 192000, rating: 4.4, reviews: 310,  daysListed: 60,  badge: null,       description: 'Transparent upper sneaker with anatomical sole. An instant collector\'s piece.' },
  { name: 'Skin Foundation',           brand: 'Bobbi Brown',     brandId: 'b4', country: 'us', category: 'Beauty',    price: 63,  sales: 3420, revenue: 215460, rating: 4.5, reviews: 1840, daysListed: 200, badge: null,       description: 'Weightless, natural-finish foundation with buildable coverage for all skin types.' },
  { name: 'Intensive Serum Foundation',brand: 'Bobbi Brown',     brandId: 'b4', country: 'us', category: 'Beauty',    price: 75,  sales: 2180, revenue: 163500, rating: 4.6, reviews: 920,  daysListed: 80,  badge: 'New',      description: 'Skin-care powered foundation with hyaluronic acid for a healthy, luminous finish.' },
  { name: 'Luxe Lip Color',            brand: 'Bobbi Brown',     brandId: 'b4', country: 'us', category: 'Beauty',    price: 25,  sales: 4200, revenue: 104580, rating: 4.4, reviews: 2100, daysListed: 160, badge: null,       description: 'Rich, creamy lip colour in 35 shades. Long-wearing formula with vitamin E.' },
  { name: 'Breton Shirt',              brand: 'Sézane',          brandId: 'b5', country: 'fr', category: 'Fashion',   price: 70,  sales: 2840, revenue: 199600, rating: 4.8, reviews: 1620, daysListed: 110, badge: 'Trending', description: 'The signature Breton stripe in 100% cotton. Relaxed fit, authentic nautical spirit.' },
  { name: 'Brigitte Trousers',         brand: 'Sézane',          brandId: 'b5', country: 'fr', category: 'Fashion',   price: 60,  sales: 1620, revenue: 97200,  rating: 4.6, reviews: 840,  daysListed: 90,  badge: null,       description: 'Wide-leg trousers with high-rise waist. Fluid fabric for effortless French style.' },
  { name: 'Appartement Bag',           brand: 'Sézane',          brandId: 'b5', country: 'fr', category: 'Fashion',   price: 240, sales: 480,  revenue: 115200, rating: 4.9, reviews: 320,  daysListed: 55,  badge: 'Sale',     description: 'Structured tote in premium leather. The perfect day-to-night Parisian bag.' },
  { name: 'Resurrection Hand Balm',    brand: 'Aēsop',           brandId: 'b6', country: 'uk', category: 'Beauty',    price: 50,  sales: 3240, revenue: 162000, rating: 4.7, reviews: 2840, daysListed: 300, badge: null,       description: 'Intensely nourishing hand balm with a distinctive botanical fragrance. A cult classic.' },
  { name: 'Geranium Leaf Cleanser',    brand: 'Aēsop',           brandId: 'b6', country: 'uk', category: 'Beauty',    price: 60,  sales: 1820, revenue: 109200, rating: 4.5, reviews: 940,  daysListed: 220, badge: null,       description: 'Gentle, sulfate-free cleanser with geranium leaf and bergamot rind.' },
  { name: 'Parsley Seed Serum',        brand: 'Aēsop',           brandId: 'b6', country: 'uk', category: 'Beauty',    price: 130, sales: 840,  revenue: 109200, rating: 4.8, reviews: 620,  daysListed: 180, badge: 'Trending', description: 'Antioxidant-rich serum that addresses signs of ageing. Parsley seed and botanical extracts.' },
  { name: 'Santal 33',                 brand: 'Le Labo',         brandId: 'b7', country: 'fr', category: 'Fragrance', price: 200, sales: 1240, revenue: 248000, rating: 4.9, reviews: 1840, daysListed: 400, badge: null,       description: 'The iconic woody scent with sandalwood, cedarwood and cardamom. Defines a generation.' },
  { name: 'Rose 31',                   brand: 'Le Labo',         brandId: 'b7', country: 'fr', category: 'Fragrance', price: 200, sales: 840,  revenue: 168000, rating: 4.7, reviews: 920,  daysListed: 350, badge: null,       description: 'A bold, genderless rose softened with cumin and musk. Complex and deeply personal.' },
  { name: 'Bergamote 22',              brand: 'Le Labo',         brandId: 'b7', country: 'fr', category: 'Fragrance', price: 160, sales: 620,  revenue: 99200,  rating: 4.6, reviews: 580,  daysListed: 280, badge: 'Sale',     description: 'Fresh citrus opening with a warm musk base. Perfect for the warm season.' },
  { name: 'Arrow Industrial Belt',     brand: 'Off-White',       brandId: 'b8', country: 'us', category: 'Fashion',   price: 130, sales: 2840, revenue: 369200, rating: 4.3, reviews: 1240, daysListed: 120, badge: null,       description: 'The signature industrial belt with embossed logo. Adjustable, chunky yellow hardware.' },
  { name: 'Odsy-1000 Sneaker',         brand: 'Off-White',       brandId: 'b8', country: 'us', category: 'Fashion',   price: 350, sales: 1240, revenue: 434000, rating: 4.4, reviews: 680,  daysListed: 90,  badge: 'New',      description: 'Chunky dad sneaker with signature arrow detailing. Oversized sole, premium materials.' },
  { name: 'Wire Keychain',             brand: 'Off-White',       brandId: 'b8', country: 'us', category: 'Fashion',   price: 20,  sales: 4820, revenue: 96400,  rating: 4.2, reviews: 2100, daysListed: 200, badge: null,       description: 'Industrial cable keychain with zip-tie closure and metal logo tag.' },
  { name: 'Tote Bag',                  brand: 'Acne Studios',    brandId: 'b9', country: 'de', category: 'Fashion',   price: 100, sales: 1840, revenue: 184000, rating: 4.6, reviews: 820,  daysListed: 70,  badge: null,       description: 'The new-season canvas tote with embossed logo. Spacious, structured, everyday-ready.' },
  { name: 'Mohair Sweater',            brand: 'Acne Studios',    brandId: 'b9', country: 'de', category: 'Fashion',   price: 160, sales: 620,  revenue: 99200,  rating: 4.7, reviews: 280,  daysListed: 40,  badge: 'New',      description: 'Oversized mohair-blend sweater in a seasonal colour palette. Soft and cosy.' },
  { name: 'Baker Cap',                 brand: 'Acne Studios',    brandId: 'b9', country: 'de', category: 'Fashion',   price: 40,  sales: 2840, revenue: 113600, rating: 4.5, reviews: 1240, daysListed: 100, badge: null,       description: 'Classic baker boy cap in organic cotton twill. Adjustable fit, logo pin.' },
  { name: 'Boy Brow',                  brand: 'Glossier',        brandId: 'b2', country: 'us', category: 'Beauty',    price: 22,  sales: 9200, revenue: 202400, rating: 4.8, reviews: 6200, daysListed: 250, badge: 'Trending', description: 'Grooming pomade that thickens, shapes and fills brows. The best-selling brow product.' },
  { name: 'Priming Moisturizer',       brand: 'Glossier',        brandId: 'b2', country: 'us', category: 'Beauty',    price: 35,  sales: 4800, revenue: 168000, rating: 4.6, reviews: 3200, daysListed: 180, badge: null,       description: 'Hydrating moisturizer that preps and smooths skin. Lightweight gel formula.' },
  { name: 'Tabi Ballerinas',           brand: 'Maison Margiela', brandId: 'b3', country: 'fr', category: 'Fashion',   price: 650, sales: 480,  revenue: 312000, rating: 4.8, reviews: 240,  daysListed: 60,  badge: null,       description: 'The split-toe ballet flat in smooth leather. Utterly refined and instantly recognizable.' },
  { name: 'Skin Foundation SPF',       brand: 'Bobbi Brown',     brandId: 'b4', country: 'us', category: 'Beauty',    price: 68,  sales: 2800, revenue: 190400, rating: 4.4, reviews: 1600, daysListed: 90,  badge: 'New',      description: 'Natural finish foundation with SPF 25 sun protection built in.' },
  { name: 'Capitaine Shirt',           brand: 'Sézane',          brandId: 'b5', country: 'fr', category: 'Fashion',   price: 85,  sales: 1980, revenue: 168300, rating: 4.7, reviews: 1020, daysListed: 65,  badge: null,       description: 'Classic cotton poplin shirt with subtle nautical details. Easy and effortlessly chic.' },
  { name: 'Hair Serum',                brand: 'Aēsop',           brandId: 'b6', country: 'uk', category: 'Beauty',    price: 88,  sales: 1240, revenue: 109120, rating: 4.6, reviews: 680,  daysListed: 140, badge: null,       description: 'Leave-in treatment that imparts gloss and tames unruly hair. Rosemary and ylang ylang.' },
  { name: 'Another 13',               brand: 'Le Labo',         brandId: 'b7', country: 'fr', category: 'Fragrance', price: 185, sales: 740,  revenue: 136900, rating: 4.8, reviews: 620,  daysListed: 320, badge: null,       description: 'A musky, animalic scent. Warm and addictive, created in collaboration with Another Magazine.' },
  { name: 'Zip Hoodie',               brand: 'Off-White',       brandId: 'b8', country: 'us', category: 'Fashion',   price: 220, sales: 1820, revenue: 400400, rating: 4.3, reviews: 840,  daysListed: 75,  badge: null,       description: 'Cotton zip-up hoodie with embossed logo graphic. A streetwear essential.' },
  { name: 'Face Scarf',               brand: 'Acne Studios',    brandId: 'b9', country: 'de', category: 'Fashion',   price: 180, sales: 1040, revenue: 187200, rating: 4.7, reviews: 480,  daysListed: 50,  badge: 'New',      description: 'Oversized wool scarf with the signature face patch. A brand icon reimagined each season.' },
];

const PRODUCT_HEIGHTS = [320, 380, 340, 400, 360, 420, 300, 380, 350, 410, 340, 390];

const PRODUCTS_V3 = PRODUCT_DATA_RAW.map((p, i) => ({
  ...p,
  id: 'prod' + (i + 1),
  thumb: AD_THUMBS[i % AD_THUMBS.length],
  h: PRODUCT_HEIGHTS[i % PRODUCT_HEIGHTS.length],
}));

const NAV_V3 = [
  { group: 'main', items: [
    { id: 'home',     label: 'Home',           icon: 'home' },
    { id: 'explore',  label: 'Explore Ads',    icon: 'compass' },
    { id: 'products', label: 'Products',       icon: 'shop' },
    { id: 'shopify',  label: 'Shopify',        icon: 'shop' },
    { id: 'brands',   label: 'Brands',         icon: 'building' },
    { id: 'saved',    label: 'Saved Ads',      icon: 'bookmark' },
  ]},
  { group: 'ai', items: [
    { id: 'chat',       label: 'AI Chat',         icon: 'sparkles' },
    { id: 'image',      label: 'AI Image',        icon: 'image-ai' },
    { id: 'video',      label: 'AI Video',        icon: 'video' },
    { id: 'transcribe', label: 'Transcribe',      icon: 'mic' },
    { id: 'workflow',    label: 'Workflow',        icon: 'workflow' },
    { id: 'whiteboard', label: 'Whiteboard',      icon: 'frame' },
    { id: 'canvas',       label: 'Canvas',          icon: 'shape-rect' },
    { id: 'videoeditor', label: 'Video Editor',   icon: 'scissors' },
    { id: 'tools',       label: 'Tools',           icon: 'tools' },
  ]},
  { group: 'foot', items: [
    { id: 'affiliate', label: 'Affiliate',  icon: 'gift' },
    { id: 'account',   label: 'Account',    icon: 'user' },
    { id: 'help',      label: 'Help',       icon: 'help' },
  ]},
];

// Swipe-file folders shown in the SavedV3 sidebar AND in the Save-to-folder
// popover triggered from any AdCard. Excludes the special "all" and "trash"
// rows when used as a save target. parentId links a folder to its parent for
// infinite nesting — omit (or null) for root-level folders.
const SAVE_FOLDERS_V3 = [
  { id: 'all',            name: 'All saved',          icon: 'bookmark',  count: 142, system: true },
  { id: 'inspo',          name: 'Inspiration',        icon: 'sparkles',  count: 62,  color: '#FFB35B' },
  { id: 'inspo-video',    name: 'Video inspo',        icon: 'play',      count: 14,  color: '#FFB35B', parentId: 'inspo' },
  { id: 'inspo-static',   name: 'Static inspo',       icon: 'image',     count: 48,  color: '#FFB35B', parentId: 'inspo' },
  { id: 'q4',             name: 'Q4 campaign refs',   icon: 'folder',    count: 36,  color: '#5B7BFF' },
  { id: 'q4-hooks',       name: 'Hooks',              icon: 'flame',     count: 11,  color: '#5B7BFF', parentId: 'q4' },
  { id: 'q4-hooks-ugc',   name: 'UGC hooks',          icon: 'user',      count: 4,   color: '#5B7BFF', parentId: 'q4-hooks' },
  { id: 'q4-ctas',        name: 'CTAs',               icon: 'flag',      count: 25,  color: '#5B7BFF', parentId: 'q4' },
  { id: 'video',          name: 'Video hooks',        icon: 'play',      count: 31,  color: '#E5484D' },
  { id: 'ugc',            name: 'UGC examples',       icon: 'user',      count: 18,  color: '#10B981' },
  { id: 'static',         name: 'Static creatives',   icon: 'image',     count: 19,  color: '#7B5BFF' },
  { id: 'trash',          name: 'Trash',              icon: 'trash',     count: 12,  system: true },
];

Object.assign(window, { BRANDS_V3, ADS_V3, AD_THUMBS, PRODUCTS_V3, COUNTRIES, NAV_V3, SAVE_FOLDERS_V3 });
