@pradip1995/create-storefront 1.0.1

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 (338) hide show
  1. package/bin/create-storefront.js +239 -0
  2. package/lib/kit-next-config.js +84 -0
  3. package/package.json +32 -0
  4. package/templates/storefront/.eslintrc.json +3 -0
  5. package/templates/storefront/README.md +35 -0
  6. package/templates/storefront/check-env-variables.js +51 -0
  7. package/templates/storefront/kit-next-config.js +71 -0
  8. package/templates/storefront/next-env.d.ts +5 -0
  9. package/templates/storefront/next.config.js +25 -0
  10. package/templates/storefront/package.json +56 -0
  11. package/templates/storefront/postcss.config.js +6 -0
  12. package/templates/storefront/public/favicon.png +0 -0
  13. package/templates/storefront/src/app/[countryCode]/(checkout)/checkout/page.tsx +23 -0
  14. package/templates/storefront/src/app/[countryCode]/(checkout)/checkout/payment/page.tsx +47 -0
  15. package/templates/storefront/src/app/[countryCode]/(checkout)/layout.tsx +31 -0
  16. package/templates/storefront/src/app/[countryCode]/(checkout)/not-found.tsx +19 -0
  17. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/addresses/page.tsx +31 -0
  18. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/loading.tsx +9 -0
  19. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/details/[id]/page.tsx +35 -0
  20. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/exchange/[id]/page.tsx +47 -0
  21. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/page.tsx +28 -0
  22. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/orders/return/[id]/page.tsx +66 -0
  23. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/page.tsx +22 -0
  24. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/payment-methods/page.tsx +23 -0
  25. package/templates/storefront/src/app/[countryCode]/(main)/account/@dashboard/profile/page.tsx +43 -0
  26. package/templates/storefront/src/app/[countryCode]/(main)/account/@login/default.tsx +11 -0
  27. package/templates/storefront/src/app/[countryCode]/(main)/account/@login/page.tsx +18 -0
  28. package/templates/storefront/src/app/[countryCode]/(main)/account/guest-orders/page.tsx +13 -0
  29. package/templates/storefront/src/app/[countryCode]/(main)/account/layout.tsx +22 -0
  30. package/templates/storefront/src/app/[countryCode]/(main)/account/loading.tsx +9 -0
  31. package/templates/storefront/src/app/[countryCode]/(main)/cart/loading.tsx +5 -0
  32. package/templates/storefront/src/app/[countryCode]/(main)/cart/not-found.tsx +21 -0
  33. package/templates/storefront/src/app/[countryCode]/(main)/cart/page.tsx +23 -0
  34. package/templates/storefront/src/app/[countryCode]/(main)/categories/[...category]/page.tsx +11 -0
  35. package/templates/storefront/src/app/[countryCode]/(main)/collections/[handle]/page.tsx +11 -0
  36. package/templates/storefront/src/app/[countryCode]/(main)/contact/page.tsx +21 -0
  37. package/templates/storefront/src/app/[countryCode]/(main)/guest-orders/page.tsx +12 -0
  38. package/templates/storefront/src/app/[countryCode]/(main)/help/page.tsx +28 -0
  39. package/templates/storefront/src/app/[countryCode]/(main)/layout.tsx +21 -0
  40. package/templates/storefront/src/app/[countryCode]/(main)/not-found.tsx +20 -0
  41. package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/confirmed/loading.tsx +5 -0
  42. package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/confirmed/page.tsx +23 -0
  43. package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/transfer/[token]/accept/page.tsx +41 -0
  44. package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/transfer/[token]/decline/page.tsx +41 -0
  45. package/templates/storefront/src/app/[countryCode]/(main)/order/[id]/transfer/[token]/page.tsx +38 -0
  46. package/templates/storefront/src/app/[countryCode]/(main)/order/exchange/[id]/page.tsx +47 -0
  47. package/templates/storefront/src/app/[countryCode]/(main)/order/return/[id]/page.tsx +61 -0
  48. package/templates/storefront/src/app/[countryCode]/(main)/orders/[id]/page.tsx +33 -0
  49. package/templates/storefront/src/app/[countryCode]/(main)/page.tsx +24 -0
  50. package/templates/storefront/src/app/[countryCode]/(main)/privacy-policy/page.tsx +173 -0
  51. package/templates/storefront/src/app/[countryCode]/(main)/products/[handle]/page.tsx +193 -0
  52. package/templates/storefront/src/app/[countryCode]/(main)/reset-password/page.tsx +192 -0
  53. package/templates/storefront/src/app/[countryCode]/(main)/store/page.tsx +72 -0
  54. package/templates/storefront/src/app/[countryCode]/(main)/terms-of-use/page.tsx +179 -0
  55. package/templates/storefront/src/app/[countryCode]/(main)/wishlist/page.tsx +19 -0
  56. package/templates/storefront/src/app/api/meta/event/route.ts +63 -0
  57. package/templates/storefront/src/app/auth/customer/google/callback/page.tsx +126 -0
  58. package/templates/storefront/src/app/layout.tsx +104 -0
  59. package/templates/storefront/src/app/not-found.tsx +30 -0
  60. package/templates/storefront/src/app/opengraph-image.jpg +0 -0
  61. package/templates/storefront/src/app/robots.ts +15 -0
  62. package/templates/storefront/src/app/sitemap.ts +65 -0
  63. package/templates/storefront/src/app/twitter-image.jpg +0 -0
  64. package/templates/storefront/src/modules/account/components/account-deletion/index.tsx +160 -0
  65. package/templates/storefront/src/modules/account/components/account-info/index.tsx +145 -0
  66. package/templates/storefront/src/modules/account/components/account-nav/icons.tsx +43 -0
  67. package/templates/storefront/src/modules/account/components/account-nav/index.tsx +318 -0
  68. package/templates/storefront/src/modules/account/components/account-nav/logout-modal.tsx +92 -0
  69. package/templates/storefront/src/modules/account/components/account-nav/payment-methods-icon.tsx +9 -0
  70. package/templates/storefront/src/modules/account/components/address-book/index.tsx +47 -0
  71. package/templates/storefront/src/modules/account/components/address-card/add-address.tsx +377 -0
  72. package/templates/storefront/src/modules/account/components/address-card/edit-address-modal.tsx +468 -0
  73. package/templates/storefront/src/modules/account/components/deletion-pending-modal/index.tsx +213 -0
  74. package/templates/storefront/src/modules/account/components/forgot-password/index.tsx +1 -0
  75. package/templates/storefront/src/modules/account/components/login/index.tsx +1 -0
  76. package/templates/storefront/src/modules/account/components/order-card/index.tsx +221 -0
  77. package/templates/storefront/src/modules/account/components/order-overview/index.tsx +159 -0
  78. package/templates/storefront/src/modules/account/components/overview/index.tsx +189 -0
  79. package/templates/storefront/src/modules/account/components/profile-billing-address/index.tsx +447 -0
  80. package/templates/storefront/src/modules/account/components/profile-email/index.tsx +75 -0
  81. package/templates/storefront/src/modules/account/components/profile-form/index.tsx +416 -0
  82. package/templates/storefront/src/modules/account/components/profile-name/index.tsx +76 -0
  83. package/templates/storefront/src/modules/account/components/profile-password/index.tsx +70 -0
  84. package/templates/storefront/src/modules/account/components/profile-phone/index.tsx +185 -0
  85. package/templates/storefront/src/modules/account/components/register/index.tsx +1 -0
  86. package/templates/storefront/src/modules/account/components/return-item-selector/index.tsx +187 -0
  87. package/templates/storefront/src/modules/account/components/return-shipping-selector/index.tsx +118 -0
  88. package/templates/storefront/src/modules/account/components/transfer-request-form/index.tsx +81 -0
  89. package/templates/storefront/src/modules/account/templates/account-layout.tsx +38 -0
  90. package/templates/storefront/src/modules/account/templates/exchange-request-template.tsx +389 -0
  91. package/templates/storefront/src/modules/account/templates/guest-orders-template.tsx +123 -0
  92. package/templates/storefront/src/modules/account/templates/login-template.tsx +44 -0
  93. package/templates/storefront/src/modules/account/templates/payment-methods-template.tsx +478 -0
  94. package/templates/storefront/src/modules/account/templates/return-request-template.tsx +300 -0
  95. package/templates/storefront/src/modules/cart/components/abandoned-carts/ScrollToPendingOrdersButton.tsx +21 -0
  96. package/templates/storefront/src/modules/cart/components/abandoned-carts/index.tsx +335 -0
  97. package/templates/storefront/src/modules/cart/components/applied-promotions/index.tsx +121 -0
  98. package/templates/storefront/src/modules/cart/components/cart-delivery-selection/index.tsx +203 -0
  99. package/templates/storefront/src/modules/cart/components/cart-item-card/index.tsx +476 -0
  100. package/templates/storefront/src/modules/cart/components/cart-item-select/index.tsx +73 -0
  101. package/templates/storefront/src/modules/cart/components/cart-view-tracker/index.tsx +44 -0
  102. package/templates/storefront/src/modules/cart/components/delivery-information/index.tsx +89 -0
  103. package/templates/storefront/src/modules/cart/components/empty-cart-message/index.tsx +38 -0
  104. package/templates/storefront/src/modules/cart/components/item/index.tsx +150 -0
  105. package/templates/storefront/src/modules/cart/components/pincode-checker/index.tsx +174 -0
  106. package/templates/storefront/src/modules/cart/components/sign-in-prompt/index.tsx +26 -0
  107. package/templates/storefront/src/modules/cart/components/you-may-also-like/index.tsx +137 -0
  108. package/templates/storefront/src/modules/cart/templates/index.tsx +88 -0
  109. package/templates/storefront/src/modules/cart/templates/items.tsx +49 -0
  110. package/templates/storefront/src/modules/cart/templates/preview.tsx +51 -0
  111. package/templates/storefront/src/modules/cart/templates/summary.tsx +29 -0
  112. package/templates/storefront/src/modules/checkout/components/add-address-modal/index.tsx +390 -0
  113. package/templates/storefront/src/modules/checkout/components/address-card/index.tsx +135 -0
  114. package/templates/storefront/src/modules/checkout/components/address-select/index.tsx +116 -0
  115. package/templates/storefront/src/modules/checkout/components/addresses/index.tsx +605 -0
  116. package/templates/storefront/src/modules/checkout/components/back-link/index.tsx +32 -0
  117. package/templates/storefront/src/modules/checkout/components/billing_address/index.tsx +301 -0
  118. package/templates/storefront/src/modules/checkout/components/checkout-begin-tracker/index.tsx +45 -0
  119. package/templates/storefront/src/modules/checkout/components/checkout-leave-guard/index.tsx +109 -0
  120. package/templates/storefront/src/modules/checkout/components/checkout-shipping-tracker/index.tsx +45 -0
  121. package/templates/storefront/src/modules/checkout/components/country-select/index.tsx +50 -0
  122. package/templates/storefront/src/modules/checkout/components/discount-code/index.tsx +220 -0
  123. package/templates/storefront/src/modules/checkout/components/error-message/index.tsx +13 -0
  124. package/templates/storefront/src/modules/checkout/components/payment/index.tsx +572 -0
  125. package/templates/storefront/src/modules/checkout/components/payment-button/index.tsx +257 -0
  126. package/templates/storefront/src/modules/checkout/components/payment-button/razorpay-payment-button.tsx +136 -0
  127. package/templates/storefront/src/modules/checkout/components/payment-container/index.tsx +129 -0
  128. package/templates/storefront/src/modules/checkout/components/payment-test/index.tsx +12 -0
  129. package/templates/storefront/src/modules/checkout/components/payment-wrapper/index.tsx +50 -0
  130. package/templates/storefront/src/modules/checkout/components/payment-wrapper/stripe-wrapper.tsx +54 -0
  131. package/templates/storefront/src/modules/checkout/components/processing-overlay/index.tsx +83 -0
  132. package/templates/storefront/src/modules/checkout/components/review/index.tsx +60 -0
  133. package/templates/storefront/src/modules/checkout/components/select-address-modal/index.tsx +103 -0
  134. package/templates/storefront/src/modules/checkout/components/shipping/index.tsx +533 -0
  135. package/templates/storefront/src/modules/checkout/components/shipping-address/index.tsx +521 -0
  136. package/templates/storefront/src/modules/checkout/components/submit-button/index.tsx +32 -0
  137. package/templates/storefront/src/modules/checkout/templates/checkout-form/index.tsx +38 -0
  138. package/templates/storefront/src/modules/checkout/templates/checkout-summary/index.tsx +274 -0
  139. package/templates/storefront/src/modules/common/components/breadcrumb/index.tsx +43 -0
  140. package/templates/storefront/src/modules/common/components/cart-totals/index.tsx +473 -0
  141. package/templates/storefront/src/modules/common/components/checkbox/index.tsx +98 -0
  142. package/templates/storefront/src/modules/common/components/delete-button/index.tsx +156 -0
  143. package/templates/storefront/src/modules/common/components/divider/index.tsx +9 -0
  144. package/templates/storefront/src/modules/common/components/filter-checkbox-group/index.tsx +134 -0
  145. package/templates/storefront/src/modules/common/components/filter-radio-group/index.tsx +62 -0
  146. package/templates/storefront/src/modules/common/components/input/index.tsx +79 -0
  147. package/templates/storefront/src/modules/common/components/interactive-link/index.tsx +33 -0
  148. package/templates/storefront/src/modules/common/components/line-item-options/index.tsx +26 -0
  149. package/templates/storefront/src/modules/common/components/line-item-price/index.tsx +64 -0
  150. package/templates/storefront/src/modules/common/components/line-item-unit-price/index.tsx +61 -0
  151. package/templates/storefront/src/modules/common/components/localized-client-link/index.tsx +32 -0
  152. package/templates/storefront/src/modules/common/components/login-popup/index.tsx +78 -0
  153. package/templates/storefront/src/modules/common/components/modal/index.tsx +123 -0
  154. package/templates/storefront/src/modules/common/components/native-select/index.tsx +75 -0
  155. package/templates/storefront/src/modules/common/components/obfuscated-email/index.tsx +30 -0
  156. package/templates/storefront/src/modules/common/components/product/product-rating/index.tsx +172 -0
  157. package/templates/storefront/src/modules/common/components/product/review-modal/index.tsx +333 -0
  158. package/templates/storefront/src/modules/common/components/product/share-button/index.tsx +227 -0
  159. package/templates/storefront/src/modules/common/components/product/wishlist-icon/index.tsx +46 -0
  160. package/templates/storefront/src/modules/common/components/radio/index.tsx +27 -0
  161. package/templates/storefront/src/modules/common/components/select/index.tsx +164 -0
  162. package/templates/storefront/src/modules/common/components/side-panel/index.tsx +65 -0
  163. package/templates/storefront/src/modules/common/icons/arrow-left.tsx +36 -0
  164. package/templates/storefront/src/modules/common/icons/back.tsx +37 -0
  165. package/templates/storefront/src/modules/common/icons/bancontact.tsx +26 -0
  166. package/templates/storefront/src/modules/common/icons/chevron-down.tsx +30 -0
  167. package/templates/storefront/src/modules/common/icons/delivered.tsx +29 -0
  168. package/templates/storefront/src/modules/common/icons/envelope.tsx +27 -0
  169. package/templates/storefront/src/modules/common/icons/eye-off.tsx +37 -0
  170. package/templates/storefront/src/modules/common/icons/eye.tsx +37 -0
  171. package/templates/storefront/src/modules/common/icons/fast-delivery.tsx +65 -0
  172. package/templates/storefront/src/modules/common/icons/ideal.tsx +26 -0
  173. package/templates/storefront/src/modules/common/icons/lock.tsx +31 -0
  174. package/templates/storefront/src/modules/common/icons/map-pin.tsx +37 -0
  175. package/templates/storefront/src/modules/common/icons/medusa.tsx +27 -0
  176. package/templates/storefront/src/modules/common/icons/menu.tsx +45 -0
  177. package/templates/storefront/src/modules/common/icons/nextjs.tsx +27 -0
  178. package/templates/storefront/src/modules/common/icons/package.tsx +44 -0
  179. package/templates/storefront/src/modules/common/icons/paypal.tsx +30 -0
  180. package/templates/storefront/src/modules/common/icons/phone.tsx +30 -0
  181. package/templates/storefront/src/modules/common/icons/placeholder-image.tsx +44 -0
  182. package/templates/storefront/src/modules/common/icons/refresh.tsx +51 -0
  183. package/templates/storefront/src/modules/common/icons/spinner.tsx +37 -0
  184. package/templates/storefront/src/modules/common/icons/trash.tsx +51 -0
  185. package/templates/storefront/src/modules/common/icons/user.tsx +37 -0
  186. package/templates/storefront/src/modules/common/icons/x.tsx +37 -0
  187. package/templates/storefront/src/modules/contact/templates/index.tsx +272 -0
  188. package/templates/storefront/src/modules/help/templates/index.tsx +629 -0
  189. package/templates/storefront/src/modules/home/components/dynamic-banner/index.tsx +190 -0
  190. package/templates/storefront/src/modules/home/components/featured-products/index.tsx +16 -0
  191. package/templates/storefront/src/modules/home/components/featured-products/product-rail/index.tsx +51 -0
  192. package/templates/storefront/src/modules/home/components/features/index.tsx +1 -0
  193. package/templates/storefront/src/modules/home/components/hero/index.tsx +1 -0
  194. package/templates/storefront/src/modules/home/components/loved-by-moms/index.tsx +1 -0
  195. package/templates/storefront/src/modules/home/components/new-arrivals/index.tsx +1 -0
  196. package/templates/storefront/src/modules/home/components/shop-by-age/index.tsx +1 -0
  197. package/templates/storefront/src/modules/home/components/shop-by-category/index.tsx +1 -0
  198. package/templates/storefront/src/modules/home/components/testimonials/index.tsx +1 -0
  199. package/templates/storefront/src/modules/home/components/why-choose-us/dynamic-features.tsx +93 -0
  200. package/templates/storefront/src/modules/home/components/why-choose-us/index.tsx +1 -0
  201. package/templates/storefront/src/modules/layout/components/account-dropdown/index.tsx +56 -0
  202. package/templates/storefront/src/modules/layout/components/cart-button/index.tsx +8 -0
  203. package/templates/storefront/src/modules/layout/components/cart-dropdown/index.tsx +424 -0
  204. package/templates/storefront/src/modules/layout/components/cart-mismatch-banner/index.tsx +57 -0
  205. package/templates/storefront/src/modules/layout/components/cookie-consent/index.tsx +116 -0
  206. package/templates/storefront/src/modules/layout/components/country-select/index.tsx +135 -0
  207. package/templates/storefront/src/modules/layout/components/desktop-search/index.tsx +148 -0
  208. package/templates/storefront/src/modules/layout/components/dynamic-logo/index.tsx +27 -0
  209. package/templates/storefront/src/modules/layout/components/footer-categories/index.tsx +34 -0
  210. package/templates/storefront/src/modules/layout/components/footer-contact/index.tsx +87 -0
  211. package/templates/storefront/src/modules/layout/components/footer-description/index.tsx +12 -0
  212. package/templates/storefront/src/modules/layout/components/footer-logo/index.tsx +22 -0
  213. package/templates/storefront/src/modules/layout/components/footer-newsletter/index.tsx +100 -0
  214. package/templates/storefront/src/modules/layout/components/language-select/index.tsx +192 -0
  215. package/templates/storefront/src/modules/layout/components/medusa-cta/index.tsx +21 -0
  216. package/templates/storefront/src/modules/layout/components/mobile-menu/index.tsx +296 -0
  217. package/templates/storefront/src/modules/layout/components/nav-links/index.tsx +66 -0
  218. package/templates/storefront/src/modules/layout/components/nav-wrapper/index.tsx +14 -0
  219. package/templates/storefront/src/modules/layout/components/promo-bar/index.tsx +7 -0
  220. package/templates/storefront/src/modules/layout/components/promo-bar/promo-bar-content.tsx +174 -0
  221. package/templates/storefront/src/modules/layout/components/push-notification-manager/index.tsx +191 -0
  222. package/templates/storefront/src/modules/layout/components/search-panel/index.tsx +136 -0
  223. package/templates/storefront/src/modules/layout/components/side-menu/index.tsx +144 -0
  224. package/templates/storefront/src/modules/layout/components/verification-banner/index.tsx +217 -0
  225. package/templates/storefront/src/modules/layout/components/wishlist-counter/index.tsx +17 -0
  226. package/templates/storefront/src/modules/layout/templates/footer/index.tsx +7 -0
  227. package/templates/storefront/src/modules/layout/templates/nav/index.tsx +14 -0
  228. package/templates/storefront/src/modules/order/components/cancel-order-modal/index.tsx +168 -0
  229. package/templates/storefront/src/modules/order/components/help/index.tsx +25 -0
  230. package/templates/storefront/src/modules/order/components/item/index.tsx +62 -0
  231. package/templates/storefront/src/modules/order/components/items/index.tsx +44 -0
  232. package/templates/storefront/src/modules/order/components/onboarding-cta/index.tsx +28 -0
  233. package/templates/storefront/src/modules/order/components/order-confirmation-back-handler/index.tsx +28 -0
  234. package/templates/storefront/src/modules/order/components/order-details/index.tsx +63 -0
  235. package/templates/storefront/src/modules/order/components/order-purchase-tracker/index.tsx +48 -0
  236. package/templates/storefront/src/modules/order/components/order-redesign/index.tsx +887 -0
  237. package/templates/storefront/src/modules/order/components/order-summary/index.tsx +60 -0
  238. package/templates/storefront/src/modules/order/components/payment-details/index.tsx +63 -0
  239. package/templates/storefront/src/modules/order/components/shipping-details/index.tsx +73 -0
  240. package/templates/storefront/src/modules/order/components/transfer-actions/index.tsx +81 -0
  241. package/templates/storefront/src/modules/order/components/transfer-image/index.tsx +275 -0
  242. package/templates/storefront/src/modules/order/templates/order-completed-template.tsx +233 -0
  243. package/templates/storefront/src/modules/order/templates/order-details-template.tsx +128 -0
  244. package/templates/storefront/src/modules/products/components/image-gallery/index.tsx +297 -0
  245. package/templates/storefront/src/modules/products/components/product-actions/index.tsx +1400 -0
  246. package/templates/storefront/src/modules/products/components/product-actions/mobile-actions.tsx +217 -0
  247. package/templates/storefront/src/modules/products/components/product-actions/option-select.tsx +62 -0
  248. package/templates/storefront/src/modules/products/components/product-onboarding-cta/index.tsx +30 -0
  249. package/templates/storefront/src/modules/products/components/product-preview/index.tsx +5 -0
  250. package/templates/storefront/src/modules/products/components/product-preview/price.tsx +29 -0
  251. package/templates/storefront/src/modules/products/components/product-price/index.tsx +58 -0
  252. package/templates/storefront/src/modules/products/components/product-rating/index.tsx +1 -0
  253. package/templates/storefront/src/modules/products/components/product-tabs/accordion.tsx +100 -0
  254. package/templates/storefront/src/modules/products/components/product-tabs/index.tsx +127 -0
  255. package/templates/storefront/src/modules/products/components/product-tabs/ratings-tab.tsx +598 -0
  256. package/templates/storefront/src/modules/products/components/product-view-tracker/index.tsx +53 -0
  257. package/templates/storefront/src/modules/products/components/related-products/index.tsx +152 -0
  258. package/templates/storefront/src/modules/products/components/review-modal/index.tsx +1 -0
  259. package/templates/storefront/src/modules/products/components/share-button/index.tsx +1 -0
  260. package/templates/storefront/src/modules/products/components/thumbnail/index.tsx +91 -0
  261. package/templates/storefront/src/modules/products/components/wishlist-icon/index.tsx +1 -0
  262. package/templates/storefront/src/modules/products/context/product-context.tsx +52 -0
  263. package/templates/storefront/src/modules/products/templates/index.tsx +26 -0
  264. package/templates/storefront/src/modules/products/templates/product-actions-wrapper/index.tsx +1 -0
  265. package/templates/storefront/src/modules/products/templates/product-info/index.tsx +2 -0
  266. package/templates/storefront/src/modules/shipping/components/free-shipping-price-nudge/index.tsx +283 -0
  267. package/templates/storefront/src/modules/skeletons/components/skeleton-button/index.tsx +5 -0
  268. package/templates/storefront/src/modules/skeletons/components/skeleton-card-details/index.tsx +10 -0
  269. package/templates/storefront/src/modules/skeletons/components/skeleton-cart-item/index.tsx +35 -0
  270. package/templates/storefront/src/modules/skeletons/components/skeleton-cart-totals/index.tsx +30 -0
  271. package/templates/storefront/src/modules/skeletons/components/skeleton-code-form/index.tsx +13 -0
  272. package/templates/storefront/src/modules/skeletons/components/skeleton-line-item/index.tsx +35 -0
  273. package/templates/storefront/src/modules/skeletons/components/skeleton-order-confirmed-header/index.tsx +14 -0
  274. package/templates/storefront/src/modules/skeletons/components/skeleton-order-information/index.tsx +36 -0
  275. package/templates/storefront/src/modules/skeletons/components/skeleton-order-items/index.tsx +43 -0
  276. package/templates/storefront/src/modules/skeletons/components/skeleton-order-summary/index.tsx +15 -0
  277. package/templates/storefront/src/modules/skeletons/components/skeleton-product-preview/index.tsx +15 -0
  278. package/templates/storefront/src/modules/skeletons/templates/skeleton-cart-page/index.tsx +65 -0
  279. package/templates/storefront/src/modules/skeletons/templates/skeleton-order-confirmed/index.tsx +21 -0
  280. package/templates/storefront/src/modules/skeletons/templates/skeleton-product-grid/index.tsx +23 -0
  281. package/templates/storefront/src/modules/skeletons/templates/skeleton-related-products/index.tsx +25 -0
  282. package/templates/storefront/src/modules/store/components/client-paginated-products.tsx +108 -0
  283. package/templates/storefront/src/modules/store/components/mobile-filters/index.tsx +135 -0
  284. package/templates/storefront/src/modules/store/components/pagination/index.tsx +118 -0
  285. package/templates/storefront/src/modules/store/components/product-list-view-tracker/index.tsx +43 -0
  286. package/templates/storefront/src/modules/store/components/refinement-list/index.tsx +299 -0
  287. package/templates/storefront/src/modules/store/components/refinement-list/sort-products/index.tsx +120 -0
  288. package/templates/storefront/src/modules/store/components/store-header/index.tsx +67 -0
  289. package/templates/storefront/src/modules/store/templates/index.tsx +1 -0
  290. package/templates/storefront/src/modules/store/templates/paginated-products.tsx +175 -0
  291. package/templates/storefront/src/modules/wishlist/components/wishlist-item/index.tsx +797 -0
  292. package/templates/storefront/src/modules/wishlist/templates/index.tsx +176 -0
  293. package/templates/storefront/src/storefront.config.ts +12 -0
  294. package/templates/storefront/src/styles/globals.css +326 -0
  295. package/templates/storefront/src/theme/valero/blocks/home/Features/index.tsx +61 -0
  296. package/templates/storefront/src/theme/valero/blocks/home/Hero/index.tsx +102 -0
  297. package/templates/storefront/src/theme/valero/blocks/home/LovedByMoms/index.tsx +407 -0
  298. package/templates/storefront/src/theme/valero/blocks/home/NewArrivals/index.tsx +48 -0
  299. package/templates/storefront/src/theme/valero/blocks/home/ShopByAge/index.tsx +128 -0
  300. package/templates/storefront/src/theme/valero/blocks/home/ShopByCategory/index.tsx +409 -0
  301. package/templates/storefront/src/theme/valero/blocks/home/Testimonials/index.tsx +697 -0
  302. package/templates/storefront/src/theme/valero/blocks/home/WhyChooseUs/index.tsx +62 -0
  303. package/templates/storefront/src/theme/valero/layouts/MainLayoutShell.tsx +14 -0
  304. package/templates/storefront/src/theme/valero/primitives/Button.tsx +28 -0
  305. package/templates/storefront/src/theme/valero/primitives/Card.tsx +32 -0
  306. package/templates/storefront/src/theme/valero/primitives/index.ts +2 -0
  307. package/templates/storefront/src/theme/valero/slots/account/ForgotPassword/index.tsx +1 -0
  308. package/templates/storefront/src/theme/valero/slots/account/Login/index.tsx +1 -0
  309. package/templates/storefront/src/theme/valero/slots/account/LoginTemplate/index.tsx +44 -0
  310. package/templates/storefront/src/theme/valero/slots/account/Register/index.tsx +1 -0
  311. package/templates/storefront/src/theme/valero/slots/cart/CartItem/index.tsx +11 -0
  312. package/templates/storefront/src/theme/valero/slots/cart/CartSummary/index.tsx +13 -0
  313. package/templates/storefront/src/theme/valero/slots/checkout/CheckoutForm/index.tsx +1 -0
  314. package/templates/storefront/src/theme/valero/slots/checkout/CheckoutSummary/index.tsx +1 -0
  315. package/templates/storefront/src/theme/valero/slots/layout/Footer/index.tsx +104 -0
  316. package/templates/storefront/src/theme/valero/slots/layout/Nav/index.tsx +97 -0
  317. package/templates/storefront/src/theme/valero/slots/layout/PromoBar/index.tsx +19 -0
  318. package/templates/storefront/src/theme/valero/slots/layout/PromoBar/promo-bar-content.tsx +174 -0
  319. package/templates/storefront/src/theme/valero/slots/order/OrderDetails/index.tsx +12 -0
  320. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductCTASection.tsx +191 -0
  321. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductDetailsSection.tsx +137 -0
  322. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductFeaturePanel.tsx +245 -0
  323. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductHighlightsSection.tsx +98 -0
  324. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductOptionsSection.tsx +233 -0
  325. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductPriceSection.tsx +53 -0
  326. package/templates/storefront/src/theme/valero/slots/product/ProductActions/ProductTrustSection.tsx +84 -0
  327. package/templates/storefront/src/theme/valero/slots/product/ProductActions/index.tsx +161 -0
  328. package/templates/storefront/src/theme/valero/slots/product/ProductCard/index.tsx +132 -0
  329. package/templates/storefront/src/theme/valero/slots/product/ProductInfo/index.tsx +40 -0
  330. package/templates/storefront/src/theme/valero/templates/StorePage/index.tsx +154 -0
  331. package/templates/storefront/src/theme/valero/tokens/colors.js +16 -0
  332. package/templates/storefront/src/theme/valero/tokens/colors.ts +21 -0
  333. package/templates/storefront/src/theme/valero/tokens/fonts.ts +13 -0
  334. package/templates/storefront/src/theme/valero/tokens/index.ts +3 -0
  335. package/templates/storefront/src/theme/valero/tokens/spacing.ts +9 -0
  336. package/templates/storefront/src/theme/valero/tokens/theme.css +91 -0
  337. package/templates/storefront/tailwind.config.js +221 -0
  338. package/templates/storefront/tsconfig.json +30 -0
