create-brainerce-store 1.53.0 → 1.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,59 @@
1
+ import type { BlogPost } from 'brainerce';
2
+ import { buildArticleJsonLd, buildBreadcrumbJsonLd } from 'brainerce';
3
+ import { getNonce } from '@/core/lib/nonce';
4
+
5
+ interface ArticleJsonLdProps {
6
+ post: BlogPost;
7
+ url: string;
8
+ /** Store display name — feeds Article.publisher (and the author fallback). */
9
+ organizationName?: string;
10
+ }
11
+
12
+ /**
13
+ * Article + BreadcrumbList structured data for a blog post page.
14
+ *
15
+ * Uses the SDK builders for the schema shape, but renders the <script> here so
16
+ * we can attach the CSP nonce (the SDK's jsonLdScriptProps can't).
17
+ */
18
+ export async function ArticleJsonLd({ post, url, organizationName }: ArticleJsonLdProps) {
19
+ const nonce = await getNonce();
20
+ const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || '';
21
+
22
+ const articleJsonLd = buildArticleJsonLd(post, {
23
+ siteUrl: baseUrl,
24
+ path: url,
25
+ organizationName,
26
+ });
27
+
28
+ const breadcrumbJsonLd = buildBreadcrumbJsonLd([
29
+ { name: 'Home', url: baseUrl || '/' },
30
+ { name: 'Blog', url: `${baseUrl}/blog` },
31
+ { name: post.title, url },
32
+ ]);
33
+
34
+ return (
35
+ <>
36
+ <script
37
+ type="application/ld+json"
38
+ nonce={nonce}
39
+ suppressHydrationWarning
40
+ dangerouslySetInnerHTML={{ __html: serializeJsonLd(articleJsonLd) }}
41
+ />
42
+ <script
43
+ type="application/ld+json"
44
+ nonce={nonce}
45
+ suppressHydrationWarning
46
+ dangerouslySetInnerHTML={{ __html: serializeJsonLd(breadcrumbJsonLd) }}
47
+ />
48
+ </>
49
+ );
50
+ }
51
+
52
+ // Escape `<`, `>`, `&` so AI-generated article copy can't break out of the
53
+ // <script> element or inject HTML.
54
+ function serializeJsonLd(value: unknown): string {
55
+ return JSON.stringify(value)
56
+ .replace(/</g, '\\u003c')
57
+ .replace(/>/g, '\\u003e')
58
+ .replace(/&/g, '\\u0026');
59
+ }
@@ -0,0 +1,37 @@
1
+ import Link from 'next/link';
2
+
3
+ interface Crumb {
4
+ name: string;
5
+ /** Site-relative path, e.g. "/category/shoes". Omit on the current (last) crumb. */
6
+ href?: string;
7
+ }
8
+
9
+ /**
10
+ * Visible breadcrumb trail. Renders the exact same path structured data
11
+ * already declares (see category-json-ld.tsx / product-json-ld.tsx) as real
12
+ * `<Link>`s — search engines weight on-page navigation links much more than
13
+ * sitemap-only or script-only (JSON-LD) mentions of a URL.
14
+ */
15
+ export function Breadcrumbs({ items }: { items: Crumb[] }) {
16
+ if (items.length < 2) return null;
17
+ return (
18
+ <nav aria-label="Breadcrumb" className="text-muted-foreground mb-4 text-sm">
19
+ <ol className="flex flex-wrap items-center gap-1.5">
20
+ {items.map((item, idx) => (
21
+ <li key={`${item.name}-${idx}`} className="flex items-center gap-1.5">
22
+ {idx > 0 && <span aria-hidden="true">/</span>}
23
+ {item.href ? (
24
+ <Link href={item.href} className="hover:text-foreground transition-colors">
25
+ {item.name}
26
+ </Link>
27
+ ) : (
28
+ <span aria-current="page" className="text-foreground">
29
+ {item.name}
30
+ </span>
31
+ )}
32
+ </li>
33
+ ))}
34
+ </ol>
35
+ </nav>
36
+ );
37
+ }
@@ -0,0 +1,61 @@
1
+ import type { CategoryDetail } from 'brainerce';
2
+ import { buildCollectionPageJsonLd, buildBreadcrumbJsonLd } from 'brainerce';
3
+ import { getNonce } from '@/core/lib/nonce';
4
+
5
+ interface CategoryJsonLdProps {
6
+ category: CategoryDetail;
7
+ url: string;
8
+ }
9
+
10
+ /**
11
+ * CollectionPage + BreadcrumbList structured data for a category (collection)
12
+ * landing page. NEVER emit Product markup on a listing page — Google's Product
13
+ * rich results are single-product only (see ProductJsonLd for PDPs).
14
+ *
15
+ * Uses the SDK builders for the schema shape, but renders the <script> here so
16
+ * we can attach the CSP nonce (the SDK's jsonLdScriptProps can't).
17
+ */
18
+ export async function CategoryJsonLd({ category, url }: CategoryJsonLdProps) {
19
+ const nonce = await getNonce();
20
+ const baseUrl = process.env.NEXT_PUBLIC_SITE_URL || '';
21
+
22
+ const collectionJsonLd = buildCollectionPageJsonLd(category, { siteUrl: baseUrl, path: url });
23
+
24
+ // Breadcrumb: Home → ancestor categories → this category.
25
+ const crumbs: Array<{ name: string; url: string }> = [
26
+ { name: 'Home', url: baseUrl || '/' },
27
+ ];
28
+ for (const ancestor of category.breadcrumb) {
29
+ if (ancestor.slug) {
30
+ crumbs.push({ name: ancestor.name, url: `${baseUrl}/category/${ancestor.slug}` });
31
+ }
32
+ }
33
+ crumbs.push({ name: category.name, url });
34
+ const breadcrumbJsonLd = buildBreadcrumbJsonLd(crumbs);
35
+
36
+ return (
37
+ <>
38
+ <script
39
+ type="application/ld+json"
40
+ nonce={nonce}
41
+ suppressHydrationWarning
42
+ dangerouslySetInnerHTML={{ __html: serializeJsonLd(collectionJsonLd) }}
43
+ />
44
+ <script
45
+ type="application/ld+json"
46
+ nonce={nonce}
47
+ suppressHydrationWarning
48
+ dangerouslySetInnerHTML={{ __html: serializeJsonLd(breadcrumbJsonLd) }}
49
+ />
50
+ </>
51
+ );
52
+ }
53
+
54
+ // Escape `<`, `>`, `&` so merchant-authored category copy can't break out of
55
+ // the <script> element or inject HTML.
56
+ function serializeJsonLd(value: unknown): string {
57
+ return JSON.stringify(value)
58
+ .replace(/</g, '\\u003c')
59
+ .replace(/>/g, '\\u003e')
60
+ .replace(/&/g, '\\u0026');
61
+ }
@@ -58,8 +58,11 @@ export async function OrganizationJsonLd({ storeInfo, baseUrl }: OrganizationJso
58
58
  potentialAction: {
59
59
  '@type': 'SearchAction',
60
60
  target: {
61
+ // Must match the storefront's real search param — the product listing
62
+ // reads `?search=` (see use-product-listing.ts), not `?q=`. A wrong
63
+ // param makes the sitelinks search box land on an empty listing.
61
64
  '@type': 'EntryPoint',
62
- urlTemplate: `${baseUrl}/products?q={search_term_string}`,
65
+ urlTemplate: `${baseUrl}/products?search={search_term_string}`,
63
66
  },
64
67
  'query-input': 'required name=search_term_string',
65
68
  },
@@ -1,4 +1,4 @@
1
- import type { Product } from 'brainerce';
1
+ import type { Product, ShippingSummaryEntry } from 'brainerce';
2
2
  import { getProductPriceInfo } from 'brainerce';
3
3
  import { getNonce } from '@/core/lib/nonce';
4
4
  import { resolveCurrency } from '@/core/lib/resolve-currency';
@@ -8,9 +8,11 @@ interface ProductJsonLdProps {
8
8
  product: Product;
9
9
  url: string;
10
10
  currency?: string;
11
+ /** From `storeInfo.shipping` — real flat-rate/free zones only. Omitted entirely when unset, never fabricated. */
12
+ shipping?: ShippingSummaryEntry[];
11
13
  }
12
14
 
13
- export async function ProductJsonLd({ product, url, currency }: ProductJsonLdProps) {
15
+ export async function ProductJsonLd({ product, url, currency, shipping }: ProductJsonLdProps) {
14
16
  // Defer to the shared server helper so the env-var + USD fallback chain
15
17
  // lives in exactly one place across all server-side currency reads.
16
18
  const resolvedCurrency = resolveCurrency(null, currency);
@@ -24,6 +26,44 @@ export async function ProductJsonLd({ product, url, currency }: ProductJsonLdPro
24
26
  ? 'https://schema.org/InStock'
25
27
  : 'https://schema.org/OutOfStock';
26
28
 
29
+ // All Brainerce catalog listings are first-party new-goods sales — no
30
+ // used/refurbished condition data exists anywhere in the product model, so
31
+ // this is a deliberate always-true assumption, not a per-product field.
32
+ const itemCondition = 'https://schema.org/NewCondition';
33
+
34
+ const shippingDetails = (shipping ?? [])
35
+ .filter((z) => z.amount !== null)
36
+ .map((z) => ({
37
+ '@type': 'OfferShippingDetails',
38
+ shippingRate: { '@type': 'MonetaryAmount', value: z.amount, currency: resolvedCurrency },
39
+ shippingDestination: { '@type': 'DefinedRegion', addressCountry: z.countries },
40
+ ...(z.handlingTime != null || z.minDeliveryDays != null || z.maxDeliveryDays != null
41
+ ? {
42
+ deliveryTime: {
43
+ '@type': 'ShippingDeliveryTime',
44
+ ...(z.handlingTime != null
45
+ ? {
46
+ handlingTime: {
47
+ '@type': 'QuantitativeValue',
48
+ minValue: 0,
49
+ maxValue: z.handlingTime,
50
+ },
51
+ }
52
+ : {}),
53
+ ...(z.minDeliveryDays != null || z.maxDeliveryDays != null
54
+ ? {
55
+ transitTime: {
56
+ '@type': 'QuantitativeValue',
57
+ minValue: z.minDeliveryDays ?? z.maxDeliveryDays,
58
+ maxValue: z.maxDeliveryDays ?? z.minDeliveryDays,
59
+ },
60
+ }
61
+ : {}),
62
+ },
63
+ }
64
+ : {}),
65
+ }));
66
+
27
67
  const isVariable = product.type === 'VARIABLE';
28
68
  const offers =
29
69
  isVariable && product.priceMin
@@ -34,6 +74,8 @@ export async function ProductJsonLd({ product, url, currency }: ProductJsonLdPro
34
74
  offerCount: product.variants?.length ?? 1,
35
75
  priceCurrency: resolvedCurrency,
36
76
  availability,
77
+ itemCondition,
78
+ ...(shippingDetails.length > 0 ? { shippingDetails } : {}),
37
79
  url,
38
80
  }
39
81
  : {
@@ -41,6 +83,11 @@ export async function ProductJsonLd({ product, url, currency }: ProductJsonLdPro
41
83
  price: priceInfo.price,
42
84
  priceCurrency: resolvedCurrency,
43
85
  availability,
86
+ itemCondition,
87
+ ...(product.salePrice && product.salePriceEndsAt
88
+ ? { priceValidUntil: product.salePriceEndsAt }
89
+ : {}),
90
+ ...(shippingDetails.length > 0 ? { shippingDetails } : {}),
44
91
  url,
45
92
  };
46
93
 
@@ -48,6 +95,7 @@ export async function ProductJsonLd({ product, url, currency }: ProductJsonLdPro
48
95
  // and AI Overviews ingest this field directly and reject markup. Strip HTML
49
96
  // first; if the description is empty after stripping, fall back to the name.
50
97
  const cleanDescription = stripHtmlForSeo(product.description) || product.name;
98
+ const brandName = product.brands?.[0]?.name;
51
99
  const productJsonLd: Record<string, unknown> = {
52
100
  '@context': 'https://schema.org',
53
101
  '@type': 'Product',
@@ -56,6 +104,12 @@ export async function ProductJsonLd({ product, url, currency }: ProductJsonLdPro
56
104
  image: imageUrl,
57
105
  url,
58
106
  sku: product.sku || product.id,
107
+ // Brand + identifiers qualify the PDP for Google's free merchant listings
108
+ // (no Merchant Center feed needed). Emitted only when present — Google
109
+ // penalizes fabricated identifiers.
110
+ ...(brandName ? { brand: { '@type': 'Brand', name: brandName } } : {}),
111
+ ...(product.gtin ? { gtin: product.gtin } : {}),
112
+ ...(product.mpn ? { mpn: product.mpn } : {}),
59
113
  offers,
60
114
  };
61
115
 
@@ -23,6 +23,8 @@ export interface PublicStoreInfo {
23
23
  requireEmailVerification?: boolean;
24
24
  upsell?: StoreInfo['upsell'];
25
25
  i18n?: StoreInfo['i18n'];
26
+ /** Real flat-rate/free shipping zones — feeds Product JSON-LD `shippingDetails`. Public by design (merchants display shipping rates openly). */
27
+ shipping?: StoreInfo['shipping'];
26
28
  }
27
29
 
28
30
  /**
@@ -44,5 +46,6 @@ export function pickPublicStoreInfo(raw: StoreInfo): PublicStoreInfo {
44
46
  requireEmailVerification: raw.requireEmailVerification,
45
47
  upsell: raw.upsell,
46
48
  i18n: raw.i18n,
49
+ shipping: raw.shipping,
47
50
  };
48
51
  }
@@ -3,7 +3,7 @@
3
3
  @tailwind utilities;
4
4
 
5
5
  /* ---------------------------------------------------------------------------
6
- Design system — "Atelier" (premium modern jewelry commerce)
6
+ Design system — "Atelier" (premium modern handcrafted-goods commerce)
7
7
  Palette (5 total): warm white / warm ink / deep forest / warm sand (2 tints)
8
8
  + functional destructive. Tokens only — never raw colors in components.
9
9
  --------------------------------------------------------------------------- */
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "home": {
10
10
  "heroEyebrow": "New collection · Handcrafted",
11
- "heroTitle": "Jewelry that tells your story",
12
- "heroLead": "Delicate gold and silver designs, handcrafted with love — made to be with you through the small moments and the big ones.",
11
+ "heroTitle": "Pieces that tell your story",
12
+ "heroLead": "Thoughtfully designed, handcrafted with love — made to be with you through the small moments and the big ones.",
13
13
  "heroCtaSecondary": "Browse categories",
14
14
  "heroTrust": "Happy customers nationwide",
15
15
  "benefit1Title": "Fast home delivery",
@@ -17,37 +17,37 @@
17
17
  "benefit2Title": "Secure payment",
18
18
  "benefit2Desc": "Encrypted checkout, highest standard",
19
19
  "benefit3Title": "Quality materials",
20
- "benefit3Desc": "Gold, 925 silver and genuine stones",
20
+ "benefit3Desc": "Carefully sourced, built to last",
21
21
  "benefit4Title": "Easy returns",
22
22
  "benefit4Desc": "30 days to exchange or return, no questions",
23
23
  "featuredEyebrow": "Our picks",
24
24
  "featuredSubtitle": "The pieces our customers love most — hand-picked from the new collection.",
25
25
  "categoriesEyebrow": "Categories",
26
26
  "categoriesTitle": "Find the perfect piece",
27
- "categoriesSubtitle": "From delicate rings to statement necklaceseach one speaks its own language.",
27
+ "categoriesSubtitle": "From everyday favorites to statement piecesthere's something for everyone.",
28
28
  "catRings": "Rings",
29
29
  "catNecklaces": "Necklaces",
30
30
  "catEarrings": "Earrings",
31
31
  "catBracelets": "Bracelets",
32
32
  "catCta": "Shop the category",
33
33
  "storyEyebrow": "Our studio",
34
- "storyTitle": "Made by hand, worn by heart",
35
- "storyP1": "Every piece begins as a small sketch on paper — and ends as delicate handwork in our studio. We choose every stone and every link with care, so the piece that reaches you is exactly as we imagined it.",
36
- "storyP2": "We believe in jewelry that lasts: real materials, meticulous finish and full warranty on every piece. That is what love for the small details looks like.",
34
+ "storyTitle": "Made with care, made to last",
35
+ "storyP1": "Every piece begins as a small sketch on paper — and ends as delicate handwork in our studio. We choose every material and every detail with care, so the piece that reaches you is exactly as we imagined it.",
36
+ "storyP2": "We believe in pieces that last: real materials, meticulous finish and full warranty on every piece. That is what love for the small details looks like.",
37
37
  "storyCta": "Discover the collection",
38
38
  "storyStat1Value": "Handmade",
39
39
  "storyStat1Label": "Every piece is made in our studio",
40
- "storyStat2Value": "925 Silver",
41
- "storyStat2Label": "Genuine materials only",
40
+ "storyStat2Value": "Hand-finished",
41
+ "storyStat2Label": "Every piece checked before it ships",
42
42
  "testimonialsEyebrow": "Customer stories",
43
43
  "testimonialsTitle": "They already fell in love",
44
- "testimonial1Quote": "The necklace arrived in gorgeous packaging and looks even better than the photos. I got compliments on day one.",
44
+ "testimonial1Quote": "It arrived in gorgeous packaging and looks even better than the photos. I got compliments on day one.",
45
45
  "testimonial1Name": "Noa L.",
46
46
  "testimonial1Meta": "Tel Aviv",
47
- "testimonial2Quote": "I bought earrings as a gift for my mom and she has not taken them off since. Amazing quality and truly personal service.",
47
+ "testimonial2Quote": "I bought this as a gift for my mom and she has not put it down since. Amazing quality and truly personal service.",
48
48
  "testimonial2Name": "Shira B.",
49
49
  "testimonial2Meta": "Haifa",
50
- "testimonial3Quote": "The ring fits perfectly, the work is delicate and precise. You can feel every detail was made with love. Highly recommend.",
50
+ "testimonial3Quote": "It's exactly as described, the work is delicate and precise. You can feel every detail was made with love. Highly recommend.",
51
51
  "testimonial3Name": "Dana K.",
52
52
  "testimonial3Meta": "Jerusalem",
53
53
  "newsletterTitle": "Join our club",
@@ -88,7 +88,7 @@
88
88
  "shippingAtCheckout": "Shipping calculated at checkout"
89
89
  },
90
90
  "footer": {
91
- "tagline": "Handcrafted jewelry, designed with love in Israel.",
91
+ "tagline": "{{storeName}} handcrafted with love in Israel.",
92
92
  "followUs": "Follow us",
93
93
  "quickLinksTitle": "Quick links",
94
94
  "linkProducts": "All products",
@@ -8,8 +8,8 @@
8
8
  },
9
9
  "home": {
10
10
  "heroEyebrow": "קולקציה חדשה · עבודת יד",
11
- "heroTitle": "תכשיטים שמספרים את הסיפור שלך",
12
- "heroLead": "עיצובים עדינים מזהב ומכסף, בעבודת יד ובאהבה — נוצרו ללוות אתכן ברגעים הקטנים והגדולים.",
11
+ "heroTitle": "פריטים שמספרים את הסיפור שלך",
12
+ "heroLead": "עיצובים עדינים, בעבודת יד ובאהבה — נוצרו ללוות אתכן ברגעים הקטנים והגדולים.",
13
13
  "heroCtaSecondary": "לצפייה בקטגוריות",
14
14
  "heroTrust": "לקוחות מרוצות ברחבי הארץ",
15
15
  "benefit1Title": "משלוח מהיר עד הבית",
@@ -17,37 +17,37 @@
17
17
  "benefit2Title": "תשלום מאובטח",
18
18
  "benefit2Desc": "סליקה מוצפנת בתקן המחמיר ביותר",
19
19
  "benefit3Title": "חומרים איכותיים",
20
- "benefit3Desc": "זהב, כסף 925 ואבני חן אמיתיות",
20
+ "benefit3Desc": "נבחרים בקפידה, עמידים לאורך זמן",
21
21
  "benefit4Title": "החזרה קלה",
22
22
  "benefit4Desc": "30 יום להחלפה או החזרה, בלי שאלות",
23
23
  "featuredEyebrow": "הנבחרים שלנו",
24
24
  "featuredSubtitle": "הפריטים שהלקוחות שלנו הכי אוהבות — נבחרו בקפידה מהקולקציה החדשה.",
25
25
  "categoriesEyebrow": "קטגוריות",
26
- "categoriesTitle": "מצאו את התכשיט המושלם",
27
- "categoriesSubtitle": "מטבעות עדינות ועד שרשראות בולטות — לכל אחת יש את השפה שלה.",
26
+ "categoriesTitle": "מצאו את הפריט המושלם",
27
+ "categoriesSubtitle": "מהפריטים העדינים ועד הבולטים — לכל אחת יש את השפה שלה.",
28
28
  "catRings": "טבעות",
29
29
  "catNecklaces": "שרשראות",
30
30
  "catEarrings": "עגילים",
31
31
  "catBracelets": "צמידים",
32
32
  "catCta": "לצפייה בקטגוריה",
33
33
  "storyEyebrow": "הסטודיו שלנו",
34
- "storyTitle": "נוצר ביד, נלבש בלב",
35
- "storyP1": "כל תכשיט אצלנו מתחיל בסקיצה קטנה על נייר — ונגמר בעבודת יד עדינה בסטודיו. אנחנו בוחרים כל אבן וכל חוליה בקפידה, כדי שהתכשיט שיגיע אליכן יהיה בדיוק כמו שדמיינו אותו.",
36
- "storyP2": "אנחנו מאמינים בתכשיטים שנשארים: חומרים אמיתיים, גימור מוקפד ואחריות מלאה על כל פריט. ככה נראית אהבה לפרטים הקטנים.",
34
+ "storyTitle": "נוצר ביד, נאהב בלב",
35
+ "storyP1": "כל פריט אצלנו מתחיל בסקיצה קטנה על נייר — ונגמר בעבודת יד עדינה בסטודיו. אנחנו בוחרים כל חומר וכל פרט בקפידה, כדי שהפריט שיגיע אליכן יהיה בדיוק כמו שדמיינו אותו.",
36
+ "storyP2": "אנחנו מאמינים בפריטים שנשארים: חומרים אמיתיים, גימור מוקפד ואחריות מלאה על כל פריט. ככה נראית אהבה לפרטים הקטנים.",
37
37
  "storyCta": "לגלות את הקולקציה",
38
38
  "storyStat1Value": "עבודת יד",
39
39
  "storyStat1Label": "כל פריט נוצר בסטודיו שלנו",
40
- "storyStat2Value": "כסף 925",
41
- "storyStat2Label": "חומרים אמיתיים בלבד",
40
+ "storyStat2Value": "גימור מוקפד",
41
+ "storyStat2Label": "כל פריט נבדק לפני המשלוח",
42
42
  "testimonialsEyebrow": "לקוחות מספרות",
43
43
  "testimonialsTitle": "הן כבר התאהבו",
44
- "testimonial1Quote": "השרשרת הגיעה באריזה מהממת ונראית אפילו יותר טוב מבתמונות. קיבלתי מחמאות כבר ביום הראשון.",
44
+ "testimonial1Quote": "הפריט הגיע באריזה מהממת ונראה אפילו יותר טוב מבתמונות. קיבלתי מחמאות כבר ביום הראשון.",
45
45
  "testimonial1Name": "נועה ל.",
46
46
  "testimonial1Meta": "תל אביב",
47
- "testimonial2Quote": "קניתי עגילים במתנה לאמא שלי והיא לא מורידה אותם מאז. איכות מדהימה ושירות סופר אישי.",
47
+ "testimonial2Quote": "קניתי מתנה לאמא שלי והיא לא מפסיקה להשתמש בו מאז. איכות מדהימה ושירות סופר אישי.",
48
48
  "testimonial2Name": "שירה ב.",
49
49
  "testimonial2Meta": "חיפה",
50
- "testimonial3Quote": "הטבעת בדיוק במידה, העבודה עדינה ומוקפדת. מרגישים שכל פרט נעשה באהבה. ממליצה בחום.",
50
+ "testimonial3Quote": "בדיוק כמו שתואר, העבודה עדינה ומוקפדת. מרגישים שכל פרט נעשה באהבה. ממליצה בחום.",
51
51
  "testimonial3Name": "דנה כ.",
52
52
  "testimonial3Meta": "ירושלים",
53
53
  "newsletterTitle": "הצטרפו למועדון שלנו",
@@ -68,7 +68,7 @@
68
68
  "productDetail": {
69
69
  "quantityLabel": "כמות",
70
70
  "shippingNote": "משלוח מהיר עד הבית · החזרה קלה עד 30 יום",
71
- "guaranteeNote": "אחריות מלאה על כל תכשיט",
71
+ "guaranteeNote": "אחריות מלאה על כל פריט",
72
72
  "pickOne": "בחרו אחד",
73
73
  "upTo": "עד {max}",
74
74
  "pickExactly": "בחרו בדיוק {min}",
@@ -88,7 +88,7 @@
88
88
  "shippingAtCheckout": "משלוח יחושב בקופה"
89
89
  },
90
90
  "footer": {
91
- "tagline": "תכשיטים בעבודת יד, מעוצבים באהבה בישראל.",
91
+ "tagline": "{{storeName}} עבודת יד, מעוצב באהבה בישראל.",
92
92
  "followUs": "עקבו אחרינו",
93
93
  "quickLinksTitle": "ניווט מהיר",
94
94
  "linkProducts": "כל המוצרים",
@@ -35,10 +35,10 @@ export function CategoryTiles({ products }: { products: Product[] }) {
35
35
  const tiles: Tile[] = [];
36
36
 
37
37
  // Prefer real category data when the catalog has it.
38
- const byCategory = new Map<string, { name: string; items: Product[] }>();
38
+ const byCategory = new Map<string, { name: string; slug: string | null; items: Product[] }>();
39
39
  for (const p of products) {
40
40
  for (const cat of p.categories ?? []) {
41
- const entry = byCategory.get(cat.id) ?? { name: cat.name, items: [] };
41
+ const entry = byCategory.get(cat.id) ?? { name: cat.name, slug: cat.slug ?? null, items: [] };
42
42
  entry.items.push(p);
43
43
  byCategory.set(cat.id, entry);
44
44
  }
@@ -50,15 +50,21 @@ export function CategoryTiles({ products }: { products: Product[] }) {
50
50
  [...items].reverse().find((p) => p.images?.[0]?.url)?.images?.[0];
51
51
 
52
52
  if (byCategory.size >= 2) {
53
- for (const [id, { name, items }] of Array.from(byCategory.entries()).slice(0, 4)) {
53
+ for (const [id, { name, slug, items }] of Array.from(byCategory.entries()).slice(0, 4)) {
54
54
  const img = pickImage(items);
55
55
  if (!img?.url) continue;
56
+ // Prefer the real category landing page (SEO-indexed, has its own
57
+ // written description) — this is the only place in the storefront that
58
+ // links to it, so without a real slug it'd be an orphaned page. Fall
59
+ // back to the filtered grid for categories with no slug yet.
56
60
  tiles.push({
57
61
  key: id,
58
62
  label: name,
59
63
  imageUrl: img.url,
60
64
  imageAlt: img.alt || name,
61
- href: `/products?category=${encodeURIComponent(id)}`,
65
+ href: slug
66
+ ? `/category/${encodeURIComponent(slug)}`
67
+ : `/products?category=${encodeURIComponent(id)}`,
62
68
  count: items.length,
63
69
  });
64
70
  }
@@ -90,7 +96,7 @@ export function CategoryTiles({ products }: { products: Product[] }) {
90
96
  <div className="mb-8 max-w-xl lg:mb-10">
91
97
  <span className="eyebrow">{t('categoriesEyebrow')}</span>
92
98
  <h2 className="text-4xl sm:text-5xl">{t('categoriesTitle')}</h2>
93
- <p className="mt-3 text-muted-foreground">{t('categoriesSubtitle')}</p>
99
+ <p className="text-muted-foreground mt-3">{t('categoriesSubtitle')}</p>
94
100
  </div>
95
101
 
96
102
  <ul
@@ -109,11 +115,8 @@ export function CategoryTiles({ products }: { products: Product[] }) {
109
115
  : undefined
110
116
  }
111
117
  >
112
- <Link
113
- href={tile.href}
114
- className="group card card-hover block overflow-hidden"
115
- >
116
- <span className="relative block aspect-square overflow-hidden bg-secondary">
118
+ <Link href={tile.href} className="card card-hover group block overflow-hidden">
119
+ <span className="bg-secondary relative block aspect-square overflow-hidden">
117
120
  <Image
118
121
  src={tile.imageUrl}
119
122
  alt={tile.imageAlt}
@@ -124,16 +127,16 @@ export function CategoryTiles({ products }: { products: Product[] }) {
124
127
  </span>
125
128
  <span className="flex items-center justify-between gap-2 px-4 py-3.5">
126
129
  <span>
127
- <span className="block text-[15px] font-semibold text-foreground">
130
+ <span className="text-foreground block text-[15px] font-semibold">
128
131
  {tile.label}
129
132
  </span>
130
- <span className="block text-xs text-muted-foreground">
133
+ <span className="text-muted-foreground block text-xs">
131
134
  {tile.count} {tile.count === 1 ? tc('product') : tc('products')}
132
135
  </span>
133
136
  </span>
134
137
  <span
135
138
  aria-hidden="true"
136
- className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-secondary text-foreground transition-colors group-hover:bg-primary group-hover:text-primary-foreground"
139
+ className="bg-secondary text-foreground group-hover:bg-primary group-hover:text-primary-foreground flex h-8 w-8 shrink-0 items-center justify-center rounded-full transition-colors"
137
140
  >
138
141
  <IconArrowEnd size={16} className="rtl-flip" />
139
142
  </span>
@@ -9,7 +9,7 @@ import * as React from 'react';
9
9
  export type IconProps = {
10
10
  size?: 16 | 18 | 20 | 24 | 28 | 32 | 56;
11
11
  className?: string;
12
- /** stroke width — 1.75 default matches the light, jewelry-grade look */
12
+ /** stroke width — 1.75 default matches the light, boutique-grade look */
13
13
  strokeWidth?: number;
14
14
  };
15
15