/* ============================================================
   DATA — product, bundles, content
   ============================================================ */
/* Expose React hooks globally for all babel scripts (one place only) */
Object.assign(window, React);

const PRODUCT = {
  name: "Mye Vegan Caviar",
  signature: "Mye Noir",
  signatureSub: "Seaweed Caviar · 50g",
  house: "Maison Mye",
  tagline: "Seaweed pearls · 50g tin",
  basePrice: 29,
  compareAt: null, // no fake sale pricing by default
  rating: 4.8,
  reviewCount: 137,
  ingredients: ["Seaweed extract (83%)","Water","Salt","Spices","Citric acid","Xanthan gum","Potassium sorbate","Sodium benzoate","Vegetable carbon"],
  storage: "Store in a cool, dry place. Once opened, keep refrigerated and use within 3 months.",
};

/* ---------------------------------------------------------------
   PRICING & OFFERS — designed with behavioural economics
   ---------------------------------------------------------------
   · Anchor: single tin at £29 sets the per-unit reference price.
   · Whole-pound pricing reads as "premium", not "discount".
   · Decoy (asymmetric dominance): "The Trio" (3 tins, £87 = 3×£29, NO
     saving) is dominated on price-per-tin by BOTH the 2-pack (£27.50/tin)
     and the 4-pack (£24/tin). Its only job is to make "The Maison"
     (4 tins, +£9 over the Trio for a whole extra tin worth £29) feel like
     an obvious no-brainer, lifting average order value.
   · Default selection = "The Soirée" (centre option + social proof).
   · Free-gift threshold (mother-of-pearl spoon, £55) pulls toward the
     two larger packs; free-shipping threshold (£25) pulls 1→2.
   --------------------------------------------------------------- */
const TIN_PRICE = 29;                 // anchor / per-unit reference
const SERVINGS_PER_TIN = 14;          // realistic canapés per 50g tin (~3.5g each)
const SPOON_GIFT_THRESHOLD = 85;      // free mother-of-pearl spoon
const TRAD_CAVIAR_LOW = 60;           // anchor vs traditional fish caviar (50g)

const BUNDLES = [
  { id:"single", name:"The Tasting", tins:1, price:29, compare:null,
    badge:null, blurb:"A first encounter — one tin for an intimate plate or two.",
    use:"First pour · quiet dinners" },
  { id:"duo", name:"The Soirée", tins:2, price:55, compare:58,
    badge:"Most Loved", blurb:"The hosting tin — enough for a full board of canapés and then some.",
    use:"Hosting · canapés & sushi" },
  { id:"trio", name:"The Trio", tins:3, price:87, compare:87, decoy:true,
    badge:null, blurb:"Three tins for a slightly longer table.",
    use:"Bigger boards · weekend hosting" },
  { id:"host", name:"The Maison", tins:4, price:96, compare:116,
    badge:"Best Value", blurb:"Four tins at our lowest price per tin — for the seasoned host and gifting.",
    use:"Events · gifting · the well-stocked larder" },
];
const perTin = (b)=> b.price / b.tins;
const perServing = (b)=> b.price / (b.tins * SERVINGS_PER_TIN);

/* The collection in waiting — luxury-named upcoming products */
const UPCOMING = [
  { id:"dore", name:"Mye Doré", sub:"Champagne Pearls", pearl:"gold",
    note:"Citrus-kissed seaweed pearls with a golden shimmer — built for celebration.", eta:"Winter 2026" },
  { id:"truffe", name:"Mye Truffe", sub:"Black Truffle Pearls", pearl:"truffle",
    note:"Earthy, decadent pearls infused with black truffle for cold-weather tables.", eta:"Winter 2026" },
  { id:"yuzu", name:"Mye Yuzu", sub:"Yuzu Pearls", pearl:"yuzu",
    note:"Bright, zesty pearls with a clean citrus lift — made for sushi and raw plates.", eta:"Spring 2027" },
  { id:"coffret", name:"Le Coffret", sub:"The Caviar Service", pearl:"set",
    note:"A gift box with a mother-of-pearl spoon, blini kit and a tin of Mye Noir.", eta:"Winter 2026" },
];

