create-magic-storefront 0.5.0 → 0.6.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 (139) hide show
  1. package/package.json +3 -3
  2. package/template/.claude/skills/storefront-design/SKILL.md +14 -10
  3. package/template/AGENTS.md +32 -16
  4. package/template/DESIGN.md +117 -0
  5. package/template/PAGES.md +107 -29
  6. package/template/README.md +15 -3
  7. package/template/app/account/addresses/page.tsx +16 -0
  8. package/template/app/account/layout.tsx +14 -0
  9. package/template/app/account/loading.tsx +15 -0
  10. package/template/app/account/orders/[id]/page.tsx +15 -0
  11. package/template/app/account/page.tsx +12 -244
  12. package/template/app/account/profile/page.tsx +16 -0
  13. package/template/app/blog/(index)/loading.tsx +22 -0
  14. package/template/app/blog/{page.tsx → (index)/page.tsx} +42 -25
  15. package/template/app/blog/[handle]/page.tsx +92 -56
  16. package/template/app/blog/author/[handle]/page.tsx +1 -1
  17. package/template/app/cart/layout.tsx +14 -0
  18. package/template/app/cart/page.tsx +49 -101
  19. package/template/app/checkout/layout.tsx +14 -0
  20. package/template/app/checkout/page.tsx +98 -281
  21. package/template/app/collections/[handle]/layout.tsx +20 -0
  22. package/template/app/collections/[handle]/loading.tsx +23 -0
  23. package/template/app/collections/[handle]/page.tsx +131 -15
  24. package/template/app/collections/page.tsx +49 -0
  25. package/template/app/contacts/page.tsx +196 -0
  26. package/template/app/error.tsx +19 -8
  27. package/template/app/fonts/OFL.txt +93 -0
  28. package/template/app/fonts/index.ts +14 -0
  29. package/template/app/fonts/onest-variable.woff2 +0 -0
  30. package/template/app/globals.css +14 -518
  31. package/template/app/layout.tsx +73 -50
  32. package/template/app/not-found.tsx +34 -4
  33. package/template/app/page.tsx +1 -1
  34. package/template/app/pages/[handle]/page.tsx +1 -1
  35. package/template/app/products/[handle]/layout.tsx +20 -0
  36. package/template/app/products/[handle]/loading.tsx +25 -0
  37. package/template/app/products/[handle]/page.tsx +112 -15
  38. package/template/app/providers.tsx +5 -1
  39. package/template/app/search/loading.tsx +12 -0
  40. package/template/app/search/page.tsx +138 -25
  41. package/template/app/sitemap.ts +5 -1
  42. package/template/app/styles/base.css +138 -0
  43. package/template/app/styles/components.css +1108 -0
  44. package/template/app/styles/layout.css +455 -0
  45. package/template/app/styles/pages.css +1839 -0
  46. package/template/app/styles/reset.css +55 -0
  47. package/template/app/styles/sections.css +415 -0
  48. package/template/app/styles/tokens.css +167 -0
  49. package/template/app/styles/utilities.css +37 -0
  50. package/template/app/wishlist/page.tsx +26 -0
  51. package/template/components/account/account-shell.tsx +100 -0
  52. package/template/components/account/addresses.tsx +247 -0
  53. package/template/components/account/order-detail.tsx +281 -0
  54. package/template/components/account/order-list.tsx +94 -0
  55. package/template/components/account/order-status.tsx +19 -0
  56. package/template/components/account/profile.tsx +129 -0
  57. package/template/components/account/sign-in.tsx +164 -0
  58. package/template/components/article-body.tsx +3 -2
  59. package/template/components/article-card.tsx +37 -12
  60. package/template/components/cart/cart-drawer.tsx +149 -0
  61. package/template/components/cart/cart-lines.tsx +89 -0
  62. package/template/components/cart/cart-summary.tsx +191 -0
  63. package/template/components/catalog/catalog-form.tsx +107 -0
  64. package/template/components/catalog/catalog-layout.tsx +82 -0
  65. package/template/components/catalog/facets-shell.tsx +60 -0
  66. package/template/components/catalog/facets.tsx +216 -0
  67. package/template/components/checkout/order-summary.tsx +84 -0
  68. package/template/components/checkout/radio-card.tsx +34 -0
  69. package/template/components/checkout/step-indicator.tsx +56 -0
  70. package/template/components/checkout/steps.tsx +264 -0
  71. package/template/components/checkout/thank-you.tsx +48 -0
  72. package/template/components/checkout/use-checkout.ts +90 -0
  73. package/template/components/footer/site-footer.tsx +132 -0
  74. package/template/components/header/cart-button.tsx +43 -0
  75. package/template/components/header/desktop-nav.tsx +133 -0
  76. package/template/components/header/mobile-menu.tsx +102 -0
  77. package/template/components/header/site-header.tsx +78 -0
  78. package/template/components/page-loading.tsx +20 -0
  79. package/template/components/pager.tsx +3 -1
  80. package/template/components/product/buy-box.tsx +148 -0
  81. package/template/components/product/gallery.tsx +179 -0
  82. package/template/components/product/pre-order-form.tsx +93 -0
  83. package/template/components/product/product-selection.tsx +31 -0
  84. package/template/components/product/recommendations.tsx +26 -0
  85. package/template/components/product/review-list.tsx +159 -0
  86. package/template/components/product/reviews.tsx +80 -0
  87. package/template/components/product/variant-picker.tsx +75 -0
  88. package/template/components/product-card.tsx +103 -0
  89. package/template/components/product-grid.tsx +27 -57
  90. package/template/components/quick-add.tsx +62 -0
  91. package/template/components/search/predictive-search.tsx +282 -0
  92. package/template/components/sections/announcement-bar.tsx +1 -1
  93. package/template/components/sections/banner.tsx +1 -1
  94. package/template/components/sections/collections.tsx +50 -13
  95. package/template/components/sections/deal-of-day.tsx +2 -2
  96. package/template/components/sections/product-shelves.tsx +13 -5
  97. package/template/components/sections/shoppable-stories.tsx +2 -2
  98. package/template/components/sections/store-reviews.tsx +10 -4
  99. package/template/components/share-button.tsx +42 -0
  100. package/template/components/ui/accordion.tsx +35 -0
  101. package/template/components/ui/badge.tsx +20 -0
  102. package/template/components/ui/breadcrumbs.tsx +31 -0
  103. package/template/components/ui/button.tsx +90 -0
  104. package/template/components/ui/drawer.tsx +84 -0
  105. package/template/components/ui/empty-state.tsx +27 -0
  106. package/template/components/ui/field.tsx +33 -0
  107. package/template/components/ui/icon.tsx +112 -0
  108. package/template/components/ui/price.tsx +35 -0
  109. package/template/components/ui/quantity-stepper.tsx +91 -0
  110. package/template/components/ui/rating.tsx +48 -0
  111. package/template/components/ui/skeleton.tsx +46 -0
  112. package/template/components/wishlist/wishlist-view.tsx +134 -0
  113. package/template/lib/article-outline.ts +35 -0
  114. package/template/lib/catalog-params.ts +170 -0
  115. package/template/lib/contacts.ts +34 -0
  116. package/template/lib/errors.ts +29 -0
  117. package/template/lib/i18n.ts +484 -0
  118. package/template/lib/menu.ts +70 -0
  119. package/template/lib/theme-settings.ts +36 -0
  120. package/template/theme/index.ts +7 -1
  121. package/template/theme/sections/collapsible-content.tsx +75 -0
  122. package/template/theme/sections/collection-list.tsx +32 -4
  123. package/template/theme/sections/featured-collection.tsx +22 -2
  124. package/template/theme/sections/hero.tsx +94 -7
  125. package/template/theme/sections/image-with-text.tsx +19 -3
  126. package/template/theme/sections/multicolumn.tsx +113 -0
  127. package/template/theme/sections/page-content.tsx +10 -4
  128. package/template/theme/sections/product-shelf.tsx +26 -4
  129. package/template/theme/sections/rich-text.tsx +13 -1
  130. package/template/theme/sections/testimonials.tsx +14 -9
  131. package/template/theme/settings.ts +85 -1
  132. package/template/theme/templates/index.json +4 -2
  133. package/template/.screenshots/home-1280.png +0 -0
  134. package/template/.screenshots/home-390.png +0 -0
  135. package/template/.screenshots/home-filled-1280.png +0 -0
  136. package/template/.screenshots/home-filled-390.png +0 -0
  137. package/template/.screenshots/page-1280.png +0 -0
  138. package/template/components/buy-box.tsx +0 -89
  139. package/template/components/cart-link.tsx +0 -15
