@usethrottle/storefront-react 0.0.0-stage → 0.1.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.
Files changed (122) hide show
  1. package/CLAUDE.md +67 -0
  2. package/README.md +119 -2
  3. package/dist/StorefrontProvider-Br4wUHui.d.cts +559 -0
  4. package/dist/StorefrontProvider-DLEPEjg6.d.ts +559 -0
  5. package/dist/account/index.cjs +69 -0
  6. package/dist/account/index.cjs.map +1 -0
  7. package/dist/account/index.d.cts +23 -0
  8. package/dist/account/index.d.ts +23 -0
  9. package/dist/account/index.js +68 -0
  10. package/dist/account/index.js.map +1 -0
  11. package/dist/chunk-2LCPIY2P.cjs +16 -0
  12. package/dist/chunk-2LCPIY2P.cjs.map +1 -0
  13. package/dist/chunk-3A72UY6T.js +2126 -0
  14. package/dist/chunk-3A72UY6T.js.map +1 -0
  15. package/dist/chunk-3JMIVAHN.js +185 -0
  16. package/dist/chunk-3JMIVAHN.js.map +1 -0
  17. package/dist/chunk-4J6AGWNC.cjs +24 -0
  18. package/dist/chunk-4J6AGWNC.cjs.map +1 -0
  19. package/dist/chunk-4U6MYDZV.js +17 -0
  20. package/dist/chunk-4U6MYDZV.js.map +1 -0
  21. package/dist/chunk-66HDJVPS.js +22 -0
  22. package/dist/chunk-66HDJVPS.js.map +1 -0
  23. package/dist/chunk-6X2OZSNV.cjs +83 -0
  24. package/dist/chunk-6X2OZSNV.cjs.map +1 -0
  25. package/dist/chunk-6ZMMZ245.cjs +2127 -0
  26. package/dist/chunk-6ZMMZ245.cjs.map +1 -0
  27. package/dist/chunk-7R37CVAB.cjs +23 -0
  28. package/dist/chunk-7R37CVAB.cjs.map +1 -0
  29. package/dist/chunk-A3IFWQUV.js +368 -0
  30. package/dist/chunk-A3IFWQUV.js.map +1 -0
  31. package/dist/chunk-AYC2YK4E.cjs +95 -0
  32. package/dist/chunk-AYC2YK4E.cjs.map +1 -0
  33. package/dist/chunk-AZV5U7YB.cjs +18 -0
  34. package/dist/chunk-AZV5U7YB.cjs.map +1 -0
  35. package/dist/chunk-CE2SKNQP.cjs +71 -0
  36. package/dist/chunk-CE2SKNQP.cjs.map +1 -0
  37. package/dist/chunk-D76CRI4X.js +2175 -0
  38. package/dist/chunk-D76CRI4X.js.map +1 -0
  39. package/dist/chunk-DOAII637.cjs +186 -0
  40. package/dist/chunk-DOAII637.cjs.map +1 -0
  41. package/dist/chunk-DYHHAOMG.cjs +17 -0
  42. package/dist/chunk-DYHHAOMG.cjs.map +1 -0
  43. package/dist/chunk-EYSVU5SJ.js +196 -0
  44. package/dist/chunk-EYSVU5SJ.js.map +1 -0
  45. package/dist/chunk-HSUUDZWS.js +37 -0
  46. package/dist/chunk-HSUUDZWS.js.map +1 -0
  47. package/dist/chunk-HZ6VEN6Q.cjs +101 -0
  48. package/dist/chunk-HZ6VEN6Q.cjs.map +1 -0
  49. package/dist/chunk-IJOTLGPT.js +16 -0
  50. package/dist/chunk-IJOTLGPT.js.map +1 -0
  51. package/dist/chunk-ISDATHVC.js +219 -0
  52. package/dist/chunk-ISDATHVC.js.map +1 -0
  53. package/dist/chunk-LW2A6USV.js +100 -0
  54. package/dist/chunk-LW2A6USV.js.map +1 -0
  55. package/dist/chunk-M4YXSLRG.cjs +369 -0
  56. package/dist/chunk-M4YXSLRG.cjs.map +1 -0
  57. package/dist/chunk-NDUEJJLP.cjs +2176 -0
  58. package/dist/chunk-NDUEJJLP.cjs.map +1 -0
  59. package/dist/chunk-NNE4FYRT.js +820 -0
  60. package/dist/chunk-NNE4FYRT.js.map +1 -0
  61. package/dist/chunk-NW3EFHY2.js +15 -0
  62. package/dist/chunk-NW3EFHY2.js.map +1 -0
  63. package/dist/chunk-NZRUQUN5.js +167 -0
  64. package/dist/chunk-NZRUQUN5.js.map +1 -0
  65. package/dist/chunk-P6HHE57S.cjs +38 -0
  66. package/dist/chunk-P6HHE57S.cjs.map +1 -0
  67. package/dist/chunk-PHY7AY27.cjs +197 -0
  68. package/dist/chunk-PHY7AY27.cjs.map +1 -0
  69. package/dist/chunk-PNJOFFTL.cjs +128 -0
  70. package/dist/chunk-PNJOFFTL.cjs.map +1 -0
  71. package/dist/chunk-PXZQ4ONA.js +127 -0
  72. package/dist/chunk-PXZQ4ONA.js.map +1 -0
  73. package/dist/chunk-Q3VTUBPP.js +82 -0
  74. package/dist/chunk-Q3VTUBPP.js.map +1 -0
  75. package/dist/chunk-Q3XFD5UI.js +45 -0
  76. package/dist/chunk-Q3XFD5UI.js.map +1 -0
  77. package/dist/chunk-QM7KTT7F.js +94 -0
  78. package/dist/chunk-QM7KTT7F.js.map +1 -0
  79. package/dist/chunk-RLWZOLXL.js +70 -0
  80. package/dist/chunk-RLWZOLXL.js.map +1 -0
  81. package/dist/chunk-SV53BRP2.js +23 -0
  82. package/dist/chunk-SV53BRP2.js.map +1 -0
  83. package/dist/chunk-VWXJO427.cjs +821 -0
  84. package/dist/chunk-VWXJO427.cjs.map +1 -0
  85. package/dist/chunk-WIIOJDHR.cjs +220 -0
  86. package/dist/chunk-WIIOJDHR.cjs.map +1 -0
  87. package/dist/chunk-XQHGFWLG.cjs +46 -0
  88. package/dist/chunk-XQHGFWLG.cjs.map +1 -0
  89. package/dist/chunk-ZHCXI2ZZ.cjs +168 -0
  90. package/dist/chunk-ZHCXI2ZZ.cjs.map +1 -0
  91. package/dist/index-RSj2Rg62.d.cts +8 -0
  92. package/dist/index-RSj2Rg62.d.ts +8 -0
  93. package/dist/index.cjs +2829 -0
  94. package/dist/index.cjs.map +1 -0
  95. package/dist/index.d.cts +1718 -0
  96. package/dist/index.d.ts +1718 -0
  97. package/dist/index.js +2828 -0
  98. package/dist/index.js.map +1 -0
  99. package/dist/metadata-QhKw-tvz.d.cts +188 -0
  100. package/dist/metadata-QhKw-tvz.d.ts +188 -0
  101. package/dist/next/client.cjs +84 -0
  102. package/dist/next/client.cjs.map +1 -0
  103. package/dist/next/client.d.cts +40 -0
  104. package/dist/next/client.d.ts +40 -0
  105. package/dist/next/client.js +83 -0
  106. package/dist/next/client.js.map +1 -0
  107. package/dist/next/index.cjs +1090 -0
  108. package/dist/next/index.cjs.map +1 -0
  109. package/dist/next/index.d.cts +218 -0
  110. package/dist/next/index.d.ts +218 -0
  111. package/dist/next/index.js +1049 -0
  112. package/dist/next/index.js.map +1 -0
  113. package/dist/server/index.cjs +994 -0
  114. package/dist/server/index.cjs.map +1 -0
  115. package/dist/server/index.d.cts +229 -0
  116. package/dist/server/index.d.ts +229 -0
  117. package/dist/server/index.js +951 -0
  118. package/dist/server/index.js.map +1 -0
  119. package/dist/styles.css +2111 -0
  120. package/dist/use-part-DCfFk7kf.d.ts +24 -0
  121. package/dist/use-part-DgjPBL_O.d.cts +24 -0
  122. package/package.json +121 -3
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/app-throttle/app-throttle/packages/storefront-react/dist/chunk-6ZMMZ245.cjs","../src/link.tsx","../src/settings/normalize.ts","../src/styles/index.ts","../src/presets/bold.css.ts","../src/presets/clean.css.ts","../src/presets/editorial.css.ts","../src/presets/index.ts","../src/styles/base.css.ts","../src/styles/frame.css.ts","../src/styles/merch.css.ts","../src/styles/pages.css.ts","../src/styles/pieces.css.ts","../src/styles/product.css.ts","../src/styles/shop.css.ts","../src/styles/shopper.css.ts","../src/theme/to-variables.ts","../src/provider/router.ts","../src/provider/StorefrontProvider.tsx"],"names":["jsx","useMemo","value"],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACZkF,+CAAA;AAA3E,IAAM,YAAA,EAA6B,CAAC,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,OAAO,CAAA,EAAA,mBAAM,6BAAA,GAAC,EAAA,EAAG,GAAG,OAAA,CAAQ,CAAA;ADejG;AACA;AEjBA,IAAM,UAAA,EAAY;AAAA,EAChB,WAAA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a,EAAA;AAGN,EAAA;AACA,EAAA;AACD,EAAA;AACM,EAAA;AAC7B,IAAA;AACI,IAAA;AACuC,IAAA;AACI,IAAA;AACjC,IAAA;AACUC,IAAAA;AACL,IAAA;AACK,IAAA;AACD,IAAA;AACxCA,IAAAA;AACoC,EAAA;AAEN,EAAA;AACW,EAAA;AACA,EAAA;AAEpCD,EAAAA;AACL,IAAA;AACL,MAAA;AACA,MAAA;AACa,MAAA;AACA,MAAA;AACb,MAAA;AACA,MAAA;AACA,MAAA;AACA,MAAA;AACkB,MAAA;AACM,MAAA;AACD,MAAA;AACvB,MAAA;AAC6B,MAAA;AAC/B,IAAA;AACgD,IAAA;AAClD,EAAA;AAGsB,EAAA;AAIZD,IAAAA;AAAC,MAAA;AAAA,MAAA;AACmD,QAAA;AACxC,QAAA;AAAA,MAAA;AAEV,IAAA;AACwB,oBAAA;AACzB,MAAA;AAAA,MAAA;AACC,QAAA;AACQ,QAAA;AAC6B,QAAA;AACrC,QAAA;AACA,QAAA;AAEC,QAAA;AAAA,MAAA;AAEL,IAAA;AAGN,EAAA;AAEJ;AAGuH;AAC7D,EAAA;AACjD,EAAA;AACT;AAUG;AACmD,EAAA;AACN,EAAA;AACR,EAAA;AAIa,EAAA;AAI7C,EAAA;AAAiE;AACgC,2BAAA;AAAQ;AAAA;AAEzD,EAAA;AAEE,EAAA;AAGtD,EAAA;AAAC,IAAA;AAAA,IAAA;AACC,MAAA;AACA,MAAA;AAC6C,MAAA;AAClB,MAAA;AACI,MAAA;AACA,MAAA;AACL,MAAA;AACH,MAAA;AACa,MAAA;AACN,MAAA;AACR,MAAA;AACtB,MAAA;AAEC,MAAA;AAAmB,QAAA;AACH,QAAA;AAChB,QAAA;AAAA,MAAA;AAAA,IAAA;AACH,EAAA;AAEJ;AlB+uD0D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/app-throttle/app-throttle/packages/storefront-react/dist/chunk-6ZMMZ245.cjs","sourcesContent":[null,"import type { AnchorHTMLAttributes, ComponentType } from 'react';\n\n/** What a link renders as: a plain `<a>` by default, `next/link` through `StorefrontNextProvider`. */\nexport type LinkComponent = ComponentType<\n AnchorHTMLAttributes<HTMLAnchorElement> & { href: string; prefetch?: boolean }\n>;\n\n/** The default `linkComponent`: a plain anchor (`prefetch` has no meaning here). */\nexport const DefaultLink: LinkComponent = ({ prefetch: _prefetch, ...anchor }) => <a {...anchor} />;\n","import type { ResolvedStorefrontSettings } from '@usethrottle/catalog';\nimport { DEFAULT_SETTINGS } from './defaults';\nimport { isRecord, isUnsafeKey } from './guards';\n\n/** The settings a component reads: the catalog's resolved document with every field present. */\nexport type NormalizedSettings = ResolvedStorefrontSettings;\n\nconst SORT_KEYS = [\n 'relevance', 'featured', 'manual', 'title_asc', 'title_desc', 'price_asc', 'price_desc', 'newest', 'updated', 'best_rated',\n];\n\n/** Where an enum-valued setting lives and what it may hold. */\nconst ENUMS: ReadonlyArray<readonly [path: readonly string[], values: readonly string[]]> = [\n [['theme', 'colorScheme'], ['light', 'dark', 'auto']],\n [['theme', 'spacingScale'], ['compact', 'comfortable', 'roomy']],\n [['listing', 'pagination'], ['numbered', 'load_more', 'infinite']],\n [['listing', 'filterLayout'], ['sidebar', 'topbar', 'drawer']],\n [['listing', 'defaultSort'], SORT_KEYS],\n [['card', 'style'], ['standard', 'minimal', 'overlay', 'row']],\n [['product', 'layout'], ['classic', 'stacked', 'editorial']],\n [['product', 'sectionsStyle'], ['auto', 'tabs', 'accordion', 'stacked']],\n];\n\nconst SECTION_KEYS = ['description', 'specs', 'shipping', 'tags', 'categories', 'related', 'reviews'];\n\n\n/**\n * Fills `raw` from `defaults`, value by value: a missing or wrong-typed value\n * takes the default, an object recurses, an array is kept whole when it is an\n * array (the lists have no per-item defaults). A default of `null` accepts any\n * non-undefined value (a media ref, a menu target, a nullable number).\n */\nfunction fill(defaults: unknown, raw: unknown): unknown {\n if (isRecord(defaults)) {\n const given = isRecord(raw) ? raw : {};\n const out: Record<string, unknown> = {};\n for (const key of Object.keys(defaults)) out[key] = fill(defaults[key], given[key]);\n // Unknown keys are kept as they came: a newer catalog may send more.\n for (const key of Object.keys(given)) if (!isUnsafeKey(key) && !(key in out)) out[key] = given[key];\n return out;\n }\n if (Array.isArray(defaults)) return Array.isArray(raw) ? raw : defaults;\n if (defaults === null) return raw === undefined ? null : raw;\n if (typeof defaults === 'number') return typeof raw === 'number' && Number.isFinite(raw) ? raw : defaults;\n return typeof raw === typeof defaults ? raw : defaults;\n}\n\n/** Menu items with a string label and an object target; a malformed item (and its subtree) is dropped, `children` must be an array. */\nfunction cleanMenu(items: unknown): unknown[] {\n if (!Array.isArray(items)) return [];\n return items.flatMap((item): unknown[] => {\n if (!isRecord(item) || typeof item.label !== 'string' || !isRecord(item.target)) return [];\n if (item.children === undefined) return [item];\n if (!Array.isArray(item.children)) return [];\n return [{ ...item, children: cleanMenu(item.children) }];\n });\n}\n\nconst warned = new Set<string>();\nfunction warnOnce(key: string, message: string): void {\n if (process.env.NODE_ENV === 'production' || warned.has(key)) return;\n warned.add(key);\n // eslint-disable-next-line no-console\n console.warn(`[@usethrottle/storefront-react] ${message}`);\n}\n\n/** Test seam: forgets which warnings were already logged. */\nexport function resetSettingsWarnings(): void {\n warned.clear();\n}\n\nfunction get(obj: Record<string, unknown>, path: readonly string[]): unknown {\n let at: unknown = obj;\n for (const key of path) at = isRecord(at) ? at[key] : undefined;\n return at;\n}\n\nfunction set(obj: Record<string, unknown>, path: readonly string[], value: unknown): void {\n let at: Record<string, unknown> = obj;\n for (const key of path.slice(0, -1)) at = at[key] as Record<string, unknown>;\n at[path[path.length - 1]!] = value;\n}\n\n/**\n * Settings from whatever the catalog answered (or nothing): deep-filled from\n * `DEFAULT_SETTINGS`, an unknown enum value replaced by its default with one\n * development warning. Never throws, so a partial or newer answer renders.\n */\nexport function normalizeSettings(raw: unknown): NormalizedSettings {\n const out = fill(DEFAULT_SETTINGS, raw) as Record<string, unknown>;\n\n // An empty string is \"not set\" for a catalog string, as the SDK's own `t` reads it.\n const strings = out.strings as Record<string, unknown>;\n const defaultStrings = DEFAULT_SETTINGS.strings as Record<string, string>;\n for (const key of Object.keys(defaultStrings)) if (strings[key] === '') strings[key] = defaultStrings[key];\n\n for (const [path, allowed] of ENUMS) {\n const value = get(out, path);\n if (typeof value === 'string' && allowed.includes(value)) continue;\n const dotted = path.join('.');\n warnOnce(`enum:${dotted}`, `settings.${dotted} has an unknown value (${JSON.stringify(value)}); using the default.`);\n set(out, path, get(DEFAULT_SETTINGS as unknown as Record<string, unknown>, path));\n }\n\n // Lists whose items carry an enum key: drop an item the components could not place.\n const listing = out.listing as Record<string, unknown>;\n listing.sorts = (listing.sorts as unknown[]).filter(\n (s) => isRecord(s) && typeof s.key === 'string' && SORT_KEYS.includes(s.key),\n );\n const product = out.product as Record<string, unknown>;\n product.sections = (product.sections as unknown[]).filter(\n (s) => isRecord(s) && typeof s.key === 'string' && SECTION_KEYS.includes(s.key),\n );\n\n // A list item that is not an object would crash the component that reads its fields.\n const nav = out.navigation as Record<string, unknown>;\n nav.header = cleanMenu(nav.header);\n nav.footer = cleanMenu(nav.footer);\n const badges = out.badges as Record<string, unknown>;\n badges.custom = (badges.custom as unknown[]).filter(isRecord);\n const home = out.home as Record<string, unknown>;\n home.shelves = (home.shelves as unknown[]).filter(isRecord);\n\n return out as unknown as NormalizedSettings;\n}\n","import { primitiveStyles } from '@usethrottle/ui';\nimport { PRESET_CSS } from '../presets';\nimport { BASE_CSS } from './base.css';\nimport { FRAME_CSS } from './frame.css';\nimport { MERCH_CSS } from './merch.css';\nimport { PAGES_CSS } from './pages.css';\nimport { PIECES_CSS } from './pieces.css';\nimport { PRODUCT_CSS } from './product.css';\nimport { SHOP_CSS } from './shop.css';\nimport { SHOPPER_CSS } from './shopper.css';\n\n/** The `id` of the `<style>` element that carries the storefront's CSS (`@layer throttle`). */\nexport const STOREFRONT_STYLE_ID = 'throttle-storefront-styles';\n/** The `id` of the `<style>` element that declares the layer order first in `<head>`. */\nexport const STOREFRONT_LAYER_ORDER_ID = 'throttle-storefront-layer-order';\n/**\n * Declares the layer order before anything else does (R5). `throttle` sits between Tailwind v4's `base` (its\n * preflight reset) and `components`/`utilities`: the reset cannot override the storefront's own rules (a filled\n * button, a card's padding), while a utility or a store's rule still beats the package. The Tailwind names are\n * declared here empty so the order holds whether or not Tailwind is on the page.\n */\nexport const STOREFRONT_LAYER_ORDER = '@layer theme, base, throttle, components, utilities;';\n\n/**\n * The whole storefront stylesheet: the primitives (class prefix `tsf-`, so\n * auth's sheet never styles them), the base, each area's rules, then every\n * preset's rules, all inside `@layer throttle` so an unlayered store rule or a\n * Tailwind utility beats it. One source feeds the runtime injector and\n * `dist/styles.css`.\n */\nexport const STOREFRONT_STYLES =\n '@layer throttle{' +\n primitiveStyles('tsf-') +\n BASE_CSS +\n PIECES_CSS +\n SHOP_CSS +\n PRODUCT_CSS +\n FRAME_CSS +\n MERCH_CSS +\n SHOPPER_CSS +\n PAGES_CSS +\n PRESET_CSS +\n '}';\n","/** `bold`'s per-preset rules. Every rule is scoped by `[data-throttle-preset]`. */\nexport const BOLD_CSS = `\n[data-throttle-preset=\"bold\"] {\n --throttle-sf-heading-weight: 800;\n --throttle-sf-heading-tracking: 0.02em;\n --throttle-sf-heading-transform: uppercase;\n}\n`;\n","/** `clean`'s per-preset rules. Every rule is scoped by `[data-throttle-preset]` (and so may use a descendant selector). */\nexport const CLEAN_CSS = `\n[data-throttle-preset=\"clean\"] {\n --throttle-sf-heading-weight: 600;\n --throttle-sf-heading-tracking: -0.01em;\n --throttle-sf-heading-transform: none;\n}\n`;\n","/** `editorial`'s per-preset rules. Every rule is scoped by `[data-throttle-preset]`. */\nexport const EDITORIAL_CSS = `\n[data-throttle-preset=\"editorial\"] {\n --throttle-sf-heading-weight: 400;\n --throttle-sf-heading-tracking: 0;\n --throttle-sf-heading-transform: none;\n}\n`;\n","import { BOLD_CSS } from './bold.css';\nimport { CLEAN_CSS } from './clean.css';\nimport { EDITORIAL_CSS } from './editorial.css';\n\n/** Every preset's CSS, after the base and area rules so a preset wins on equal specificity. Tokens are `@usethrottle/ui/presets`'. */\nexport const PRESET_CSS = CLEAN_CSS + EDITORIAL_CSS + BOLD_CSS;\n","/**\n * The storefront's own base rules (the primitives' come from `primitiveStyles`).\n * Single-class selectors and logical properties only: a class passed through\n * `classNames` must win on equal specificity, and the sheet must hold in rtl.\n * No backticks inside: this is a template literal.\n */\nexport const BASE_CSS = `\n.tsf-root {\n --throttle-sf-accent: #2563eb;\n --throttle-sf-accent-hover: #1d4ed8;\n --throttle-sf-accent-subtle: #eaf0fd;\n --throttle-sf-sale: #b91c1c;\n --throttle-sf-success: #15803d;\n --throttle-sf-warning: #b45309;\n --throttle-sf-danger: #b91c1c;\n --throttle-sf-card-radius: 8px;\n --throttle-sf-grid-gap: 20px;\n --throttle-sf-heading-weight: 600;\n --throttle-sf-heading-tracking: -0.01em;\n --throttle-sf-heading-transform: none;\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n text-align: start;\n}\n\n.tsf-slot-outlet { display: block; }\n`;\n","/**\n * The store frame's rules. Single-class selectors and logical properties only; a state is a `:where()`\n * attribute so it stays one class in specificity. No backticks inside: this is a template literal.\n */\nexport const FRAME_CSS = `\n.tsf-skip-link {\n position: absolute;\n inset-inline-start: 8px;\n inset-block-start: -120px;\n z-index: 1000;\n padding: 12px 16px;\n border-radius: 8px;\n background: var(--throttle-color-primary);\n color: var(--throttle-color-primary-foreground);\n font-weight: 600;\n text-decoration: none;\n}\n.tsf-skip-link:focus { inset-block-start: 8px; }\n\n.tsf-store-frame { display: flex; flex-direction: column; min-block-size: 100vh; }\n.tsf-store-frame-main { flex: 1 0 auto; }\n.tsf-store-frame-main:focus { outline: none; }\n\n.tsf-announcement-bar {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n min-block-size: 44px;\n padding-block: 4px;\n padding-inline: 52px;\n background: var(--throttle-color-primary);\n color: var(--throttle-color-primary-foreground);\n font-size: 13px;\n text-align: center;\n}\n.tsf-announcement-bar-text { display: inline-flex; align-items: center; min-block-size: 44px; margin: 0; color: inherit; text-decoration: none; }\n.tsf-announcement-bar-text:hover { text-decoration: underline; }\n.tsf-announcement-bar-dismiss {\n position: absolute;\n inset-inline-end: 4px;\n inset-block-start: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.tsf-header:focus { outline: none; }\n.tsf-header { border-block-end: 1px solid var(--throttle-color-border); background: var(--throttle-color-background); color: var(--throttle-color-foreground); }\n.tsf-header-bar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 4px 12px;\n max-inline-size: 1280px;\n margin-inline: auto;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.tsf-header-menu-button,\n.tsf-header-drawer-close,\n.tsf-category-nav-toggle,\n.tsf-cart-button,\n.tsf-account-button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n text-decoration: none;\n}\n.tsf-header-menu-button:hover,\n.tsf-header-drawer-close:hover,\n.tsf-cart-button:hover,\n.tsf-account-button:hover { background: var(--throttle-color-muted); }\n@media (min-width: 960px) { .tsf-header-menu-button { display: none; } }\n\n.tsf-header-brand {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n flex: none;\n min-inline-size: 44px;\n min-block-size: 44px;\n color: inherit;\n font-size: 20px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n text-decoration: none;\n}\n.tsf-header-logo { display: block; block-size: 32px; inline-size: auto; max-inline-size: 160px; }\n.tsf-header-store-name:where([data-has-logo]) {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n.tsf-header-search { order: 3; flex: 1 1 100%; min-inline-size: 0; }\n@media (min-width: 640px) {\n .tsf-header-search { order: 0; flex: 1 1 auto; max-inline-size: 520px; margin-inline: auto; }\n}\n.tsf-header-actions { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: auto; }\n@media (min-width: 640px) { .tsf-header-actions { margin-inline-start: 0; } }\n\n.tsf-header-nav-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n max-inline-size: 1280px;\n margin-inline: auto;\n padding-inline: 16px;\n}\n@media (max-width: 959px) { .tsf-header-nav-row { display: none; } }\n.tsf-header-prefs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-inline-start: auto; }\n.tsf-header-prefs:where([data-in-drawer]) { margin-inline-start: 0; padding-block: 8px; padding-inline: 16px; }\n.tsf-header-drawer-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-block: 8px;\n padding-inline: 16px;\n border-block-end: 1px solid var(--throttle-color-border);\n}\n.tsf-header-drawer-title { margin: 0; font-size: 18px; font-weight: var(--throttle-sf-heading-weight); }\n\n.tsf-category-nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; margin: 0; padding: 0; list-style: none; }\n.tsf-category-nav-list:where([data-stacked=\"true\"]) { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding-block: 8px; padding-inline: 16px; }\n.tsf-category-nav-item { position: relative; display: flex; align-items: center; }\n.tsf-category-nav-item:where([data-stacked=\"true\"]) { flex-wrap: wrap; }\n.tsf-category-nav-link {\n display: inline-flex;\n align-items: center;\n min-block-size: 44px;\n color: inherit;\n text-decoration: none;\n}\n.tsf-category-nav-link:hover { color: var(--throttle-sf-accent); }\n.tsf-category-nav-toggle { min-inline-size: 28px; }\n.tsf-category-nav-panel {\n position: absolute;\n inset-block-start: 100%;\n inset-inline-start: 0;\n z-index: 30;\n min-inline-size: 200px;\n margin: 0;\n padding: 8px;\n list-style: none;\n background: var(--throttle-color-background);\n border: 1px solid var(--throttle-color-border);\n border-radius: var(--throttle-radius, 8px);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n.tsf-category-nav-panel:where([data-stacked=\"true\"]) {\n position: static;\n flex-basis: 100%;\n min-inline-size: 0;\n padding-block: 0;\n padding-inline: 16px 0;\n border: 0;\n box-shadow: none;\n}\n\n.tsf-search-box {\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n min-block-size: 44px;\n padding-inline: 12px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: 999px;\n background: var(--throttle-color-background);\n color: var(--throttle-color-muted-foreground);\n}\n.tsf-search-box:focus-within { outline: 2px solid var(--throttle-sf-accent); outline-offset: 2px; }\n.tsf-search-box-input {\n flex: 1 1 auto;\n min-inline-size: 0;\n padding-block: 10px;\n border: 0;\n outline: none;\n background: transparent;\n color: var(--throttle-color-foreground);\n font: inherit;\n}\n.tsf-search-box-panel {\n position: absolute;\n inset-inline: 0;\n inset-block-start: calc(100% + 4px);\n z-index: 40;\n max-block-size: min(70vh, 480px);\n overflow: auto;\n padding: 8px;\n border: 1px solid var(--throttle-color-border);\n border-radius: var(--throttle-radius, 8px);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);\n}\n.tsf-search-box-group-label {\n padding-block: 8px 4px;\n padding-inline: 8px;\n color: var(--throttle-color-muted-foreground);\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n}\n.tsf-search-box-option,\n.tsf-search-box-all {\n display: flex;\n align-items: center;\n gap: 10px;\n min-block-size: 44px;\n padding: 6px 8px;\n border-radius: 6px;\n color: inherit;\n text-decoration: none;\n}\n.tsf-search-box-option:hover,\n.tsf-search-box-all:hover,\n.tsf-search-box-option:where([aria-selected=\"true\"]),\n.tsf-search-box-all:where([aria-selected=\"true\"]) { background: var(--throttle-color-muted); }\n.tsf-search-box-all { font-weight: 600; color: var(--throttle-sf-accent); }\n.tsf-search-box-thumb { flex: none; inline-size: 40px; }\n.tsf-search-box-option-name { flex: 1 1 auto; min-inline-size: 0; overflow-wrap: anywhere; }\n.tsf-search-box-option-meta { flex: none; color: var(--throttle-color-muted-foreground); font-size: 13px; }\n.tsf-search-box-none { margin: 0; padding: 8px; color: var(--throttle-color-muted-foreground); }\n.tsf-search-box-status {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.tsf-locale-switch,\n.tsf-currency-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }\n.tsf-locale-switch-label,\n.tsf-currency-switch-label { color: var(--throttle-color-muted-foreground); }\n.tsf-locale-switch-select,\n.tsf-currency-switch-select {\n min-block-size: 44px;\n padding-inline: 8px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: 6px;\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n}\n\n.tsf-cart-button-count {\n position: absolute;\n inset-block-start: 4px;\n inset-inline-end: 2px;\n min-inline-size: 18px;\n block-size: 18px;\n padding-inline: 4px;\n border-radius: 999px;\n background: var(--throttle-sf-accent);\n color: #ffffff;\n font-size: 11px;\n font-weight: 600;\n line-height: 18px;\n text-align: center;\n font-variant-numeric: tabular-nums;\n}\n.tsf-cart-button-count:where([data-empty]) { display: none; }\n\n.tsf-header-menu-button:focus-visible,\n.tsf-header-drawer-close:focus-visible,\n.tsf-header-brand:focus-visible,\n.tsf-category-nav-link:focus-visible,\n.tsf-category-nav-toggle:focus-visible,\n.tsf-cart-button:focus-visible,\n.tsf-account-button:focus-visible,\n.tsf-announcement-bar-dismiss:focus-visible,\n.tsf-announcement-bar-text:focus-visible,\n.tsf-footer-link:focus-visible,\n.tsf-search-box-option:focus-visible,\n.tsf-search-box-all:focus-visible,\n.tsf-locale-switch-select:focus-visible,\n.tsf-currency-switch-select:focus-visible { outline: 2px solid var(--throttle-sf-accent); outline-offset: 2px; }\n\n.tsf-footer {\n margin-block-start: 48px;\n padding-block: 32px;\n padding-inline: 16px;\n border-block-start: 1px solid var(--throttle-color-border);\n background: var(--throttle-color-surface);\n color: var(--throttle-color-foreground);\n}\n.tsf-footer-brand,\n.tsf-footer-extra { max-inline-size: 1280px; margin-inline: auto; margin-block-end: 24px; }\n.tsf-footer-extra { margin-block: 24px 0; }\n.tsf-footer-nav { max-inline-size: 1280px; margin-inline: auto; }\n.tsf-footer-list { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 40px; margin: 0; padding: 0; list-style: none; }\n.tsf-footer-sublist { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }\n.tsf-footer-link { display: inline-flex; align-items: center; min-inline-size: 44px; min-block-size: 44px; color: inherit; text-decoration: none; }\n.tsf-footer-link:hover { color: var(--throttle-sf-accent); text-decoration: underline; }\n.tsf-footer-copyright { max-inline-size: 1280px; margin-block: 24px 0; margin-inline: auto; color: color-mix(in srgb, var(--throttle-color-muted-foreground) 75%, var(--throttle-color-foreground)); font-size: 13px; }\n`;\n","/**\n * The merchandising sections' rules. Single-class selectors and logical\n * properties only. The grid reads its column counts from custom properties the\n * section sets. No backticks inside: this is a template literal.\n */\nexport const MERCH_CSS = `\n.tsf-merch-skeleton { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--throttle-sf-grid-gap); }\n.tsf-merch-skeleton-item { aspect-ratio: 4 / 5; border-radius: var(--throttle-sf-card-radius); background: var(--throttle-color-muted); }\n@media (min-width: 768px) { .tsf-merch-skeleton { grid-template-columns: repeat(4, minmax(0, 1fr)); } }\n\n.tsf-collection-shelf { display: block; }\n.tsf-collection-shelf-header,\n.tsf-product-carousel-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-block-end: 16px; }\n.tsf-collection-shelf-title,\n.tsf-product-carousel-title { margin: 0; font-size: 22px; font-weight: var(--throttle-sf-heading-weight); letter-spacing: var(--throttle-sf-heading-tracking); text-transform: var(--throttle-sf-heading-transform); }\n.tsf-collection-shelf-eyebrow,\n.tsf-product-carousel-eyebrow { flex: 1 0 100%; margin: 0; color: var(--throttle-sf-accent); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }\n.tsf-collection-shelf-link { display: inline-flex; align-items: center; min-block-size: 44px; color: var(--throttle-sf-accent); font-weight: 500; text-decoration: none; }\n.tsf-collection-shelf-link:hover { color: var(--throttle-sf-accent-hover); text-decoration: underline; }\n.tsf-collection-shelf-grid { display: grid; grid-template-columns: repeat(var(--tsf-columns-mobile, 2), minmax(0, 1fr)); gap: var(--throttle-sf-grid-gap); margin: 0; padding: 0; list-style: none; }\n.tsf-collection-shelf-item { min-inline-size: 0; }\n@media (min-width: 768px) { .tsf-collection-shelf-grid { grid-template-columns: repeat(var(--tsf-columns-desktop, 4), minmax(0, 1fr)); } }\n\n.tsf-product-carousel { display: block; }\n.tsf-product-carousel-controls { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }\n.tsf-product-carousel-prev,\n.tsf-product-carousel-next { display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; padding: 0; border: 1px solid var(--throttle-color-border-control); border-radius: 999px; background: var(--throttle-color-background); color: var(--throttle-color-foreground); cursor: pointer; }\n.tsf-product-carousel-prev:hover:not(:disabled),\n.tsf-product-carousel-next:hover:not(:disabled) { border-color: var(--throttle-color-foreground); }\n.tsf-product-carousel-prev:disabled,\n.tsf-product-carousel-next:disabled { opacity: 0.4; cursor: default; }\n.tsf-product-carousel-track { display: flex; gap: var(--throttle-sf-grid-gap); margin: 0; padding: 0; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }\n.tsf-product-carousel-item { flex: 0 0 68%; min-inline-size: 0; scroll-snap-align: start; }\n@media (min-width: 640px) { .tsf-product-carousel-item { flex-basis: calc((100% - var(--throttle-sf-grid-gap)) / 2); } }\n@media (min-width: 900px) { .tsf-product-carousel-item { flex-basis: calc((100% - 2 * var(--throttle-sf-grid-gap)) / 3); } }\n@media (min-width: 1200px) { .tsf-product-carousel-item { flex-basis: calc((100% - 3 * var(--throttle-sf-grid-gap)) / 4); } }\n@media (prefers-reduced-motion: no-preference) { .tsf-product-carousel-track { scroll-behavior: smooth; } }\n\n.tsf-featured-product { display: grid; gap: 24px; align-items: center; }\n.tsf-featured-product-media { min-inline-size: 0; max-inline-size: 520px; }\n.tsf-featured-product-media-link { display: block; }\n.tsf-featured-product-placeholder { inline-size: 100%; background: var(--throttle-color-muted); border-radius: var(--throttle-sf-card-radius); }\n.tsf-featured-product-body { display: grid; gap: 12px; justify-items: start; min-inline-size: 0; }\n.tsf-featured-product-title { margin: 0; font-size: 28px; font-weight: var(--throttle-sf-heading-weight); letter-spacing: var(--throttle-sf-heading-tracking); text-transform: var(--throttle-sf-heading-transform); }\n.tsf-featured-product-price { margin: 0; font-size: 18px; }\n.tsf-featured-product-from { font-size: 14px; color: var(--throttle-color-muted-foreground); }\n.tsf-featured-product-description { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; color: var(--throttle-color-muted-foreground); }\n.tsf-featured-product-link { display: inline-flex; padding: 10px 20px; border-radius: var(--throttle-radius-md, 6px); background: var(--throttle-sf-accent); color: var(--throttle-color-background); font-weight: 600; text-decoration: none; }\n.tsf-featured-product-link:hover { background: var(--throttle-sf-accent-hover); }\n@media (min-width: 768px) {\n .tsf-featured-product:where([data-layout=\"image-left\"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }\n .tsf-featured-product:where([data-layout=\"image-right\"]) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }\n .tsf-featured-product-media:where([data-layout=\"image-right\"]) { order: 2; }\n}\n\n.tsf-category-directory { display: block; }\n.tsf-category-directory-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }\n.tsf-category-directory-list:where([data-layout=\"list\"]) { grid-template-columns: minmax(0, 1fr); gap: 4px; }\n@media (min-width: 768px) { .tsf-category-directory-list:where([data-layout=\"grid\"]) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }\n.tsf-category-directory-item { min-inline-size: 0; }\n.tsf-category-directory-link { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--throttle-color-border); border-radius: var(--throttle-sf-card-radius); color: inherit; text-decoration: none; }\n.tsf-category-directory-link:hover { border-color: var(--throttle-color-foreground); }\n.tsf-category-directory-image { inline-size: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--throttle-sf-card-radius); background: var(--throttle-color-muted); }\n.tsf-category-directory-name { font-weight: 600; }\n.tsf-category-directory-count { font-size: 13px; color: var(--throttle-color-muted-foreground); }\n.tsf-category-directory-children { display: grid; gap: 2px; margin: 6px 0 0; padding: 0; padding-inline-start: 16px; list-style: none; font-size: 14px; }\n\n.tsf-reviews-list { display: block; }\n.tsf-reviews-list-items { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }\n.tsf-reviews-list-item { display: grid; gap: 6px; padding-block-end: 20px; border-block-end: 1px solid var(--throttle-color-border); }\n.tsf-reviews-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }\n.tsf-reviews-list-title { margin: 0; font-size: 16px; font-weight: 600; }\n.tsf-reviews-list-body { margin: 0; line-height: 1.6; overflow-wrap: anywhere; }\n.tsf-reviews-list-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 13px; color: var(--throttle-color-muted-foreground); }\n.tsf-reviews-list-author { font-weight: 600; color: var(--throttle-color-foreground); }\n.tsf-reviews-list-verified { color: var(--throttle-sf-success); }\n.tsf-reviews-list-product { color: var(--throttle-sf-accent); }\n@media (max-width: 767px) {\n .tsf-reviews-list-product { display: inline-flex; align-items: center; min-block-size: 44px; }\n}\n.tsf-reviews-list-reply { padding: 10px 14px; border-inline-start: 3px solid var(--throttle-color-border); background: var(--throttle-color-muted); font-size: 14px; }\n`;\n","/** The pages' rules (search, not-found, account). Single-class selectors, logical properties. No backticks inside. */\nexport const PAGES_CSS = `\n.tsf-search-results { max-inline-size: 1280px; margin-inline: auto; padding-block: 24px; padding-inline: 16px; }\n.tsf-search-results-title {\n margin-block: 0 16px;\n font-size: 28px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-search-results-prompt { margin: 0; color: var(--throttle-color-muted-foreground); }\n\n.tsf-not-found {\n display: grid;\n justify-items: center;\n gap: 12px;\n padding-block: 64px;\n padding-inline: 16px;\n text-align: center;\n}\n.tsf-not-found-code {\n margin: 0;\n color: var(--throttle-color-muted-foreground);\n font-size: 72px;\n font-weight: 700;\n line-height: 1;\n letter-spacing: -0.03em;\n}\n.tsf-not-found-title {\n margin: 0;\n font-size: 28px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-not-found-body { max-inline-size: 44ch; margin: 0; color: var(--throttle-color-muted-foreground); }\n.tsf-not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-block: 12px 0; margin-inline: 0; }\n.tsf-not-found-link {\n display: inline-flex;\n align-items: center;\n min-block-size: 44px;\n padding-inline: 20px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-radius, 8px);\n color: inherit;\n font-weight: 600;\n text-decoration: none;\n}\n.tsf-not-found-link:first-child { border-color: transparent; background: var(--throttle-color-primary); color: var(--throttle-color-primary-foreground); }\n.tsf-not-found-link:focus-visible { outline: 2px solid var(--throttle-sf-accent); outline-offset: 2px; }\n\n.tsf-account-page { max-inline-size: 960px; margin-inline: auto; padding-block: 32px; padding-inline: 16px; }\n.tsf-account-page-title { margin-block: 0 16px; font-size: 28px; font-weight: var(--throttle-sf-heading-weight); letter-spacing: var(--throttle-sf-heading-tracking); text-transform: var(--throttle-sf-heading-transform); }\n.tsf-account-page-setup-notice {\n max-inline-size: 560px;\n margin-block: 48px;\n margin-inline: auto;\n padding: 24px;\n border: 1px solid var(--throttle-color-border);\n border-radius: var(--throttle-radius, 8px);\n background: var(--throttle-color-surface);\n}\n.tsf-account-page-setup-title { margin-block: 0 8px; font-size: 18px; }\n.tsf-account-page-setup-body { margin: 0; color: color-mix(in srgb, var(--throttle-color-muted-foreground) 75%, var(--throttle-color-foreground)); }\n`;\n","/**\n * The pieces' rules. Single-class selectors; the card's variants set custom\n * properties on the root (`:where()` keeps their specificity at one class) and\n * the parts read them. No backticks inside: this is a template literal.\n */\nexport const PIECES_CSS = `\n.tsf-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }\n.tsf-link:hover { color: var(--throttle-sf-accent); }\n\n.tsf-image { display: block; inline-size: 100%; block-size: auto; object-fit: cover; background: var(--throttle-color-muted); }\n\n.tsf-rich-text { overflow-wrap: anywhere; line-height: 1.6; }\n.tsf-rich-text-link { color: var(--throttle-sf-accent); }\n\n.tsf-money { font-variant-numeric: tabular-nums; }\n.tsf-money-compare { margin-inline-start: 6px; color: var(--throttle-color-muted-foreground); font-weight: 400; font-variant-numeric: tabular-nums; }\n\n.tsf-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-weight: 600; }\n.tsf-price-label { flex-basis: 100%; font-size: 12px; font-weight: 500; color: var(--throttle-sf-accent); }\n.tsf-price-hint { flex-basis: 100%; font-size: 12px; font-weight: 400; color: var(--throttle-color-muted-foreground); }\n\n.tsf-star-rating { display: inline-flex; align-items: center; gap: 6px; color: var(--throttle-color-muted-foreground); font-size: 13px; }\n.tsf-star-rating-stars { display: inline-flex; gap: 1px; color: var(--throttle-color-warning); }\n.tsf-star-rating-count { font-variant-numeric: tabular-nums; }\n\n.tsf-product-badge {\n display: inline-flex;\n align-items: center;\n padding: 2px 8px;\n border-radius: 999px;\n font-size: 12px;\n font-weight: 600;\n line-height: 1.4;\n background: var(--tsf-badge-bg, var(--throttle-color-foreground));\n color: var(--tsf-badge-fg, var(--throttle-color-background));\n}\n\n.tsf-swatch {\n display: inline-block;\n inline-size: 16px;\n block-size: 16px;\n border-radius: 999px;\n border: 1px solid var(--throttle-color-border-control);\n background-color: var(--throttle-color-muted);\n background-size: cover;\n background-position: center;\n box-sizing: border-box;\n vertical-align: middle;\n}\n.tsf-swatch:where([data-selected=\"true\"]) { outline: 2px solid var(--throttle-color-foreground); outline-offset: 2px; }\n.tsf-swatch:where([data-disabled=\"true\"]) { opacity: 0.4; }\n\n/* The card: the variant sets the properties, the parts read them. */\n.tsf-product-card {\n --tsf-card-border: 1px solid var(--throttle-color-border);\n --tsf-card-radius: var(--throttle-sf-card-radius);\n --tsf-body-padding: 12px;\n --tsf-media-radius: 0;\n position: relative;\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n border: var(--tsf-card-border);\n border-radius: var(--tsf-card-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n overflow: hidden;\n}\n.tsf-product-card:where([data-variant=\"minimal\"]) {\n --tsf-card-border: 0 solid transparent;\n --tsf-card-radius: 0;\n --tsf-body-padding: 10px 0 0;\n --tsf-media-radius: var(--throttle-sf-card-radius);\n overflow: visible;\n background: transparent;\n}\n.tsf-product-card:where([data-variant=\"overlay\"]) {\n --tsf-card-border: 0 solid transparent;\n --tsf-body-padding: 40px 14px 14px;\n --tsf-body-position: absolute;\n --tsf-body-events: none;\n --tsf-body-color: #fff;\n --tsf-body-background: linear-gradient(to top, rgb(0 0 0 / 0.72), rgb(0 0 0 / 0));\n}\n.tsf-product-card:where([data-variant=\"row\"]) { --tsf-media-basis: 38%; }\n.tsf-product-card:where([data-sold-out]) { --tsf-media-opacity: 0.6; }\n\n.tsf-product-card-row { display: flex; align-items: stretch; flex: 1; min-inline-size: 0; }\n\n.tsf-product-card-media {\n --tsf-alt: 0;\n position: relative;\n flex: 0 0 var(--tsf-media-basis, auto);\n overflow: hidden;\n border-radius: var(--tsf-media-radius);\n background: var(--throttle-color-muted);\n}\n.tsf-product-card-media:focus-within { --tsf-alt: 1; }\n@media (hover: hover) {\n .tsf-product-card-media:hover { --tsf-alt: 1; }\n}\n.tsf-product-card-media-link { display: block; color: inherit; text-decoration: none; opacity: var(--tsf-media-opacity, 1); }\n.tsf-product-card-image { display: block; }\n.tsf-product-card-image-alt {\n position: absolute;\n inset: 0;\n opacity: var(--tsf-alt);\n transition: opacity 0.2s ease;\n background: var(--throttle-color-muted);\n}\n/* No hover on a touch screen: the two images sit side by side and the shopper swipes. */\n@media (hover: none) {\n .tsf-product-card-media-link { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }\n .tsf-product-card-image, .tsf-product-card-image-alt { position: static; flex: 0 0 100%; opacity: 1; scroll-snap-align: start; }\n}\n@media (prefers-reduced-motion: reduce) {\n .tsf-product-card-image-alt { transition: none; }\n}\n.tsf-product-card-placeholder { inline-size: 100%; background: var(--throttle-color-muted); }\n\n.tsf-product-card-badges {\n position: absolute;\n inset-block-start: 8px;\n inset-inline-start: 8px;\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n max-inline-size: calc(100% - 16px);\n pointer-events: none;\n}\n.tsf-product-card-actions {\n position: absolute;\n inset-block-end: 8px;\n inset-inline-end: 8px;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.tsf-product-card-body {\n position: var(--tsf-body-position, static);\n inset-inline: 0;\n inset-block-end: 0;\n flex: 1;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 6px;\n padding: var(--tsf-body-padding);\n min-inline-size: 0;\n color: var(--tsf-body-color, inherit);\n background: var(--tsf-body-background, transparent);\n pointer-events: var(--tsf-body-events, auto);\n}\n.tsf-product-card-brand { margin: 0; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; }\n.tsf-product-card-title {\n margin: 0;\n font-size: 15px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n line-height: 1.3;\n overflow-wrap: anywhere;\n}\n.tsf-product-card-title-link { color: inherit; text-decoration: none; pointer-events: auto; }\n.tsf-product-card-title-link:hover { text-decoration: underline; }\n.tsf-product-card-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }\n.tsf-product-card-swatch-more { font-size: 12px; opacity: 0.7; }\n.tsf-product-card-rating { color: inherit; }\n.tsf-product-card-price { margin: 0; font-size: 15px; }\n.tsf-product-card-from { font-size: 12px; font-weight: 400; opacity: 0.7; }\n.tsf-product-card-unpriced { font-size: 13px; opacity: 0.7; }\n`;\n","/**\n * The product page's rules. Single-class selectors only (attribute selectors\n * and `:where()` add no class), logical properties only, so a class passed\n * through `classNames` wins on equal specificity and the sheet holds in rtl.\n * The layout sets custom properties on the page root and the parts read them.\n * No backticks inside: this is a template literal.\n */\nexport const PRODUCT_CSS = `\n.tsf-product-page {\n --tsf-main-columns: minmax(0, 1.1fr) minmax(0, 1fr);\n --tsf-main-gap: 48px;\n --tsf-buy-position: static;\n --tsf-gallery-max: none;\n --tsf-buy-max: none;\n --tsf-main-justify: stretch;\n display: block;\n max-inline-size: 1280px;\n margin-inline: auto;\n padding-block: 24px 96px;\n padding-inline: 16px;\n box-sizing: border-box;\n}\n.tsf-product-page:where([data-layout=\"stacked\"]) {\n --tsf-main-columns: minmax(0, 1fr);\n --tsf-main-gap: 32px;\n --tsf-gallery-max: 720px;\n --tsf-buy-max: 640px;\n --tsf-main-justify: center;\n}\n.tsf-product-page:where([data-layout=\"editorial\"]) {\n --tsf-main-columns: minmax(0, 1.7fr) minmax(0, 1fr);\n --tsf-main-gap: 64px;\n --tsf-buy-position: sticky;\n}\n@media (max-width: 767px) {\n .tsf-product-page,\n .tsf-product-page:where([data-layout=\"stacked\"]),\n .tsf-product-page:where([data-layout=\"editorial\"]) {\n --tsf-main-columns: minmax(0, 1fr);\n --tsf-main-gap: 24px;\n --tsf-buy-position: static;\n --tsf-gallery-max: none;\n --tsf-buy-max: none;\n }\n}\n\n.tsf-product-page-main {\n display: grid;\n grid-template-columns: var(--tsf-main-columns);\n gap: var(--tsf-main-gap);\n justify-content: var(--tsf-main-justify);\n align-items: start;\n margin-block-end: 48px;\n}\n\n/* Breadcrumbs */\n.tsf-product-breadcrumbs { margin-block-end: 16px; font-size: var(--throttle-font-size-sm, 14px); color: var(--throttle-color-muted-foreground); }\n.tsf-product-breadcrumbs-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }\n.tsf-product-breadcrumbs-item { display: inline-flex; align-items: center; gap: 8px; }\n.tsf-product-breadcrumbs-item:not(:last-child)::after { content: \"/\"; color: var(--throttle-color-border-control); }\n.tsf-product-breadcrumbs-link { color: inherit; text-decoration: none; }\n.tsf-product-breadcrumbs-link:hover { color: var(--throttle-color-foreground); text-decoration: underline; }\n.tsf-product-breadcrumbs-current { color: var(--throttle-color-foreground); }\n@media (max-width: 767px) {\n .tsf-product-breadcrumbs-link,\n .tsf-buy-box-rating { display: inline-flex; align-items: center; min-block-size: 44px; }\n}\n\n/* Gallery */\n.tsf-gallery { display: grid; gap: 12px; max-inline-size: var(--tsf-gallery-max); inline-size: 100%; margin-inline: auto; min-inline-size: 0; }\n.tsf-gallery-stage {\n position: relative;\n overflow: hidden;\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-muted);\n touch-action: pan-y;\n cursor: zoom-in;\n outline-offset: 2px;\n}\n.tsf-gallery-stage:focus-visible { outline: 2px solid var(--throttle-color-primary); }\n.tsf-gallery-item { display: block; transition: transform 0.2s ease; will-change: transform; }\n.tsf-gallery-item:where([data-zoomed=\"true\"]) { transform: scale(1.9); }\n.tsf-gallery-item:where([data-zoomed=\"true\"]) { cursor: zoom-in; }\n.tsf-gallery-video { display: block; inline-size: 100%; block-size: auto; background: #000; }\n.tsf-gallery-placeholder { aspect-ratio: 4 / 5; background: var(--throttle-color-muted); }\n.tsf-gallery-previous, .tsf-gallery-next, .tsf-gallery-enlarge, .tsf-lightbox-previous, .tsf-lightbox-next {\n position: absolute;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: 44px;\n block-size: 44px;\n padding: 0;\n border: 1px solid var(--throttle-color-border);\n border-radius: 999px;\n background: color-mix(in srgb, var(--throttle-color-background) 88%, transparent);\n color: var(--throttle-color-foreground);\n cursor: pointer;\n}\n.tsf-gallery-previous { inset-inline-start: 12px; inset-block-start: calc(50% - 22px); }\n.tsf-gallery-next { inset-inline-end: 12px; inset-block-start: calc(50% - 22px); }\n.tsf-gallery-enlarge { inset-inline-end: 12px; inset-block-end: 12px; }\n.tsf-gallery-previous:hover, .tsf-gallery-next:hover, .tsf-gallery-enlarge:hover { background: var(--throttle-color-background); }\n.tsf-gallery-counter {\n position: absolute;\n inset-inline-start: 12px;\n inset-block-end: 12px;\n margin: 0;\n padding: 2px 10px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--throttle-color-background) 88%, transparent);\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n}\n.tsf-gallery-thumbs { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }\n.tsf-gallery-thumbs-item { flex: 0 0 72px; }\n.tsf-gallery-thumb {\n display: block;\n inline-size: 72px;\n padding: 0;\n border: 2px solid transparent;\n border-radius: calc(var(--throttle-sf-card-radius) / 1.5);\n background: var(--throttle-color-muted);\n overflow: hidden;\n cursor: pointer;\n opacity: 0.7;\n}\n.tsf-gallery-thumb:where([aria-current=\"true\"]) { border-color: var(--throttle-color-foreground); opacity: 1; }\n.tsf-gallery-thumb:hover { opacity: 1; }\n.tsf-gallery-thumb:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: 2px; }\n\n/* Lightbox (inside the ui modal) */\n.tsf-lightbox { position: relative; display: grid; place-items: center; min-inline-size: min(92vw, 960px); min-block-size: 50vh; }\n.tsf-lightbox-title { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.tsf-lightbox-stage { display: grid; place-items: center; max-block-size: 82vh; }\n.tsf-lightbox-previous { inset-inline-start: 8px; inset-block-start: calc(50% - 22px); }\n.tsf-lightbox-next { inset-inline-end: 8px; inset-block-start: calc(50% - 22px); }\n.tsf-lightbox-counter { margin: 8px 0 0; font-size: 13px; color: var(--throttle-color-muted-foreground); font-variant-numeric: tabular-nums; }\n\n/* Buy box */\n.tsf-buy-box {\n position: var(--tsf-buy-position);\n inset-block-start: 24px;\n display: grid;\n gap: 16px;\n max-inline-size: var(--tsf-buy-max);\n inline-size: 100%;\n margin-inline: auto;\n min-inline-size: 0;\n}\n.tsf-buy-box-kicker { margin: 0; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--throttle-color-muted-foreground); }\n.tsf-buy-box-title {\n margin: 0;\n font-family: var(--throttle-font-family-heading, inherit);\n font-size: clamp(26px, 3vw, 36px);\n line-height: 1.15;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n overflow-wrap: anywhere;\n}\n.tsf-buy-box-rating { justify-self: start; color: inherit; text-decoration: none; }\n.tsf-buy-box-summary { margin: 0; color: var(--throttle-color-muted-foreground); line-height: 1.55; }\n.tsf-buy-box-price { margin: 0; font-size: 22px; }\n.tsf-buy-box-sku { margin: 0; font-size: 13px; color: var(--throttle-color-muted-foreground); }\n.tsf-buy-box-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }\n\n/* Variant picker */\n.tsf-variant-picker { display: grid; gap: 16px; }\n.tsf-variant-option { margin: 0; padding: 0; border: 0; min-inline-size: 0; }\n.tsf-variant-option-legend { display: flex; gap: 8px; align-items: baseline; padding: 0; margin-block-end: 8px; font-size: 14px; }\n.tsf-variant-option-name { font-weight: 600; }\n.tsf-variant-option-chosen { color: var(--throttle-color-muted-foreground); }\n.tsf-variant-option-values { display: flex; flex-wrap: wrap; gap: 8px; }\n.tsf-variant-value {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n padding-inline: 14px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n cursor: pointer;\n overflow: hidden;\n}\n.tsf-variant-value:where([data-kind=\"swatch\"]) { padding-inline: 0; border-radius: 999px; min-inline-size: 44px; }\n.tsf-variant-value:hover { border-color: var(--throttle-color-foreground); }\n.tsf-variant-value:where([aria-pressed=\"true\"]) { border-color: var(--throttle-color-foreground); box-shadow: inset 0 0 0 1px var(--throttle-color-foreground); }\n.tsf-variant-value:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: 2px; }\n.tsf-variant-value:where([data-sold-out]), .tsf-variant-value:where([data-unavailable]) { color: var(--throttle-color-muted-foreground); }\n.tsf-variant-value:where([data-sold-out])::after {\n content: \"\";\n position: absolute;\n inset: 0;\n background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--throttle-color-muted-foreground) 50%, transparent calc(50% + 1px));\n pointer-events: none;\n}\n.tsf-variant-value:where([data-unavailable]) { border-style: dashed; }\n.tsf-variant-value-label { pointer-events: none; }\n\n/* Stock, quantity, add */\n.tsf-stock-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }\n.tsf-stock-status::before { content: \"\"; inline-size: 8px; block-size: 8px; border-radius: 999px; background: var(--throttle-sf-success); }\n.tsf-stock-status:where([data-state=\"low\"])::before { background: var(--throttle-sf-warning); }\n.tsf-stock-status:where([data-state=\"out\"])::before, .tsf-stock-status:where([data-state=\"no_currency\"])::before { background: var(--throttle-color-muted-foreground); }\n.tsf-stock-status:where([data-state=\"backorder\"])::before, .tsf-stock-status:where([data-state=\"preorder\"])::before { background: var(--throttle-sf-accent); }\n\n.tsf-quantity-input { display: inline-flex; align-items: stretch; border: 1px solid var(--throttle-color-border-control); border-radius: var(--throttle-radius); overflow: hidden; }\n.tsf-quantity-decrease, .tsf-quantity-increase {\n inline-size: 44px;\n min-block-size: 48px;\n padding: 0;\n border: 0;\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font-size: 18px;\n cursor: pointer;\n}\n.tsf-quantity-decrease:where([aria-disabled=\"true\"]), .tsf-quantity-increase:where([aria-disabled=\"true\"]) { opacity: 0.4; cursor: not-allowed; }\n.tsf-quantity-field {\n inline-size: 56px;\n padding: 0;\n border: 0;\n border-inline: 1px solid var(--throttle-color-border);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n text-align: center;\n appearance: textfield;\n -moz-appearance: textfield;\n}\n.tsf-quantity-field::-webkit-outer-spin-button, .tsf-quantity-field::-webkit-inner-spin-button { appearance: none; margin: 0; }\n\n.tsf-add-to-cart { display: grid; gap: 8px; min-inline-size: 0; }\n.tsf-add-to-cart-button, .tsf-sticky-add-to-cart-button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n inline-size: 100%;\n min-block-size: 48px;\n padding-inline: 20px;\n border: 1px solid transparent;\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-primary);\n color: var(--throttle-color-primary-foreground);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n}\n.tsf-add-to-cart-button:hover:not(:disabled), .tsf-sticky-add-to-cart-button:hover:not(:disabled) { filter: brightness(0.92); }\n.tsf-add-to-cart-button:disabled, .tsf-sticky-add-to-cart-button:disabled { opacity: 0.55; cursor: not-allowed; }\n.tsf-add-to-cart-button:where([aria-disabled=\"true\"]) { cursor: progress; }\n.tsf-add-to-cart-button:focus-visible, .tsf-sticky-add-to-cart-button:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: 2px; }\n.tsf-add-to-cart-message { margin: 0; min-block-size: 1.4em; font-size: 14px; }\n.tsf-add-to-cart-message:where([data-tone=\"ok\"]) { color: var(--throttle-sf-success); }\n.tsf-add-to-cart-message:where([data-tone=\"refused\"]) { color: var(--throttle-sf-danger); }\n\n.tsf-sticky-add-to-cart {\n position: fixed;\n inset-inline: 0;\n inset-block-end: 0;\n z-index: var(--throttle-z-popover, 30);\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 12px 16px;\n border-block-start: 1px solid var(--throttle-color-border);\n background: var(--throttle-color-background);\n box-shadow: var(--throttle-shadow-popover, 0 -4px 16px rgba(0, 0, 0, 0.08));\n}\n.tsf-sticky-add-to-cart-title { flex: 1 1 auto; margin: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-inline-size: 0; }\n.tsf-sticky-add-to-cart-price { margin: 0; flex: 0 0 auto; }\n.tsf-sticky-add-to-cart-button { inline-size: auto; flex: 0 0 auto; }\n\n/* Sections */\n.tsf-product-sections { display: grid; gap: 32px; }\n.tsf-product-sections:where([data-style=\"accordion\"]) { gap: 0; border-block-start: 1px solid var(--throttle-color-border); }\n.tsf-product-section { min-inline-size: 0; scroll-margin-block-start: 16px; }\n.tsf-product-section:where([hidden]) { display: none; }\n.tsf-product-section-title {\n margin: 0 0 12px;\n font-family: var(--throttle-font-family-heading, inherit);\n font-size: 22px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-product-section-title:where([data-in-tabs]) { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.tsf-product-section-trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n inline-size: 100%;\n min-block-size: 56px;\n padding: 0;\n border: 0;\n border-block-end: 1px solid var(--throttle-color-border);\n background: none;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: pointer;\n}\n.tsf-product-section-trigger:focus-visible { outline: 2px solid var(--throttle-color-primary); outline-offset: -2px; }\n.tsf-product-section-body { padding-block: 16px; min-inline-size: 0; }\n.tsf-product-section-body:where([hidden]) { display: none; }\n.tsf-product-specs { display: grid; margin: 0; }\n.tsf-product-specs-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 16px; padding-block: 10px; border-block-end: 1px solid var(--throttle-color-border); }\n.tsf-product-specs-label { margin: 0; color: var(--throttle-color-muted-foreground); text-transform: capitalize; }\n.tsf-product-specs-value { margin: 0; overflow-wrap: anywhere; }\n.tsf-shipping-section { line-height: 1.6; }\n\n.tsf-tag-list, .tsf-category-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }\n.tsf-tag-list-link, .tsf-category-list-link {\n display: inline-flex;\n align-items: center;\n min-block-size: 36px;\n padding-inline: 14px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: 999px;\n color: inherit;\n text-decoration: none;\n font-size: 14px;\n}\n.tsf-tag-list-link:hover, .tsf-category-list-link:hover { border-color: var(--throttle-color-foreground); }\n\n.tsf-related-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--throttle-sf-grid-gap); margin: 0; padding: 0; list-style: none; }\n.tsf-related-products-item { min-inline-size: 0; }\n\n/* Reviews */\n.tsf-product-reviews { display: grid; gap: 24px; }\n.tsf-product-reviews-summary { display: grid; gap: 12px; max-inline-size: 420px; }\n.tsf-product-reviews-main { display: grid; gap: 24px; min-inline-size: 0; }\n@media (min-width: 768px) {\n .tsf-product-reviews:where([data-layout=\"columns\"]) { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }\n .tsf-product-reviews-summary:where([data-layout=\"columns\"]) { max-inline-size: none; }\n}\n.tsf-product-reviews-average { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 36px; font-weight: 600; }\n.tsf-product-reviews-histogram { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }\n.tsf-product-reviews-histogram-row {\n display: grid;\n grid-template-columns: 36px minmax(0, 1fr) 32px;\n align-items: center;\n gap: 10px;\n inline-size: 100%;\n min-block-size: 32px;\n padding: 0 6px;\n border: 1px solid transparent;\n border-radius: var(--throttle-radius-sm, 6px);\n background: none;\n color: inherit;\n font: inherit;\n font-size: 14px;\n cursor: pointer;\n}\n.tsf-product-reviews-histogram-row:hover { background: var(--throttle-color-muted); }\n.tsf-product-reviews-histogram-row:where([aria-pressed=\"true\"]) { border-color: var(--throttle-color-foreground); background: var(--throttle-color-muted); }\n.tsf-product-reviews-histogram-row:focus-visible { outline: 2px solid var(--throttle-color-primary); }\n.tsf-product-reviews-histogram-bar { display: block; block-size: 8px; border-radius: 999px; background: var(--throttle-color-muted); overflow: hidden; }\n.tsf-product-reviews-histogram-fill { display: block; block-size: 100%; background: var(--throttle-color-warning); }\n.tsf-product-reviews-histogram-count { text-align: end; font-variant-numeric: tabular-nums; color: var(--throttle-color-muted-foreground); }\n.tsf-product-reviews-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; }\n.tsf-product-reviews-clear { min-block-size: 44px; padding-inline: 4px; border: 0; background: none; color: var(--throttle-sf-accent); font: inherit; text-decoration: underline; cursor: pointer; }\n.tsf-product-reviews-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }\n.tsf-product-review { display: grid; gap: 6px; padding-block-end: 20px; border-block-end: 1px solid var(--throttle-color-border); }\n.tsf-product-review-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n.tsf-product-review-date { font-size: 13px; color: var(--throttle-color-muted-foreground); }\n.tsf-product-review-title { margin: 0; font-size: 16px; }\n.tsf-product-review-body { margin: 0; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-line; }\n.tsf-product-review-author { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--throttle-color-muted-foreground); }\n.tsf-product-review-reply { padding: 12px 16px; border-inline-start: 3px solid var(--throttle-color-border-control); background: var(--throttle-color-muted); font-size: 14px; }\n.tsf-product-reviews-load-more {\n justify-self: start;\n min-block-size: 44px;\n padding-inline: 20px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-background);\n color: inherit;\n font: inherit;\n cursor: pointer;\n}\n.tsf-product-reviews-load-more:where([aria-disabled=\"true\"]) { cursor: progress; opacity: 0.7; }\n.tsf-product-reviews-empty, .tsf-product-reviews-gate, .tsf-product-reviews-error { margin: 0; color: var(--throttle-color-muted-foreground); }\n.tsf-product-reviews-error { color: var(--throttle-sf-danger); }\n\n.tsf-review-form { display: grid; gap: 14px; max-inline-size: 520px; padding: 20px; border: 1px solid var(--throttle-color-border); border-radius: var(--throttle-sf-card-radius); }\n.tsf-review-form-title { margin: 0; font-weight: 600; font-size: 18px; }\n.tsf-review-form-stars { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; border: 0; }\n.tsf-review-form-star { position: relative; display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; font-size: 26px; color: var(--throttle-color-border-control); cursor: pointer; }\n.tsf-review-form-star:where([data-on=\"true\"]) { color: var(--throttle-color-warning); }\n.tsf-review-form-star-input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }\n.tsf-review-form-star:focus-within { outline: 2px solid var(--throttle-color-primary); border-radius: 6px; }\n.tsf-review-form-field { display: grid; gap: 6px; font-size: 14px; }\n.tsf-review-form-textarea { padding: 10px 12px; border: 1px solid var(--throttle-color-border-control); border-radius: var(--throttle-radius); background: var(--throttle-color-background); color: inherit; font: inherit; resize: vertical; }\n.tsf-review-form-error { display: block; font-size: 13px; color: var(--throttle-sf-danger); }\n.tsf-review-form-submit { justify-self: start; min-block-size: 48px; padding-inline: 24px; border: 0; border-radius: var(--throttle-radius); background: var(--throttle-color-primary); color: var(--throttle-color-primary-foreground); font: inherit; font-weight: 600; cursor: pointer; }\n.tsf-review-form-submit:where([aria-disabled=\"true\"]) { cursor: progress; opacity: 0.7; }\n.tsf-review-form-thanks { margin: 0; padding: 14px 16px; border-radius: var(--throttle-radius); background: var(--throttle-color-success-surface, var(--throttle-color-muted)); }\n\n@media (prefers-reduced-motion: reduce) {\n .tsf-gallery-item { transition: none; }\n}\n`;\n","/**\n * The shop-all sections' rules. Single-class selectors (a variant or state is\n * a `:where([data-...])` on the same class) and logical properties only. The\n * filters become a drawer below 768px, the width the component also uses.\n * No backticks inside: this is a template literal.\n */\nexport const SHOP_CSS = `\n.tsf-shop-all { display: flex; flex-direction: column; gap: 16px; min-inline-size: 0; padding-block: 24px; }\n\n.tsf-shop-all-heading {\n margin: 0;\n font-size: 28px;\n line-height: 1.2;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-shop-all-description { margin: 0; max-inline-size: 70ch; color: var(--throttle-color-muted-foreground); line-height: 1.6; }\n\n.tsf-shop-all-breadcrumb-list { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--throttle-color-muted-foreground); }\n.tsf-shop-all-breadcrumb:where(:not(:last-child))::after { content: \"/\"; margin-inline-start: 8px; opacity: 0.6; }\n.tsf-shop-all-breadcrumb-link { color: inherit; text-decoration: none; }\n.tsf-shop-all-breadcrumb-link:hover { color: var(--throttle-color-foreground); text-decoration: underline; }\n\n.tsf-shop-all-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }\n.tsf-shop-all-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }\n.tsf-result-count { margin: 0; color: var(--throttle-color-muted-foreground); font-size: 14px; }\n\n.tsf-shop-all-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }\n.tsf-shop-all-body:where([data-layout=\"sidebar\"]) { grid-template-columns: 240px minmax(0, 1fr); }\n.tsf-shop-all-main { display: flex; flex-direction: column; gap: 24px; min-inline-size: 0; }\n\n.tsf-live-region {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n/* Sort */\n.tsf-sort-select { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }\n.tsf-sort-select-input,\n.tsf-facet-select,\n.tsf-facet-search,\n.tsf-facet-range-input {\n min-block-size: 44px;\n padding-inline: 12px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n box-sizing: border-box;\n}\n.tsf-facet-select, .tsf-facet-search { inline-size: 100%; }\n\n/* Filters: the column */\n.tsf-filter-sidebar { display: flex; flex-direction: column; gap: 4px; min-inline-size: 0; }\n.tsf-filter-sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block-end: 8px; }\n.tsf-filter-sidebar-title { margin: 0; font-size: 16px; font-weight: var(--throttle-sf-heading-weight); }\n.tsf-filter-clear, .tsf-active-filters-clear, .tsf-facet-range-clear, .tsf-facet-show-all {\n padding: 0;\n min-block-size: 44px;\n border: 0;\n background: none;\n color: var(--throttle-sf-accent);\n font: inherit;\n font-size: 14px;\n text-decoration: underline;\n text-underline-offset: 2px;\n cursor: pointer;\n}\n\n/* Filters: the top bar and the drawer trigger */\n.tsf-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }\n.tsf-filter-bar-more,\n.tsf-filter-drawer-trigger {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-block-size: 44px;\n padding-inline: 14px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n cursor: pointer;\n}\n.tsf-filter-drawer-count, .tsf-facet-selected {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 20px;\n padding-inline: 6px;\n border-radius: 999px;\n background: var(--throttle-sf-accent);\n color: var(--throttle-color-background);\n font-size: 12px;\n line-height: 20px;\n}\n\n/* A facet */\n.tsf-facet { min-inline-size: 0; border-block-start: 1px solid var(--throttle-color-border); }\n.tsf-facet:where([data-presentation=\"dropdown\"]) { border: 0; position: relative; }\n.tsf-facet-heading { margin: 0; font-size: 15px; }\n.tsf-facet-toggle {\n display: flex;\n align-items: center;\n gap: 8px;\n inline-size: 100%;\n min-block-size: 44px;\n padding: 0;\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n font-weight: 600;\n text-align: start;\n cursor: pointer;\n}\n.tsf-facet-label { flex: 1; text-align: start; }\n.tsf-facet-body { padding-block-end: 12px; }\n.tsf-facet-fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }\n.tsf-facet-legend {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n.tsf-facet-trigger {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n min-block-size: 44px;\n padding-inline: 14px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n cursor: pointer;\n}\n.tsf-facet-trigger:where([aria-expanded=\"true\"]) { border-color: var(--throttle-color-foreground); }\n.tsf-facet-panel {\n position: absolute;\n inset-block-start: calc(100% + 4px);\n inset-inline-start: 0;\n z-index: 20;\n min-inline-size: 240px;\n max-block-size: 360px;\n overflow-y: auto;\n padding: 8px 14px;\n border: 1px solid var(--throttle-color-border);\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-background);\n box-shadow: 0 8px 24px rgb(0 0 0 / 0.14);\n}\n.tsf-facet-options { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }\n.tsf-facet-search { margin-block-end: 8px; }\n.tsf-facet-option-label { display: flex; align-items: center; gap: 10px; min-block-size: 44px; cursor: pointer; font-size: 14px; }\n.tsf-facet-option:where([data-empty]) { opacity: 0.5; }\n.tsf-facet-option-input { inline-size: 18px; block-size: 18px; margin: 0; accent-color: var(--throttle-sf-accent); }\n.tsf-facet-option-text { flex: 1; overflow-wrap: anywhere; }\n.tsf-facet-option-count { color: var(--throttle-color-muted-foreground); font-variant-numeric: tabular-nums; font-size: 13px; }\n.tsf-facet-empty { margin: 0; color: var(--throttle-color-muted-foreground); font-size: 14px; }\n.tsf-facet-boolean { display: flex; flex-direction: column; }\n\n.tsf-facet-range { display: flex; flex-direction: column; gap: 8px; }\n.tsf-facet-range-fields { display: flex; gap: 8px; }\n.tsf-facet-range-field { display: flex; flex: 1; flex-direction: column; gap: 4px; min-inline-size: 0; font-size: 13px; }\n.tsf-facet-range-input { inline-size: 100%; }\n.tsf-facet-range-error { margin: 0; color: var(--throttle-sf-danger); font-size: 13px; }\n.tsf-facet-range-hint { margin: 0; color: var(--throttle-color-muted-foreground); font-size: 13px; }\n.tsf-facet-range-actions { display: flex; align-items: center; gap: 12px; }\n.tsf-facet-range-apply {\n min-block-size: 44px;\n padding-inline: 16px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n cursor: pointer;\n}\n\n/* Filters: the drawer */\n.tsf-filter-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 20px; border-block-end: 1px solid var(--throttle-color-border); }\n.tsf-filter-drawer-title { margin: 0; font-size: 18px; font-weight: var(--throttle-sf-heading-weight); }\n.tsf-filter-drawer-close { display: inline-flex; align-items: center; justify-content: center; inline-size: 44px; block-size: 44px; border: 0; background: none; color: inherit; cursor: pointer; }\n.tsf-filter-drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }\n.tsf-filter-drawer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-block-start: 1px solid var(--throttle-color-border); }\n.tsf-filter-drawer-apply {\n flex: 1;\n min-block-size: 44px;\n padding-inline: 16px;\n border: 0;\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-primary);\n color: var(--throttle-color-primary-foreground);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n}\n\n/* The chips */\n.tsf-active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; }\n.tsf-active-filter-remove {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-block-size: 36px;\n padding-inline: 12px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: 999px;\n background: var(--throttle-color-muted);\n color: inherit;\n font: inherit;\n font-size: 13px;\n cursor: pointer;\n}\n\n/* The grid */\n.tsf-product-grid-pages { display: flex; flex-direction: column; gap: var(--throttle-sf-grid-gap); }\n.tsf-product-grid, .tsf-product-grid-skeleton {\n display: grid;\n grid-template-columns: repeat(var(--tsf-cols-mobile, 2), minmax(0, 1fr));\n gap: var(--throttle-sf-grid-gap);\n align-items: start;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n@media (min-width: 768px) {\n .tsf-product-grid, .tsf-product-grid-skeleton { grid-template-columns: repeat(var(--tsf-cols-desktop, 4), minmax(0, 1fr)); }\n}\n.tsf-product-grid:where([data-previous]) { opacity: 0.55; transition: opacity 0.15s ease; }\n.tsf-product-grid-item { min-inline-size: 0; }\n.tsf-product-grid-skeleton-item { aspect-ratio: 4 / 5; border-radius: var(--throttle-sf-card-radius); background: var(--throttle-color-muted); animation: tsf-shop-pulse 1.4s ease-in-out infinite; }\n@keyframes tsf-shop-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }\n@media (prefers-reduced-motion: reduce) {\n .tsf-product-grid-skeleton-item { animation: none; }\n .tsf-product-grid:where([data-previous]) { transition: none; }\n}\n.tsf-product-grid-empty, .tsf-product-grid-error { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-block: 48px; text-align: center; color: var(--throttle-color-muted-foreground); }\n\n/* Pagination */\n.tsf-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }\n.tsf-pagination-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }\n.tsf-pagination-link, .tsf-pagination-step, .tsf-pagination-gap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n padding-inline: 8px;\n border-radius: var(--throttle-sf-card-radius);\n color: inherit;\n text-decoration: none;\n font-variant-numeric: tabular-nums;\n box-sizing: border-box;\n}\n.tsf-pagination-link:hover, .tsf-pagination-step:hover { background: var(--throttle-color-muted); }\n.tsf-pagination-link:where([aria-current=\"page\"]) { border: 1px solid var(--throttle-color-foreground); font-weight: 600; }\n.tsf-pagination-step:where([data-disabled]) { opacity: 0.4; }\n.tsf-pagination-more {\n min-block-size: 44px;\n padding-inline: 24px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-sf-card-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n cursor: pointer;\n}\n.tsf-pagination-more:where([aria-disabled=\"true\"]) { opacity: 0.6; cursor: progress; }\n.tsf-pagination-crawl {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n}\n\n/* From 768px up the sidebar or the bar are the filters, and the drawer's button is only for phones. */\n@media (min-width: 768px) {\n .tsf-filter-drawer-trigger:where([data-phone-only]) { display: none; }\n}\n\n/* Phones: every filter layout is the drawer. */\n@media (max-width: 767px) {\n .tsf-filter-sidebar, .tsf-filter-bar { display: none; }\n .tsf-shop-all-body:where([data-layout=\"sidebar\"]) { grid-template-columns: minmax(0, 1fr); }\n}\n`;\n","/**\n * The cart drawer, quick add, quick view, recently viewed and compare. Single-class selectors and\n * logical properties only; a state is a `:where()` attribute so it stays one class in specificity.\n * No backticks inside: this is a template literal.\n */\nexport const SHOPPER_CSS = `\n/* Cart drawer */\n.tsf-cart-drawer {\n display: flex;\n flex-direction: column;\n block-size: 100%;\n min-block-size: 0;\n color: var(--throttle-color-foreground);\n}\n.tsf-cart-drawer:where([data-inline]) { block-size: auto; }\n.tsf-cart-drawer-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding-block: 12px;\n padding-inline: 20px;\n border-block-end: 1px solid var(--throttle-color-border);\n}\n.tsf-cart-drawer-title {\n margin: 0;\n font-family: var(--throttle-font-family-heading, inherit);\n font-size: 20px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-cart-drawer-title:where([data-inline]) { margin-block-end: 12px; }\n.tsf-cart-drawer-close {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n border: 0;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n.tsf-cart-drawer-close:focus-visible,\n.tsf-cart-line-remove:focus-visible,\n.tsf-cart-line-decrease:focus-visible,\n.tsf-cart-line-increase:focus-visible,\n.tsf-cart-checkout:focus-visible,\n.tsf-cart-continue:focus-visible,\n.tsf-quick-add-button:focus-visible,\n.tsf-compare-button:focus-visible,\n.tsf-compare-clear:focus-visible,\n.tsf-compare-product-remove:focus-visible {\n outline: 2px solid var(--throttle-color-primary);\n outline-offset: 2px;\n}\n.tsf-cart-drawer-body {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-block-size: 0;\n}\n.tsf-cart-status:empty { display: none; }\n.tsf-cart-status { position: absolute; inline-size: 1px; block-size: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }\n.tsf-cart-error {\n margin: 12px 20px 0;\n padding: 10px 12px;\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-muted);\n color: var(--throttle-sf-danger);\n font-size: 14px;\n}\n.tsf-cart-loading { padding: 20px; }\n.tsf-cart-empty { display: grid; justify-items: center; gap: 16px; padding: 48px 20px; text-align: center; }\n.tsf-cart-empty-text { margin: 0; color: var(--throttle-color-muted-foreground); }\n.tsf-cart-lines {\n flex: 1 1 auto;\n min-block-size: 0;\n margin: 0;\n padding: 0 20px;\n list-style: none;\n overflow-y: auto;\n}\n.tsf-cart-line {\n display: grid;\n grid-template-columns: 72px minmax(0, 1fr) auto;\n grid-template-areas: \"media body total\" \"media body remove\";\n align-items: start;\n gap: 4px 12px;\n padding-block: 16px;\n border-block-end: 1px solid var(--throttle-color-border);\n}\n.tsf-cart-line:where([data-busy]) { opacity: 0.7; }\n.tsf-cart-line-media { grid-area: media; overflow: hidden; border-radius: var(--throttle-radius); background: var(--throttle-color-muted); }\n.tsf-cart-line-body { grid-area: body; display: grid; gap: 4px; min-inline-size: 0; }\n.tsf-cart-line-name { margin: 0; font-weight: 600; overflow-wrap: anywhere; }\n.tsf-cart-line-price { margin: 0; color: var(--throttle-color-muted-foreground); font-size: 14px; }\n.tsf-cart-line-note { margin: 0; color: var(--throttle-sf-danger); font-size: 13px; }\n.tsf-cart-line-quantity {\n display: inline-flex;\n align-items: center;\n justify-self: start;\n margin-block-start: 4px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-radius);\n}\n.tsf-cart-line-decrease,\n.tsf-cart-line-increase {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n border: 0;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n.tsf-cart-line-decrease:disabled,\n.tsf-cart-line-increase:disabled { opacity: 0.4; cursor: not-allowed; }\n.tsf-cart-line-count { min-inline-size: 28px; text-align: center; font-variant-numeric: tabular-nums; }\n.tsf-cart-line-total { grid-area: total; margin: 0; font-weight: 600; text-align: end; }\n.tsf-cart-line-remove {\n grid-area: remove;\n align-self: end;\n justify-self: end;\n min-block-size: 44px;\n padding-inline: 4px;\n border: 0;\n background: transparent;\n color: var(--throttle-color-muted-foreground);\n font: inherit;\n font-size: 13px;\n text-decoration: underline;\n cursor: pointer;\n}\n.tsf-cart-line-remove:disabled { opacity: 0.5; cursor: not-allowed; }\n.tsf-cart-footer {\n display: grid;\n gap: 12px;\n padding-block: 16px;\n padding-inline: 20px;\n border-block-start: 1px solid var(--throttle-color-border);\n background: var(--throttle-color-background);\n}\n.tsf-cart-subtotal { display: flex; align-items: baseline; justify-content: space-between; margin: 0; font-size: 18px; font-weight: 600; }\n.tsf-cart-checkout {\n min-block-size: 48px;\n padding-inline: 20px;\n border: 1px solid transparent;\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-primary);\n color: var(--throttle-color-primary-foreground);\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n}\n.tsf-cart-checkout:hover:not(:disabled) { filter: brightness(0.92); }\n.tsf-cart-checkout:disabled { opacity: 0.55; cursor: not-allowed; }\n.tsf-cart-checkout:where([aria-disabled=\"true\"]) { cursor: progress; }\n.tsf-cart-continue {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-block-size: 44px;\n padding-inline: 12px;\n border: 0;\n background: transparent;\n color: var(--throttle-sf-accent);\n font: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n\n/* Quick add */\n.tsf-quick-add { position: relative; display: grid; gap: 4px; justify-items: end; }\n.tsf-quick-add-button,\n.tsf-compare-button {\n min-block-size: 44px;\n padding-inline: 14px;\n border: 1px solid var(--throttle-color-border-control);\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n font: inherit;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n}\n.tsf-quick-add-button:hover,\n.tsf-compare-button:hover:not(:disabled) { background: var(--throttle-color-muted); }\n.tsf-quick-add-button:where([aria-disabled=\"true\"]) { cursor: progress; }\n.tsf-compare-button:where([aria-pressed=\"true\"]) { border-color: var(--throttle-sf-accent); color: var(--throttle-sf-accent); }\n.tsf-compare-button:disabled { opacity: 0.5; cursor: not-allowed; }\n.tsf-quick-add-message { margin: 0; max-inline-size: 220px; font-size: 13px; text-align: end; }\n.tsf-quick-add-message:empty { display: none; }\n.tsf-quick-add-message:where([data-tone=\"ok\"]) { color: var(--throttle-sf-success); }\n.tsf-quick-add-message:where([data-tone=\"refused\"]) { color: var(--throttle-sf-danger); }\n.tsf-quick-add-panel {\n position: fixed;\n z-index: var(--throttle-z-popover, 30);\n display: grid;\n gap: 12px;\n inline-size: min(280px, calc(100vw - 16px));\n overflow-y: auto;\n padding: 16px;\n border: 1px solid var(--throttle-color-border);\n border-radius: var(--throttle-radius);\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n box-shadow: var(--throttle-shadow-popover, 0 8px 24px rgba(0, 0, 0, 0.12));\n text-align: start;\n}\n.tsf-quick-add-title { margin: 0; font-weight: 600; }\n\n/* Quick view */\n.tsf-quick-view-title {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n.tsf-quick-view { padding: 24px; }\n.tsf-quick-view-message { margin: 0; padding: 24px; text-align: center; color: var(--throttle-color-muted-foreground); }\n.tsf-quick-view-body { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }\n@media (min-width: 640px) {\n .tsf-quick-view-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }\n}\n.tsf-quick-view-gallery, .tsf-quick-view-details { min-inline-size: 0; }\n.tsf-quick-view-details { display: grid; align-content: start; gap: 16px; }\n.tsf-quick-view-link { color: var(--throttle-sf-accent); text-decoration: underline; }\n\n/* Recently viewed */\n.tsf-recently-viewed { display: grid; gap: 16px; }\n.tsf-recently-viewed-title {\n margin: 0;\n font-family: var(--throttle-font-family-heading, inherit);\n font-size: 22px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-recently-viewed-list {\n display: flex;\n gap: var(--throttle-sf-grid-gap, 16px);\n margin: 0;\n padding: 0;\n list-style: none;\n overflow-x: auto;\n scroll-snap-type: x proximity;\n}\n.tsf-recently-viewed-item { flex: 0 0 min(220px, 60vw); min-inline-size: 0; scroll-snap-align: start; }\n\n/* Compare */\n.tsf-compare { display: grid; gap: 16px; }\n.tsf-compare-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }\n.tsf-compare-title {\n margin: 0;\n font-family: var(--throttle-font-family-heading, inherit);\n font-size: 22px;\n font-weight: var(--throttle-sf-heading-weight);\n letter-spacing: var(--throttle-sf-heading-tracking);\n text-transform: var(--throttle-sf-heading-transform);\n}\n.tsf-compare-clear {\n min-block-size: 44px;\n padding-inline: 12px;\n border: 0;\n background: transparent;\n color: var(--throttle-sf-accent);\n font: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n.tsf-compare-empty { margin: 0; color: var(--throttle-color-muted-foreground); }\n.tsf-compare-scroll { overflow-x: auto; }\n.tsf-compare-table { inline-size: 100%; min-inline-size: 560px; border-collapse: collapse; table-layout: fixed; }\n.tsf-compare-caption {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n margin: -1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n}\n.tsf-compare-label {\n inline-size: 140px;\n padding: 12px;\n border-block-end: 1px solid var(--throttle-color-border);\n color: var(--throttle-color-muted-foreground);\n font-size: 14px;\n font-weight: 600;\n text-align: start;\n vertical-align: top;\n}\n.tsf-compare-product {\n position: relative;\n padding: 12px;\n border-block-end: 1px solid var(--throttle-color-border);\n font-weight: 600;\n text-align: start;\n vertical-align: top;\n}\n.tsf-compare-product-media { overflow: hidden; margin-block-end: 8px; border-radius: var(--throttle-radius); background: var(--throttle-color-muted); }\n.tsf-compare-product-link { color: inherit; text-decoration: none; }\n.tsf-compare-product-link:hover { text-decoration: underline; }\n.tsf-compare-product-remove {\n position: absolute;\n inset-block-start: 4px;\n inset-inline-end: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-inline-size: 44px;\n min-block-size: 44px;\n border: 0;\n border-radius: 999px;\n background: var(--throttle-color-background);\n color: var(--throttle-color-foreground);\n cursor: pointer;\n}\n.tsf-compare-cell { padding: 12px; border-block-end: 1px solid var(--throttle-color-border); vertical-align: top; overflow-wrap: anywhere; }\n`;\n","import { toAuthAppearance } from '@usethrottle/catalog';\nimport type { ThemeTokens, ThrottleVariables } from '@usethrottle/ui';\nimport { brighten, isHexColor, mix, normalizeHex } from './color';\n\ntype Scheme = 'light' | 'dark';\n\n/** The `--throttle-sf-*` custom properties the storefront stylesheet reads. */\nexport type SfVariables = Record<`--throttle-sf-${string}`, string>;\n\nconst BLACK = '#000000';\n\nconst GRID_GAP: Record<ThemeTokens['spacingScale'], string> = {\n compact: '12px',\n comfortable: '20px',\n roomy: '32px',\n};\n\n/** A palette colour as `#rrggbb`, or `undefined` when it is not a hex colour (so nothing odd reaches CSS). */\nconst hex = (value: unknown): string | undefined => (isHexColor(value) ? normalizeHex(value) : undefined);\n\n/**\n * The theme as the two variable layers the storefront renders from.\n *\n * - `variables` are `@usethrottle/ui`'s variables (the catalog SDK's own\n * mapping, so storefront and auth components agree on every colour, the body\n * font stack and the radius);\n * - `sf` are the storefront-only properties: the accent colours that have no\n * ui variable, the card radius and the grid gap.\n *\n * The derived accent shades use Meridian's formulas: `accent-hover` is the\n * accent mixed toward black in the light scheme and brightened in the dark one,\n * and `accent-subtle` is a wash of the brightened accent over the surface.\n * Server-safe: no React, no DOM.\n */\nexport function themeToVariables(\n theme: ThemeTokens,\n scheme: Scheme,\n): { variables: ThrottleVariables; sf: SfVariables } {\n const mapped = toAuthAppearance(\n { light: theme.light, dark: theme.dark, fonts: theme.fonts as never, radius: theme.radius },\n scheme,\n );\n const variables: ThrottleVariables = { ...mapped.variables };\n\n const palette = theme[scheme];\n const sf: SfVariables = {\n '--throttle-sf-card-radius': `${Number.isFinite(theme.radius) ? theme.radius : 0}px`,\n '--throttle-sf-grid-gap': GRID_GAP[theme.spacingScale] ?? GRID_GAP.comfortable,\n };\n const put = (name: string, value: string | undefined) => {\n if (value !== undefined) sf[`--throttle-sf-${name}`] = value;\n };\n put('sale', hex(palette.colorSale));\n put('success', hex(palette.colorSuccess));\n put('warning', hex(palette.colorWarning));\n put('danger', hex(palette.colorDanger));\n\n const accent = hex(palette.colorAccent);\n if (accent !== undefined) {\n const bright = brighten(accent, 0.165, 1.15);\n const surface = hex(palette.colorSurface);\n put('accent', accent);\n put('accent-hover', scheme === 'light' ? mix(accent, BLACK, 0.8) : bright);\n put('accent-subtle', surface === undefined ? undefined : mix(bright, surface, 0.15));\n }\n return { variables, sf };\n}\n","import { useMemo, useSyncExternalStore } from 'react';\n\n/** Navigation as the components use it. Next's router is adapted to this by `StorefrontNextProvider`. */\nexport type StorefrontRouter = {\n pathname: string;\n searchParams: URLSearchParams;\n push(href: string, options?: { scroll?: boolean }): void;\n replace(href: string, options?: { scroll?: boolean }): void;\n};\n\nconst listeners = new Set<() => void>();\nconst notify = () => listeners.forEach((l) => l());\n\nfunction subscribe(listener: () => void): () => void {\n if (listeners.size === 0) window.addEventListener('popstate', notify);\n listeners.add(listener);\n return () => {\n listeners.delete(listener);\n if (listeners.size === 0) window.removeEventListener('popstate', notify);\n };\n}\n\nconst snapshot = () => window.location.pathname + window.location.search;\nconst serverSnapshot = () => '/';\n\nfunction navigate(mode: 'push' | 'replace', href: string, options?: { scroll?: boolean }): void {\n window.history[mode === 'push' ? 'pushState' : 'replaceState'](null, '', href);\n notify();\n if (options?.scroll !== false) window.scrollTo(0, 0);\n}\n\n/**\n * The default router (plain React, Vite): the browser's History API. It\n * re-renders on `popstate` and after its own `push` / `replace`. On the server\n * it answers `/` with no query; a Next store uses `StorefrontNextProvider`.\n */\nexport function useHistoryRouter(): StorefrontRouter {\n const location = useSyncExternalStore(subscribe, snapshot, serverSnapshot);\n return useMemo(() => {\n const at = location.indexOf('?');\n return {\n pathname: at === -1 ? location : location.slice(0, at),\n searchParams: new URLSearchParams(at === -1 ? '' : location.slice(at + 1)),\n push: (href, options) => navigate('push', href, options),\n replace: (href, options) => navigate('replace', href, options),\n };\n }, [location]);\n}\n","import { createCatalogClient, type CatalogClient } from '@usethrottle/catalog';\nimport {\n CatalogProvider,\n useGenerationWatch,\n useStorefrontSettings,\n type CartStorage,\n type CartUrls,\n type CatalogProviderProps,\n} from '@usethrottle/catalog/react';\nimport {\n ThrottleUIProvider,\n isRtlLocale,\n useAppearance,\n useInjectStyles,\n useSiteDesign,\n type IconOverrides,\n type PresetName,\n type ThemeTokens,\n type ThrottleAppearance,\n type ThrottleVariables,\n} from '@usethrottle/ui';\nimport { useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { usePart } from '../parts';\nimport { DefaultLink, type LinkComponent } from '../link';\nimport { normalizeSettings, type NormalizedSettings } from '../settings/normalize';\nimport { resolveSiteDesign, type ResolvedSiteDesign } from '../site/resolve';\nimport {\n STOREFRONT_LAYER_ORDER,\n STOREFRONT_LAYER_ORDER_ID,\n STOREFRONT_STYLES,\n STOREFRONT_STYLE_ID,\n} from '../styles';\nimport { SfLocalizationProvider } from '../strings/localization';\nimport type { StorefrontLocalization } from '../strings';\nimport { themeToVariables, type SfVariables } from '../theme/to-variables';\nimport { CartDrawerContext } from './cart-drawer';\nimport {\n StorefrontContext,\n type AnalyticsSink,\n type StorefrontAppearance,\n type StorefrontContextValue,\n} from './context';\nimport { useHistoryRouter, type StorefrontRouter } from './router';\n\n/** The props of `StorefrontProvider`. Give it a `catalogKey` (or a `client`) and everything else has a default. */\nexport type StorefrontProviderProps = {\n /** The catalog's publishable key. Give this or `client`. */\n catalogKey?: string;\n /** A ready catalog client (a server-built one, or a fixture in tests). */\n client?: CatalogClient;\n /** The settings answered on the server (`loadSettings`); the first render uses them with no request. */\n settings?: NormalizedSettings;\n /** Whether the catalog's lists carry ratings (`/config` `reviews`; the server loaders return it). Default true. */\n reviewsOnLists?: boolean;\n /** A preset's name. A Builder's theme wins over it; it wins over the catalog's theme (R11). */\n preset?: PresetName;\n /** Token overrides, merged over the preset. */\n theme?: Partial<ThemeTokens>;\n /** Colour scheme. Default: the site design's, else `'auto'` (follows the visitor's system setting). */\n scheme?: 'light' | 'dark' | 'auto';\n /**\n * BCP 47 locale (`'en'`, `'de'`, `'ar'`), sent to the catalog when the provider makes the client; picks `dir` when\n * that is not given. Default `'en'`.\n */\n locale?: string;\n /**\n * ISO 4217 code prices are read in (`'EUR'`), sent to the catalog when the provider makes the client. Default: the\n * catalog's. Every amount is shown by `formatMoney` in its own record's currency.\n */\n currency?: string;\n /** Default: from `locale`. */\n dir?: 'ltr' | 'rtl';\n /**\n * Style overrides: `parts` (class names per part key), `variables` / `darkVariables` (token overrides that win over every other theme source).\n */\n appearance?: StorefrontAppearance;\n /**\n * Text overrides keyed by string key, for any language. Site-design and catalog-settings strings win over it; the package's English is the last fallback.\n */\n localization?: StorefrontLocalization;\n /** Replacement icons by name (a shared `@usethrottle/ui` icon override map). */\n icons?: IconOverrides;\n /** Where GA4-shaped ecommerce events go: `{ track(event, payload) }`. Default: nothing is sent. */\n analytics?: AnalyticsSink;\n /**\n * How the storefront reads and changes the URL. Default: the History API (client-only apps). `StorefrontNextProvider` supplies Next's.\n */\n router?: StorefrontRouter;\n /**\n * The component every storefront link renders through. Default: a plain `<a>`. `StorefrontNextProvider` supplies `next/link`.\n */\n linkComponent?: LinkComponent;\n /** Default true. Set false and import `@usethrottle/storefront-react/styles.css` for a flash-free SSR paint. */\n injectStyles?: boolean;\n /**\n * An opaque, stable id of the signed-in customer (not a token), `null` when signed out. The catalog\n * cache is partitioned by it: when it changes, every list and product is read again. The prices come\n * from the catalog client's own `customerToken` source (`createCatalogClient({ customerToken })`);\n * this prop only says whose cache entries these are.\n */\n customerKey?: string | null;\n /**\n * Cart wiring, handed to the `CatalogProvider` this component creates, so the storefront's add-to-cart,\n * cart button and drawer read the app's one cart. Never mount a second `CatalogProvider` around it: two\n * providers never share a cart. `cartStorage` is where the cart session id is kept (default: memory only),\n * `customerCart` resumes a signed-in customer's cart on any device.\n */\n cartStorage?: CartStorage;\n /** Resumes a signed-in customer's cart on any device; passed to the `CatalogProvider` unchanged. */\n customerCart?: CatalogProviderProps['customerCart'];\n /** The store's own URLs, sent on every cart created and used by `checkout()`: `returnUrl`, `cancelUrl` (and `storefrontUrl`). */\n cartUrls?: CartUrls;\n /** Where the checkout lives, when it is not Throttle's own. */\n throttleBaseUrl?: string;\n /** Throttle's hosted pages, used to build a cart link. Default `https://checkout.usethrottle.dev`. */\n throttleCheckoutUrl?: string;\n /** The account key; a Builder's connections may supply it instead. */\n throttlePublishableKey?: string;\n /** Called when the catalog's generation changes (a merchant published). */\n onGenerationChange?: (generation: number) => void;\n /**\n * The open tab's check for a new catalog generation (a conditional read, a `304` when nothing changed).\n * Default on, every 60 s; `intervalMs` is never below 60 s. `false` turns it off: the signed webhook\n * then is the only way a change reaches an open tab.\n */\n generationWatch?: boolean | { intervalMs?: number };\n /** The storefront tree. */\n children?: ReactNode;\n};\n\nconst MIN_WATCH_INTERVAL_MS = 60_000;\n\nconst NO_ANALYTICS: AnalyticsSink = { track() {} };\n\n/** Hex colours and `px` lengths only reach this, but a custom property is still declared with care. */\nconst declarations = (vars: SfVariables) =>\n Object.entries(vars)\n .map(([name, value]) => `${name}: ${value};`)\n .join(' ');\n\n/** A short stable id for one sf-variable set, like `@usethrottle/ui`'s scope ids. */\nfunction scopeIdOf(text: string): string {\n let hash = 5381;\n for (let i = 0; i < text.length; i++) hash = ((hash << 5) + hash + text.charCodeAt(i)) | 0;\n return `f${(hash >>> 0).toString(36)}`;\n}\n\n/**\n * The storefront root: the catalog provider, the ui provider (class prefix\n * `tsf-`), the resolved site design, strings and router, and the one wrapper\n * element that carries the theme.\n */\nexport function StorefrontProvider(props: StorefrontProviderProps) {\n const { catalogKey, client: given, currency, locale } = props;\n const client = useMemo(() => {\n if (given) return given;\n if (!catalogKey) throw new Error('StorefrontProvider needs a `catalogKey` or a `client`.');\n return createCatalogClient({\n publishableKey: catalogKey,\n ...(currency ? { currency } : {}),\n ...(locale ? { locale } : {}),\n });\n }, [given, catalogKey, currency, locale]);\n\n return (\n <CatalogProvider\n client={client}\n customerKey={props.customerKey ?? null}\n cartStorage={props.cartStorage}\n customerCart={props.customerCart}\n cartUrls={props.cartUrls}\n throttleBaseUrl={props.throttleBaseUrl}\n throttleCheckoutUrl={props.throttleCheckoutUrl}\n >\n <StorefrontRoot {...props} client={client} />\n </CatalogProvider>\n );\n}\n\nfunction StorefrontRoot(props: StorefrontProviderProps & { client: CatalogClient }) {\n const {\n client, settings: initialSettings, preset, scheme, appearance, localization, icons, analytics, router,\n linkComponent, injectStyles = true, reviewsOnLists = true, throttlePublishableKey, onGenerationChange, generationWatch = true, currency, children,\n } = props;\n const locale = props.locale ?? 'en';\n const dir = props.dir ?? (isRtlLocale(locale) ? 'rtl' : 'ltr');\n\n // The settings: seeded from the server's answer, refreshed by the catalog hook when the generation moves.\n const seeded = useMemo(\n () => (initialSettings ? { settings: initialSettings, settingsVersion: 0, generation: 0 } : undefined),\n [initialSettings],\n );\n const query = useStorefrontSettings(seeded ? { initialData: seeded } : undefined);\n const settings = useMemo(\n () => normalizeSettings(query.data?.settings ?? initialSettings),\n [query.data, initialSettings],\n );\n const status = query.data ? 'ready' : query.error ? 'error' : 'loading';\n\n\n const siteDesign = useSiteDesign();\n const themeKey = JSON.stringify(props.theme ?? null);\n const site = useMemo(\n () =>\n resolveSiteDesign({\n site: siteDesign,\n settings,\n preset,\n theme: props.theme,\n scheme,\n throttlePublishableKey,\n }),\n // `theme` is compared by value: an inline object must not rebuild every context below.\n [siteDesign, settings, preset, themeKey, scheme, throttlePublishableKey],\n );\n\n useInjectStyles(STOREFRONT_LAYER_ORDER_ID, STOREFRONT_LAYER_ORDER, { enabled: injectStyles, position: 'prepend' });\n useInjectStyles(STOREFRONT_STYLE_ID, STOREFRONT_STYLES, { enabled: injectStyles });\n\n // The developer's `appearance` is the last layer: its variables beat the theme mapping.\n const effectiveScheme = appearance?.theme ?? site.scheme;\n const light = useMemo(() => themeToVariables(site.theme, 'light'), [site.theme]);\n const dark = useMemo(() => themeToVariables(site.theme, 'dark'), [site.theme]);\n const uiAppearance = useMemo<ThrottleAppearance>(() => {\n const own = appearance?.variables;\n const ownDark = appearance?.darkVariables;\n const base: ThrottleVariables = { ...(effectiveScheme === 'dark' ? dark : light).variables, ...own };\n const value: ThrottleAppearance = { theme: effectiveScheme, variables: base };\n if (effectiveScheme === 'auto') value.darkVariables = { ...dark.variables, ...own, ...ownDark };\n else if (effectiveScheme === 'dark' && ownDark) value.darkVariables = ownDark;\n if (appearance?.elements) value.elements = appearance.elements;\n if (appearance?.parts) value.parts = appearance.parts;\n if (appearance?.components) value.components = appearance.components;\n return value;\n }, [appearance, effectiveScheme, light, dark]);\n\n const historyRouter = useHistoryRouter();\n const [drawerOpen, setDrawerOpen] = useState(false);\n const drawer = useMemo(() => ({ open: drawerOpen, setOpen: setDrawerOpen }), [drawerOpen]);\n\n const value = useMemo<StorefrontContextValue>(\n () => ({\n settings,\n site,\n preset: site.preset,\n scheme: site.scheme,\n dir,\n locale,\n currency,\n client,\n router: router ?? historyRouter,\n analytics: analytics ?? NO_ANALYTICS,\n Link: linkComponent ?? DefaultLink,\n reviewsOnLists,\n throttlePublishableKey: site.throttlePublishableKey,\n }),\n [settings, site, dir, locale, currency, client, router, historyRouter, analytics, linkComponent, reviewsOnLists],\n );\n\n return (\n <ThrottleUIProvider appearance={uiAppearance} classPrefix=\"tsf-\" dir={dir} icons={icons}>\n <SfLocalizationProvider value={localization ?? {}}>\n <StorefrontContext.Provider value={value}>\n {generationWatch !== false ? (\n <GenerationWatcher\n intervalMs={typeof generationWatch === 'object' ? generationWatch.intervalMs : undefined}\n onChange={onGenerationChange}\n />\n ) : null}\n <CartDrawerContext.Provider value={drawer}>\n <StorefrontRootElement\n site={site}\n scheme={effectiveScheme}\n sf={{ light: light.sf, dark: dark.sf }}\n dir={dir}\n status={status}\n >\n {children}\n </StorefrontRootElement>\n </CartDrawerContext.Provider>\n </StorefrontContext.Provider>\n </SfLocalizationProvider>\n </ThrottleUIProvider>\n );\n}\n\n/** The watch is a component so it can be left out; never faster than once a minute. */\nfunction GenerationWatcher({ intervalMs, onChange }: { intervalMs?: number; onChange?: (generation: number) => void }) {\n useGenerationWatch({ intervalMs: Math.max(intervalMs ?? MIN_WATCH_INTERVAL_MS, MIN_WATCH_INTERVAL_MS), onChange });\n return null;\n}\n\n/** The one element the provider renders. It is inside the ui provider so it can read the resolved appearance. */\nfunction StorefrontRootElement(props: {\n site: ResolvedSiteDesign;\n scheme: 'light' | 'dark' | 'auto';\n sf: { light: SfVariables; dark: SfVariables };\n dir: 'ltr' | 'rtl';\n status: 'loading' | 'ready' | 'error';\n children?: ReactNode;\n}) {\n const { site, scheme, sf, dir, status, children } = props;\n const { rootProps, scopeCss } = useAppearance();\n const part = usePart('storefront-root');\n\n // `auto` cannot switch inline custom properties on a media query, so the sf\n // variables ride in a scoped rule, as the ui does for its own variables.\n const sfScope = scheme === 'auto' ? scopeIdOf(JSON.stringify(sf)) : null;\n const sfCss =\n sfScope === null\n ? null\n : `.tsf-root[data-sf-scope=\"${sfScope}\"] { ${declarations(sf.light)} }\\n` +\n `@media (prefers-color-scheme: dark) {\\n .tsf-root[data-sf-scope=\"${sfScope}\"] { ${declarations(sf.dark)} }\\n}\\n`;\n\n const style = scheme === 'auto' ? rootProps.style : { ...rootProps.style, ...(scheme === 'dark' ? sf.dark : sf.light) };\n // `tsf-root` carries the theme variables and stays even when unstyled; the part class follows the usual rule.\n const className = [rootProps.className, part.className].filter(Boolean).join(' ');\n\n return (\n <div\n className={className}\n style={style}\n data-throttle-part={part['data-throttle-part']}\n data-throttle-preset={site.preset}\n data-throttle-theme={rootProps['data-throttle-theme']}\n data-throttle-scope={rootProps['data-throttle-scope']}\n data-sf-scope={sfScope ?? undefined}\n data-site-source={site.source}\n data-theme-accent={site.theme.light.colorAccent}\n data-theme-radius={site.theme.radius}\n data-settings-status={status}\n dir={dir}\n >\n {scopeCss ? <style>{scopeCss}</style> : null}\n {sfCss ? <style>{sfCss}</style> : null}\n {children}\n </div>\n );\n}\n"]}
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
3
+
4
+ // src/product/gallery-items.ts
5
+ function galleryItems(product) {
6
+ return product.images;
7
+ }
8
+ var isVideo = (item) => item.kind === "video";
9
+ function srcSetOf(item) {
10
+ const entries = Object.entries(_nullishCoalesce(item.sizes, () => ( {}))).filter(([, url]) => typeof url === "string" && url !== "");
11
+ return entries.length > 0 ? entries.map(([width, url]) => `${url} ${width}w`).join(", ") : void 0;
12
+ }
13
+ function ratioOf(item) {
14
+ return _optionalChain([item, 'optionalAccess', _ => _.width]) && _optionalChain([item, 'optionalAccess', _2 => _2.height]) ? item.width / item.height : 0.8;
15
+ }
16
+
17
+
18
+
19
+
20
+
21
+
22
+ exports.galleryItems = galleryItems; exports.isVideo = isVideo; exports.srcSetOf = srcSetOf; exports.ratioOf = ratioOf;
23
+ //# sourceMappingURL=chunk-7R37CVAB.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/app-throttle/app-throttle/packages/storefront-react/dist/chunk-7R37CVAB.cjs","../src/product/gallery-items.ts"],"names":[],"mappings":"AAAA,6rBAAY;AACZ;AACA;ACMO,SAAS,YAAA,CAAa,OAAA,EAA2D;AACtF,EAAA,OAAO,OAAA,CAAQ,MAAA;AACjB;AAEO,IAAM,QAAA,EAAU,CAAC,IAAA,EAAA,GAA+B,IAAA,CAAK,KAAA,IAAS,OAAA;AAG9D,SAAS,QAAA,CAAS,IAAA,EAAuC;AAC9D,EAAA,MAAM,QAAA,EAAU,MAAA,CAAO,OAAA,kBAAQ,IAAA,CAAK,KAAA,UAAS,CAAC,GAAC,CAAA,CAAE,MAAA,CAAO,CAAC,CAAC,EAAE,GAAG,CAAA,EAAA,GAAM,OAAO,IAAA,IAAQ,SAAA,GAAY,IAAA,IAAQ,EAAE,CAAA;AAC1G,EAAA,OAAO,OAAA,CAAQ,OAAA,EAAS,EAAA,EAAI,OAAA,CAAQ,GAAA,CAAI,CAAC,CAAC,KAAA,EAAO,GAAG,CAAA,EAAA,GAAM,CAAA,EAAA;AAC5D;AAG+D;AACN,EAAA;AACzD;ADT6D;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/app-throttle/app-throttle/packages/storefront-react/dist/chunk-7R37CVAB.cjs","sourcesContent":[null,"import type { StorefrontProduct } from '@usethrottle/catalog';\n\ntype CatalogImage = StorefrontProduct['images'][number];\n\n/** One entry of the gallery: a photo, or a video when the media item says `kind: 'video'`. */\nexport type GalleryItem = CatalogImage & { kind?: 'image' | 'video'; posterUrl?: string };\n\n/** The photos of a product in the catalog's order; a media item of `kind: 'video'` plays instead of showing. */\nexport function galleryItems(product: Pick<StorefrontProduct, 'images'>): GalleryItem[] {\n return product.images as GalleryItem[];\n}\n\nexport const isVideo = (item: GalleryItem): boolean => item.kind === 'video';\n\n/** The `srcset` of an item's sizes (`{ '400': url, ... }`), or undefined without any. */\nexport function srcSetOf(item: GalleryItem): string | undefined {\n const entries = Object.entries(item.sizes ?? {}).filter(([, url]) => typeof url === 'string' && url !== '');\n return entries.length > 0 ? entries.map(([width, url]) => `${url} ${width}w`).join(', ') : undefined;\n}\n\n/** The ratio of an item (width over height); the 4:5 portrait the cards use when it has none. */\nexport function ratioOf(item: GalleryItem | undefined): number {\n return item?.width && item?.height ? item.width / item.height : 0.8;\n}\n"]}