create-nymbal-app 0.3.0 → 0.5.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 (167) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.js +14 -12
  3. package/dist/index.js.map +1 -1
  4. package/package.json +5 -4
  5. package/scaffold/project/astro/src/pages/index.astro +13 -15
  6. package/scaffold/templates/astro/_dot.node-version +1 -1
  7. package/scaffold/templates/astro/astro.config.mjs +23 -0
  8. package/scaffold/templates/astro/package.json +26 -27
  9. package/scaffold/templates/astro/src/components/SkipNav.astro +3 -1
  10. package/scaffold/templates/astro/src/elements/index.ts +11 -0
  11. package/scaffold/templates/astro/src/layouts/BaseLayout.astro +15 -4
  12. package/scaffold/templates/astro/src/lib/api.ts +126 -20
  13. package/scaffold/templates/astro/src/lib/chrome.ts +59 -0
  14. package/scaffold/templates/astro/src/lib/client.ts +4 -2
  15. package/scaffold/templates/astro/src/lib/fragments.ts +48 -0
  16. package/scaffold/templates/astro/src/lib/server-elements.ts +5 -0
  17. package/scaffold/templates/astro/src/middleware.ts +37 -0
  18. package/scaffold/templates/astro/src/pages/account/addresses.astro +5 -97
  19. package/scaffold/templates/astro/src/pages/account/login.astro +7 -34
  20. package/scaffold/templates/astro/src/pages/account/profile.astro +6 -56
  21. package/scaffold/templates/astro/src/pages/account/register.astro +7 -73
  22. package/scaffold/templates/astro/src/pages/cart.astro +14 -7
  23. package/scaffold/templates/astro/src/pages/category/[slug].astro +41 -26
  24. package/scaffold/templates/astro/src/pages/checkout.astro +34 -90
  25. package/scaffold/templates/astro/src/pages/fragments/footer.astro +5 -2
  26. package/scaffold/templates/astro/src/pages/fragments/header.astro +12 -2
  27. package/scaffold/templates/astro/src/pages/fragments/nav.astro +8 -5
  28. package/scaffold/templates/astro/src/pages/fragments/product/[slug].astro +9 -10
  29. package/scaffold/templates/astro/src/pages/index.astro +18 -15
  30. package/scaffold/templates/astro/src/pages/order/[orderNumber].astro +22 -44
  31. package/scaffold/templates/astro/src/pages/product/[slug].astro +46 -29
  32. package/scaffold/templates/astro/src/pages/products/index.astro +40 -26
  33. package/scaffold/templates/astro/src/pages/search.astro +13 -8
  34. package/scaffold/templates/astro/src/scripts/init-client.ts +14 -0
  35. package/scaffold/templates/astro/src/scripts/pdp.ts +47 -53
  36. package/scaffold/templates/astro/src/scripts/plp.ts +21 -98
  37. package/scaffold/templates/astro/src/scripts/search.ts +19 -120
  38. package/scaffold/templates/astro/src/scripts/signed-in-redirect.ts +4 -0
  39. package/scaffold/templates/astro/src/styles/global.css +49 -45
  40. package/scaffold/templates/astro/src/styles/pages/account.css +0 -90
  41. package/scaffold/templates/astro/src/styles/pages/confirmation.css +6 -0
  42. package/scaffold/templates/astro/src/styles/pages/home.css +9 -100
  43. package/scaffold/templates/astro/src/styles/pages/pdp.css +5 -167
  44. package/scaffold/templates/astro/src/styles/pages/plp.css +3 -42
  45. package/scaffold/templates/astro/src/styles/pages/search.css +13 -100
  46. package/scaffold/templates/astro/src/styles/tokens.css +56 -0
  47. package/scaffold/templates/nextjs/_dot.node-version +1 -1
  48. package/scaffold/templates/nextjs/app/(catalog)/category/[slug]/page.tsx +74 -0
  49. package/scaffold/templates/nextjs/app/(catalog)/home/[key]/page.tsx +80 -0
  50. package/scaffold/templates/nextjs/app/(catalog)/layout.tsx +13 -0
  51. package/scaffold/templates/nextjs/app/(catalog)/not-found.tsx +7 -0
  52. package/scaffold/templates/nextjs/app/(catalog)/product/[slug]/page.tsx +182 -0
  53. package/scaffold/templates/nextjs/app/(catalog)/products/page.tsx +62 -0
  54. package/scaffold/templates/nextjs/app/(catalog)/search/SearchView.tsx +90 -0
  55. package/scaffold/templates/nextjs/app/(catalog)/search/page.tsx +46 -0
  56. package/scaffold/templates/nextjs/app/(shopper)/account/addresses/AddressesView.tsx +5 -0
  57. package/scaffold/templates/nextjs/app/(shopper)/account/addresses/page.tsx +17 -0
  58. package/scaffold/templates/nextjs/app/(shopper)/account/login/LoginView.tsx +28 -0
  59. package/scaffold/templates/nextjs/app/(shopper)/account/login/page.tsx +23 -0
  60. package/scaffold/templates/nextjs/app/(shopper)/account/profile/ProfileView.tsx +5 -0
  61. package/scaffold/templates/nextjs/app/(shopper)/account/profile/page.tsx +20 -0
  62. package/scaffold/templates/nextjs/app/(shopper)/account/register/RegisterView.tsx +26 -0
  63. package/scaffold/templates/nextjs/app/(shopper)/account/register/page.tsx +11 -0
  64. package/scaffold/templates/nextjs/app/(shopper)/cart/CartView.tsx +5 -0
  65. package/scaffold/templates/nextjs/app/(shopper)/cart/page.tsx +22 -0
  66. package/scaffold/templates/nextjs/app/(shopper)/checkout/CheckoutView.tsx +27 -0
  67. package/scaffold/templates/nextjs/app/(shopper)/checkout/page.tsx +39 -0
  68. package/scaffold/templates/nextjs/app/(shopper)/layout.tsx +12 -0
  69. package/scaffold/templates/nextjs/app/{order → (shopper)/order}/[orderNumber]/page.tsx +24 -5
  70. package/scaffold/templates/nextjs/app/error.tsx +3 -7
  71. package/scaffold/templates/nextjs/app/fragments/footer/route.ts +13 -0
  72. package/scaffold/templates/nextjs/app/fragments/header/[key]/route.ts +18 -0
  73. package/scaffold/templates/nextjs/app/fragments/nav/[key]/route.ts +23 -0
  74. package/scaffold/templates/nextjs/app/fragments/product/[slug]/route.ts +22 -0
  75. package/scaffold/templates/nextjs/app/globals.css +5 -23
  76. package/scaffold/templates/nextjs/app/layout.tsx +8 -5
  77. package/scaffold/templates/nextjs/app/not-found.tsx +9 -33
  78. package/scaffold/templates/nextjs/app/tokens.css +56 -0
  79. package/scaffold/templates/nextjs/components/client/ListingControls.tsx +87 -0
  80. package/scaffold/templates/nextjs/components/client/NymbalSetup.tsx +48 -6
  81. package/scaffold/templates/nextjs/components/client/ProductInteractive.tsx +64 -28
  82. package/scaffold/templates/nextjs/components/client/elements.tsx +15 -0
  83. package/scaffold/templates/nextjs/components/server/Header.tsx +33 -97
  84. package/scaffold/templates/nextjs/components/server/NotFoundView.tsx +39 -0
  85. package/scaffold/templates/nextjs/components/server/SkipNav.tsx +7 -3
  86. package/scaffold/templates/nextjs/elements/index.ts +12 -0
  87. package/scaffold/templates/nextjs/lib/api.ts +162 -46
  88. package/scaffold/templates/nextjs/lib/chrome.ts +40 -0
  89. package/scaffold/templates/nextjs/lib/client.ts +3 -0
  90. package/scaffold/templates/nextjs/lib/fragments.ts +16 -0
  91. package/scaffold/templates/nextjs/lib/header.ts +39 -0
  92. package/scaffold/templates/nextjs/lib/render.ts +14 -0
  93. package/scaffold/templates/nextjs/next.config.mjs +32 -0
  94. package/scaffold/templates/nextjs/package.json +28 -29
  95. package/scaffold/templates/nextjs/styles/pages/account.module.css +0 -70
  96. package/scaffold/templates/nextjs/styles/pages/confirmation.module.css +6 -85
  97. package/scaffold/templates/nextjs/styles/pages/home.module.css +2 -103
  98. package/scaffold/templates/nextjs/styles/pages/pdp.module.css +3 -179
  99. package/scaffold/templates/nextjs/styles/pages/plp.module.css +8 -141
  100. package/scaffold/templates/nextjs/styles/pages/search.module.css +8 -128
  101. package/scaffold/templates/nextjs/tsconfig.dist.json +5 -0
  102. package/scaffold/templates/astro/src/components/AddressForm.astro +0 -107
  103. package/scaffold/templates/astro/src/components/Breadcrumb.astro +0 -20
  104. package/scaffold/templates/astro/src/components/CategoryNav.astro +0 -27
  105. package/scaffold/templates/astro/src/components/CheckoutSteps.astro +0 -29
  106. package/scaffold/templates/astro/src/components/Footer.astro +0 -108
  107. package/scaffold/templates/astro/src/components/Header.astro +0 -192
  108. package/scaffold/templates/astro/src/components/ImageGallery.astro +0 -42
  109. package/scaffold/templates/astro/src/components/OrderSummary.astro +0 -53
  110. package/scaffold/templates/astro/src/components/Pagination.astro +0 -13
  111. package/scaffold/templates/astro/src/components/PriceDisplay.astro +0 -25
  112. package/scaffold/templates/astro/src/components/ProductCard.astro +0 -44
  113. package/scaffold/templates/astro/src/components/RelatedProducts.astro +0 -28
  114. package/scaffold/templates/astro/src/components/ReviewForm.astro +0 -74
  115. package/scaffold/templates/astro/src/components/ReviewList.astro +0 -41
  116. package/scaffold/templates/astro/src/components/SortDropdown.astro +0 -26
  117. package/scaffold/templates/astro/src/components/StockBadge.astro +0 -32
  118. package/scaffold/templates/astro/src/scripts/auth-forms.ts +0 -82
  119. package/scaffold/templates/astro/src/scripts/cart-page.ts +0 -143
  120. package/scaffold/templates/astro/src/scripts/checkout.ts +0 -272
  121. package/scaffold/templates/astro/src/scripts/image-gallery.ts +0 -22
  122. package/scaffold/templates/astro/src/scripts/profile-form.ts +0 -57
  123. package/scaffold/templates/astro/src/scripts/review-form.ts +0 -27
  124. package/scaffold/templates/astro/src/styles/pages/cart.css +0 -243
  125. package/scaffold/templates/astro/src/styles/pages/checkout.css +0 -270
  126. package/scaffold/templates/nextjs/app/account/addresses/page.tsx +0 -10
  127. package/scaffold/templates/nextjs/app/account/login/page.tsx +0 -23
  128. package/scaffold/templates/nextjs/app/account/profile/page.tsx +0 -10
  129. package/scaffold/templates/nextjs/app/account/register/page.tsx +0 -10
  130. package/scaffold/templates/nextjs/app/cart/page.tsx +0 -10
  131. package/scaffold/templates/nextjs/app/category/[slug]/page.tsx +0 -58
  132. package/scaffold/templates/nextjs/app/checkout/page.tsx +0 -10
  133. package/scaffold/templates/nextjs/app/page.tsx +0 -63
  134. package/scaffold/templates/nextjs/app/product/[slug]/page.tsx +0 -111
  135. package/scaffold/templates/nextjs/app/products/page.tsx +0 -40
  136. package/scaffold/templates/nextjs/app/search/page.tsx +0 -24
  137. package/scaffold/templates/nextjs/components/client/AddressManager.tsx +0 -181
  138. package/scaffold/templates/nextjs/components/client/CartPage.tsx +0 -120
  139. package/scaffold/templates/nextjs/components/client/CheckoutForm.tsx +0 -523
  140. package/scaffold/templates/nextjs/components/client/ImageGallery.tsx +0 -68
  141. package/scaffold/templates/nextjs/components/client/LoginForm.tsx +0 -89
  142. package/scaffold/templates/nextjs/components/client/MiniCartWrapper.tsx +0 -12
  143. package/scaffold/templates/nextjs/components/client/ProductGrid.tsx +0 -148
  144. package/scaffold/templates/nextjs/components/client/ProfileForm.tsx +0 -112
  145. package/scaffold/templates/nextjs/components/client/RegisterForm.tsx +0 -131
  146. package/scaffold/templates/nextjs/components/client/ReviewForm.tsx +0 -116
  147. package/scaffold/templates/nextjs/components/client/SearchBarWrapper.tsx +0 -27
  148. package/scaffold/templates/nextjs/components/client/SearchResults.tsx +0 -141
  149. package/scaffold/templates/nextjs/components/client/SortDropdown.tsx +0 -35
  150. package/scaffold/templates/nextjs/components/server/Breadcrumb.tsx +0 -36
  151. package/scaffold/templates/nextjs/components/server/CategoryNav.tsx +0 -29
  152. package/scaffold/templates/nextjs/components/server/CheckoutSteps.tsx +0 -60
  153. package/scaffold/templates/nextjs/components/server/Footer.module.css +0 -64
  154. package/scaffold/templates/nextjs/components/server/Footer.tsx +0 -79
  155. package/scaffold/templates/nextjs/components/server/Header.module.css +0 -147
  156. package/scaffold/templates/nextjs/components/server/OrderSummary.tsx +0 -79
  157. package/scaffold/templates/nextjs/components/server/PriceDisplay.tsx +0 -31
  158. package/scaffold/templates/nextjs/components/server/ProductCard.tsx +0 -59
  159. package/scaffold/templates/nextjs/components/server/RelatedProducts.tsx +0 -31
  160. package/scaffold/templates/nextjs/components/server/ReviewList.tsx +0 -62
  161. package/scaffold/templates/nextjs/components/server/StockBadge.tsx +0 -19
  162. package/scaffold/templates/nextjs/styles/pages/cart.module.css +0 -240
  163. package/scaffold/templates/nextjs/styles/pages/checkout.module.css +0 -404
  164. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/layout.tsx +0 -0
  165. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/orders/[orderNumber]/page.tsx +0 -0
  166. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/orders/page.tsx +0 -0
  167. /package/scaffold/templates/nextjs/app/{account → (shopper)/account}/page.tsx +0 -0
