// Home + Shop + Product pages const { useState: useStateP, useEffect: useEffectP, useMemo: useMemoP } = React; // ===== HOME ===== function HomePage() { const { t, lang, formatPrice, addToCart } = window.useStore(); const C = MASKA_CONTENT; const flagship = MASKA_CATALOG.groups.hero_flagship; const wraps = MASKA_CATALOG.groups.wraps.slice(0, 4); return (
{/* Hero */}
EST. 2013 · Dubai
522 products · 5 stores
{lang === "ar" ? "مصنوع يدوياً في د3" : "Handmade in d3"}
― {C.brand.since}

{t("hero_h1_a")}
{t("hero_h1_b")}

{t("hero_sub")}

{t("shop_by_occasion_cta")} {t("book_wrapping")}
{/* Shop by occasion */}
― {t("occasion_eyebrow")}

{t("occasion_title")}

{t("occasion_sub")}

{t("all_products")}
{C.occasions.map(o => (
{lang === "ar" ? o.ar : o.en}
{o.meta_en}
))}
{/* Signature */}
The original fabric wrap
↻ {lang === "ar" ? "قابل لإعادة الاستخدام" : "Reusable by design"}
― {t("signature_eyebrow")}

{t("signature_title").split('.')[0]}.
{lang === "ar" ? "" : "Since 2013."}

{t("signature_body")}

{lang === "ar" ? "تراث الفوروشيكي" : "Furoshiki heritage"}
{t("reusable")}
{lang === "ar" ? "صناعة يدوية" : "Hand-finished"}
{/* flagship row */}
{lang === "ar" ? "المجموعات الأكثر شغفاً" : "The signature collection"}
{flagship.map(p => )}
{/* Services teaser */}
― {t("services_eyebrow")}

{t("services_title")}

― 01 / Walk-in

{t("svc_in_store_title")}

{t("in_store_wrapping_body")}

{t("learn_more")}
― 02 / Door-to-Door

{t("svc_door_title")}

{t("door_to_door_body")}

{t("book_now")}
{/* Story band */}
Furoshiki origin
古 風呂敷FUROSHIKI · JAPAN
― {t("story_eyebrow")}

{t("story_title")}

{t("story_body")}

2013 {lang === "ar" ? "بدأت من جميرا" : "Born in Jumeirah"}
2014 {lang === "ar" ? "مبادرة آلة الخياطة" : "Sewing Machine Initiative"}
2015 {lang === "ar" ? "استوديو في d3" : "Studio at d3"}
2024 {lang === "ar" ? "أسبوع دبي للتصميم" : "Dubai Design Week"}
{/* Press row */}
― {t("press_eyebrow")}
{MASKA_CONTENT.press.map(p =>
{p}
)}
{/* Stores + Corporate CTA */}
― {lang === "ar" ? "تجدنا في" : "Find us in"}

{lang === "ar" ? "خمسة متاجر في دبي." : "Five stores across Dubai."}

{lang === "ar" ? "من جميرا إلى ند الشبا — يمكنك المرور لتغليف هديتك في عشر دقائق، أو لتصفّح لفائفنا الموسمية." : "From Jumeirah to Nad Al Sheba — walk in to have a gift wrapped in ten minutes, or browse our seasonal wraps in person."}

{lang === "ar" ? "اعثر على متجر" : "Find a store"}
― {lang === "ar" ? "للشركات" : "For corporate"}

{lang === "ar" ? "هدايا تحمل اسم علامتك." : "Gifts that carry your brand."}

{lang === "ar" ? "من 50 إلى 5000 قطعة — مصممة، ملفوفة، موصلة بأسلوب ماسكا." : "From 50 to 5,000 pieces — designed, wrapped and dispatched the MASKA way."}