@@ -0,0 +1,629 @@
1
+ "use client"
2
+
3
+ import { useState, useEffect, useRef } from "react"
4
+ import { submitContactRequest } from "@core/data/contact"
5
+ import ObfuscatedEmail from "@modules/common/components/obfuscated-email"
6
+
7
+ interface ContactDetails {
8
+ phone: string
9
+ email: string
10
+ address: string
11
+ }
12
+
13
+ interface HelpTemplateProps {
14
+ countryCode: string
15
+ contactInfo?: ContactDetails | null
16
+ dynamicFaqs?: Array<{ category: string; items: Array<{ q: string; a: string }> }> | null
17
+ }
18
+
19
+ const defaultFaqs = [
20
+ {
21
+ category: "Order & Delivery",
22
+ icon: "🚚",
23
+ color: "from-blue-500 to-cyan-400",
24
+ items: [
25
+ { q: "When will I receive my order?", a: "Orders are typically processed within 1-2 business days. Delivery takes 3-5 business days depending on your location. Express delivery options may be available at checkout." },
26
+ { q: "How can I track my order?", a: "Once your order ships, you will receive a tracking link via email and SMS. You can also track your order anytime from your account dashboard under 'My Orders'." },
27
+ { q: "Can I cancel or change my order?", a: "You can cancel or change your order within 24 hours of placing it. Please contact our support team immediately or use the cancel option in your account. After 24 hours, the order may already be in processing." },
28
+ { q: "Do you offer free shipping?", a: "Yes! We offer free shipping on all orders above ₹999. For orders below this amount, a nominal shipping fee applies based on your delivery location and the chosen shipping method." },
29
+ ]
30
+ },
31
+ {
32
+ category: "Returns & Exchanges",
33
+ icon: "📦",
34
+ color: "from-emerald-500 to-teal-400",
35
+ items: [
36
+ { q: "What is your return policy?", a: "We offer a 7-day return policy for unused, unwashed items in their original packaging with tags attached. Items must be in their original condition to qualify for a return." },
37
+ { q: "How do I initiate a return?", a: "Go to your account, click on the specific order, and select 'Return Items'. Follow the instructions to generate a pickup request. Our team will schedule a pickup within 2 business days." },
38
+ { q: "Do you offer exchanges?", a: "Yes, you can request an exchange for a different size or color within 7 days of delivery, subject to availability. Exchange items must be in original condition with all tags intact." },
39
+ { q: "When will I receive my exchanged item?", a: "Once we receive and verify your returned item, the exchange will be dispatched within 2 business days. You'll receive a tracking link as soon as it ships." },
40
+ ]
41
+ },
42
+ {
43
+ category: "Payment & Refunds",
44
+ icon: "💳",
45
+ color: "from-violet-500 to-purple-400",
46
+ items: [
47
+ { q: "When will I receive my refund?", a: "Refunds are processed within 5-7 business days after we receive and inspect your returned items. The amount will be credited to your original payment method." },
48
+ { q: "What payment methods do you accept?", a: "We accept all major credit/debit cards, UPI, Net Banking, Wallets (Paytm, PhonePe, etc.), and Cash on Delivery (COD) for most PIN codes across India." },
49
+ { q: "Is my payment information secure?", a: "Absolutely! We use industry-standard SSL encryption and our payment gateway (Razorpay) is PCI-DSS compliant. We never store your card details on our servers." },
50
+ ]
51
+ },
52
+ {
53
+ category: "Product Inquiry",
54
+ icon: "👗",
55
+ color: "from-pink-500 to-rose-400",
56
+ items: [
57
+ { q: "How do I find the right size for my child?", a: "Each product page includes a detailed size chart with measurements in both cm and inches. We recommend measuring your child and comparing with our chart for the best fit. When in doubt, size up!" },
58
+ { q: "Are Chocomelon products safe for kids?", a: "Yes! All our products are certified child-safe. We use non-toxic, hypoallergenic dyes and materials that meet Indian safety standards for children's clothing. Safety is our top priority." },
59
+ { q: "How should I care for Chocomelon clothing?", a: "Machine wash cold with like colors. Do not bleach. Tumble dry low or hang dry. Iron on low heat if needed. Detailed care instructions are printed on the garment's inner label." },
60
+ ]
61
+ },
62
+ ]
63
+
64
+
65
+
66
+ const HelpTemplate = ({ countryCode, contactInfo, dynamicFaqs }: HelpTemplateProps) => {
67
+ const faqsToDisplay = dynamicFaqs && dynamicFaqs.length > 0 ? dynamicFaqs : defaultFaqs
68
+
69
+ const [activeTab, setActiveTab] = useState(0)
70
+ const [openFaq, setOpenFaq] = useState<string | null>("item-0")
71
+ const [searchQuery, setSearchQuery] = useState("")
72
+ const [searchResults, setSearchResults] = useState<Array<{ catIndex: number; catName: string; q: string; a: string; itemIndex: number }> | null>(null)
73
+ const [isSearching, setIsSearching] = useState(false)
74
+ const [heroVisible, setHeroVisible] = useState(false)
75
+ const heroRef = useRef<HTMLDivElement>(null)
76
+
77
+ const [contactDetails] = useState<ContactDetails>({
78
+ phone: contactInfo?.phone || "+91 82382 57652",
79
+ email: contactInfo?.email || "chocomelonllp@gmail.com",
80
+ address: contactInfo?.address || "312, Silver trade center, Mota Varachha, Surat",
81
+ })
82
+
83
+ const [formData, setFormData] = useState({ name: "", email: "", topic: "", message: "" })
84
+ const [isSubmitting, setIsSubmitting] = useState(false)
85
+ const [submitSuccess, setSubmitSuccess] = useState(false)
86
+ const [submitError, setSubmitError] = useState<string | null>(null)
87
+
88
+ useEffect(() => {
89
+ const timer = setTimeout(() => setHeroVisible(true), 100)
90
+ return () => clearTimeout(timer)
91
+ }, [])
92
+
93
+ const handleSearch = (value: string) => {
94
+ setSearchQuery(value)
95
+ if (!value.trim()) {
96
+ setSearchResults(null)
97
+ setIsSearching(false)
98
+ return
99
+ }
100
+ setIsSearching(true)
101
+ const lower = value.toLowerCase()
102
+ const results: typeof searchResults = []
103
+ faqsToDisplay.forEach((cat, catIndex) => {
104
+ cat.items.forEach((item, itemIndex) => {
105
+ if (item.q.toLowerCase().includes(lower) || item.a.toLowerCase().includes(lower)) {
106
+ results!.push({ catIndex, catName: cat.category, q: item.q, a: item.a, itemIndex })
107
+ }
108
+ })
109
+ })
110
+ setSearchResults(results)
111
+ }
112
+
113
+ const handleFormChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {
114
+ const { name, value } = e.target
115
+ setFormData((prev) => ({ ...prev, [name]: value }))
116
+ }
117
+
118
+ const handleFormSubmit = async (e: React.FormEvent) => {
119
+ e.preventDefault()
120
+ setIsSubmitting(true)
121
+ setSubmitSuccess(false)
122
+ setSubmitError(null)
123
+ try {
124
+ const result = await submitContactRequest({
125
+ email: formData.email,
126
+ payload: { full_name: formData.name, topic: formData.topic || "general_inquiry", message: formData.message },
127
+ metadata: { source_page: "help" },
128
+ source: "storefront",
129
+ })
130
+ if (result.success) {
131
+ if (typeof window !== "undefined") {
132
+ (window as any).dataLayer = (window as any).dataLayer || []
133
+ ;(window as any).dataLayer.push({ event: "form_submit", form_type: "help_contact_form" })
134
+ }
135
+ setSubmitSuccess(true)
136
+ setFormData({ name: "", email: "", topic: "", message: "" })
137
+ setTimeout(() => setSubmitSuccess(false), 5000)
138
+ } else {
139
+ setSubmitError(result.error || "Failed to submit request. Please try again.")
140
+ }
141
+ } catch {
142
+ setSubmitError("Something went wrong. Please try again.")
143
+ } finally {
144
+ setIsSubmitting(false)
145
+ }
146
+ }
147
+
148
+ const currentCategory = faqsToDisplay[activeTab] || faqsToDisplay[0]
149
+
150
+ return (
151
+ <div className="page-surface pb-20">
152
+ <style>{`
153
+ @keyframes float-slow {
154
+ 0%, 100% { transform: translateY(0px) rotate(0deg); }
155
+ 50% { transform: translateY(-18px) rotate(6deg); }
156
+ }
157
+ @keyframes float-med {
158
+ 0%, 100% { transform: translateY(0px) rotate(0deg); }
159
+ 50% { transform: translateY(-12px) rotate(-4deg); }
160
+ }
161
+ @keyframes pulse-glow {
162
+ 0%, 100% { opacity: 0.4; transform: scale(1); }
163
+ 50% { opacity: 0.7; transform: scale(1.08); }
164
+ }
165
+ @keyframes slide-up {
166
+ from { opacity: 0; transform: translateY(32px); }
167
+ to { opacity: 1; transform: translateY(0); }
168
+ }
169
+ @keyframes fade-in {
170
+ from { opacity: 0; }
171
+ to { opacity: 1; }
172
+ }
173
+ @keyframes shimmer {
174
+ 0% { transform: translateX(-100%); }
175
+ 100% { transform: translateX(100%); }
176
+ }
177
+ @keyframes accordion-open {
178
+ from { opacity: 0; transform: translateY(-6px); }
179
+ to { opacity: 1; transform: translateY(0); }
180
+ }
181
+ @keyframes bounce-in {
182
+ 0% { transform: scale(0.8); opacity: 0; }
183
+ 60% { transform: scale(1.05); }
184
+ 100% { transform: scale(1); opacity: 1; }
185
+ }
186
+
187
+ .animate-float-slow { animation: float-slow 6s ease-in-out infinite; }
188
+ .animate-float-med { animation: float-med 4.5s ease-in-out infinite; }
189
+ .animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }
190
+ .animate-slide-up { animation: slide-up 0.6s ease forwards; }
191
+ .animate-fade-in { animation: fade-in 0.5s ease forwards; }
192
+ .animate-bounce-in { animation: bounce-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
193
+
194
+ .hero-visible .hero-tag { animation: slide-up 0.5s 0.1s ease both; }
195
+ .hero-visible .hero-title { animation: slide-up 0.5s 0.25s ease both; }
196
+ .hero-visible .hero-sub { animation: slide-up 0.5s 0.4s ease both; }
197
+ .hero-visible .hero-search { animation: slide-up 0.5s 0.55s ease both; }
198
+
199
+ .faq-tab { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
200
+ .faq-tab.active { box-shadow: 0 4px 20px rgba(var(--color-brand-accent-rgb), 0.3); }
201
+
202
+ .accordion-content {
203
+ display: grid;
204
+ grid-template-rows: 0fr;
205
+ transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
206
+ opacity: 0;
207
+ }
208
+ .accordion-content.open {
209
+ grid-template-rows: 1fr;
210
+ opacity: 1;
211
+ }
212
+ .accordion-inner { overflow: hidden; }
213
+
214
+ .stat-card:hover .stat-icon { transform: scale(1.2) rotate(8deg); }
215
+ .stat-icon { transition: transform 0.3s cubic-bezier(0.175,0.885,0.32,1.275); }
216
+
217
+ .contact-card { transition: all 0.3s cubic-bezier(0.4,0,0.2,1); }
218
+
219
+ .shimmer-btn::after {
220
+ content: '';
221
+ position: absolute;
222
+ inset: 0;
223
+ background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
224
+ transform: translateX(-100%);
225
+ transition: none;
226
+ }
227
+ .shimmer-btn:hover::after { animation: shimmer 1.5s ease infinite; }
228
+ `}</style>
229
+
230
+ {/* ── HERO SECTION ── */}
231
+ <div
232
+ ref={heroRef}
233
+ className={`relative overflow-hidden pb-12 pt-16 md:pt-24 md:pb-16 ${heroVisible ? "hero-visible" : ""}`}
234
+ >
235
+ {/* Animated blobs (Soft Light Theme) */}
236
+ <div className="absolute inset-0 overflow-hidden pointer-events-none">
237
+ <div className="animate-pulse-glow absolute top-[-15%] left-[-8%] w-80 h-80 rounded-full help-accent-glow" />
238
+ <div className="animate-pulse-glow absolute bottom-[-20%] right-[-10%] w-[450px] h-[450px] rounded-full help-accent-glow" style={{ animationDelay: "1.5s" }} />
239
+ <div className="animate-float-slow absolute top-[12%] right-[8%] w-20 h-20 rounded-3xl opacity-50 bg-brand-accent-muted/50 backdrop-blur-sm" />
240
+ <div className="animate-float-med absolute top-[30%] left-[6%] w-12 h-12 rounded-2xl opacity-60 bg-brand-accent-muted/40" style={{ animationDelay: "1s" }} />
241
+ <div className="animate-float-slow absolute bottom-[25%] right-[18%] w-8 h-8 rounded-xl opacity-70 bg-brand-accent-muted/50" style={{ animationDelay: "2s" }} />
242
+ <div className="absolute top-8 right-12 opacity-30 help-dot-pattern" style={{ backgroundSize: "20px 20px", width: "160px", height: "120px" }} />
243
+ <div className="absolute bottom-12 left-10 opacity-20 help-dot-pattern-sm" style={{ backgroundSize: "16px 16px", width: "100px", height: "80px" }} />
244
+ </div>
245
+
246
+ <div className="relative z-10 max-w-4xl mx-auto px-4 text-center">
247
+ <span className="hero-tag help-badge inline-flex items-center gap-2 py-1.5 px-5 rounded-full text-xs font-bold tracking-widest mb-7 uppercase opacity-0">
248
+ <span className="w-2 h-2 rounded-full bg-green-400 animate-pulse inline-block" />
249
+ Support Center — We&apos;re here to help
250
+ </span>
251
+
252
+ <h1 className="hero-title text-4xl md:text-5xl lg:text-[3.75rem] font-black text-heading mb-6 leading-tight tracking-tight opacity-0">
253
+ How can we{" "}
254
+ <span className="relative inline-block">
255
+ help you
256
+ <span className="absolute bottom-0 left-0 w-full h-[6px] rounded-full help-accent-underline" />
257
+ </span>
258
+ {" "}today?
259
+ </h1>
260
+
261
+ <p className="hero-sub text-muted text-base md:text-lg max-w-2xl mx-auto leading-relaxed mb-4 font-medium opacity-0">
262
+ Find answers to common questions, or reach out to our friendly support team. We&apos;re committed to making every Chocomelon experience magical! ✨
263
+ </p>
264
+
265
+ </div>
266
+ </div>
267
+
268
+ <div className="w-full max-w-[1280px] mx-auto px-4 md:px-8">
269
+
270
+
271
+
272
+ {/* ── FAQ SECTION ── */}
273
+ <div id="faq-section" className="mb-20">
274
+ {/* Section Header */}
275
+ <div className="text-center mb-10">
276
+ <span className="help-badge inline-block py-1.5 px-5 rounded-full text-xs font-bold tracking-widest uppercase mb-4">
277
+ Knowledge Base
278
+ </span>
279
+ <h2 className="text-3xl md:text-4xl lg:text-5xl font-black text-heading mb-4 tracking-tight">
280
+ Frequently Asked{" "}
281
+ <span className="help-gradient-text">Questions</span>
282
+ </h2>
283
+ <p className="text-muted text-base md:text-lg max-w-xl mx-auto leading-relaxed">
284
+ Browse through our most common questions — organized by topic for easy navigation.
285
+ </p>
286
+ </div>
287
+
288
+ {/* Category Tabs */}
289
+ <div className="flex flex-wrap gap-3 justify-center mb-10">
290
+ {faqsToDisplay.map((cat, i) => {
291
+ const isActive = activeTab === i
292
+ const catWithIcon = cat as any
293
+ return (
294
+ <button
295
+ key={i}
296
+ type="button"
297
+ onClick={() => { setActiveTab(i); setOpenFaq("item-0") }}
298
+ className={`faq-tab flex items-center gap-2.5 py-3 px-5 rounded-2xl font-bold text-sm border-2 transition-all ${
299
+ isActive
300
+ ? "active help-tab-active"
301
+ : "text-body bg-surface border-[var(--color-border)] hover:border-brand-accent-border hover:text-brand-accent"
302
+ }`}
303
+ >
304
+ <span className="text-base">{catWithIcon.icon || "❓"}</span>
305
+ {cat.category}
306
+ </button>
307
+ )
308
+ })}
309
+ </div>
310
+
311
+ {/* FAQ Panel */}
312
+ <div className="help-panel rounded-3xl overflow-hidden relative">
313
+ <div className="help-panel-header px-6 md:px-10 py-6 flex items-center gap-4">
314
+ <div className="w-12 h-12 rounded-2xl flex items-center justify-center text-2xl help-btn-brand">
315
+ {(currentCategory as any).icon || "❓"}
316
+ </div>
317
+ <div>
318
+ <h3 className="font-black text-heading text-lg md:text-xl">{currentCategory.category}</h3>
319
+ <p className="text-muted text-xs font-medium mt-0.5">{currentCategory.items.length} questions answered</p>
320
+ </div>
321
+ </div>
322
+
323
+ <div className="divide-y divide-[var(--color-border)]">
324
+ {currentCategory.items.map((faq, idx) => {
325
+ const id = `item-${idx}`
326
+ const isOpen = openFaq === id
327
+ return (
328
+ <div key={id} className={`group transition-colors duration-200 ${isOpen ? "help-faq-open" : "bg-surface hover:bg-surface-muted/60"}`}>
329
+ <button
330
+ type="button"
331
+ onClick={() => setOpenFaq(isOpen ? null : id)}
332
+ className="w-full flex items-center justify-between gap-4 px-6 md:px-10 py-5 md:py-6 text-left focus:outline-none"
333
+ >
334
+ <div className="flex items-center gap-4">
335
+ <span className={`flex-shrink-0 w-7 h-7 rounded-lg flex items-center justify-center text-xs font-black transition-all duration-200 ${isOpen ? "help-accent-chip-open" : "help-accent-chip"}`}>
336
+ {String(idx + 1).padStart(2, "0")}
337
+ </span>
338
+ <span className={`font-bold text-[15px] md:text-base leading-snug transition-colors ${isOpen ? "text-brand-accent" : "text-heading group-hover:text-brand-accent"}`}>
339
+ {faq.q}
340
+ </span>
341
+ </div>
342
+ <span className={`flex-shrink-0 w-8 h-8 rounded-xl flex items-center justify-center transition-all duration-300 ${isOpen ? "rotate-180 help-accent-chip-open" : "help-accent-chip"}`}>
343
+ <svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
344
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M19 9l-7 7-7-7" />
345
+ </svg>
346
+ </span>
347
+ </button>
348
+
349
+ <div className={`accordion-content ${isOpen ? "open" : ""}`}>
350
+ <div className="accordion-inner">
351
+ <div className="px-6 md:px-10 pb-6 pt-0 pl-[4.5rem] md:pl-[5.5rem]">
352
+ <div className="h-px w-full mb-4 help-accent-divider" />
353
+ <p className="text-body text-[14px] md:text-[15px] leading-relaxed font-medium">
354
+ {faq.a}
355
+ </p>
356
+ </div>
357
+ </div>
358
+ </div>
359
+ </div>
360
+ )
361
+ })}
362
+ </div>
363
+
364
+ {/* Panel Footer */}
365
+ <div className="px-6 md:px-10 py-5 flex items-center justify-between flex-wrap gap-3 border-t border-[var(--color-border)] bg-brand-accent-muted/30">
366
+ <p className="text-muted text-sm font-medium">Still have questions? We&apos;re just a message away! 👇</p>
367
+ <button type="button"
368
+ onClick={() => document.getElementById("contact-section")?.scrollIntoView({ behavior: "smooth" })}
369
+ className="py-2 px-5 rounded-xl text-sm font-bold help-btn-brand transition-all hover:-translate-y-0.5">
370
+ Contact Support
371
+ </button>
372
+ </div>
373
+ </div>
374
+ </div>
375
+
376
+ {/* ── CONTACT SECTION ── */}
377
+ <div id="contact-section" className="relative">
378
+ {/* Glow backdrop */}
379
+ <div className="absolute inset-0 -z-10 overflow-hidden pointer-events-none">
380
+ <div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[400px] rounded-full opacity-25 help-accent-glow blur-[60px]" />
381
+ </div>
382
+
383
+ <div className="text-center mb-12">
384
+ <span className="help-badge inline-block py-1.5 px-5 rounded-full text-xs font-bold tracking-widest uppercase mb-4">
385
+ Direct Support
386
+ </span>
387
+ <h2 className="text-3xl md:text-4xl lg:text-5xl font-black text-heading mb-4 tracking-tight">
388
+ Still need{" "}
389
+ <span className="help-gradient-text">help?</span>
390
+ </h2>
391
+ <p className="text-muted text-base md:text-lg max-w-lg mx-auto leading-relaxed">
392
+ Our friendly support team is ready to assist you with anything, anytime.
393
+ </p>
394
+ </div>
395
+
396
+ <div className="grid grid-cols-1 lg:grid-cols-12 gap-8 xl:gap-12 items-stretch">
397
+
398
+ {/* Left: Contact Info + Map */}
399
+ <div className="lg:col-span-5 flex flex-col gap-4">
400
+ {/* Contact Cards */}
401
+ {[
402
+ {
403
+ icon: (
404
+ <svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.8} d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z" /></svg>
405
+ ),
406
+ label: "Call Us",
407
+ value: contactDetails.phone,
408
+ sub: "Mon–Sat, 9am – 6pm IST",
409
+ bg: "from-blue-500 to-cyan-400",
410
+ lightBg: "from-blue-50 to-cyan-50",
411
+ },
412
+ {
413
+ icon: (
414
+ <svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.8} d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" /></svg>
415
+ ),
416
+ label: "Email Us",
417
+ value: (
418
+ <ObfuscatedEmail
419
+ email={contactDetails.email}
420
+ className="hover:text-brand-accent transition-colors"
421
+ />
422
+ ),
423
+ sub: "We'll reply within 24 hours",
424
+ bg: "from-violet-500 to-purple-400",
425
+ lightBg: "from-violet-50 to-purple-50",
426
+ },
427
+ {
428
+ icon: (
429
+ <svg className="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.8} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.8} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
430
+ ),
431
+ label: "Our Store",
432
+ value: contactDetails.address,
433
+ sub: "Visit us anytime",
434
+ bg: "from-pink-500 to-rose-400",
435
+ lightBg: "from-pink-50 to-rose-50",
436
+ },
437
+ ].map((card, i) => (
438
+ <div key={i} className="contact-card contact-card-themed flex items-center gap-4 p-5 rounded-2xl cursor-default hover:-translate-y-1">
439
+ <div className={`w-13 h-13 rounded-2xl flex items-center justify-center text-inverse shrink-0 bg-gradient-to-br ${card.bg} shadow-brand-sm`}
440
+ style={{ width: "52px", height: "52px" }}>
441
+ {card.icon}
442
+ </div>
443
+ <div className="flex-1 overflow-hidden">
444
+ <p className="text-xs font-bold text-muted uppercase tracking-wider mb-0.5">{card.label}</p>
445
+ <p className="font-bold text-heading text-sm leading-tight truncate">{card.value}</p>
446
+ <p className="text-muted text-xs mt-0.5">{card.sub}</p>
447
+ </div>
448
+ </div>
449
+ ))}
450
+
451
+ <div className="rounded-3xl overflow-hidden relative flex-grow help-panel"
452
+ style={{ minHeight: "220px" }}>
453
+ <div className="absolute inset-0 z-10 pointer-events-none rounded-3xl"
454
+ style={{ boxShadow: "inset 0 0 0 3px rgba(255,255,255,0.6)" }} />
455
+ {contactDetails.address ? (
456
+ <iframe
457
+ width="100%"
458
+ height="100%"
459
+ style={{ border: 0, display: "block" }}
460
+ loading="lazy"
461
+ allowFullScreen
462
+ referrerPolicy="no-referrer-when-downgrade"
463
+ src={`https://www.google.com/maps?q=${encodeURIComponent(contactDetails.address)}&output=embed`}
464
+ title="Chocomelon Store Location"
465
+ />
466
+ ) : (
467
+ <div className="w-full h-full flex items-center justify-center bg-gray-100">
468
+ <p className="text-gray-400 font-medium text-sm">Map unavailable</p>
469
+ </div>
470
+ )}
471
+ </div>
472
+ </div>
473
+
474
+ {/* Right: Contact Form */}
475
+ <div className="lg:col-span-7">
476
+ <div className="relative help-panel rounded-3xl p-6 sm:p-8 md:p-10 overflow-hidden">
477
+ <div className="absolute top-0 right-0 w-40 h-40 pointer-events-none bg-brand-accent-muted/40 rounded-bl-[6rem]" style={{ borderRadius: "0 1.5rem 0 6rem" }} />
478
+
479
+ <div className="flex items-center gap-3 mb-8 relative z-10">
480
+ <div className="w-10 h-10 rounded-2xl flex items-center justify-center help-btn-brand">
481
+ <svg className="w-5 h-5 text-inverse" fill="none" viewBox="0 0 24 24" stroke="currentColor">
482
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z" />
483
+ </svg>
484
+ </div>
485
+ <div>
486
+ <h3 className="font-black text-heading text-xl">Send us a message</h3>
487
+ <p className="text-muted text-xs font-medium">We typically respond within a few hours</p>
488
+ </div>
489
+ </div>
490
+
491
+ <form onSubmit={handleFormSubmit} className="space-y-5 relative z-10">
492
+ <div className="grid grid-cols-1 sm:grid-cols-2 gap-5">
493
+ <div className="space-y-1.5">
494
+ <label htmlFor="help-name" className="block text-xs font-bold text-muted uppercase tracking-wider">
495
+ Full Name <span className="text-red-400">*</span>
496
+ </label>
497
+ <input
498
+ type="text" id="help-name" name="name"
499
+ value={formData.name} onChange={handleFormChange} required
500
+ placeholder="Your full name"
501
+ className="help-form-input form-input w-full px-4 py-3.5 rounded-xl text-sm font-medium placeholder:text-muted/60"
502
+ />
503
+ </div>
504
+ <div className="space-y-1.5">
505
+ <label htmlFor="help-email" className="block text-xs font-bold text-muted uppercase tracking-wider">
506
+ Email Address <span className="text-red-400">*</span>
507
+ </label>
508
+ <input
509
+ type="email" id="help-email" name="email"
510
+ value={formData.email} onChange={handleFormChange} required
511
+ placeholder="you@example.com"
512
+ className="help-form-input form-input w-full px-4 py-3.5 rounded-xl text-sm font-medium placeholder:text-muted/60"
513
+ />
514
+ </div>
515
+ </div>
516
+
517
+ <div className="space-y-1.5">
518
+ <label htmlFor="help-topic" className="block text-xs font-bold text-muted uppercase tracking-wider">
519
+ Topic <span className="text-red-400">*</span>
520
+ </label>
521
+ <div className="relative">
522
+ <select
523
+ id="help-topic" name="topic"
524
+ value={formData.topic} onChange={handleFormChange} required
525
+ className="help-form-input form-input w-full px-4 py-3.5 rounded-xl text-sm font-medium appearance-none cursor-pointer"
526
+ style={{ color: formData.topic ? "var(--color-text-heading)" : "var(--color-text-muted)" }}
527
+ >
528
+ <option value="" disabled>Select a topic...</option>
529
+ <option value="general_inquiry">💬 General Inquiry (Information)</option>
530
+ <option value="order_delivery_issue">🚚 Order Issue / Delivery Issue (Order delay, tracking, delivery problem)</option>
531
+ <option value="returns_refunds">📦 Returns & Refunds (Return, exchange, refund related)</option>
532
+ <option value="product_inquiry">👗 Product Inquiry (Product details, size, availability)</option>
533
+ <option value="payment_billing">💳 Payment & Billing Issue (Payment failed, refund, invoice)</option>
534
+ <option value="account_login">👤 Account & Login Issue</option>
535
+ </select>
536
+ <div className="absolute inset-y-0 right-4 flex items-center pointer-events-none">
537
+ <svg className="w-4 h-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
538
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M19 9l-7 7-7-7" />
539
+ </svg>
540
+ </div>
541
+ </div>
542
+ </div>
543
+
544
+ <div className="space-y-1.5">
545
+ <label htmlFor="help-message" className="block text-xs font-bold text-muted uppercase tracking-wider">
546
+ Your Message <span className="text-red-400">*</span>
547
+ </label>
548
+ <textarea
549
+ id="help-message" name="message"
550
+ value={formData.message} onChange={handleFormChange} required
551
+ rows={5}
552
+ placeholder="Please describe your question or issue in detail. The more context you provide, the faster we can help!"
553
+ className="help-form-input form-input w-full px-4 py-3.5 rounded-xl text-sm font-medium placeholder:text-muted/60 resize-none"
554
+ />
555
+ </div>
556
+
557
+ {/* Feedback Messages */}
558
+ {submitSuccess && (
559
+ <div className="flex items-center gap-3 p-4 rounded-2xl animate-bounce-in"
560
+ style={{ background: "linear-gradient(135deg, #f0fdf4, #dcfce7)", border: "1px solid #bbf7d0" }}>
561
+ <div className="w-9 h-9 rounded-xl bg-green-500 flex items-center justify-center flex-shrink-0">
562
+ <svg className="w-5 h-5 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
563
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M5 13l4 4L19 7" />
564
+ </svg>
565
+ </div>
566
+ <div>
567
+ <p className="text-green-800 font-bold text-sm">Message sent successfully! 🎉</p>
568
+ <p className="text-green-600 text-xs mt-0.5">Our team will get back to you within 24 hours.</p>
569
+ </div>
570
+ </div>
571
+ )}
572
+ {submitError && (
573
+ <div className="flex items-center gap-3 p-4 rounded-2xl animate-bounce-in"
574
+ style={{ background: "linear-gradient(135deg, #fef2f2, #fee2e2)", border: "1px solid #fecaca" }}>
575
+ <div className="w-9 h-9 rounded-xl bg-red-500 flex items-center justify-center flex-shrink-0">
576
+ <svg className="w-5 h-5 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor">
577
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M6 18L18 6M6 6l12 12" />
578
+ </svg>
579
+ </div>
580
+ <p className="text-red-800 font-semibold text-sm">{submitError}</p>
581
+ </div>
582
+ )}
583
+
584
+ <button
585
+ type="submit"
586
+ disabled={isSubmitting}
587
+ className={`shimmer-btn relative overflow-hidden w-full py-4 rounded-2xl text-inverse text-[15px] font-black tracking-wide transition-all duration-300 flex items-center justify-center gap-2.5 disabled:opacity-70 disabled:cursor-not-allowed hover:-translate-y-0.5 active:translate-y-0 shadow-brand-sm ${submitSuccess ? "bg-green-500 hover:bg-green-600" : "help-btn-brand"}`}
588
+ style={submitSuccess ? undefined : { backgroundSize: "200% 100%" }}
589
+ >
590
+ {isSubmitting ? (
591
+ <>
592
+ <svg className="animate-spin h-5 w-5" fill="none" viewBox="0 0 24 24">
593
+ <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
594
+ <path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" />
595
+ </svg>
596
+ Sending your message...
597
+ </>
598
+ ) : submitSuccess ? (
599
+ <>
600
+ <svg className="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
601
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M5 13l4 4L19 7" />
602
+ </svg>
603
+ Message Sent!
604
+ </>
605
+ ) : (
606
+ <>
607
+ Send Message
608
+ <svg className="w-4 h-4 group-hover:translate-x-1 transition-transform" fill="none" viewBox="0 0 24 24" stroke="currentColor">
609
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2.5} d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8" />
610
+ </svg>
611
+ </>
612
+ )}
613
+ </button>
614
+
615
+ <p className="text-center text-xs text-muted font-medium">
616
+ 🔒 Your information is safe and never shared with third parties.
617
+ </p>
618
+ </form>
619
+ </div>
620
+ </div>
621
+ </div>
622
+ </div>
623
+
624
+ </div>
625
+ </div>
626
+ )
627
+ }
628
+
629
+ export default HelpTemplate