@@ -0,0 +1,1108 @@
1
+ /* Reusable components: one block per component, BEM-lite (DESIGN.md). */
2
+ @layer components {
3
+ /* Button */
4
+ .button {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+ gap: var(--space-2);
9
+ min-height: 44px;
10
+ padding: 0 var(--space-5);
11
+ border: 1px solid var(--line-strong);
12
+ border-radius: var(--radius-sm);
13
+ background: var(--surface);
14
+ color: var(--fg);
15
+ font-weight: var(--weight-medium);
16
+ line-height: 1.2;
17
+ text-align: center;
18
+ text-decoration: none;
19
+ white-space: nowrap;
20
+ cursor: pointer;
21
+ transition:
22
+ background-color var(--duration-fast) var(--ease),
23
+ border-color var(--duration-fast) var(--ease),
24
+ transform var(--duration-fast) var(--ease);
25
+ }
26
+ .button:hover {
27
+ border-color: var(--fg);
28
+ }
29
+ .button:active:not(:disabled) {
30
+ transform: translateY(1px);
31
+ }
32
+ .button--primary {
33
+ background: var(--accent);
34
+ border-color: var(--accent);
35
+ color: var(--on-accent);
36
+ }
37
+ .button--primary:hover {
38
+ border-color: var(--accent);
39
+ background: color-mix(in srgb, var(--accent) 88%, var(--fg));
40
+ }
41
+ .button--full {
42
+ width: 100%;
43
+ }
44
+
45
+ /* Badge: only from data (sale, sold out, new, pre-order). */
46
+ .badge {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ align-self: flex-start;
50
+ min-height: 1.375rem;
51
+ padding: 0 var(--space-2);
52
+ border-radius: var(--radius-sm);
53
+ background: var(--label-bg);
54
+ color: var(--label-fg);
55
+ font-size: var(--text-xs);
56
+ font-weight: var(--weight-medium);
57
+ line-height: 1;
58
+ white-space: nowrap;
59
+ }
60
+ .badge--sold-out,
61
+ .badge--neutral {
62
+ background: var(--surface);
63
+ color: var(--fg);
64
+ box-shadow: inset 0 0 0 1px var(--line-strong);
65
+ }
66
+
67
+ /* Missing image: the same box, a quiet fill. */
68
+ .media-fallback {
69
+ width: 100%;
70
+ height: 100%;
71
+ background: var(--placeholder);
72
+ }
73
+
74
+ /* Product grid and card */
75
+ .product-grid {
76
+ display: grid;
77
+ grid-template-columns: repeat(2, minmax(0, 1fr));
78
+ gap: var(--space-6) var(--space-3);
79
+ margin: 0;
80
+ padding: 0;
81
+ list-style: none;
82
+ }
83
+ @media (min-width: 750px) {
84
+ .product-grid {
85
+ grid-template-columns: repeat(3, minmax(0, 1fr));
86
+ gap: var(--space-7) var(--space-4);
87
+ }
88
+ }
89
+ @media (min-width: 990px) {
90
+ .product-grid {
91
+ grid-template-columns: repeat(4, minmax(0, 1fr));
92
+ gap: var(--space-7) var(--space-5);
93
+ }
94
+ }
95
+ .product-grid > li {
96
+ min-width: 0;
97
+ }
98
+ /* One row that scrolls sideways: a shelf on the home page. */
99
+ .product-grid--slider {
100
+ grid-auto-flow: column;
101
+ grid-template-columns: none;
102
+ grid-auto-columns: calc((100% - var(--space-3)) / 2.3);
103
+ margin-inline: calc(var(--gutter) * -1);
104
+ padding: 0 var(--gutter) var(--space-2);
105
+ overflow-x: auto;
106
+ overscroll-behavior-x: contain;
107
+ scroll-padding-inline: var(--gutter);
108
+ scroll-snap-type: x mandatory;
109
+ scrollbar-width: none;
110
+ }
111
+ .product-grid--slider::-webkit-scrollbar {
112
+ display: none;
113
+ }
114
+ .product-grid--slider > li {
115
+ scroll-snap-align: start;
116
+ }
117
+ @media (min-width: 750px) {
118
+ .product-grid--slider {
119
+ grid-template-columns: none;
120
+ grid-auto-columns: calc((100% - 2 * var(--space-4)) / 3.3);
121
+ }
122
+ }
123
+ @media (min-width: 990px) {
124
+ .product-grid--slider {
125
+ grid-template-columns: none;
126
+ grid-auto-columns: calc((100% - 3 * var(--space-5)) / 4);
127
+ margin-inline: 0;
128
+ padding-inline: 0;
129
+ }
130
+ }
131
+ /* The title link is stretched over the whole card; quick add sits above it. */
132
+ .product-card {
133
+ position: relative;
134
+ display: flex;
135
+ flex-direction: column;
136
+ gap: var(--space-3);
137
+ height: 100%;
138
+ }
139
+ .product-card__media {
140
+ position: relative;
141
+ overflow: hidden;
142
+ aspect-ratio: var(--media-ratio);
143
+ border-radius: var(--radius-md);
144
+ background: var(--placeholder);
145
+ }
146
+ .product-card__media img,
147
+ .product-card__media .media-fallback {
148
+ width: 100%;
149
+ height: 100%;
150
+ object-fit: cover;
151
+ transition: transform var(--duration) var(--ease);
152
+ }
153
+ :root[data-image-ratio='natural'] .product-card__media img {
154
+ height: auto;
155
+ }
156
+ .product-card__badges {
157
+ position: absolute;
158
+ top: var(--space-2);
159
+ left: var(--space-2);
160
+ display: flex;
161
+ flex-wrap: wrap;
162
+ gap: var(--space-1);
163
+ }
164
+ .product-card__info {
165
+ display: flex;
166
+ flex-direction: column;
167
+ gap: var(--space-1);
168
+ }
169
+ .product-card__vendor {
170
+ display: none;
171
+ color: var(--muted);
172
+ font-size: var(--text-xs);
173
+ letter-spacing: 0.02em;
174
+ }
175
+ :root[data-show-vendor] .product-card__vendor {
176
+ display: block;
177
+ }
178
+ .product-card__rating {
179
+ display: none;
180
+ }
181
+ :root[data-show-rating] .product-card__rating:has(.rating) {
182
+ display: block;
183
+ }
184
+ .product-card__link {
185
+ color: inherit;
186
+ text-decoration: none;
187
+ }
188
+ .product-card__link::after {
189
+ content: '';
190
+ position: absolute;
191
+ inset: 0;
192
+ z-index: 1;
193
+ }
194
+ .product-card__link:focus-visible {
195
+ outline: none;
196
+ }
197
+ .product-card:has(.product-card__link:focus-visible) {
198
+ outline: 2px solid var(--fg);
199
+ outline-offset: 4px;
200
+ border-radius: var(--radius-md);
201
+ }
202
+ .product-card__title {
203
+ display: -webkit-box;
204
+ -webkit-box-orient: vertical;
205
+ -webkit-line-clamp: 2;
206
+ line-clamp: 2;
207
+ overflow: hidden;
208
+ font-size: var(--text-sm);
209
+ line-height: var(--leading-snug);
210
+ }
211
+ @media (min-width: 750px) {
212
+ .product-card__title {
213
+ font-size: var(--text-base);
214
+ }
215
+ }
216
+ @media (hover: hover) {
217
+ .product-card:hover .product-card__media img {
218
+ transform: scale(1.03);
219
+ }
220
+ .product-card:hover .product-card__title {
221
+ text-decoration: underline;
222
+ text-underline-offset: 0.2em;
223
+ }
224
+ }
225
+ .product-card__quick-add {
226
+ position: absolute;
227
+ z-index: 2;
228
+ right: var(--space-2);
229
+ bottom: var(--space-2);
230
+ display: grid;
231
+ place-items: center;
232
+ width: 44px;
233
+ height: 44px;
234
+ min-height: 44px;
235
+ padding: 0;
236
+ border: 0;
237
+ border-radius: var(--radius-pill);
238
+ background: var(--surface);
239
+ color: var(--fg);
240
+ box-shadow: var(--shadow-1);
241
+ }
242
+ .product-card__quick-add:hover {
243
+ background: var(--fg);
244
+ color: var(--bg);
245
+ }
246
+ .product-card__error {
247
+ position: absolute;
248
+ z-index: 2;
249
+ inset: auto var(--space-2) calc(44px + var(--space-3));
250
+ padding: var(--space-2) var(--space-3);
251
+ border-radius: var(--radius-sm);
252
+ background: var(--bg);
253
+ color: var(--danger);
254
+ font-size: var(--text-sm);
255
+ }
256
+ :root[data-card-style='card'] .product-card {
257
+ padding: var(--space-2) var(--space-2) var(--space-3);
258
+ border: 1px solid var(--line);
259
+ border-radius: var(--radius-md);
260
+ background: var(--surface);
261
+ }
262
+
263
+ /* Price */
264
+ .price {
265
+ display: flex;
266
+ flex-wrap: wrap;
267
+ align-items: baseline;
268
+ gap: 0 var(--space-2);
269
+ font-weight: var(--weight-medium);
270
+ font-variant-numeric: tabular-nums;
271
+ }
272
+ .price__compare {
273
+ color: var(--muted);
274
+ font-size: 0.875em;
275
+ font-weight: var(--weight-regular);
276
+ }
277
+ .price--sale .price__current {
278
+ color: var(--danger);
279
+ }
280
+
281
+ /* Collection grid and card */
282
+ .collection-grid {
283
+ display: grid;
284
+ grid-template-columns: repeat(2, minmax(0, 1fr));
285
+ gap: var(--space-4) var(--space-3);
286
+ }
287
+ @media (min-width: 750px) {
288
+ .collection-grid {
289
+ grid-template-columns: repeat(3, minmax(0, 1fr));
290
+ gap: var(--space-5);
291
+ }
292
+ }
293
+ @media (min-width: 990px) {
294
+ .collection-grid {
295
+ grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr));
296
+ }
297
+ }
298
+ .collection-card {
299
+ display: flex;
300
+ flex-direction: column;
301
+ gap: var(--space-2);
302
+ text-decoration: none;
303
+ font-weight: var(--weight-medium);
304
+ }
305
+ .collection-card__media {
306
+ overflow: hidden;
307
+ aspect-ratio: 1;
308
+ border-radius: var(--radius-md);
309
+ background: var(--placeholder);
310
+ }
311
+ .collection-card__media img,
312
+ .collection-card__media .media-fallback {
313
+ width: 100%;
314
+ height: 100%;
315
+ object-fit: cover;
316
+ transition: transform var(--duration) var(--ease);
317
+ }
318
+ .collection-card__count {
319
+ margin-top: calc(var(--space-1) * -1);
320
+ color: var(--muted);
321
+ font-size: var(--text-sm);
322
+ font-weight: var(--weight-regular);
323
+ }
324
+ /* Text tiles: a shop whose collections have no images. */
325
+ .collection-grid--text .collection-card {
326
+ position: relative;
327
+ justify-content: center;
328
+ min-height: 5.5rem;
329
+ padding: var(--space-4) calc(var(--space-4) + 24px) var(--space-4) var(--space-4);
330
+ border: 1px solid var(--line);
331
+ border-radius: var(--radius-md);
332
+ background: var(--surface);
333
+ transition: border-color var(--duration) var(--ease);
334
+ }
335
+ .collection-grid--text .collection-card__count {
336
+ margin-top: 0;
337
+ }
338
+ .collection-card__arrow {
339
+ position: absolute;
340
+ top: 50%;
341
+ right: var(--space-3);
342
+ color: var(--muted);
343
+ transform: translateY(-50%);
344
+ }
345
+ @media (hover: hover) {
346
+ .collection-grid--text .collection-card:hover {
347
+ border-color: var(--line-strong);
348
+ }
349
+ .collection-card:hover .collection-card__media img {
350
+ transform: scale(1.03);
351
+ }
352
+ .collection-card:hover .collection-card__title {
353
+ text-decoration: underline;
354
+ }
355
+ }
356
+
357
+ /* Pagination */
358
+ .pager {
359
+ display: flex;
360
+ flex-wrap: wrap;
361
+ justify-content: center;
362
+ gap: var(--space-1);
363
+ margin-top: var(--space-7);
364
+ }
365
+ .pager > * {
366
+ display: inline-grid;
367
+ place-items: center;
368
+ min-width: 44px;
369
+ min-height: 44px;
370
+ padding: 0 var(--space-2);
371
+ border-radius: var(--radius-sm);
372
+ text-decoration: none;
373
+ }
374
+ .pager a:hover {
375
+ background: var(--subtle);
376
+ }
377
+ .pager [aria-current='page'] {
378
+ border: 1px solid var(--fg);
379
+ font-weight: var(--weight-medium);
380
+ }
381
+
382
+ /* Chips: filter, category and tag links. */
383
+ .chips {
384
+ display: flex;
385
+ flex-wrap: wrap;
386
+ gap: var(--space-2);
387
+ }
388
+ .chips a,
389
+ .chips button {
390
+ display: inline-flex;
391
+ align-items: center;
392
+ gap: var(--space-2);
393
+ min-height: 44px;
394
+ padding: 0 var(--space-4);
395
+ border: 1px solid var(--line-strong);
396
+ border-radius: var(--radius-pill);
397
+ font-size: var(--text-sm);
398
+ text-decoration: none;
399
+ }
400
+ .chips a:hover,
401
+ .chips button:hover {
402
+ border-color: var(--fg);
403
+ }
404
+ .chips button[aria-pressed='true'],
405
+ .chips a[aria-current='page'] {
406
+ background: var(--fg);
407
+ border-color: var(--fg);
408
+ color: var(--bg);
409
+ }
410
+ .chips a[aria-current='page'] .muted {
411
+ color: inherit;
412
+ opacity: 0.7;
413
+ }
414
+
415
+ /* Cart lines (cart drawer and cart page). */
416
+ .cart-lines {
417
+ container: cart-lines / inline-size;
418
+ margin: 0;
419
+ padding: 0;
420
+ list-style: none;
421
+ }
422
+ .cart-line {
423
+ display: grid;
424
+ grid-template-columns: 72px minmax(0, 1fr) auto;
425
+ grid-template-areas:
426
+ 'media info info'
427
+ 'media controls total';
428
+ gap: var(--space-2) var(--space-4);
429
+ padding: var(--space-4) 0;
430
+ border-bottom: 1px solid var(--line);
431
+ }
432
+ .cart-line:last-child {
433
+ border-bottom: 0;
434
+ }
435
+ .cart-line__media {
436
+ grid-area: media;
437
+ overflow: hidden;
438
+ width: 72px;
439
+ aspect-ratio: var(--media-ratio);
440
+ border-radius: var(--radius-sm);
441
+ background: var(--placeholder);
442
+ }
443
+ :root[data-image-ratio='natural'] .cart-line__media {
444
+ aspect-ratio: 1;
445
+ }
446
+ .cart-line__media img,
447
+ .cart-line__media .media-fallback {
448
+ width: 100%;
449
+ height: 100%;
450
+ object-fit: cover;
451
+ }
452
+ .cart-line__info {
453
+ grid-area: info;
454
+ display: flex;
455
+ flex-direction: column;
456
+ gap: var(--space-1);
457
+ min-width: 0;
458
+ }
459
+ .cart-line__title {
460
+ font-weight: var(--weight-medium);
461
+ line-height: var(--leading-snug);
462
+ text-decoration: none;
463
+ }
464
+ a.cart-line__title:hover {
465
+ text-decoration: underline;
466
+ }
467
+ .cart-line__variant {
468
+ color: var(--muted);
469
+ font-size: var(--text-sm);
470
+ }
471
+ .cart-line__issue {
472
+ color: var(--danger);
473
+ font-size: var(--text-sm);
474
+ }
475
+ .cart-line__total {
476
+ grid-area: total;
477
+ font-weight: var(--weight-medium);
478
+ font-variant-numeric: tabular-nums;
479
+ white-space: nowrap;
480
+ }
481
+ .cart-line__total {
482
+ align-self: center;
483
+ }
484
+ /* A narrow list (a phone, the drawer): the line price goes under the title, the controls get
485
+ the row. */
486
+ @container cart-lines (max-width: 479px) {
487
+ .cart-line {
488
+ grid-template-areas:
489
+ 'media info'
490
+ 'media total'
491
+ 'media controls';
492
+ grid-template-columns: 72px minmax(0, 1fr);
493
+ }
494
+ .cart-line__total {
495
+ justify-self: start;
496
+ }
497
+ }
498
+ .cart-line__controls {
499
+ grid-area: controls;
500
+ display: flex;
501
+ align-items: center;
502
+ gap: var(--space-2);
503
+ }
504
+ .cart-line__remove {
505
+ color: var(--muted);
506
+ }
507
+
508
+ /* Cart drawer */
509
+ .cart-drawer__summary {
510
+ display: flex;
511
+ flex-direction: column;
512
+ gap: var(--space-2);
513
+ }
514
+ .cart-drawer__subtotal {
515
+ display: flex;
516
+ justify-content: space-between;
517
+ font-size: var(--text-lg);
518
+ font-weight: var(--weight-heading);
519
+ }
520
+ .cart-drawer__note {
521
+ margin-bottom: var(--space-2);
522
+ color: var(--muted);
523
+ font-size: var(--text-sm);
524
+ }
525
+
526
+ /* Form field: label above, error below. */
527
+ .field {
528
+ display: flex;
529
+ flex-direction: column;
530
+ gap: var(--space-1);
531
+ }
532
+ .field__label {
533
+ font-size: var(--text-sm);
534
+ font-weight: var(--weight-medium);
535
+ }
536
+ .field__error {
537
+ color: var(--danger);
538
+ font-size: var(--text-sm);
539
+ }
540
+ .choice {
541
+ display: flex;
542
+ align-items: center;
543
+ gap: var(--space-3);
544
+ min-height: 44px;
545
+ }
546
+
547
+ /* Icons and icon buttons */
548
+ .icon {
549
+ flex: none;
550
+ }
551
+ .icon-button {
552
+ position: relative;
553
+ display: inline-grid;
554
+ place-items: center;
555
+ width: 44px;
556
+ height: 44px;
557
+ min-height: 44px;
558
+ padding: 0;
559
+ border: 0;
560
+ border-radius: var(--radius-sm);
561
+ background: transparent;
562
+ color: inherit;
563
+ }
564
+ .icon-button:hover {
565
+ background: color-mix(in srgb, currentColor 8%, transparent);
566
+ }
567
+
568
+ /* Button sizes and the link variant */
569
+ .button--sm {
570
+ min-height: 36px;
571
+ padding: 0 var(--space-3);
572
+ font-size: var(--text-sm);
573
+ }
574
+ .button--lg {
575
+ min-height: 52px;
576
+ padding: 0 var(--space-6);
577
+ font-size: var(--text-lg);
578
+ }
579
+ .button--link {
580
+ min-height: 44px;
581
+ padding: 0;
582
+ border: 0;
583
+ background: none;
584
+ text-decoration: underline;
585
+ text-underline-offset: 0.2em;
586
+ }
587
+ .button--link:hover {
588
+ border: 0;
589
+ text-decoration-thickness: 2px;
590
+ }
591
+ .button[aria-busy='true'] {
592
+ cursor: progress;
593
+ opacity: 0.7;
594
+ }
595
+
596
+ /* Skeleton */
597
+ .skeleton--title {
598
+ height: 2.5rem;
599
+ margin-bottom: var(--space-5);
600
+ }
601
+ .skeleton {
602
+ display: block;
603
+ border-radius: var(--radius-sm);
604
+ background: linear-gradient(
605
+ 90deg,
606
+ var(--placeholder) 0%,
607
+ var(--subtle) 50%,
608
+ var(--placeholder) 100%
609
+ );
610
+ background-size: 200% 100%;
611
+ animation: skeleton 1.4s ease-in-out infinite;
612
+ }
613
+ @keyframes skeleton {
614
+ from {
615
+ background-position: 100% 0;
616
+ }
617
+ to {
618
+ background-position: -100% 0;
619
+ }
620
+ }
621
+ @media (prefers-reduced-motion: reduce) {
622
+ .skeleton {
623
+ animation: none;
624
+ }
625
+ }
626
+
627
+ /* Empty state */
628
+ .empty-state {
629
+ display: flex;
630
+ flex-direction: column;
631
+ align-items: center;
632
+ gap: var(--space-3);
633
+ max-width: 32rem;
634
+ margin: var(--space-7) auto;
635
+ text-align: center;
636
+ }
637
+ .empty-state__icon {
638
+ color: var(--muted);
639
+ }
640
+ .empty-state__title {
641
+ font-size: var(--text-2xl);
642
+ }
643
+ .empty-state__text {
644
+ color: var(--muted);
645
+ }
646
+ .empty-state__action {
647
+ display: flex;
648
+ flex-wrap: wrap;
649
+ justify-content: center;
650
+ gap: var(--space-3);
651
+ margin-top: var(--space-2);
652
+ }
653
+
654
+ /* Accordion */
655
+ .accordion {
656
+ border-bottom: 1px solid var(--line);
657
+ }
658
+ .accordion__summary {
659
+ display: flex;
660
+ align-items: center;
661
+ justify-content: space-between;
662
+ gap: var(--space-3);
663
+ min-height: 3.5rem;
664
+ font-weight: var(--weight-medium);
665
+ list-style: none;
666
+ cursor: pointer;
667
+ }
668
+ .accordion__summary::-webkit-details-marker {
669
+ display: none;
670
+ }
671
+ .accordion__icon {
672
+ transition: transform var(--duration) var(--ease);
673
+ }
674
+ .accordion[open] .accordion__icon {
675
+ transform: rotate(180deg);
676
+ }
677
+ .accordion__content {
678
+ padding-bottom: var(--space-5);
679
+ }
680
+
681
+ /* Breadcrumbs */
682
+ .breadcrumbs {
683
+ margin-bottom: var(--space-3);
684
+ }
685
+ .breadcrumbs__list {
686
+ display: flex;
687
+ flex-wrap: wrap;
688
+ margin: 0;
689
+ padding: 0;
690
+ list-style: none;
691
+ color: var(--muted);
692
+ font-size: var(--text-sm);
693
+ }
694
+ .breadcrumbs__item:not(:last-child)::after {
695
+ content: '/';
696
+ margin-inline: var(--space-2);
697
+ color: var(--line-strong);
698
+ }
699
+ .breadcrumbs a {
700
+ text-decoration: none;
701
+ }
702
+ /* Phones: the current page is the heading right below; the trail stops at its parent. */
703
+ @media (max-width: 749px) {
704
+ .breadcrumbs__item:last-child {
705
+ display: none;
706
+ }
707
+ .breadcrumbs__item:nth-last-child(2)::after {
708
+ content: none;
709
+ }
710
+ /* Home and this page only: nothing left worth a trail. */
711
+ .breadcrumbs:has(.breadcrumbs__item:nth-child(2):last-child) {
712
+ display: none;
713
+ }
714
+ }
715
+ .breadcrumbs a:hover {
716
+ color: var(--fg);
717
+ text-decoration: underline;
718
+ }
719
+ .breadcrumbs [aria-current='page'] {
720
+ color: var(--fg);
721
+ }
722
+
723
+ /* Price sizes */
724
+ .price--sm {
725
+ font-size: var(--text-sm);
726
+ }
727
+ .price--lg {
728
+ font-size: var(--text-xl);
729
+ }
730
+
731
+ /* Rating: the full stars are clipped to the average. */
732
+ .rating {
733
+ display: inline-flex;
734
+ align-items: center;
735
+ gap: var(--space-2);
736
+ font-size: var(--text-sm);
737
+ color: var(--muted);
738
+ }
739
+ .rating__stars {
740
+ position: relative;
741
+ display: inline-flex;
742
+ color: var(--fg);
743
+ }
744
+ .rating__empty,
745
+ .rating__full {
746
+ display: inline-flex;
747
+ gap: 1px;
748
+ }
749
+ .rating__empty {
750
+ opacity: 0.3;
751
+ }
752
+ .rating__full {
753
+ position: absolute;
754
+ inset: 0;
755
+ overflow: hidden;
756
+ width: var(--rating-fill, 0%);
757
+ }
758
+
759
+ /* Quantity stepper */
760
+ .quantity {
761
+ display: inline-flex;
762
+ align-items: stretch;
763
+ height: 44px;
764
+ border: 1px solid var(--line-strong);
765
+ border-radius: var(--radius-sm);
766
+ background: var(--surface);
767
+ }
768
+ .quantity__button {
769
+ display: grid;
770
+ place-items: center;
771
+ width: 44px;
772
+ min-height: 0;
773
+ padding: 0;
774
+ border: 0;
775
+ border-radius: 0;
776
+ background: transparent;
777
+ }
778
+ .quantity__button:disabled {
779
+ opacity: 0.35;
780
+ }
781
+ .quantity__input.quantity__input {
782
+ width: 3rem;
783
+ min-height: 0;
784
+ padding: 0;
785
+ border: 0;
786
+ border-radius: 0;
787
+ background: transparent;
788
+ text-align: center;
789
+ -moz-appearance: textfield;
790
+ appearance: textfield;
791
+ }
792
+ .quantity__input::-webkit-inner-spin-button,
793
+ .quantity__input::-webkit-outer-spin-button {
794
+ -webkit-appearance: none;
795
+ margin: 0;
796
+ }
797
+
798
+ /* Drawer: a native <dialog> sliding in from one side. */
799
+ html:has(.drawer[open]) {
800
+ overflow: hidden;
801
+ }
802
+ .drawer {
803
+ position: fixed;
804
+ inset: 0 0 0 auto;
805
+ z-index: var(--z-drawer);
806
+ width: min(26rem, 100vw - var(--space-7));
807
+ height: 100dvh;
808
+ margin: 0;
809
+ background: var(--bg);
810
+ color: var(--fg);
811
+ box-shadow: var(--shadow-2);
812
+ transition:
813
+ transform var(--duration) var(--ease),
814
+ overlay var(--duration) allow-discrete,
815
+ display var(--duration) allow-discrete;
816
+ transform: translateX(100%);
817
+ }
818
+ .drawer[open] {
819
+ transform: none;
820
+ }
821
+ @starting-style {
822
+ .drawer[open] {
823
+ transform: translateX(100%);
824
+ }
825
+ }
826
+ .drawer--left {
827
+ inset: 0 auto 0 0;
828
+ transform: translateX(-100%);
829
+ }
830
+ @starting-style {
831
+ .drawer--left[open] {
832
+ transform: translateX(-100%);
833
+ }
834
+ }
835
+ .drawer--bottom {
836
+ inset: auto 0 0 0;
837
+ width: 100%;
838
+ height: auto;
839
+ max-height: 85dvh;
840
+ border-radius: var(--radius-lg) var(--radius-lg) 0 0;
841
+ transform: translateY(100%);
842
+ }
843
+ @starting-style {
844
+ .drawer--bottom[open] {
845
+ transform: translateY(100%);
846
+ }
847
+ }
848
+ .drawer--top {
849
+ inset: 0 0 auto 0;
850
+ width: 100%;
851
+ height: auto;
852
+ max-height: 85dvh;
853
+ border-radius: 0 0 var(--radius-lg) var(--radius-lg);
854
+ transform: translateY(-100%);
855
+ }
856
+ @starting-style {
857
+ .drawer--top[open] {
858
+ transform: translateY(-100%);
859
+ }
860
+ }
861
+ .drawer--top .drawer__panel {
862
+ max-height: 85dvh;
863
+ }
864
+ .drawer::backdrop {
865
+ background: var(--overlay);
866
+ opacity: 0;
867
+ transition:
868
+ opacity var(--duration) var(--ease),
869
+ overlay var(--duration) allow-discrete,
870
+ display var(--duration) allow-discrete;
871
+ }
872
+ .drawer[open]::backdrop {
873
+ opacity: 1;
874
+ }
875
+ @starting-style {
876
+ .drawer[open]::backdrop {
877
+ opacity: 0;
878
+ }
879
+ }
880
+ .drawer__panel {
881
+ display: flex;
882
+ flex-direction: column;
883
+ height: 100%;
884
+ max-height: inherit;
885
+ /* A dialog sits in the top layer, outside body's padding: Telegram's inset too. */
886
+ padding-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
887
+ }
888
+ .drawer--bottom .drawer__panel {
889
+ max-height: 85dvh;
890
+ }
891
+ .drawer__header {
892
+ display: flex;
893
+ align-items: center;
894
+ justify-content: space-between;
895
+ gap: var(--space-3);
896
+ min-height: var(--header-h);
897
+ padding: 0 var(--space-2) 0 var(--space-5);
898
+ border-bottom: 1px solid var(--line);
899
+ }
900
+ .drawer__title {
901
+ font-size: var(--text-lg);
902
+ }
903
+ .drawer__body {
904
+ flex: 1;
905
+ overflow-y: auto;
906
+ overscroll-behavior: contain;
907
+ padding: var(--space-4) var(--space-5);
908
+ }
909
+ .drawer__footer {
910
+ padding: var(--space-4) var(--space-5);
911
+ border-top: 1px solid var(--line);
912
+ }
913
+
914
+ /* Predictive search (a panel from the top). */
915
+ .predictive-search .drawer__body {
916
+ width: 100%;
917
+ max-width: 48rem;
918
+ margin-inline: auto;
919
+ }
920
+ .predictive-search__form {
921
+ position: relative;
922
+ margin-bottom: var(--space-4);
923
+ }
924
+ .predictive-search__icon {
925
+ position: absolute;
926
+ top: 50%;
927
+ left: var(--space-3);
928
+ color: var(--muted);
929
+ transform: translateY(-50%);
930
+ pointer-events: none;
931
+ }
932
+ .predictive-search__form input {
933
+ min-height: 52px;
934
+ padding-left: calc(var(--space-3) * 2 + 20px);
935
+ font-size: max(var(--text-lg), 16px);
936
+ }
937
+ .predictive-search__results {
938
+ display: flex;
939
+ flex-direction: column;
940
+ gap: var(--space-5);
941
+ }
942
+ .predictive-search__heading {
943
+ margin-bottom: var(--space-2);
944
+ color: var(--muted);
945
+ font-size: var(--text-sm);
946
+ }
947
+ .predictive-search__queries,
948
+ .predictive-search__collections,
949
+ .predictive-search__products {
950
+ margin: 0;
951
+ padding: 0;
952
+ list-style: none;
953
+ }
954
+ .predictive-search__queries,
955
+ .predictive-search__collections {
956
+ display: flex;
957
+ flex-wrap: wrap;
958
+ gap: var(--space-2);
959
+ }
960
+ .predictive-search__queries a,
961
+ .predictive-search__collections a {
962
+ display: inline-flex;
963
+ align-items: center;
964
+ min-height: 40px;
965
+ padding-inline: var(--space-4);
966
+ border: 1px solid var(--line-strong);
967
+ border-radius: var(--radius-pill);
968
+ text-decoration: none;
969
+ }
970
+ .predictive-search__products a {
971
+ display: flex;
972
+ align-items: center;
973
+ gap: var(--space-3);
974
+ padding: var(--space-2);
975
+ border-radius: var(--radius-sm);
976
+ text-decoration: none;
977
+ }
978
+ .predictive-search__option[aria-selected='true'] > a,
979
+ .predictive-search__option > a:hover {
980
+ background: var(--subtle);
981
+ border-color: var(--fg);
982
+ }
983
+ .predictive-search__thumb {
984
+ flex: none;
985
+ overflow: hidden;
986
+ width: 48px;
987
+ aspect-ratio: var(--media-ratio);
988
+ border-radius: var(--radius-sm);
989
+ background: var(--placeholder);
990
+ }
991
+ :root[data-image-ratio='natural'] .predictive-search__thumb {
992
+ aspect-ratio: 1;
993
+ }
994
+ .predictive-search__thumb img,
995
+ .predictive-search__thumb .media-fallback {
996
+ width: 100%;
997
+ height: 100%;
998
+ object-fit: cover;
999
+ }
1000
+ .predictive-search__product {
1001
+ display: flex;
1002
+ flex-direction: column;
1003
+ gap: var(--space-1);
1004
+ min-width: 0;
1005
+ font-size: var(--text-sm);
1006
+ }
1007
+ .predictive-search__empty {
1008
+ color: var(--muted);
1009
+ }
1010
+ .predictive-search__all {
1011
+ display: inline-flex;
1012
+ align-items: center;
1013
+ gap: var(--space-1);
1014
+ min-height: 44px;
1015
+ margin-top: var(--space-4);
1016
+ font-weight: var(--weight-medium);
1017
+ }
1018
+
1019
+ /* Facets: a left drawer below desktop width; laid out in place (a closed dialog shown) above. */
1020
+ .facets-button {
1021
+ display: inline-flex;
1022
+ align-items: center;
1023
+ gap: var(--space-2);
1024
+ min-height: 44px;
1025
+ padding: 0 var(--space-4);
1026
+ border-radius: var(--radius-pill);
1027
+ font-weight: var(--weight-medium);
1028
+ }
1029
+ .facets-button__count {
1030
+ display: grid;
1031
+ place-items: center;
1032
+ min-width: 1.25rem;
1033
+ height: 1.25rem;
1034
+ padding: 0 0.3rem;
1035
+ border-radius: var(--radius-pill);
1036
+ background: var(--fg);
1037
+ color: var(--bg);
1038
+ font-size: var(--text-xs);
1039
+ }
1040
+ .facets {
1041
+ display: flex;
1042
+ flex-direction: column;
1043
+ }
1044
+ .facet:first-child {
1045
+ border-top: 1px solid var(--line);
1046
+ }
1047
+ .facet__values {
1048
+ display: flex;
1049
+ flex-direction: column;
1050
+ max-height: 18rem;
1051
+ overflow-y: auto;
1052
+ }
1053
+ .facet__values .choice {
1054
+ min-height: 40px;
1055
+ }
1056
+ .facet__count {
1057
+ margin-left: auto;
1058
+ color: var(--muted);
1059
+ font-size: var(--text-sm);
1060
+ font-variant-numeric: tabular-nums;
1061
+ }
1062
+ .facet__price {
1063
+ display: grid;
1064
+ grid-template-columns: 1fr 1fr;
1065
+ gap: var(--space-3);
1066
+ }
1067
+ .facet--boolean {
1068
+ min-height: 3.5rem;
1069
+ border-bottom: 1px solid var(--line);
1070
+ font-weight: var(--weight-medium);
1071
+ }
1072
+ .facets__apply {
1073
+ margin-top: var(--space-5);
1074
+ }
1075
+ .facets-drawer .facets__apply {
1076
+ display: none;
1077
+ }
1078
+ @media (min-width: 990px) {
1079
+ .facets-button {
1080
+ display: none;
1081
+ }
1082
+ .drawer.facets-drawer {
1083
+ position: static;
1084
+ display: block;
1085
+ width: auto;
1086
+ height: auto;
1087
+ max-height: none;
1088
+ background: transparent;
1089
+ box-shadow: none;
1090
+ transform: none;
1091
+ transition: none;
1092
+ }
1093
+ .facets-drawer .drawer__header,
1094
+ .facets-drawer .drawer__footer {
1095
+ display: none;
1096
+ }
1097
+ .facets-drawer .drawer__body {
1098
+ padding: 0;
1099
+ overflow: visible;
1100
+ }
1101
+ .facets-drawer .facets__apply {
1102
+ display: inline-flex;
1103
+ }
1104
+ .facets-drawer form[data-enhanced] .facets__apply {
1105
+ display: none;
1106
+ }
1107
+ }
1108
+ }