/* Occasions / pairings — sell the moment, not the seaweed */
const OCCASIONS = [
  { k:"The dinner party", v:"A board of blinis, a chilled bottle, a spoon of Mye. The starter that sets the tone.", scene:"scene-table" },
  { k:"The celebration", v:"Birthdays, anniversaries, the promotion. Caviar makes any night feel like an occasion.", scene:"scene-champ" },
  { k:"The quiet luxury", v:"A Tuesday that deserves better. Toast, soured cream, pearls — dinner for one, elevated.", scene:"scene-canape" },
  { k:"The gift", v:"For the host who has everything, the foodie, the vegan in your life who misses the theatre.", scene:"scene-portrait" },
];

const USE_CASES = [
  { id:"blini", img:"blinis", label:"BLINIS & CRÈME", title:"On blinis", copy:"The classic canapé pairing, reimagined plant-based with vegan crème fraîche and dill." },
  { id:"sushi", img:"sushi", label:"NIGIRI & MAKI", title:"On sushi", copy:"A rich ocean finish for nigiri, rolls, hand rolls and small plates." },
  { id:"champ", img:"champagne", label:"CELEBRATION", title:"With champagne", copy:"Built for celebrations, hosting and quietly elegant nights in." },
  { id:"tin", img:"tin", label:"FROM THE TIN", title:"From the tin", copy:"No prep, no fuss — chilled and ready to serve with a mother-of-pearl spoon." },
];

const TASTE = [
  { k:"Flavour", v:"Briny · oceanic · savoury" },
  { k:"Texture", v:"Delicate pearls · gentle pop" },
  { k:"Finish", v:"Clean · never overpowering" },
  { k:"Serve", v:"Chilled, straight from the tin" },
];

const COMPARE = [
  ["Main ingredient","Seaweed-based","Sturgeon fish roe"],
  ["Plant-based","Yes","No"],
  ["Price","From £29 / 50g tin","Often £60–£150 / 50g"],
  ["Fish involved","None","Animal-derived"],
  ["Storage","Cool & dry, then chill","Kept refrigerated"],
  ["Best for","Canapés · sushi · blinis · champagne","Canapés · blinis · fine dining"],
];

const FAQS = [
  { q:"What is Mye Vegan Caviar made from?", a:"Mye is a seaweed-based caviar alternative. The pearls are made primarily from seaweed extract (83%), with water, salt, spices, citric acid, xanthan gum, two preservatives and vegetable carbon for colour. No fish roe, no animal products." },
  { q:"Does it taste like real caviar?", a:"Mye is inspired by the caviar experience rather than an identical copy. Expect a clean, briny, oceanic and savoury flavour with a delicate pearl pop — designed to bring the same visual luxury and finish to the plate, without any fish." },
  { q:"Is it 100% vegan?", a:"Yes — Mye is made without fish roe or animal products. If you have specific dietary needs, please check the full ingredient and allergen panel before serving." },
  { q:"How should I serve it?", a:"Straight from the tin, chilled. It's beautiful on blinis with vegan crème fraîche, over sushi and maki, on potato or cucumber canapés, with crackers or crisps, and alongside champagne. Best used as a finishing garnish rather than cooked." },
  { q:"How many servings are in one 50g tin?", a:"As a rough guide, one 50g tin tops around 12–15 small canapés (roughly a 3–4g spoon each), or serves 2–3 people generously as a starter. Caviar disappears faster than you'd think once the blinis and champagne are out — if in doubt, size up." },
  { q:"Does it need to be refrigerated?", a:"Store unopened in a cool, dry place. Once opened, keep it refrigerated and use within 3 months." },
  { q:"Is it suitable for people with allergies?", a:"Allergen information: [Add confirmed allergen and cross-contamination statement here.] We never publish allergen claims that haven't been confirmed against the product label." },
  { q:"Where do you deliver, and how fast?", a:"We ship across the UK. Free standard UK delivery is available on selected orders, typically arriving in 2–4 business days. Order by 2pm for same-day dispatch on weekdays." },
  { q:"What if my order arrives damaged?", a:"Email us within 48 hours with a photo and we'll arrange a replacement or full refund — no fuss." },
  { q:"Can restaurants or caterers order in bulk?", a:"Yes. We supply restaurants, supper clubs, caterers and event teams with trade pricing and samples. Request trade pricing from our Wholesale page." },
];