{lang === "ar" ? "أرسل طلباً" : "Send an enquiry"}
); } window.HomePage = HomePage; // ===== SHOP ===== function ShopPage({ filter = null }) { const { t, lang, formatPrice } = window.useStore(); const C = MASKA_CONTENT; const route = useRoute(); // Resolve products const collectionMeta = useMemoP(() => { if (!filter) return null; const occ = C.occasions.find(o => o.id === filter); if (occ) return { label: lang === "ar" ? occ.ar : occ.en, sub: occ.meta_en, group: occ.group, kind: "occasion" }; const ty = C.types.find(o => o.id === filter); if (ty) return { label: lang === "ar" ? ty.ar : ty.en, sub: "", group: ty.group, kind: "type" }; return null; }, [filter, lang]); const products = useMemoP(() => { if (!collectionMeta) { // shop hub — show variety from many groups const groups = ["giftsets", "wraps", "envelopes", "cards", "baskets", "boxes", "charms"]; const all = []; const seen = new Set(); for (const g of groups) { for (const p of (MASKA_CATALOG.groups[g] || [])) { if (!seen.has(p.handle)) { seen.add(p.handle); all.push(p); } } } return all; } return MASKA_CATALOG.groups[collectionMeta.group] || []; }, [collectionMeta]); const [sort, setSort] = useStateP("newest"); const sorted = useMemoP(() => { const a = [...products]; if (sort === "price_low") a.sort((x,y) => parseFloat(x.price) - parseFloat(y.price)); else if (sort === "price_high") a.sort((x,y) => parseFloat(y.price) - parseFloat(x.price)); return a; }, [products, sort]); // Determine which tab is "active" for hub view const activeTab = filter || "all"; return (
{/* Shop hero */}
{lang === "ar" ? "الرئيسية" : "Home"} / {t("shop")} {collectionMeta && <>/ {collectionMeta.label}}
― {collectionMeta ? (collectionMeta.kind === "occasion" ? t("shop_by_occasion") : t("shop_by_type")) : t("shop")}

{collectionMeta ? collectionMeta.label : (lang === "ar" ? "كل الهدايا" : "Everything we wrap.")}

{collectionMeta?.sub &&

{collectionMeta.sub}

} {/* Two-track tabs */}
{t("shop_by_occasion")}
{C.occasions.map(o => ( {lang === "ar" ? o.ar : o.en} ))}
{t("shop_by_type")}
{/* Sort + count */}
{sorted.length} {t("results_count")}
{t("sort")}:
{/* Grid */}
{sorted.length === 0 && (

{lang === "ar" ? "لا توجد منتجات بعد." : "Nothing here yet."}

{t("back_to_shop")}
)}
{sorted.map(p => )}
); } window.ShopPage = ShopPage; // ===== PRODUCT ===== function ProductPage({ handle }) { const { t, lang, formatPrice, addToCart } = window.useStore(); const product = MASKA_CATALOG.byHandle[handle]; const [imgIdx, setImgIdx] = useStateP(0); const [variant, setVariant] = useStateP(product?.variants?.[0]?.title || null); const [qty, setQty] = useStateP(1); const [giftMsg, setGiftMsg] = useStateP(""); useEffectP(() => { setImgIdx(0); setQty(1); setVariant(product?.variants?.[0]?.title || null); }, [handle]); if (!product) { return (

Product not found.

{t("back_to_shop")}
); } const fp = formatPrice(product.price); const crossSell = MASKA_CATALOG.groups.wraps.filter(p => p.handle !== handle).slice(0, 4); return (
{lang === "ar" ? "الرئيسية" : "Home"} / {t("shop")} / {product.title}
{product.title}/
{product.images.length > 1 && (
{product.images.map((img, i) => (
setImgIdx(i)}>
))}
)}
{(product.tags || []).filter(t => !/website|maska/i.test(t)).slice(0, 4).map(t =>
{t}
)}

{product.title}

{fp.ccy}{fp.num}
{product.body && (

{product.body}

)} {product.variants && product.variants.length > 1 && (

{t("variants_title")}

{product.variants.map(v => ( ))}
)}

{t("gift_message")}