// Dolce Sorrento — sito 2026–2027 (componente unico, IT/EN). Dati: Catalogo 2026–2027.
import { useEffect, useState, useRef } from "react"
import { addPropertyControls, ControlType } from "framer"
const FU = "https://framerusercontent.com/images/"
const IDS: Record<string, string> = {"trad-delizia-limone":"2ZfkG5OsPnERWxyUaIl3V92cMGs","trad-delizia-tiramisu":"FSdanbjLQl238cmbxXLQfS3INsI","trad-delizia-pistacchio":"GCOHK33k13MAO9HcrbYidt7mM","trad-ricotta-pera":"70SoXdPpSY0Dsh6c31nDKEdOLn8","trad-ricotta-cioccolato":"YuphDb6uT1zzkkPJUNa8k16M3bw","trad-ricotta-pistacchio":"RjYUPr1kgKF5sDnoUD6AV7dEI","trad-capresina-cioccolato":"RkMBgksfah6DdMdIXp7f1hH8nQ","trad-capresina-limone":"WbnqjyQbk9VTMHrsiBX23eRnhA","torta-ricotta-pera":"fCbNkPBu7NIf0nGisnaS8udHEc","torta-ricotta-cioccolato":"eDuWPbmy38YkJQozClPfCk4R5U","torta-ricotta-pistacchio":"vjeJ6KOcAVHJCilw341wvRVNAo","torta-caprese":"SnIKgpvnWfHdmFiDw9ua6efKkc","torta-caprese-limone":"jlTRjNY8mOlWwzMMRwRpaIbDhI","gf-delizia-limone":"3nfmD035iMQ0zlZCsLzDmRjy2s","gf-delizia-tiramisu":"nvnPm0kckGFEU6czIuzMmbKVw","gf-delizia-pistacchio":"DkXLPsXFwwKNEfs2rkYg1Zictm4","gf-ricotta-pera":"XxcQ4Z1wyFmkuPDaiejicbETXH8","gf-ricotta-cioccolato":"55VY0mZDv7PIswObdhgwN7Exc","gf-ricotta-pistacchio":"RjYUPr1kgKF5sDnoUD6AV7dEI","gf-capresina-limone":"WbnqjyQbk9VTMHrsiBX23eRnhA","gf-capresina-cioccolato":"RkMBgksfah6DdMdIXp7f1hH8nQ","gf-mousse-caramello":"wrRko1UqmPKBjv3ZhFd5yzv1Q","gf-mousse-tiramisu":"Gvz7JPfMFtc5YnrSe3mIsSQHeEM","gf-mousse-pistacchio":"T9z9AUEjojysBWrrrZ7lxqAbDNM","x-donna-delizia":"Y0oCFJ0YPClqvQA5MoAs9aINaY","x-panorama":"jAcEdUUUIyPXD24Dz82n2VemM","x-torte-mare":"vjeJ6KOcAVHJCilw341wvRVNAo","x-limoni":"Y0oCFJ0YPClqvQA5MoAs9aINaY"}
const IMG: Record<string, string> = {}
for (const k in IDS) IMG[k] = FU + IDS[k] + ".png?scale-down-to=1024"
const SVG = (s: string) => "data:image/svg+xml," + encodeURIComponent(s)
const TILE = (bg: string, fg: string) => SVG(`<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><rect width="80" height="80" fill="${bg}"/><g fill="none" stroke="${fg}" stroke-width="1.6"><rect x="1" y="1" width="78" height="78"/><circle cx="40" cy="40" r="14"/><path d="M40 6C48 20 48 26 40 26C32 26 32 20 40 6ZM40 74C48 60 48 54 40 54C32 54 32 60 40 74ZM6 40C20 32 26 32 26 40C26 48 20 48 6 40ZM74 40C60 32 54 32 54 40C54 48 60 48 74 40ZM1 1L14 14M79 1L66 14M1 79L14 66M79 79L66 66"/></g><circle cx="40" cy="40" r="4" fill="${fg}"/></svg>`)
IMG["pattern-band"] = TILE("#06492F", "#1E6B4A")
IMG["pattern-band-blu"] = TILE("#0A3866", "#2A5F94")
const PH = SVG(`<svg xmlns="http://www.w3.org/2000/svg" width="1070" height="940" viewBox="0 0 1070 940"><defs><pattern id="p" width="120" height="120" patternUnits="userSpaceOnUse"><rect width="120" height="120" fill="#F4EEE1"/><g fill="none" stroke="#E2D6BC" stroke-width="2"><rect x="1" y="1" width="118" height="118"/><circle cx="60" cy="60" r="21"/></g></pattern></defs><rect width="1070" height="940" fill="url(#p)"/><ellipse cx="535" cy="470" rx="250" ry="105" fill="#fff" stroke="#C8102E" stroke-width="4"/><text x="535" y="492" text-anchor="middle" font-family="Georgia,serif" font-style="italic" font-size="64" fill="#C8102E">Dolce Sorrento</text></svg>`)
IMG["logo-dolce-sorrento"] = "data:image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KYq+wjBfxvoCLyHBxvAvvZg91Bn3TLok+nSGuGQWXyU4wlRspvm0J0K9FwK4tb10TknsdoseO343i322g16KW/ODcUujGsG04F1tHk83uBo3z5YHawZJwCtb5VEwdxHrTHgYUGNQOcTObiGdWQPPtp7T5/ISuODLpEbeAlffbrHicFTED0eC/OxQO+0xU3OE5szHRVgzTmrRRHi0T5x5bQYj/uhhURpnjmNTlsMdVfNE5xC9HQ8yqcATUKFd/35HMCZTxRUTF0yVWNFd15Byy1V32MXVBWrPX94PToKDkSZ8kaI8v54tE4AWrvWu83LmydSjVhwZfy5a+MVylMSR+cD2kjIfRR80FQqBNH33VFuxtxA73ZfV4T19+ePl0uF6Hk3C8rzAE2P8sTqtYo+0GxMwNYPUf46C0TzAE28VoF/8iFEBAXj9VTrdy6gqf34CGBD8JKoWOF+TmxmBdoiweoqwUYmrxrXdfeegVaVe9cINoKc7M5A5TMCbVMCZeT9o40Yc3RNIP84EyDnApolW+vId6R28G4xRiL/1KL39xnBOCfQWkYUtTdP743bxGOFMYL8tD8zEOcGWnPF+EnJ6j3ATTR+SuqH+/H1DUB4C6DbaF8QbmLxKtm9LcZvC7RWkiSp4d4kUfRWgCOHg+g52dQQJ8n+bd/8jYE2cFv03j0mLwT4ORBnfKOX5NEeV8n9Jd75IkDrl2Z6W8R6TZ5eohfG/IRcPTC6L9Gv5+TVUa5kf7+/3NteEGjd/tnvV0/7dlph8/ic/I6iX8j1/w8Yet1K5x9gWPEj/NHfyfPjpmMZktV+f/G33P0P8y7goAuLhu8AAAAASUVORK5CYII="
const I = (k: string) => IMG[k] || PH
const CSS = ".ds{color-scheme:light;--g:#06492F;--g2:#0E5E3F;--b:#123F73;--y:#F2D64B;--r:#C8102E;--bg:#FBF8F1;--ink:#1F2A24;--mute:#56615B;--line:#E4DCCB;--card:#fff}.ds,.ds *{box-sizing:border-box;min-width:0}.ds{margin:0;background:var(--bg);color:var(--ink);font:17px/1.6 'Jost',system-ui,sans-serif;overflow-x:clip}.ds img{max-width:100%;display:block}.ds a{color:var(--g)}.ds h1,.ds h2,.ds h3{margin:0;line-height:1.08;text-wrap:balance}.ds .s{font-family:'Dancing Script',cursive;font-weight:700}.ds .wrap{max-width:1240px;margin:0 auto;padding:0 max(4vw,16px)}.ds .band{padding:clamp(56px,7vw,104px) 0}.ds .tile{background:#06492F url(__PAT__) repeat;background-size:72px;color:#fff}.ds .tileb{background:#0A3866 url(__PATB__) repeat;background-size:72px;color:#fff}.ds .eyebrow{font-size:14px;color:var(--b);font-weight:600;margin:0 0 8px}.ds .tile .eyebrow,.ds .tileb .eyebrow{color:var(--y)}.ds .btn{display:inline-flex;align-items:center;min-height:48px;padding:0 26px;border-radius:999px;font-weight:600;text-decoration:none;border:1.5px solid transparent;cursor:pointer;font:600 16px 'Jost',sans-serif}.ds .btn.y{background:var(--y);color:var(--ink)}.ds .btn.g{background:var(--g);color:#fff}.ds .btn.o{border-color:currentColor;color:inherit;background:transparent}.ds .btn:focus-visible,.ds a:focus-visible,.ds button:focus-visible,.ds input:focus-visible,.ds select:focus-visible,.ds textarea:focus-visible{outline:3px solid var(--y);outline-offset:2px}.ds header{position:relative;z-index:20;background:rgba(251,248,241,.96);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}.ds .hd{display:flex;align-items:center;gap:14px 28px;padding-top:10px;padding-bottom:10px;flex-wrap:wrap}.ds .logo img{height:58px;width:auto;filter:drop-shadow(0 1px 3px rgba(0,0,0,.18))}.ds nav.main{display:flex;gap:4px 22px;flex-wrap:wrap;flex:1 1 380px;font-weight:500;font-size:15px}.ds nav.main a{text-decoration:none;padding:8px 0;color:var(--ink)}.ds nav.main a[aria-current=page]{border-bottom:2px solid var(--y)}.ds .lang{display:flex;border:1.5px solid var(--g);border-radius:999px;overflow:hidden}.ds .lang button{min-height:40px;min-width:46px;border:0;background:transparent;font:600 14px 'Jost';color:var(--g);cursor:pointer}.ds .lang button[aria-pressed=true]{background:var(--g);color:#fff}.ds .hero{position:relative;height:min(86vh,720px);min-height:520px;overflow:hidden;background:#0b2a20;color:#fff}.ds .kb{position:absolute;inset:0;background-size:cover;background-position:center;opacity:0;animation:dskb 21s infinite}.ds .kb:nth-child(2){animation-delay:7s}.ds .kb:nth-child(3){animation-delay:14s}@keyframes dskb{0%{opacity:0;transform:scale(1.02)}5%{opacity:1}33%{opacity:1}40%{opacity:0;transform:scale(1.15)}100%{opacity:0}}.ds .hero:after{content:\"\";position:absolute;inset:0;background:linear-gradient(180deg,rgba(6,40,28,.1) 30%,rgba(6,40,28,.8))}.ds .hero .wrap{position:relative;z-index:1;height:100%;display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:clamp(40px,7vh,80px)}.ds .hero h1{font-size:clamp(46px,7vw,96px);max-width:900px;line-height:1}.ds .hero p{font-size:clamp(17px,1.6vw,20px);max-width:640px;font-weight:300;margin:16px 0 26px}.ds .row{display:flex;flex-wrap:wrap;gap:12px}.ds .facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:22px;padding:30px 0}.ds .facts b{display:block;font-size:30px;font-weight:600;line-height:1.15}.ds .facts span{opacity:.85;font-size:15px}.ds .sec-h{text-align:center;max-width:780px;margin:0 auto 48px}.ds .sec-h h2{font-size:clamp(44px,5.5vw,68px);color:var(--g)}.ds .sec-h p{margin:14px 0 0}.ds .grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}.ds .arch{background:var(--card);border:1px solid var(--line);border-radius:240px 240px 20px 20px;overflow:hidden}.ds .arch img{width:100%;aspect-ratio:1/1;object-fit:contain;background:#fff;padding:18px 18px 0}.ds .arch div{padding:20px 24px 26px}.ds .arch small{color:var(--b);font-weight:600;font-size:14px}.ds .arch h3{font-size:42px;color:var(--g);margin:2px 0 10px}.ds .arch p{margin:0;font-size:16px}.ds .lines{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:26px}.ds .line{display:block;text-decoration:none;color:inherit;border-radius:22px;overflow:hidden;background:var(--card);border:1px solid var(--line);transition:transform .25s}.ds .line:hover{transform:translateY(-4px)}.ds .line img{width:100%;aspect-ratio:16/9;object-fit:contain;background:#fff;padding:12px}.ds .line div{padding:24px 26px 28px}.ds .line h3{font-size:46px;color:var(--g)}.ds .split{display:flex;flex-wrap:wrap;gap:40px;align-items:center}.ds .split>*{flex:1 1 360px}.ds .minis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.ds .minis a{background:#fff;border-radius:16px;overflow:hidden;text-decoration:none;color:var(--ink);font-weight:500;font-size:15px}.ds .minis img{width:100%;aspect-ratio:1/1;object-fit:contain;background:#fff;padding:6px}.ds .minis span{display:block;padding:10px 12px}.ds .clips{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(230px,1fr);gap:18px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px}.ds .clip{position:relative;aspect-ratio:9/16;border-radius:20px;overflow:hidden;scroll-snap-align:start;background:#123}.ds .clip img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;animation:dszoom 10s ease-in-out infinite alternate}@keyframes dszoom{to{transform:scale(1.14)}}.ds .clip div{position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.7));display:flex;flex-direction:column;justify-content:flex-end;padding:20px;color:#fff}.ds .clip b{font-size:19px;line-height:1.25;margin-top:10px}.ds .clip small{opacity:.85}.ds .cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:24px}.ds .card{background:var(--card);border:1px solid var(--line);border-radius:20px;overflow:hidden}.ds .card img{width:100%;aspect-ratio:16/10;object-fit:contain;background:#fff;padding:12px}.ds .card>div{padding:24px}.ds .card h3{font-size:24px;color:var(--g);margin-bottom:8px}.ds .card ul{margin:0;padding-left:18px;font-size:16px}.ds .badges{display:flex;flex-wrap:wrap;gap:16px}.ds .badges div{background:#fff;color:var(--g);border-radius:16px;padding:18px 22px;flex:1 1 220px}.ds .badges b{font-size:20px;display:block}.ds .badges span{color:var(--mute);font-size:15px}.ds .archimg{width:100%;max-width:440px;aspect-ratio:4/5;object-fit:contain;background:#fff;border-radius:240px 240px 20px 20px}.ds form{background:#fff;border-radius:20px;padding:28px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.ds label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:500}.ds input,.ds select,.ds textarea{font:16px 'Jost',sans-serif;padding:12px 14px;border:1px solid #C9C1AF;border-radius:10px;background:#fff;color:var(--ink);min-height:48px}.ds .full{grid-column:1/-1}.ds .ok{grid-column:1/-1;margin:0;color:var(--g);font-weight:500}.ds .pbar{position:sticky;top:79px;z-index:10;background:rgba(251,248,241,.97);border-bottom:1px solid var(--line)}.ds .pbar .wrap{display:flex;flex-wrap:wrap;gap:10px 24px;justify-content:space-between;padding-top:12px;padding-bottom:12px}.ds .pill{min-height:44px;padding:0 16px;border-radius:999px;border:1.5px solid var(--g);background:#fff;color:var(--g);font:500 14px 'Jost';cursor:pointer}.ds .pill[aria-pressed=true]{background:var(--g);color:#fff}.ds .pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:22px}.ds .pc{background:#fff;border:1px solid var(--line);border-radius:20px;overflow:hidden;text-decoration:none;color:var(--ink);display:flex;flex-direction:column;transition:box-shadow .2s}.ds .pc:hover{box-shadow:0 10px 30px rgba(6,73,47,.12)}.ds .pc .im{position:relative}.ds .pc img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff;padding:10px}.ds .tag{position:absolute;font-size:12px;font-weight:600;padding:4px 11px;border-radius:999px}.ds .pc .body{padding:18px 20px 20px;display:flex;flex-direction:column;gap:8px;flex:1}.ds .pc h3{font-size:19px;font-weight:600;color:var(--g);line-height:1.25}.ds .pc p{margin:0;font-size:14.5px;color:var(--mute)}.ds .mini{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto;font-size:13px}.ds .mini span{background:#F4EEE1;border-radius:8px;padding:4px 9px}.ds .aic{font-size:13px;font-weight:600;color:var(--b);display:flex;gap:6px;align-items:center}.ds .pp{display:flex;flex-wrap:wrap;gap:44px;align-items:flex-start}.ds .pp>*{flex:1 1 440px}.ds .pp .ph{border-radius:24px;overflow:hidden;background:#fff;border:1px solid var(--line)}.ds .pp .ph img{width:100%;aspect-ratio:4/3;object-fit:contain;background:#fff;padding:20px}.ds .pp h1{font-size:clamp(44px,5vw,64px);color:var(--g);margin:10px 0 14px}.ds .kv{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:22px 0}.ds .kv div{background:#fff;border:1px solid var(--line);border-radius:14px;padding:12px 8px;text-align:center}.ds .kv b{display:block;font-size:20px}.ds .kv span{font-size:13px;color:var(--mute)}.ds .note{background:#EEF4EA;border-radius:16px;padding:18px 20px;font-size:16px}.ds .scroll{overflow-x:auto}.ds table{width:100%;border-collapse:collapse;font-size:15px;min-width:560px}.ds th,.ds td{text-align:left;padding:12px 10px 12px 0;border-bottom:1px solid #EEE7D8}.ds thead th{border-bottom:2px solid var(--g);font-weight:600}.ds td.n,.ds th.n{text-align:right}.ds .pal{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}.ds .pal>div{background:#fff;border:1px solid var(--line);border-radius:16px;padding:18px 20px}.ds .pal h3{font-size:18px;color:var(--b);margin-bottom:8px}.ds .pal dl{display:grid;grid-template-columns:1fr auto;margin:0;font-size:15px}.ds .pal dt,.ds .pal dd{margin:0;padding:7px 0;border-bottom:1px solid #EEE7D8}.ds .pal dt{color:var(--mute)}.ds .pal dd{text-align:right;font-variant-numeric:tabular-nums}.ds .draft{background:#FBF3D6;border-radius:14px;padding:16px 18px;font-size:15px}.ds footer .wrap{display:flex;flex-wrap:wrap;gap:24px;justify-content:space-between;padding-top:44px;padding-bottom:44px;font-size:14px}.ds footer img{height:70px;width:auto;margin-bottom:10px}.ds footer a{color:#fff}.ds .proto{font-size:13px;opacity:.75}@media(max-width:700px){.ds .minis{grid-template-columns:repeat(2,minmax(0,1fr))}.ds .kv{grid-template-columns:repeat(2,minmax(0,1fr))}.ds form{grid-template-columns:1fr}.ds .logo img{height:46px}.ds .pbar{top:0;position:static}.ds nav.main{order:3;flex-basis:100%;gap:2px 16px;font-size:14px}}@media(prefers-reduced-motion:reduce){.ds .kb,.ds .clip img{animation:none}.ds .kb:first-child{opacity:1}.ds{scroll-behavior:auto}}.ds .hero video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.ds{position:relative}.ds .lang{margin-left:auto}.ds .hero .eyebrow{color:var(--y)}.ds .wrap.facts{padding:30px max(4vw,16px)}.ds .pbar{top:0}@media(max-width:700px){.ds .hd{gap:6px 12px;padding-top:8px;padding-bottom:6px}.ds .logo img{height:44px}.ds nav.main{order:3;flex:1 1 100%;flex-wrap:nowrap;overflow-x:auto;gap:20px;font-size:14px;scrollbar-width:none;-webkit-overflow-scrolling:touch}.ds nav.main::-webkit-scrollbar{display:none}.ds nav.main a{white-space:nowrap;padding:6px 0}.ds .hero{height:auto;min-height:calc(100svh - 110px)}.ds .hero h1{font-size:46px}.ds .hero .wrap{padding-top:120px}.ds .facts b{font-size:24px}.ds .facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.ds .arch img{aspect-ratio:4/3}.ds .arch{border-radius:180px 180px 20px 20px}.ds .sec-h h2{font-size:44px}.ds .btn{width:100%;justify-content:center}.ds .row{gap:10px}.ds .pbar .row{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}.ds .pill{white-space:nowrap;flex:none}.ds .pp h1{font-size:40px}.ds .band{padding:52px 0}}"
let lang = "it", filter = "all"
const T={
it:{nav:[['storie','Le nostre storie'],['prodotti','Prodotti'],['canali','Horeca · GDO · Export'],['qualita','Qualità'],['contatti','Contatti']],
heroK:'Penisola Sorrentina · Costiera Amalfitana',heroT:'I dolci sapori della tradizione italiana',
heroP:'Dessert surgelati della tradizione campana. La linea tradizionale è fatta con panna fresca; la linea senza glutine è pensata per chi è celiaco o intollerante. Si scongelano e si servono.',
ctaRange:'Scopri la gamma',ctaDist:'Diventa distributore',
facts:[['Panna fresca','in tutta la linea tradizionale'],['15 mesi','di shelf life a −18 °C o meno'],['BRCGS · Grade A','Food Safety, Battipaglia (SA)'],['8–10 minuti','per scongelare le Mousse']],
stK:'Capri · Sorrento · Costiera Amalfitana',stT:'Dove nascono i nostri dolci',stP:'Ogni dolce Dolce Sorrento ha un luogo e una storia. Seguiamo le ricette dei grandi classici della pasticceria campana, nati tra il golfo di Napoli e la Costiera.',
stories:[['Sorrento · 1978','La Delizia','Nasce nel 1978 dal pasticcere sorrentino Carmine Marzuillo, come omaggio al limone dorato di Sorrento: una cupola di pan di Spagna con un cuore di crema al limone. Oggi la facciamo anche al tiramisù e al pistacchio.'],
['Capri · anni \'20','La Caprese','Si racconta che sia nata a Capri da una dimenticanza: un pasticcere che lasciò fuori la farina. Ne uscì una torta di cioccolato, burro e mandorle tostate, croccante fuori e morbidissima dentro.'],
['Costiera Amalfitana','Ricotta e pere','Il classico più giovane della Costiera: due dischi di biscotto alle nocciole e mandorle con crema di ricotta e cubetti di pera succosa. Da noi anche al cioccolato e al pistacchio.'],
['Ispirate alla Caprese','Le Capresine','La Caprese diventa monoporzione e si riempie: cuore di crema al cioccolato, oppure al limone nella versione sorrentina. Le prepariamo anche senza glutine.']],
lnT:'Due linee, un\'unica tradizione',lnP:'Scegli la linea per il tuo menu o il tuo banco frigo.',
lines:[['Tradizionale','Fatta con panna fresca. Delizie, Ricotta, Capresine monoporzione e 5 torte pre-porzionate in 14 fette.','13 referenze'],['Senza glutine','Per chi è allergico o intollerante al glutine, senza rinunciare al gusto della tradizione. Delizie anche senza lattosio.','12 referenze']],
msK:'Novità',msT:'Mousse senza glutine',msP:'Caramello, Nocciola, Tiramisù e Pistacchio su base di pan di Spagna. Scongelamento rapido: 8–10 minuti a 0/+4 °C e sono pronte da servire.',msB:'Vedi le Mousse',
clT:'Guarda i nostri dolci',clP:'Brevi clip verticali, pensate anche per Instagram e TikTok.',
clips:[['La Delizia, dal 1978','0:15'],['Caprese: nata a Capri','0:15'],['Ricotta e pere dalla Costiera','0:15'],['Mousse: pronte in 8 minuti','0:12']],
chT:'Per chi lavora con noi',
ch:[['Horeca',['Linea tradizionale con panna fresca','Scongela e servi: nessuna preparazione','Torte già divise in 14 fette','Dopo lo scongelamento: 2 giorni a 0/+4 °C']],
['GDO e retail',['Monoporzioni pronte per il banco frigo','Linea tradizionale e senza glutine','15 mesi di shelf life a −18 °C','Nuovo pack retail in arrivo']],
['Export e distributori',['Pallet EUR 80×120 e UK 100×120','Palletizzazione per ogni referenza','Catena del freddo a −18 °C o meno','Schede in italiano e inglese']]],
qT:'Qualità certificata',qP:'Produciamo a Battipaglia (SA): certificazione BRCGS Food Safety Grade A e uno stabilimento dedicato alla linea senza glutine.',
q:[['BRCGS Food Safety','Issue 9 · Grade A'],['Spiga Barrata AIC','su 7 referenze senza glutine']],
caT:'Catalogo 2026–2027',caP:'Tutte le referenze con formati, palletizzazione e istruzioni di scongelamento.',caB1:'Richiedi il catalogo · IT',caB2:'Request catalogue · EN',
coT:'Lavoriamo insieme',coP:'Distributori, importatori, Horeca e GDO: chiedi listino e campionatura.',
f:['Nome e cognome','Azienda','Email','Paese','Sono un','Messaggio','Richiedi listino e campionatura'],fo:['Distributore / importatore','Horeca','GDO / retail','Altro'],
fOk:'Si apre la tua email con il messaggio pronto per info@cdfood.it. Se non si apre, scrivici a info@cdfood.it o chiama +39 0828 509098.',
pT:'La gamma 2026–2027',pP:'25 referenze surgelate. Conservazione a −18 °C o meno, shelf life 15 mesi. Una volta scongelato, il prodotto non va ricongelato e si conserva a 0/+4 °C per 2 giorni.',
flt:[['all','Tutti'],['trad','Monoporzioni'],['torte','Torte'],['gf','Senza glutine'],['mousse','Mousse']],pal:'Pallet',
lbl:{trad:'Tradizionale',torte:'Torta pre-porzionata',gf:'Senza glutine',mousse:'Senza glutine'},nov:'NOVITÀ',panna:'Con panna fresca',
w:'peso',d:'diametro',pz:'pz / cartone',sl:'shelf life',m15:'15 mesi',
prep:'Preparazione',st:'Conservazione: a −18 °C o meno. Una volta scongelato, il prodotto non deve essere ricongelato e può essere conservato a 0/+4 °C per 2 giorni.',
th:'Scongelare a una temperatura di 0/+4 °C per ',thH:'4–6 ore.',thM:'8–10 minuti.',fast:'Scongelamento rapido. Pronto da servire.',
palT:'Palletizzazione',ph:['Pallet','Peso','Diametro','Pz / crt','Crt / strato','Strati','Crt / pallet','Pz / pallet'],src:'Dati Catalogo 2026–2027.',
ingT:'Ingredienti e allergeni',ing:'Ingredienti, allergeni e valori nutrizionali saranno pubblicati dalla scheda tecnica ufficiale. Nel frattempo la scheda è disponibile su richiesta.',
askS:'Richiedi campionatura',askT:'Richiedi scheda tecnica',back:'Tutti i prodotti',rel:'Della stessa linea',
foot:['un marchio CD FOOD S.R.L. · P.IVA 05951860658','Viale G. Brodolini 36 · 84091 Battipaglia (SA) · Italia','Privacy','Cookie'],proto:'Prototipo di lavoro – non ancora online.'},
en:{nav:[['storie','Our stories'],['prodotti','Products'],['canali','Foodservice · Retail · Export'],['qualita','Quality'],['contatti','Contact']],
heroK:'Sorrento Peninsula · Amalfi Coast',heroT:'The sweet taste of Italian tradition',
heroP:'Frozen desserts from the Campania pastry tradition. Our traditional line is made with fresh cream; our gluten-free line is designed for people with coeliac disease or gluten intolerance. Thaw and serve.',
ctaRange:'Explore the range',ctaDist:'Become a distributor',
facts:[['Fresh cream','across the traditional line'],['15 months','shelf life at −18 °C or lower'],['BRCGS · Grade A','Food Safety, Battipaglia (Italy)'],['8–10 minutes','to thaw our Mousses']],
stK:'Capri · Sorrento · Amalfi Coast',stT:'Where our desserts come from',stP:'Every Dolce Sorrento dessert has a place and a story. We follow the recipes of the great classics of Campania patisserie, born between the Gulf of Naples and the Amalfi Coast.',
stories:[['Sorrento · 1978','Delizia','Created in 1978 by Sorrento pastry chef Carmine Marzuillo as a tribute to the golden Sorrento lemon: a sponge cake dome with a lemon cream heart. Today we also make it with tiramisù and pistachio.'],
['Capri · 1920s','Caprese','Legend has it that it was born on Capri from a mistake: a baker who left out the flour. The result was a cake of chocolate, butter and toasted almonds, crisp outside and meltingly soft inside.'],
['Amalfi Coast','Ricotta and pear','The youngest classic of the Amalfi Coast: two hazelnut and almond biscuit layers with ricotta cream and juicy diced pear. We also make it with chocolate chips and pistachio.'],
['Inspired by the Caprese','Capresine','The Caprese becomes a single portion with a filling: chocolate cream, or lemon in the Sorrento version. Also available gluten free.']],
lnT:'Two lines, one tradition',lnP:'Choose the line for your menu or your freezer cabinet.',
lines:[['Traditional','Made with fresh cream. Delizia, Ricotta and Capresina single portions, plus 5 cakes pre-cut into 14 slices.','13 products'],['Gluten free','For people allergic or intolerant to gluten, with all the taste of tradition. Delizia also lactose free.','12 products']],
msK:'New',msT:'Gluten-free Mousses',msP:'Caramel, Hazelnut, Tiramisù and Pistachio on a sponge cake base. Fast defrost: 8–10 minutes at 0/+4 °C and they are ready to serve.',msB:'See the Mousses',
clT:'Watch our desserts',clP:'Short vertical clips, made for Instagram and TikTok too.',
clips:[['Delizia, since 1978','0:15'],['Caprese: born on Capri','0:15'],['Ricotta and pear from the Coast','0:15'],['Mousse: ready in 8 minutes','0:12']],
chT:'For our partners',
ch:[['Foodservice',['Traditional line made with fresh cream','Thaw and serve: no preparation','Cakes pre-cut into 14 slices','After thawing: 2 days at 0/+4 °C']],
['Retail',['Single portions ready for the freezer cabinet','Traditional and gluten-free lines','15 months shelf life at −18 °C','New retail pack coming soon']],
['Export and distributors',['EUR 80×120 and UK 100×120 pallets','Pallet configuration for every product','Cold chain at −18 °C or lower','Specifications in Italian and English']]],
qT:'Certified quality',qP:'We produce in Battipaglia (Italy): BRCGS Food Safety Grade A certification and a dedicated plant for the gluten-free line.',
q:[['BRCGS Food Safety','Issue 9 · Grade A'],['AIC Crossed Grain','on 7 gluten-free products']],
caT:'Catalogue 2026–2027',caP:'Every product with formats, pallet configuration and thawing instructions.',caB1:'Richiedi il catalogo · IT',caB2:'Request catalogue · EN',
coT:'Let\'s work together',coP:'Distributors, importers, foodservice and retail: ask for our price list and samples.',
f:['Full name','Company','Email','Country','I am a','Message','Request price list and samples'],fo:['Distributor / importer','Foodservice','Retail','Other'],
fOk:'Your email app opens with the message ready for info@cdfood.it. If it does not, write to info@cdfood.it or call +39 0828 509098.',
pT:'The 2026–2027 range',pP:'25 frozen products. Store at −18 °C or lower, 15 months shelf life. Once thawed, the product must not be refrozen and can be stored at 0/+4 °C for 2 days.',
flt:[['all','All'],['trad','Single portions'],['torte','Cakes'],['gf','Gluten free'],['mousse','Mousse']],pal:'Pallet',
lbl:{trad:'Traditional',torte:'Pre-cut cake',gf:'Gluten free',mousse:'Gluten free'},nov:'NEW',panna:'Made with fresh cream',
w:'weight',d:'diameter',pz:'pcs / carton',sl:'shelf life',m15:'15 months',
prep:'Preparation',st:'Storage: at −18 °C or lower. Once thawed, the product must not be refrozen and can be stored at 0/+4 °C for 2 days.',
th:'Defrost at a temperature of 0/+4 °C for ',thH:'4–6 hours.',thM:'8–10 minutes.',fast:'Fast defrost. Ready to serve.',
palT:'Pallet configuration',ph:['Pallet','Weight','Diameter','Pcs / crt','Crt / layer','Layers','Crt / pallet','Pcs / pallet'],src:'Data from Catalogue 2026–2027.',
ingT:'Ingredients and allergens',ing:'Ingredients, allergens and nutrition facts will be published from the official specification. Meanwhile the specification is available on request.',
askS:'Request samples',askT:'Request specification',back:'All products',rel:'From the same line',
foot:['a CD FOOD S.R.L. brand · VAT IT05951860658','Viale G. Brodolini 36 · 84091 Battipaglia (SA) · Italy','Privacy','Cookies'],proto:'Working prototype – not live yet.'}};
const H='4–6',M='8–10';
// [slug, linea, img, it nome, en nome, it desc, en desc, peso, diam, pz, EUR crt/strato, EUR strati, UK crt/strato, UK strati, aic, novità]
const P=[
['delizia-limone','trad','trad-delizia-limone','Delizia al limone','Delizia lemon','Un classico della pasticceria sorrentina famoso in tutto il mondo: una cupola di pan di Spagna con un cuore cremoso al limone e una copertura glassata. Un dolce che sa di estate.','A world-famous Sorrento pastry classic: a dome of sponge cake with a creamy lemon heart and a glazed coating. A dessert that tastes like summer.','100 g','10 cm',6,9,19,12,20],
['delizia-tiramisu','trad','trad-delizia-tiramisu','Delizia al tiramisù','Delizia tiramisù','La forma e la soffice consistenza della Delizia incontrano il tiramisù: pan di Spagna inzuppato nel caffè, farcito con una deliziosa crema al mascarpone e completato da una spolverata di cacao.','The shape and soft texture of the Delizia meet tiramisù: sponge cake soaked in coffee, filled with a delicious mascarpone cream and topped with a dusting of cocoa.','100 g','10 cm',6,9,19,12,20],
['delizia-pistacchio','trad','trad-delizia-pistacchio','Delizia al pistacchio','Delizia pistachio','Una variante della classica Delizia al Limone con un cuore cremoso al pistacchio, ricoperta da una delicata glassa e decorata con granella croccante di pistacchio.','A variation of the classic Lemon Delizia with a creamy pistachio heart, covered with a delicate glaze and decorated with crunchy ground pistachios.','100 g','10 cm',6,9,19,12,20],
['ricotta-pera','trad','trad-ricotta-pera','Ricotta e pera','Ricotta and pear','Due strati di biscotto alle nocciole e mandorle farciti con soffice ricotta e cubetti di pere succose.','Two layers of hazelnut and almond biscuit filled with fluffy ricotta and juicy diced pears.','90 g','6 cm',12,12,13,16,15],
['ricotta-cioccolato','trad','trad-ricotta-cioccolato','Ricotta e gocce di cioccolato','Ricotta and chocolate chips','La variante della classica Ricotta e Pere: i cubetti di frutta lasciano il posto a croccanti gocce di cioccolato fondente, in abbinamento con la dolce crema di ricotta.','The twist on the classic Ricotta and Pear: the fruit is replaced by crunchy dark chocolate chips, a heavenly match with the sweet ricotta cream.','90 g','6 cm',12,12,13,16,15],
['ricotta-pistacchio','trad','trad-ricotta-pistacchio','Ricotta e pistacchio','Ricotta and pistachio','La variante per gli amanti del pistacchio: biscuit di sola farina di nocciole e mandorle, vellutata farcitura di ricotta cremosa e pistacchi, ricoperta da croccante granella.','For pistachio lovers: a biscuit made only with hazelnut and almond flour, a velvety filling of creamy ricotta and pistachios, covered with crunchy crumbs.','90 g','6 cm',12,12,13,16,15],
['capresina-cioccolato','trad','trad-capresina-cioccolato','Capresina alla crema di cioccolato','Capresina chocolate cream','Il nuovo formato monoporzione della classica Torta Caprese: torta al burro con mandorle tostate e cacao, con un irresistibile cuore di crema al cioccolato.','The new single-portion format of the classic Caprese Cake: toasted almond and cocoa butter cake with an irresistible chocolate cream centre.','85 g','8 cm',12,8,22,12,25],
['capresina-limone','trad','trad-capresina-limone','Capresina alla crema di limone','Capresina lemon cream','Soffice torta al burro con mandorle tostate e un fresco cuore farcito con delicata crema al limone: la Capresina, versione sorrentina.','Soft toasted almond butter cake with a fresh centre filled with delicate lemon cream: the Capresina, Sorrento version.','85 g','8 cm',12,8,22,12,25],
['torta-ricotta-pere','torte','torta-ricotta-pera','Torta ricotta e pere','Ricotta and pear cake','Torta pre-porzionata in 14 fette che rende omaggio alla celebre Ricotta e Pere nata in Costiera Amalfitana: due strati di biscotto alle nocciole e mandorle e crema di ricotta con succosi cubetti di pera.','Cake pre-cut into 14 slices, a tribute to the famous Ricotta and Pear cake born on the Amalfi Coast: two hazelnut and almond biscuit layers and ricotta cream with juicy diced pears.','1300 g','26 cm',1,8,22,12,25],
['torta-ricotta-cioccolato','torte','torta-ricotta-cioccolato','Torta ricotta e gocce di cioccolato','Ricotta and chocolate chip cake','Torta pre-porzionata: al posto della frutta, gocce di cioccolato fondente mescolate alla soffice crema di ricotta per sorprendere il palato.','Pre-cut cake: instead of fruit, dark chocolate chips mixed into soft ricotta cream to surprise the palate.','1300 g','26 cm',1,8,22,12,25],
['torta-ricotta-pistacchio','torte','torta-ricotta-pistacchio','Torta ricotta e pistacchio','Ricotta and pistachio cake','Un grande classico della tradizione campana nella versione al pistacchio: già tagliata in porzioni, cremosa e delicata, per un\'esperienza di gusto ancora più intensa.','A great classic of Campania tradition in the pistachio version: already cut into portions, creamy and delicate, for an even more intense taste.','1300 g','26 cm',1,8,22,12,25],
['caprese-cioccolato','torte','torta-caprese','Caprese al cioccolato','Caprese chocolate','Il grande classico della tradizione pasticcera campana in versione pre-porzionata: cioccolato, burro e mandorle tostate, croccante fuori e morbidissima dentro.','The great classic of Campania patisserie, pre-cut: chocolate, butter and toasted almonds, crisp outside and meltingly soft inside.','1100 g','26 cm',1,8,22,12,25],
['caprese-limone','torte','torta-caprese-limone','Caprese al limone','Caprese lemon','La celebre Torta Caprese con un tipico tocco sorrentino al limone: una dolcezza fresca e leggera per chi ama il connubio tra dolce e aspro.','The famous Caprese Cake with a typical Sorrento lemon twist: a fresh, light treat for those who like sweet and sour together.','1100 g','26 cm',1,8,22,12,25],
['delizia-limone-sg','gf','gf-delizia-limone','Delizia al limone senza glutine e senza lattosio','Delizia lemon gluten free and lactose free','Pan di Spagna con sciroppo al limone, un cuore cremoso, ricoperto da glassa al limone e decorato con briciole di pan di Spagna.','Sponge cake with lemon syrup, a creamy heart, topped with lemon glaze and decorated with sponge cake crumble.','100 g','10 cm',6,9,19,12,20,'IT-281-004'],
['delizia-tiramisu-sg','gf','gf-delizia-tiramisu','Delizia al tiramisù senza glutine e senza lattosio','Delizia tiramisù gluten free and lactose free','Pan di Spagna con bagna al caffè, cuore cremoso al mascarpone e una spolverata di cacao.','Sponge cake with coffee syrup, creamy mascarpone centre and a cocoa sprinkling.','100 g','10 cm',6,9,19,12,20,'IT-281-017'],
['delizia-pistacchio-sg','gf','gf-delizia-pistacchio','Delizia al pistacchio senza glutine e senza lattosio','Delizia pistachio gluten free and lactose free','Pan di Spagna con un cuore cremoso e una copertura di glassa al pistacchio, rifinita e decorata con granella di pistacchio.','Sponge cake with a creamy centre and a pistachio glaze topping, finished and decorated with ground pistachio.','100 g','10 cm',6,9,19,12,20,'IT-281-005'],
['ricotta-pere-sg','gf','gf-ricotta-pera','Ricotta e pere senza glutine','Ricotta and pear gluten free','La classica Ricotta e Pere in una versione ancora più delicata e soffice: due strati di tenero biscotto alle nocciole e mandorle, soffice crema di ricotta e succosi cubetti di pera.','The classic Ricotta and Pear in an even more delicate and fluffy version: two layers of tender hazelnut and almond biscuit, soft ricotta cream and juicy pear cubes.','90 g','6 cm',12,12,13,16,15,'IT-281-012'],
['ricotta-cioccolato-sg','gf','gf-ricotta-cioccolato','Ricotta e gocce di cioccolato senza glutine','Ricotta and chocolate chips gluten free','L\'irresistibile variante della Ricotta e Pere: la crema di ricotta è arricchita con piccole gocce di cioccolato fondente.','The irresistible twist on Ricotta and Pear: the ricotta cream is enriched with small dark chocolate drops.','90 g','6 cm',12,12,13,16,15,'IT-281-011'],
['ricotta-pistacchio-sg','gf','gf-ricotta-pistacchio','Ricotta e pistacchio senza glutine','Ricotta and pistachio gluten free','La versione al pistacchio della Ricotta e Pere: il gusto della ricotta cremosa esaltato dalla croccante granella di pistacchio.','The pistachio version of Ricotta and Pear: creamy ricotta enhanced by crunchy ground pistachio.','90 g','6 cm',12,12,13,16,15,'IT-281-013'],
['capresina-limone-sg','gf','gf-capresina-limone','Capresina al limone senza glutine','Capresina lemon gluten free','Il tipico dolce di Capri nella sua versione più leggera ed estiva: la ricetta della Caprese unita a uno dei simboli della penisola sorrentina, il limone.','The typical Capri dessert in its lightest, most summery version: the Caprese recipe combined with a symbol of the Sorrento peninsula, the lemon.','90 g','10 cm',9,16,10,21,12],
['capresina-cioccolato-sg','gf','gf-capresina-cioccolato','Capresina al cioccolato senza glutine','Capresina chocolate gluten free','La versione classica della celebre Torta Caprese: soffice impasto al cioccolato e mandorle tostate, senza glutine e adatta a tutti.','The classic version of the famous Caprese Cake: soft chocolate dough and roasted almonds, gluten free for everyone.','90 g','10 cm',9,16,10,21,12],
['mousse-caramello','mousse','gf-mousse-caramello','Mousse al caramello senza glutine','Mousse caramel gluten free','Un dolce speciale dove il caramello dorato e la mousse cremosa si combinano perfettamente, in una deliziosa miscela di consistenze e sapori.','A special dessert where golden caramel and creamy mousse work together perfectly, in a delicious mix of textures and tastes.','90 g','7 cm',12,12,13,16,15,'IT-281-021',1],
['mousse-nocciola','mousse','gf-mousse-nocciola','Mousse alla nocciola senza glutine','Mousse hazelnut gluten free','Un connubio di opposti: la croccantezza e il gusto dolce delle nocciole bilanciano il cioccolato fondente in una soffice mousse su pan di Spagna.','A combination of opposites: crunchy, sweet hazelnuts balance dark chocolate in a soft mousse on a sponge cake.','90 g','7 cm',12,12,13,16,15,'',1],
['mousse-tiramisu','mousse','gf-mousse-tiramisu','Mousse al tiramisù senza glutine','Mousse tiramisù gluten free','Il Tiramisù con la consistenza leggera e cremosa di una mousse: l\'intensità del caffè si fonde con il mascarpone su una base di pan di Spagna.','Tiramisù with the light, creamy texture of a mousse: strong coffee blends with mascarpone on a sponge cake base.','80 g','7 cm',12,12,13,16,15,'',1],
['mousse-pistacchio','mousse','gf-mousse-pistacchio','Mousse al pistacchio senza glutine','Mousse pistachio gluten free','Il pistacchio dolce e tostato trasformato in una cremosità avvolgente, adagiato su una base di pan di Spagna.','Sweet, toasted pistachio turned into creamy goodness, nestled on a sponge cake base.','90 g','7 cm',12,12,13,16,15,'',1]
].map(r=>({slug:r[0],line:r[1],img:I(r[2]),name:{it:r[3],en:r[4]},desc:{it:r[5],en:r[6]},w:r[7],d:r[8],pz:r[9],eu:[r[10],r[11]],uk:[r[12],r[13]],aic:r[14]||'',nov:!!r[15],fresh:r[1]==='trad'||r[1]==='torte',fast:r[1]==='mousse'}));
const esc=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
const fmt=n=>{const s=String(n);return lang==='it'?s.replace(/\B(?=(\d{3})+(?!\d))/g,'.'):s.replace(/\B(?=(\d{3})+(?!\d))/g,',')};
const aicIcon='<img src="https://framerusercontent.com/images/1EKKScEsRj67vjsP0of4slWpw.png" alt="Spiga Barrata AIC" width="26" height="26" style="width:26px;height:26px;object-fit:contain;display:inline-block">';
const play='<svg aria-hidden="true" width="44" height="44" viewBox="0 0 44 44"><circle cx="22" cy="22" r="21" fill="none" stroke="#fff" stroke-width="2"/><path d="M18 14l12 8-12 8z" fill="#fff"/></svg>';
const inGroup=(p,g)=>g==='all'||p.line===g||(g==='gf'&&p.line==='mousse');
const badgeBg={trad:'#06492F',torte:'#7A5230',gf:'#123F73',mousse:'#123F73'};
function card(p){const t=T[lang];return `<a class="pc" href="#p-${p.slug}"><div class="im"><img src="${p.img}" alt="${esc(p.name[lang])}" loading="lazy">
<span class="tag" style="top:12px;left:12px;background:${badgeBg[p.line]};color:#fff">${t.lbl[p.line]}</span>
${p.nov?`<span class="tag" style="top:12px;right:12px;background:var(--y)">${t.nov}</span>`:''}</div>
<div class="body"><h3>${esc(p.name[lang])}</h3><p>${esc(p.desc[lang])}</p>
${p.fresh?`<span class="aic" style="color:var(--g)">${t.panna}</span>`:''}${p.aic?`<span class="aic">${aicIcon}Spiga Barrata AIC · ${p.aic}</span>`:''}
<div class="mini"><span>${p.w}</span><span>Ø ${p.d}</span><span>${p.pz} ${t.pz}</span><span>EUR ${p.eu[0]*p.eu[1]} crt</span></div></div></a>`}
function home(){const t=T[lang];const st=['x-donna-delizia','torta-caprese','torta-ricotta-pera','trad-capresina-limone'],pos=['50% 40%','52% 55%','50% 58%','34% 62%'];
const clipImg=['x-ristorante','torta-caprese','torta-ricotta-pera','gf-mousse-pistacchio'];
return `<section class="hero" aria-label="Video"><video autoplay muted loop playsinline preload="metadata" poster="${I('x-panorama')}" src="https://framerusercontent.com/assets/DG8kHZNYRVnxdYkooBvqZbYejE.mp4"></video>
<div class="wrap"><p class="eyebrow">${t.heroK}</p><h1 class="s">${t.heroT}</h1><p>${t.heroP}</p><div class="row"><a class="btn y" href="#prodotti">${t.ctaRange}</a><a class="btn o" href="#contatti">${t.ctaDist}</a></div></div></section>
<section class="tile"><div class="wrap facts">${t.facts.map(f=>`<div><b>${f[0]}</b><span>${f[1]}</span></div>`).join('')}</div></section>
<section id="storie" class="band"><div class="wrap"><div class="sec-h"><p class="eyebrow">${t.stK}</p><h2 class="s">${t.stT}</h2><p>${t.stP}</p></div>
<div class="grid">${t.stories.map((s,i)=>`<article class="arch"><img src="${I(st[i])}" alt="${esc(s[1])}" style="object-position:${pos[i]}" loading="lazy"><div><small>${s[0]}</small><h3 class="s">${s[1]}</h3><p>${s[2]}</p></div></article>`).join('')}</div></div></section>
<section class="band" style="background:#fff;border-block:1px solid var(--line)"><div class="wrap"><h2 style="font-size:clamp(32px,4vw,44px);color:var(--g);font-weight:500">${t.lnT}</h2><p style="margin:8px 0 34px;color:var(--mute)">${t.lnP}</p>
<div class="lines">${t.lines.map((l,i)=>`<a class="line" href="#prodotti" data-f="${i?'gf':'trad'}"><img src="${I(i?'gf-delizia-limone':'torta-ricotta-pera')}" alt="" style="object-position:50% ${i?68:62}%"><div><h3 class="s">${l[0]}</h3><p style="margin:8px 0 12px">${l[1]}</p><b style="color:var(--g)">${l[2]} →</b></div></a>`).join('')}</div></div></section>
<section class="tileb band"><div class="wrap split"><div><p class="eyebrow">${t.msK}</p><h2 class="s" style="font-size:clamp(46px,5vw,62px)">${t.msT}</h2><p style="margin:14px 0 22px">${t.msP}</p><a class="btn y" href="#prodotti" data-f="mousse">${t.msB}</a></div>
<div class="minis">${P.filter(p=>p.line==='mousse').map(p=>`<a href="#p-${p.slug}"><img src="${p.img}" alt="${esc(p.name[lang])}" loading="lazy"><span>${esc(p.name[lang].split(' ').slice(0,3).join(' ').replace(/ senza| gluten/,''))}</span></a>`).join('')}</div></div></section>
<section id="canali" class="band" style="background:#fff;border-top:1px solid var(--line)"><div class="wrap"><h2 style="font-size:clamp(32px,4vw,44px);color:var(--g);font-weight:500;margin-bottom:32px">${t.chT}</h2>
<div class="cards">${t.ch.map((c,i)=>`<article class="card"><img src="${I(['x-torte-mare','trad-delizia-limone','x-panorama'][i])}" alt="" style="object-position:${['50% 55%','50% 70%','62% 50%'][i]}" loading="lazy"><div><h3>${c[0]}</h3><ul>${c[1].map(x=>`<li>${x}</li>`).join('')}</ul></div></article>`).join('')}</div></div></section>
<section id="qualita" class="tile band"><div class="wrap split"><div><h2 style="font-size:clamp(32px,4vw,42px);font-weight:500">${t.qT}</h2><p style="margin:12px 0 0">${t.qP}</p></div><div class="badges">${t.q.map(q=>`<div><b>${q[0]}</b><span>${q[1]}</span></div>`).join('')}</div></div></section>
<section id="catalogo" class="band"><div class="wrap split"><img class="archimg" src="${I('x-limoni')}" alt="Limoni di Sorrento sul mare" loading="lazy"><div><h2 class="s" style="font-size:clamp(46px,5vw,62px);color:var(--g)">${t.caT}</h2><p style="margin:12px 0 22px">${t.caP}</p><div class="row"><a class="btn g" href="#contatti">${t.caB1}</a><a class="btn o" style="color:var(--g)" href="#contatti">${t.caB2}</a></div></div></div></section>
<section id="contatti" class="band" style="background:#EEF4EA"><div class="wrap split"><div><h2 style="font-size:clamp(32px,4vw,44px);color:var(--g);font-weight:500">${t.coT}</h2><p style="margin:12px 0 18px">${t.coP}</p>
<p style="margin:0;line-height:1.9">CD FOOD S.R.L.<br>Viale G. Brodolini 36, 84091 Battipaglia (SA)<br>+39 0828 509098<br>info@cdfood.it</p></div>
<form id="frm" novalidate><label>${t.f[0]}<input id="f1" autocomplete="name"></label><label>${t.f[1]}<input id="f2" autocomplete="organization"></label><label>${t.f[2]}<input id="f3" type="email" autocomplete="email"></label><label>${t.f[3]}<input id="f4" autocomplete="country-name"></label>
<label class="full">${t.f[4]}<select id="f5">${t.fo.map(o=>`<option>${o}</option>`).join('')}</select></label><label class="full">${t.f[5]}<textarea id="f6" rows="4"></textarea></label>
<button class="btn g full" type="submit">${t.f[6]}</button><p class="ok" id="fok" hidden>${t.fOk}</p></form></div></section>`}
function products(){const t=T[lang];const list=P.filter(p=>inGroup(p,filter));
return `<section class="tile"><div class="wrap" style="padding-top:56px;padding-bottom:48px"><h1 class="s" style="font-size:clamp(48px,6vw,72px)">${t.pT}</h1><p style="margin:12px 0 0;max-width:740px">${t.pP}</p></div></section>
<div class="pbar"><div class="wrap"><div class="row" role="group" aria-label="Filtro">${t.flt.map(f=>`<button class="pill" type="button" data-flt="${f[0]}" aria-pressed="${filter===f[0]}">${f[1]} · ${P.filter(p=>inGroup(p,f[0])).length}</button>`).join('')}</div></div></div>
<section class="band" style="padding-top:36px"><div class="wrap pgrid">${list.map(card).join('')}</div></section>`}
function product(p){const t=T[lang];const pal=[['EUR 80×120',p.eu],['UK 100×120',p.uk]];const rel=P.filter(x=>x.line===p.line&&x!==p).slice(0,4);
return `<section class="band" style="padding-top:36px"><div class="wrap"><a href="#prodotti" style="font-weight:500">← ${t.back}</a>
<div class="pp" style="margin-top:22px"><div class="ph"><img src="${p.img}" alt="${esc(p.name[lang])}"></div><div>
<div class="row"><span class="tag" style="position:static;background:${badgeBg[p.line]};color:#fff">${t.lbl[p.line]}</span>${p.nov?`<span class="tag" style="position:static;background:var(--y)">${t.nov}</span>`:''}${p.fresh?`<span class="tag" style="position:static;border:1.5px solid var(--g);color:var(--g)">${t.panna}</span>`:''}</div>
<h1 class="s">${esc(p.name[lang])}</h1><p style="margin:0;font-size:18px">${esc(p.desc[lang])}</p>
${p.aic?`<p class="aic" style="margin-top:14px;font-size:15px">${aicIcon}Spiga Barrata AIC · ${p.aic}</p>`:''}
<div class="kv"><div><b>${p.w}</b><span>${t.w}</span></div><div><b>${p.d}</b><span>${t.d}</span></div><div><b>${p.pz}</b><span>${t.pz}</span></div><div><b>${t.m15}</b><span>${t.sl}</span></div></div>
<div class="note"><b style="color:var(--g)">${p.fast?t.fast:t.prep}</b><br>${t.th}${p.fast?t.thM:t.thH} ${t.st}</div>
<div class="row" style="margin-top:22px"><a class="btn g" href="#contatti">${t.askS}</a><a class="btn o" style="color:var(--g)" href="#contatti">${t.askT}</a></div></div></div>
<div class="split" style="margin-top:56px;align-items:flex-start"><div style="flex:2 1 520px"><h2 style="font-size:30px;color:var(--g);font-weight:500;margin-bottom:14px">${t.palT}</h2>
<div class="pal">${pal.map(r=>`<div><h3>${r[0]}</h3><dl><dt>${t.ph[1]}</dt><dd>${p.w}</dd><dt>${t.ph[2]}</dt><dd>${p.d}</dd><dt>${t.ph[3]}</dt><dd>${p.pz}</dd><dt>${t.ph[4]}</dt><dd>${r[1][0]}</dd><dt>${t.ph[5]}</dt><dd>${r[1][1]}</dd><dt>${t.ph[6]}</dt><dd><b>${r[1][0]*r[1][1]}</b></dd><dt>${t.ph[7]}</dt><dd><b>${fmt(r[1][0]*r[1][1]*p.pz)}</b></dd></dl></div>`).join('')}</div>
<p style="font-size:13px;color:var(--mute)">${t.src}</p></div>
<div style="flex:1 1 320px"><h2 style="font-size:30px;color:var(--g);font-weight:500;margin-bottom:14px">${t.ingT}</h2><p class="draft">${t.ing}</p></div></div>
${rel.length?`<h2 style="font-size:30px;color:var(--g);font-weight:500;margin:56px 0 20px">${t.rel}</h2><div class="pgrid">${rel.map(card).join('')}</div>`:''}</div></section>`}
function page(h){const t=T[lang];let view='home',p=null;
if(h==='prodotti')view='prodotti';else if(h.startsWith('p-')){p=P.find(x=>x.slug===h.slice(2));view=p?'p':'home'}
const nav=t.nav.map(n=>`<a href="#${n[0]}"${(n[0]==='prodotti'&&view!=='home')||n[0]===h?' aria-current="page"':''}>${n[1]}</a>`).join('');
const head=`<header><div class="wrap hd"><a class="logo" href="#home" aria-label="Dolce Sorrento, home"><img src="${I("logo-dolce-sorrento")}" alt="Dolce Sorrento"></a><nav class="main" aria-label="Menu">${nav}</nav><div class="lang" role="group" aria-label="Lingua / Language"><button type="button" data-l="it" aria-pressed="${lang==='it'}">IT</button><button type="button" data-l="en" aria-pressed="${lang==='en'}">EN</button></div></div></header>`;
const body=view==='prodotti'?products():view==='p'?product(p):home();
const foot=`<footer class="tile"><div class="wrap"><div><img src="${I("logo-dolce-sorrento")}" alt="Dolce Sorrento">${t.foot[0]}</div><div>${t.foot[1]}<br>+39 0828 509098 · info@cdfood.it</div><div><a href="/privacy">${t.foot[2]}</a> · <a href="/privacy">${t.foot[3]}</a></div></div></footer>`;
return {html:head+'<main>'+body+'</main>'+foot,title:view==='p'?p.name[lang]+' · Dolce Sorrento':view==='prodotti'?t.pT+' · Dolce Sorrento':'',view};
}
/**
* @framerSupportedLayoutWidth any-prefer-fixed
* @framerSupportedLayoutHeight auto
*/
export default function DolceSorrentoSite(props: { start?: string; startFilter?: string }) {
const start = props.start || "home"
const [L, setL] = useState("it")
const [F, setF] = useState(props.startFilter || "all")
const [H, setH] = useState(start)
const root = useRef<HTMLDivElement>(null)
useEffect(() => {
try { const l = localStorage.getItem("ds-lang"); if (l === "it" || l === "en") setL(l); else if (!navigator.language.toLowerCase().startsWith("it")) setL("en") } catch (e) {}
const on = () => { const h = (window.location.hash || "").slice(1); setH(h || start) }
on(); window.addEventListener("hashchange", on)
return () => window.removeEventListener("hashchange", on)
}, [])
lang = L; filter = F
const r = page(H)
useEffect(() => { if (r.title) document.title = r.title }, [H, L])
const first = useRef(true)
useEffect(() => {
if (first.current) { first.current = false; if (H === start) return }
if (r.view === "home" && H !== "home" && H !== start) { const el = document.getElementById(H); if (el) el.scrollIntoView() }
else window.scrollTo(0, 0)
}, [H])
const onClick = (e: any) => {
const b = e.target.closest("[data-flt]"); if (b) { setF(b.dataset.flt); return }
const a = e.target.closest("[data-f]"); if (a) { setF(a.dataset.f); if (window.location.hash === "#prodotti") e.preventDefault() }
const l = e.target.closest("button[data-l]"); if (l) { setL(l.dataset.l); try { localStorage.setItem("ds-lang", l.dataset.l) } catch (x) {} }
}
const onSubmit = (e: any) => {
e.preventDefault(); const g = (id: string) => (root.current?.querySelector("#" + id) as any)?.value || ""
const body = `${g("f1")}\n${g("f2")}\n${g("f3")}\n${g("f4")}\n${g("f5")}\n\n${g("f6")}`
window.location.href = "mailto:info@cdfood.it?subject=" + encodeURIComponent("Richiesta dal sito Dolce Sorrento") + "&body=" + encodeURIComponent(body)
const ok = root.current?.querySelector("#fok") as any; if (ok) ok.hidden = false
}
return (
<div ref={root} className="ds" style={{ width: "100%" }} onClick={onClick} onSubmit={onSubmit}>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link href="https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Jost:wght@300;400;500;600&display=swap" rel="stylesheet" />
<style dangerouslySetInnerHTML={{ __html: CSS.replace("__PAT__", I("pattern-band")).replace("__PATB__", I("pattern-band-blu")) }} />
<div dangerouslySetInnerHTML={{ __html: r.html }} />
</div>
)
}
addPropertyControls(DolceSorrentoSite, {
start: { type: ControlType.Enum, title: "Vista", options: ["home", "prodotti"], optionTitles: ["Home", "Prodotti"], defaultValue: "home" },
startFilter: { type: ControlType.Enum, title: "Filtro", options: ["all", "trad", "torte", "gf", "mousse"], optionTitles: ["Tutti", "Monoporzioni", "Torte", "Senza glutine", "Mousse"], defaultValue: "all" },
})