const REVIEWS = [
  { name:"Eleanor R.", loc:"Bath", rating:5, tag:"Hosting", title:"My guests genuinely gasped", body:"Served it on little blinis with vegan crème fraîche for a birthday dinner. It looked like something off a tasting menu and disappeared in minutes.", scene:"scene-blini" },
  { name:"Marcus T.", loc:"London", rating:5, tag:"Sushi", title:"Brilliant on homemade maki", body:"Clean, briny, lovely pop. We topped avocado rolls and it added exactly the finish I wanted without any fishiness.", scene:"scene-sushi" },
  { name:"Priya N.", loc:"Manchester", rating:4, tag:"Vegan", title:"Finally, caviar energy at a vegan table", body:"As a long-time vegan I've missed this whole category. Mye is elegant and the tin looks gorgeous on the table.", scene:"scene-champ" },
  { name:"Sofia L.", loc:"Edinburgh", rating:5, tag:"Canapés", title:"The easiest upgrade I've found", body:"New potatoes, a dot of vegan soured cream, a spoon of Mye. Three ingredients, looks like I hired a chef.", scene:"scene-canape" },
  { name:"James W.", loc:"Bristol", rating:5, tag:"Hosting", title:"Dinner party hero", body:"Bought the Dinner Party Pack and used both tins across a six-person evening. Will absolutely reorder before Christmas.", scene:"scene-table" },
  { name:"Aisha K.", loc:"Leeds", rating:4, tag:"Foodie", title:"Beautiful texture", body:"The pearls actually pop. Lovely against something creamy. A little goes a long way so the tin stretched further than expected.", scene:"scene-portrait" },
];