@@ -1,62 +0,0 @@
1
- import { formatDate } from '@/lib/format'
2
- import styles from '@/styles/pages/pdp.module.css'
3
-
4
- interface Review {
5
- id: string
6
- productId: string
7
- rating: number
8
- title: string
9
- body: string
10
- submittedAt: string
11
- }
12
-
13
- interface ReviewListProps {
14
- reviews: Review[]
15
- }
16
-
17
- function StarRating({ rating }: { rating: number }) {
18
- return (
19
- <div className={styles.reviewStars} aria-label={`${rating} out of 5 stars`}>
20
- {Array.from({ length: 5 }, (_, i) => (
21
- <span
22
- key={i}
23
- className={i < rating ? styles.starFilled : styles.starEmpty}
24
- aria-hidden="true"
25
- >
26
- ★
27
- </span>
28
- ))}
29
- </div>
30
- )
31
- }
32
-
33
- export function ReviewList({ reviews }: ReviewListProps) {
34
- if (reviews.length === 0) {
35
- return (
36
- <div className={styles.reviewsSection}>
37
- <h2 className={styles.reviewsTitle}>Reviews</h2>
38
- <p className={styles.noReviews}>No reviews yet. Be the first to leave a review.</p>
39
- </div>
40
- )
41
- }
42
-
43
- return (
44
- <div className={styles.reviewsSection}>
45
- <h2 className={styles.reviewsTitle}>Reviews ({reviews.length})</h2>
46
- <div className={styles.reviewsList}>
47
- {reviews.map((review) => (
48
- <article key={review.id} className={styles.reviewCard}>
49
- <div className={styles.reviewHeader}>
50
- <StarRating rating={review.rating} />
51
- <time className={styles.reviewDate} dateTime={review.submittedAt}>
52
- {formatDate(review.submittedAt)}
53
- </time>
54
- </div>
55
- {review.title && <h3 className={styles.reviewTitle}>{review.title}</h3>}
56
- <p className={styles.reviewBody}>{review.body}</p>
57
- </article>
58
- ))}
59
- </div>
60
- </div>
61
- )
62
- }
@@ -1,19 +0,0 @@
1
- import styles from '@/styles/pages/pdp.module.css'
2
-
3
- interface StockBadgeProps {
4
- stock: number
5
- }
6
-
7
- export function StockBadge({ stock }: StockBadgeProps) {
8
- const inStock = stock > 0
9
-
10
- return (
11
- <span
12
- className={`${styles.stockBadge} ${inStock ? styles.inStock : styles.outOfStock}`}
13
- data-testid="stock-badge"
14
- >
15
- <span className={styles.stockDot} aria-hidden="true" />
16
- {inStock ? (stock <= 5 ? `Only ${stock} left` : 'In Stock') : 'Out of Stock'}
17
- </span>
18
- )
19
- }
@@ -1,240 +0,0 @@
1
- /* ── Cart Page ─────────────────────────────────────────────────────── */
2
-
3
- .page {
4
- padding-block: var(--nymbal-spacing-xl);
5
- }
6
-
7
- .pageTitle {
8
- font-size: 2rem;
9
- font-weight: var(--nymbal-font-weight-bold);
10
- margin-bottom: var(--nymbal-spacing-lg);
11
- }
12
-
13
- .layout {
14
- display: flex;
15
- flex-direction: column;
16
- gap: var(--nymbal-spacing-xl);
17
- }
18
-
19
- @media (min-width: 1024px) {
20
- .layout {
21
- flex-direction: row;
22
- align-items: flex-start;
23
- }
24
- }
25
-
26
- /* ── Cart Items ───────────────────────────────────────────────────── */
27
-
28
- .itemsSection {
29
- flex: 1;
30
- min-width: 0;
31
- }
32
-
33
- .itemsList {
34
- display: flex;
35
- flex-direction: column;
36
- }
37
-
38
- .item {
39
- display: flex;
40
- gap: var(--nymbal-spacing-md);
41
- padding: var(--nymbal-spacing-md) 0;
42
- border-bottom: 1px solid var(--nymbal-color-border);
43
- }
44
-
45
- .item:first-child {
46
- padding-top: 0;
47
- }
48
-
49
- .itemImage {
50
- width: 5rem;
51
- height: 5rem;
52
- flex-shrink: 0;
53
- border-radius: var(--nymbal-radius-md);
54
- background-color: #f4f4f5;
55
- overflow: hidden;
56
- }
57
-
58
- .itemImage img {
59
- width: 100%;
60
- height: 100%;
61
- object-fit: cover;
62
- }
63
-
64
- .itemDetails {
65
- flex: 1;
66
- min-width: 0;
67
- display: flex;
68
- flex-direction: column;
69
- gap: var(--nymbal-spacing-xs);
70
- }
71
-
72
- .itemName {
73
- font-size: var(--nymbal-font-size-sm);
74
- font-weight: var(--nymbal-font-weight-medium);
75
- text-decoration: none;
76
- color: var(--nymbal-color-text);
77
- }
78
-
79
- .itemName:hover {
80
- text-decoration: underline;
81
- }
82
-
83
- .itemVariant {
84
- font-size: var(--nymbal-font-size-xs);
85
- color: var(--nymbal-color-text-muted);
86
- }
87
-
88
- .itemActions {
89
- display: flex;
90
- align-items: center;
91
- gap: var(--nymbal-spacing-md);
92
- margin-top: auto;
93
- }
94
-
95
- .itemPrice {
96
- font-size: var(--nymbal-font-size-sm);
97
- font-weight: var(--nymbal-font-weight-bold);
98
- margin-left: auto;
99
- text-align: right;
100
- flex-shrink: 0;
101
- }
102
-
103
- .removeButton {
104
- display: inline-flex;
105
- align-items: center;
106
- justify-content: center;
107
- padding: var(--nymbal-spacing-xs);
108
- font-size: var(--nymbal-font-size-xs);
109
- color: var(--nymbal-color-text-muted);
110
- background: none;
111
- border: none;
112
- cursor: pointer;
113
- border-radius: var(--nymbal-radius-sm);
114
- transition: color var(--nymbal-transition-fast),
115
- background-color var(--nymbal-transition-fast);
116
- }
117
-
118
- .removeButton:hover {
119
- color: var(--nymbal-color-error);
120
- background-color: #fef2f2;
121
- }
122
-
123
- @media (min-width: 640px) {
124
- .itemImage {
125
- width: 6rem;
126
- height: 6rem;
127
- }
128
- }
129
-
130
- /* ── Summary Sidebar ──────────────────────────────────────────────── */
131
-
132
- .summary {
133
- background: var(--nymbal-color-surface);
134
- border: 1px solid var(--nymbal-color-border);
135
- border-radius: var(--nymbal-radius-lg);
136
- padding: var(--nymbal-spacing-lg);
137
- width: 100%;
138
- }
139
-
140
- @media (min-width: 1024px) {
141
- .summary {
142
- width: 22rem;
143
- flex-shrink: 0;
144
- position: sticky;
145
- top: 5.5rem;
146
- }
147
- }
148
-
149
- .summaryTitle {
150
- font-size: var(--nymbal-font-size-lg);
151
- font-weight: var(--nymbal-font-weight-bold);
152
- margin-bottom: var(--nymbal-spacing-md);
153
- }
154
-
155
- .summaryRow {
156
- display: flex;
157
- justify-content: space-between;
158
- align-items: center;
159
- padding: var(--nymbal-spacing-sm) 0;
160
- font-size: var(--nymbal-font-size-sm);
161
- }
162
-
163
- .summaryLabel {
164
- color: var(--nymbal-color-text-muted);
165
- }
166
-
167
- .summaryValue {
168
- font-weight: var(--nymbal-font-weight-medium);
169
- }
170
-
171
- .summaryDivider {
172
- border: 0;
173
- border-top: 1px solid var(--nymbal-color-border);
174
- margin: var(--nymbal-spacing-sm) 0;
175
- }
176
-
177
- .summaryTotal {
178
- font-size: var(--nymbal-font-size-base);
179
- font-weight: var(--nymbal-font-weight-bold);
180
- }
181
-
182
- .checkoutButton {
183
- display: block;
184
- width: 100%;
185
- padding: 0.75rem;
186
- margin-top: var(--nymbal-spacing-md);
187
- font-size: var(--nymbal-font-size-base);
188
- font-weight: var(--nymbal-font-weight-medium);
189
- text-align: center;
190
- color: var(--nymbal-color-text-inverse);
191
- background-color: var(--nymbal-color-primary);
192
- border: none;
193
- border-radius: var(--nymbal-radius-md);
194
- cursor: pointer;
195
- text-decoration: none;
196
- transition: background-color var(--nymbal-transition-fast);
197
- }
198
-
199
- .checkoutButton:hover {
200
- background-color: var(--nymbal-color-primary-hover);
201
- text-decoration: none;
202
- color: var(--nymbal-color-text-inverse);
203
- }
204
-
205
- .checkoutButton:disabled {
206
- opacity: 0.5;
207
- cursor: not-allowed;
208
- }
209
-
210
- .continueShoppingLink {
211
- display: block;
212
- text-align: center;
213
- margin-top: var(--nymbal-spacing-md);
214
- font-size: var(--nymbal-font-size-sm);
215
- color: var(--nymbal-color-accent);
216
- text-decoration: none;
217
- }
218
-
219
- .continueShoppingLink:hover {
220
- text-decoration: underline;
221
- }
222
-
223
- /* ── Empty Cart ───────────────────────────────────────────────────── */
224
-
225
- .empty {
226
- text-align: center;
227
- padding: 4rem var(--nymbal-spacing-lg);
228
- }
229
-
230
- .emptyTitle {
231
- font-size: var(--nymbal-font-size-lg);
232
- font-weight: var(--nymbal-font-weight-medium);
233
- margin-bottom: var(--nymbal-spacing-sm);
234
- }
235
-
236
- .emptyText {
237
- font-size: var(--nymbal-font-size-sm);
238
- color: var(--nymbal-color-text-muted);
239
- margin-bottom: var(--nymbal-spacing-lg);
240
- }
@@ -1,404 +0,0 @@
1
- /* ── Checkout Page ─────────────────────────────────────────────────── */
2
-
3
- .page {
4
- padding-block: var(--nymbal-spacing-xl);
5
- }
6
-
7
- .pageTitle {
8
- font-size: 2rem;
9
- font-weight: var(--nymbal-font-weight-bold);
10
- margin-bottom: var(--nymbal-spacing-lg);
11
- }
12
-
13
- .layout {
14
- display: flex;
15
- flex-direction: column-reverse;
16
- gap: var(--nymbal-spacing-xl);
17
- }
18
-
19
- @media (min-width: 1024px) {
20
- .layout {
21
- flex-direction: row;
22
- align-items: flex-start;
23
- }
24
- }
25
-
26
- /* ── Step Indicator ───────────────────────────────────────────────── */
27
-
28
- .steps {
29
- display: flex;
30
- align-items: center;
31
- gap: 0;
32
- margin-bottom: var(--nymbal-spacing-xl);
33
- overflow-x: auto;
34
- }
35
-
36
- .step {
37
- display: flex;
38
- align-items: center;
39
- gap: var(--nymbal-spacing-sm);
40
- flex-shrink: 0;
41
- }
42
-
43
- .stepNumber {
44
- display: flex;
45
- align-items: center;
46
- justify-content: center;
47
- width: 2rem;
48
- height: 2rem;
49
- border-radius: 50%;
50
- font-size: var(--nymbal-font-size-sm);
51
- font-weight: var(--nymbal-font-weight-medium);
52
- border: 2px solid var(--nymbal-color-border);
53
- color: var(--nymbal-color-text-muted);
54
- background: var(--nymbal-color-surface);
55
- flex-shrink: 0;
56
- transition: all var(--nymbal-transition-fast);
57
- }
58
-
59
- .stepLabel {
60
- font-size: var(--nymbal-font-size-sm);
61
- color: var(--nymbal-color-text-muted);
62
- font-weight: var(--nymbal-font-weight-normal);
63
- white-space: nowrap;
64
- }
65
-
66
- .stepActive .stepNumber {
67
- background-color: var(--nymbal-color-primary);
68
- border-color: var(--nymbal-color-primary);
69
- color: var(--nymbal-color-text-inverse);
70
- }
71
-
72
- .stepActive .stepLabel {
73
- color: var(--nymbal-color-text);
74
- font-weight: var(--nymbal-font-weight-medium);
75
- }
76
-
77
- .stepCompleted .stepNumber {
78
- background-color: var(--nymbal-color-success);
79
- border-color: var(--nymbal-color-success);
80
- color: var(--nymbal-color-text-inverse);
81
- }
82
-
83
- .stepCompleted .stepLabel {
84
- color: var(--nymbal-color-text);
85
- }
86
-
87
- .stepConnector {
88
- width: 2rem;
89
- height: 2px;
90
- background-color: var(--nymbal-color-border);
91
- flex-shrink: 0;
92
- margin: 0 var(--nymbal-spacing-xs);
93
- }
94
-
95
- .stepConnectorCompleted {
96
- background-color: var(--nymbal-color-success);
97
- }
98
-
99
- @media (min-width: 640px) {
100
- .stepConnector {
101
- width: 3rem;
102
- }
103
- }
104
-
105
- /* ── Form Sections ────────────────────────────────────────────────── */
106
-
107
- .formArea {
108
- flex: 1;
109
- min-width: 0;
110
- }
111
-
112
- .formSection {
113
- background: var(--nymbal-color-surface);
114
- border: 1px solid var(--nymbal-color-border);
115
- border-radius: var(--nymbal-radius-lg);
116
- padding: var(--nymbal-spacing-lg);
117
- margin-bottom: var(--nymbal-spacing-lg);
118
- }
119
-
120
- .formSectionTitle {
121
- font-size: var(--nymbal-font-size-lg);
122
- font-weight: var(--nymbal-font-weight-bold);
123
- margin-bottom: var(--nymbal-spacing-md);
124
- }
125
-
126
- .formGrid {
127
- display: grid;
128
- grid-template-columns: 1fr;
129
- gap: var(--nymbal-spacing-md);
130
- }
131
-
132
- @media (min-width: 640px) {
133
- .formGrid {
134
- grid-template-columns: repeat(2, 1fr);
135
- }
136
- }
137
-
138
- .formGridFull {
139
- grid-column: 1 / -1;
140
- }
141
-
142
- .fieldLabel {
143
- display: block;
144
- font-size: var(--nymbal-font-size-sm);
145
- font-weight: var(--nymbal-font-weight-medium);
146
- margin-bottom: var(--nymbal-spacing-xs);
147
- }
148
-
149
- .fieldInput {
150
- display: block;
151
- width: 100%;
152
- padding: 0.625rem 0.75rem;
153
- font-size: var(--nymbal-font-size-sm);
154
- border: 1px solid var(--nymbal-color-border);
155
- border-radius: var(--nymbal-radius-md);
156
- background: var(--nymbal-color-surface);
157
- transition: border-color var(--nymbal-transition-fast),
158
- box-shadow var(--nymbal-transition-fast);
159
- }
160
-
161
- .fieldInput:focus {
162
- outline: none;
163
- border-color: var(--nymbal-color-accent);
164
- box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
165
- }
166
-
167
- .fieldError {
168
- font-size: var(--nymbal-font-size-xs);
169
- color: var(--nymbal-color-error);
170
- margin-top: var(--nymbal-spacing-xs);
171
- }
172
-
173
- /* ── Shipping Methods ─────────────────────────────────────────────── */
174
-
175
- .shippingMethods {
176
- display: flex;
177
- flex-direction: column;
178
- gap: var(--nymbal-spacing-sm);
179
- }
180
-
181
- .shippingOption {
182
- display: flex;
183
- align-items: center;
184
- gap: var(--nymbal-spacing-md);
185
- padding: var(--nymbal-spacing-md);
186
- border: 1px solid var(--nymbal-color-border);
187
- border-radius: var(--nymbal-radius-md);
188
- cursor: pointer;
189
- transition: border-color var(--nymbal-transition-fast);
190
- }
191
-
192
- .shippingOption:hover {
193
- border-color: var(--nymbal-color-primary);
194
- }
195
-
196
- .shippingOptionSelected {
197
- border-color: var(--nymbal-color-accent);
198
- background-color: rgba(37, 99, 235, 0.04);
199
- }
200
-
201
- .shippingOption input[type='radio'] {
202
- width: auto;
203
- accent-color: var(--nymbal-color-accent);
204
- flex-shrink: 0;
205
- }
206
-
207
- .shippingOptionInfo {
208
- flex: 1;
209
- }
210
-
211
- .shippingOptionName {
212
- font-size: var(--nymbal-font-size-sm);
213
- font-weight: var(--nymbal-font-weight-medium);
214
- }
215
-
216
- .shippingOptionDetail {
217
- font-size: var(--nymbal-font-size-xs);
218
- color: var(--nymbal-color-text-muted);
219
- }
220
-
221
- .shippingOptionPrice {
222
- font-size: var(--nymbal-font-size-sm);
223
- font-weight: var(--nymbal-font-weight-bold);
224
- flex-shrink: 0;
225
- }
226
-
227
- /* ── Payment ──────────────────────────────────────────────────────── */
228
-
229
- .paymentSection {
230
- background: var(--nymbal-color-surface);
231
- border: 1px solid var(--nymbal-color-border);
232
- border-radius: var(--nymbal-radius-lg);
233
- padding: var(--nymbal-spacing-lg);
234
- }
235
-
236
- .paymentElement {
237
- margin-bottom: var(--nymbal-spacing-lg);
238
- }
239
-
240
- .paymentError {
241
- padding: var(--nymbal-spacing-md);
242
- background-color: #fef2f2;
243
- border: 1px solid #fecaca;
244
- border-radius: var(--nymbal-radius-md);
245
- color: var(--nymbal-color-error);
246
- font-size: var(--nymbal-font-size-sm);
247
- margin-bottom: var(--nymbal-spacing-md);
248
- }
249
-
250
- /* ── Order Summary Sidebar ────────────────────────────────────────── */
251
-
252
- .orderSummary {
253
- background: var(--nymbal-color-surface);
254
- border: 1px solid var(--nymbal-color-border);
255
- border-radius: var(--nymbal-radius-lg);
256
- padding: var(--nymbal-spacing-lg);
257
- width: 100%;
258
- }
259
-
260
- @media (min-width: 1024px) {
261
- .orderSummary {
262
- width: 22rem;
263
- flex-shrink: 0;
264
- position: sticky;
265
- top: 5.5rem;
266
- }
267
- }
268
-
269
- .orderSummaryTitle {
270
- font-size: var(--nymbal-font-size-lg);
271
- font-weight: var(--nymbal-font-weight-bold);
272
- margin-bottom: var(--nymbal-spacing-md);
273
- }
274
-
275
- .orderItem {
276
- display: flex;
277
- gap: var(--nymbal-spacing-sm);
278
- padding: var(--nymbal-spacing-sm) 0;
279
- }
280
-
281
- .orderItemImage {
282
- width: 3rem;
283
- height: 3rem;
284
- flex-shrink: 0;
285
- border-radius: var(--nymbal-radius-sm);
286
- background-color: #f4f4f5;
287
- overflow: hidden;
288
- }
289
-
290
- .orderItemImage img {
291
- width: 100%;
292
- height: 100%;
293
- object-fit: cover;
294
- }
295
-
296
- .orderItemInfo {
297
- flex: 1;
298
- min-width: 0;
299
- }
300
-
301
- .orderItemName {
302
- font-size: var(--nymbal-font-size-xs);
303
- font-weight: var(--nymbal-font-weight-medium);
304
- line-height: 1.3;
305
- }
306
-
307
- .orderItemQty {
308
- font-size: var(--nymbal-font-size-xs);
309
- color: var(--nymbal-color-text-muted);
310
- }
311
-
312
- .orderItemPrice {
313
- font-size: var(--nymbal-font-size-xs);
314
- font-weight: var(--nymbal-font-weight-medium);
315
- flex-shrink: 0;
316
- }
317
-
318
- .summaryDivider {
319
- border: 0;
320
- border-top: 1px solid var(--nymbal-color-border);
321
- margin: var(--nymbal-spacing-sm) 0;
322
- }
323
-
324
- .summaryRow {
325
- display: flex;
326
- justify-content: space-between;
327
- padding: var(--nymbal-spacing-xs) 0;
328
- font-size: var(--nymbal-font-size-sm);
329
- }
330
-
331
- .summaryRowLabel {
332
- color: var(--nymbal-color-text-muted);
333
- }
334
-
335
- .summaryTotal {
336
- font-weight: var(--nymbal-font-weight-bold);
337
- font-size: var(--nymbal-font-size-base);
338
- }
339
-
340
- /* ── Form Navigation ──────────────────────────────────────────────── */
341
-
342
- .formActions {
343
- display: flex;
344
- justify-content: space-between;
345
- align-items: center;
346
- gap: var(--nymbal-spacing-md);
347
- margin-top: var(--nymbal-spacing-lg);
348
- }
349
-
350
- .backButton {
351
- padding: 0.625rem 1.25rem;
352
- font-size: var(--nymbal-font-size-sm);
353
- font-weight: var(--nymbal-font-weight-medium);
354
- color: var(--nymbal-color-text);
355
- background: none;
356
- border: 1px solid var(--nymbal-color-border);
357
- border-radius: var(--nymbal-radius-md);
358
- cursor: pointer;
359
- transition: border-color var(--nymbal-transition-fast),
360
- background-color var(--nymbal-transition-fast);
361
- }
362
-
363
- .backButton:hover {
364
- border-color: var(--nymbal-color-primary);
365
- background-color: #f4f4f5;
366
- }
367
-
368
- .nextButton {
369
- padding: 0.625rem 2rem;
370
- font-size: var(--nymbal-font-size-sm);
371
- font-weight: var(--nymbal-font-weight-medium);
372
- color: var(--nymbal-color-text-inverse);
373
- background-color: var(--nymbal-color-primary);
374
- border: none;
375
- border-radius: var(--nymbal-radius-md);
376
- cursor: pointer;
377
- transition: background-color var(--nymbal-transition-fast);
378
- margin-left: auto;
379
- }
380
-
381
- .nextButton:hover {
382
- background-color: var(--nymbal-color-primary-hover);
383
- }
384
-
385
- .nextButton:disabled {
386
- opacity: 0.5;
387
- cursor: not-allowed;
388
- }
389
-
390
- /* ── Processing Overlay ───────────────────────────────────────────── */
391
-
392
- .processing {
393
- display: flex;
394
- flex-direction: column;
395
- align-items: center;
396
- justify-content: center;
397
- padding: 3rem;
398
- gap: var(--nymbal-spacing-md);
399
- }
400
-
401
- .processingText {
402
- font-size: var(--nymbal-font-size-sm);
403
- color: var(--nymbal-color-text-muted);
404
- }