const RECIPES = [
  { id:"blinis", img:"rBlinis", time:"20 min", level:"Easy", serves:"Makes 24", tins:1, title:"Vegan caviar blinis",
    desc:"Fluffy mini blinis, vegan crème fraîche, dill and a generous spoon of Mye Noir.",
    intro:"The dish that started it all. Warm, pillowy blinis crowned with cool vegan crème fraîche and a glossy spoon of Mye Noir — the canapé that makes a room go quiet.",
    ingredients:["24 mini blinis (shop-bought or homemade)","150g vegan crème fraîche or thick cashew cream","1 tin Mye Noir (50g)","2 tbsp finely chopped chives","1 lemon, zested","Cracked black pepper"],
    method:["Warm the blinis gently in a low oven (or a dry pan) until just heated through — never hot, or they'll melt the crème.","Spoon or pipe a small mound of vegan crème fraîche onto each blini.","Using a mother-of-pearl or plastic spoon, place a generous pearl of Mye Noir on top. Avoid metal, which can dull the flavour.","Finish with a pinch of chives, a little lemon zest and a crack of pepper. Serve immediately, chilled."],
    tip:"Assemble within 10 minutes of serving so the blinis stay soft and the pearls stay glossy. One 50g tin comfortably tops ~24 canapés.",
    pairing:"A cold glass of brut champagne or a crisp dry English sparkling." },

  { id:"sushi", img:"sushi", time:"40 min", level:"Medium", serves:"Makes 32", tins:1, title:"Avocado maki, crowned with Mye",
    desc:"Simple avocado and cucumber rolls finished with a crown of seaweed pearls.",
    intro:"Plant-based maki given the full omakase treatment. Creamy avocado, crisp cucumber and a ridge of Mye Noir for that clean ocean finish — no fish required.",
    ingredients:["300g sushi rice, cooked & seasoned","4 nori sheets","1 ripe avocado, sliced","½ cucumber, julienned","1 tin Mye Noir (50g)","Soy sauce, to serve","Pickled ginger & wasabi, to serve"],
    method:["Lay a nori sheet on a bamboo mat, shiny side down. Spread a thin, even layer of seasoned rice, leaving a 2cm border at the top.","Arrange avocado and cucumber in a line across the rice. Roll tightly using the mat, sealing the border with a dab of water.","With a sharp, wet knife, slice each roll into 8 even pieces.","Top each piece with a small spoon of Mye Noir. Serve with soy, ginger and wasabi."],
    tip:"Keep your knife wet between cuts for clean edges. Add the pearls just before serving so they sit proud and glossy on top.",
    pairing:"Chilled sake, or a dry junmai if you want to lean into the ritual." },

  { id:"potato", img:"rPotato", time:"25 min", level:"Easy", serves:"Makes 20", tins:1, title:"New potato caviar bites",
    desc:"Baby potatoes, vegan soured cream, dill and Mye — the three-ingredient showstopper.",
    intro:"Possibly the highest ratio of 'looks expensive' to 'effort required' in the entire repertoire. Warm baby potatoes, a swirl of soured cream, and Mye Noir doing the heavy lifting.",
    ingredients:["20 baby new potatoes","150g vegan soured cream","1 tin Mye Noir (50g)","Fresh dill fronds","1 lemon, zested","Sea salt & olive oil"],
    method:["Boil the potatoes in salted water until just tender, 12–15 minutes. Drain and cool slightly.","Halve each potato and trim the base so it sits flat. Season the cut side with a little salt and olive oil.","Pipe or spoon a swirl of vegan soured cream onto each half.","Top with a spoon of Mye Noir, a frond of dill and a little lemon zest. Serve just warm."],
    tip:"Choose potatoes roughly the same size so they cook evenly and look uniform on the board. Serve slightly warm against the cool pearls for contrast.",
    pairing:"A buttery vegan Chardonnay or a dirty martini for the full effect." },

  { id:"cucumber", img:"rCucumber", time:"15 min", level:"Easy", serves:"Makes 18", tins:1, title:"Cucumber & cashew cups",
    desc:"Crisp cucumber rounds, whipped cashew, lemon zest and a pearl crown.",
    intro:"Cool, crunchy and completely raw — the lightest, freshest way to serve Mye. Thick cucumber rounds hollowed into little cups, filled with whipped cashew and a generous pearl crown.",
    ingredients:["2 large cucumbers","200g cashews, soaked & blended (or vegan cream cheese)","1 tin Mye Noir (50g)","1 lemon, zested + a squeeze of juice","Micro herbs or dill","Sea salt"],
    method:["Blend soaked cashews with lemon juice, a splash of water and a pinch of salt until smooth and thick. Chill.","Cut the cucumbers into 3cm rounds. Scoop a small well in the top of each with a teaspoon.","Pipe the whipped cashew into each cup.","Top with Mye Noir, a little lemon zest and a micro herb. Serve cold."],
    tip:"Salt the cucumber cups and drain on kitchen paper for 5 minutes first — it keeps them crisp and stops the filling sliding.",
    pairing:"A clean, herbaceous gin & tonic or a chilled Picpoul." },

  { id:"champ", img:"rChamp", time:"10 min", level:"Easy", serves:"For 6", tins:2, title:"The champagne & Mye board",
    desc:"How to build a celebration board around a chilled tin and a cold bottle.",
    intro:"Not so much a recipe as a blueprint for a very good evening. A chilled tin of Mye Noir at the centre, the right things around it, and a cold bottle within arm's reach.",
    ingredients:["2 tins Mye Noir (50g), well chilled","Mini blinis & crisp crackers","Vegan crème fraîche","Cornichons, capers & shallots","Lemon wedges & fresh dill","1 bottle of brut champagne or English sparkling"],
    method:["Set the unopened tins in a small bowl of ice to keep them cold on the board.","Arrange blinis and crackers in a loose fan, with little bowls of crème fraîche, cornichons, capers and finely diced shallot.","Add lemon wedges and dill for colour and lift.","Open the tins at the table — the reveal is half the theatre. Provide a mother-of-pearl spoon and let guests build their own."],
    tip:"Allow roughly one 50g tin per 3–4 guests as a starter. Two tins is the sweet spot for a dinner party of six.",
    pairing:"Brut champagne is classic; a dry English sparkling or a cold fino sherry both sing too." },

  { id:"guest", img:"blinis", time:"Guide", level:"Hosting", serves:"Calculator", tins:0, title:"How much caviar per guest?",
    desc:"A simple hosting calculator — tells you how many tins you need for your table.",
    intro:"The question every host asks. Tell us how many guests you're feeding and how generous you're feeling, and we'll do the maths.",
    calculator:true,
    ingredients:[],
    method:[],
    tip:"As a rule of thumb: a 50g tin tops around 12–15 small canapés (a 3–4g spoon each), or serves 2–3 people generously as a starter.",
    pairing:"Whatever's cold." },
];

Object.assign(window, { PRODUCT, BUNDLES, UPCOMING, OCCASIONS, USE_CASES, TASTE, COMPARE, FAQS, REVIEWS, RECIPES,
  TIN_PRICE, SERVINGS_PER_TIN, SPOON_GIFT_THRESHOLD, TRAD_CAVIAR_LOW, perTin, perServing });
