@tansy/theme-storefront 0.0.0-stage → 0.1.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.
package/styles.css ADDED
@@ -0,0 +1,461 @@
1
+ /*
2
+ * Storefront theme. The source of theme.css: run `npm run build -w @tansy/theme-storefront`
3
+ * after changing a class name in a .tsx file or anything here. The site loads the built
4
+ * theme.css, so a site using the theme needs no Tailwind of its own.
5
+ *
6
+ * Every utility starts with `sf:` and there is no global reset, so nothing here reaches the
7
+ * dashboard or another plugin's page. Colours, radii and sizes are the --site-* tokens from
8
+ * index.ts, so the accent under Settings, or a site's own tokens, restyle the theme.
9
+ */
10
+
11
+ @layer theme, base, components, utilities;
12
+ @import "tailwindcss/theme.css" layer(theme) prefix(sf);
13
+ @import "tailwindcss/utilities.css" layer(utilities) source(none);
14
+
15
+ @source "./render.tsx";
16
+ @source "./client.tsx";
17
+ @source "./icons.tsx";
18
+
19
+ @theme inline {
20
+ --color-page: var(--site-color-page);
21
+ --color-surface: var(--site-color-surface);
22
+ --color-ink: var(--site-color-text);
23
+ --color-muted: var(--site-color-muted);
24
+ --color-line: var(--site-color-border);
25
+ --color-accent: var(--site-color-accent);
26
+ --color-on-accent: var(--site-color-on-accent);
27
+ --font-sans: var(--site-font-body);
28
+ --container-wide: var(--site-size-wide);
29
+ --container-measure: var(--site-size-measure);
30
+ --spacing-gutter: var(--site-space-gutter);
31
+ --radius-card: var(--site-radius-card);
32
+ --shadow-card: var(--site-shadow-card);
33
+ }
34
+
35
+ /* ------------------------------------------------------------ foundations */
36
+
37
+ /* The header runs edge to edge, so drop the browser's body margin, on this theme's pages only. */
38
+ body:has(.site-root[data-theme="storefront"]) { margin: 0; }
39
+
40
+ .sf-shell {
41
+ line-height: 1.5;
42
+ text-rendering: optimizeLegibility;
43
+ color-scheme: light;
44
+ }
45
+
46
+ @media (min-width: 64rem) {
47
+ .sf-shell { --site-space-gutter: 2.5rem; }
48
+ }
49
+
50
+ /* Dark colours, unless the site chose "light". Neutrals only: the accent stays the owner's. */
51
+ @media (prefers-color-scheme: dark) {
52
+ .sf-shell[data-scheme="auto"] {
53
+ --site-color-page: #0d0f0e;
54
+ --site-color-surface: #181b1a;
55
+ --site-color-text: #f1f3f2;
56
+ --site-color-muted: #9aa19e;
57
+ --site-color-border: #262b29;
58
+ --site-shadow-card: 0 18px 48px rgba(0, 0, 0, 0.45);
59
+ color-scheme: dark;
60
+ }
61
+ }
62
+
63
+ /* A reset for the theme's own markup, with no specificity, so any utility or plugin style wins. */
64
+ @layer base {
65
+ :where(.sf-shell) *, :where(.sf-shell) ::before, :where(.sf-shell) ::after { box-sizing: border-box; }
66
+ :where(.sf-shell) :where(h1, h2, h3, h4, p, figure, blockquote, dl, dd) { margin: 0; }
67
+ :where(.sf-shell) :where(h1, h2, h3, h4) { font-size: inherit; font-weight: inherit; }
68
+ :where(.sf-shell) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
69
+ :where(.sf-shell) :where(a) { color: inherit; text-decoration: inherit; }
70
+ :where(.sf-shell) :where(img, svg, video) { display: block; max-width: 100%; }
71
+ :where(.sf-shell) :where(button, input, select, textarea) { font: inherit; color: inherit; background: transparent; border: 0; margin: 0; padding: 0; }
72
+ :where(.sf-shell) :where(button, summary, [role="button"]) { cursor: pointer; }
73
+ :where(.sf-shell) :where(fieldset) { margin: 0; padding: 0; border: 0; min-width: 0; }
74
+ :where(.sf-shell) :where(summary) { list-style: none; }
75
+ :where(.sf-shell) :where(summary)::-webkit-details-marker { display: none; }
76
+ :where(.sf-shell) :where([hidden]:not([hidden="until-found"])) { display: none !important; }
77
+ }
78
+
79
+ /* ------------------------------------------------------------- components */
80
+
81
+ @layer components {
82
+ /* The site menu. Its markup is the CMS's <Menu>: nested lists of links. */
83
+ .sf-menu > ul { display: flex; align-items: center; gap: 0.25rem; }
84
+ .sf-menu li { position: relative; }
85
+ .sf-menu a {
86
+ display: inline-flex;
87
+ align-items: center;
88
+ padding: 0.5rem 1rem;
89
+ border-radius: 999px;
90
+ font-size: 0.9375rem;
91
+ font-weight: 500;
92
+ color: var(--site-color-muted);
93
+ transition: color 0.15s, background-color 0.15s;
94
+ }
95
+ .sf-menu a:hover, .sf-menu a:focus-visible { color: var(--site-color-text); background: var(--site-color-surface); outline: none; }
96
+ .sf-menu a[aria-current="page"] { color: var(--site-color-text); }
97
+ .sf-menu li > ul {
98
+ position: absolute;
99
+ inset-block-start: 100%;
100
+ inset-inline-start: 0;
101
+ z-index: 40;
102
+ display: grid;
103
+ min-width: 13rem;
104
+ margin-top: 0.5rem;
105
+ padding: 0.5rem;
106
+ border: 1px solid var(--site-color-border);
107
+ border-radius: 1.5rem;
108
+ background: var(--site-color-page);
109
+ box-shadow: var(--site-shadow-card);
110
+ opacity: 0;
111
+ visibility: hidden;
112
+ translate: 0 0.25rem;
113
+ transition: opacity 0.15s, translate 0.15s, visibility 0.15s;
114
+ }
115
+ /* Bridges the gap, so the pointer can reach the dropdown. */
116
+ .sf-menu li > ul::before { content: ""; position: absolute; inset: -0.75rem 0 auto; height: 0.75rem; }
117
+ .sf-menu li:hover > ul, .sf-menu li:focus-within > ul { opacity: 1; visibility: visible; translate: 0; }
118
+ .sf-menu li > ul a { display: flex; width: 100%; border-radius: 1rem; }
119
+
120
+ .sf-menu-stacked > ul { flex-direction: column; align-items: stretch; }
121
+ .sf-menu-stacked a { display: flex; font-size: 1rem; }
122
+ .sf-menu-stacked li > ul,
123
+ .sf-menu-footer li > ul { position: static; margin: 0; padding: 0 0 0 1rem; border: 0; box-shadow: none; background: none; opacity: 1; visibility: visible; translate: 0; }
124
+ .sf-menu-footer > ul { flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 0.5rem; }
125
+ .sf-menu-footer a { padding-inline: 0.75rem; }
126
+
127
+ /* Icon buttons that open a panel, such as the language menu. */
128
+ .sf-popover > summary { list-style: none; }
129
+ .sf-popover[open] > summary { border-color: var(--site-color-text); }
130
+
131
+ .sf-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 3.5rem; color: var(--site-color-muted); font-size: 0.875rem; }
132
+ .sf-pager a {
133
+ display: inline-flex;
134
+ align-items: center;
135
+ height: 2.75rem;
136
+ padding: 0 1.25rem;
137
+ border: 1px solid var(--site-color-border);
138
+ border-radius: 999px;
139
+ color: var(--site-color-text);
140
+ font-weight: 500;
141
+ transition: border-color 0.15s;
142
+ }
143
+ .sf-pager a:hover { border-color: var(--site-color-text); }
144
+
145
+ /* Owners' writing: page bodies, product descriptions and the shop page's introduction. */
146
+ .sf-prose { color: var(--site-color-text); line-height: 1.75; }
147
+ .sf-prose > * + * { margin-top: 1.25em; }
148
+ .sf-prose :where(h2) { margin-top: 2em; font-size: 1.5rem; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
149
+ .sf-prose :where(h3) { margin-top: 1.75em; font-size: 1.25rem; font-weight: 600; }
150
+ .sf-prose :where(a) { color: var(--site-color-accent); text-decoration: underline; text-underline-offset: 0.2em; }
151
+ .sf-prose :where(ul) { list-style: disc; padding-inline-start: 1.25em; }
152
+ .sf-prose :where(ol) { list-style: decimal; padding-inline-start: 1.25em; }
153
+ .sf-prose :where(li + li) { margin-top: 0.375em; }
154
+ .sf-prose :where(blockquote) { padding-inline-start: 1.25em; border-inline-start: 3px solid var(--site-color-accent); color: var(--site-color-muted); font-size: 1.125em; }
155
+ .sf-prose :where(img) { border-radius: var(--site-radius-card); }
156
+ .sf-prose :where(code) { padding: 0.15em 0.4em; border-radius: 0.375rem; background: var(--site-color-surface); font-size: 0.9em; }
157
+ .sf-prose :where(pre) { overflow-x: auto; padding: 1.25rem; border-radius: 1.25rem; background: var(--site-color-surface); }
158
+ .sf-prose :where(pre code) { padding: 0; background: none; }
159
+ .sf-prose :where(hr) { border: 0; border-top: 1px solid var(--site-color-border); }
160
+ }
161
+
162
+ /* ------------------------------------------------- feeling like an app */
163
+
164
+ /*
165
+ * Touch: no grey flash on tap, no wait for a double tap, and things that answer a press by
166
+ * giving way a little. Rows that scroll sideways snap and keep the page from moving with them.
167
+ */
168
+ .sf-shell { -webkit-tap-highlight-color: transparent; }
169
+ .sf-shell :where(a, button, summary, label, input, select) { touch-action: manipulation; }
170
+ .sf-shell :where(.sf-press, .sf-tab) { transition-property: transform, color; transition-duration: 0.15s; }
171
+ .sf-shell :where(.sf-press, .sf-tab):active { transform: scale(0.97); }
172
+ .sf-chips, .sf-track { scrollbar-width: none; overscroll-behavior-x: contain; }
173
+ /* A back arrow returns to a list at a product's card: it lands a third of the way down, not under the header. */
174
+ .sf-card { scroll-margin-block: 30dvh; }
175
+ .sf-chips::-webkit-scrollbar, .sf-track::-webkit-scrollbar { display: none; }
176
+ .sf-chips { scroll-snap-type: x proximity; }
177
+ .sf-chips > ul > li, .sf-chips > li { scroll-snap-align: start; scroll-margin-inline: var(--site-space-gutter); }
178
+ .sf-track { -webkit-overflow-scrolling: touch; }
179
+
180
+ /* The tab bar's own count, over its icon rather than in the corner of the tab. */
181
+ .sf-tabbar .shop-count { inset-block-start: 0.25rem; inset-inline-end: calc(50% - 1.5rem); }
182
+ .sf-tabbar { padding-bottom: env(safe-area-inset-bottom); }
183
+ /* The cart's tab is the shop's CartLink, which takes no aria-current, so the cart page marks it here. */
184
+ .sf-shell[data-page="shop-cart"] .sf-tab-cart { color: var(--site-color-accent); }
185
+ /* Its frosted glass is a layer behind it: backdrop-filter on the bar itself would pin the menu sheet, which is fixed, to the bar instead of the screen. */
186
+ .sf-tabbar::before {
187
+ content: "";
188
+ position: absolute;
189
+ inset: 0;
190
+ z-index: -1;
191
+ background: color-mix(in srgb, var(--site-color-page) 85%, transparent);
192
+ -webkit-backdrop-filter: blur(24px);
193
+ backdrop-filter: blur(24px);
194
+ }
195
+
196
+ /* The dot under the current tab, which slides between tabs as pages change. */
197
+ .sf-tab-dot {
198
+ position: absolute;
199
+ inset-block-end: 0.2rem;
200
+ inset-inline-start: calc(50% - 0.6rem);
201
+ width: 1.2rem;
202
+ height: 0.2rem;
203
+ border-radius: 999px;
204
+ background: var(--site-color-accent);
205
+ }
206
+
207
+ /* A product's picture zoomed to fill the screen, over a frosted page. */
208
+ .sf-zoom {
209
+ background: color-mix(in srgb, var(--site-color-page) 92%, transparent);
210
+ -webkit-backdrop-filter: blur(20px);
211
+ backdrop-filter: blur(20px);
212
+ touch-action: pinch-zoom;
213
+ }
214
+
215
+ /* Payments' Subscribe and Billing buttons, in the theme's shape. */
216
+ .sf-shell .sf-plan-action .payments-button {
217
+ width: 100%;
218
+ height: 3.25rem;
219
+ border: 0;
220
+ border-radius: 999px;
221
+ background: var(--site-color-accent);
222
+ color: var(--site-color-on-accent);
223
+ font-weight: 600;
224
+ cursor: pointer;
225
+ transition: filter 0.15s, transform 0.15s;
226
+ }
227
+ .sf-shell .sf-plan-action .payments-button:hover { filter: brightness(1.1); }
228
+ .sf-shell .sf-plan-action .payments-button:active { transform: scale(0.98); }
229
+ .sf-shell .sf-plan-action .payments-error { margin-top: 0.5rem; font-size: 0.875rem; color: var(--site-color-muted); }
230
+
231
+ /* The menu as a sheet that rises from the bottom, over a dimmed page. Tapping the page closes it. */
232
+ .sf-sheet > summary::before {
233
+ content: "";
234
+ position: fixed;
235
+ inset: 0;
236
+ z-index: 45;
237
+ background: rgb(0 0 0 / 0.35);
238
+ opacity: 0;
239
+ pointer-events: none;
240
+ transition: opacity 0.25s;
241
+ }
242
+ .sf-sheet[open] > summary::before { opacity: 1; pointer-events: auto; }
243
+ .sf-sheet-panel { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
244
+ .sf-sheet[open] > .sf-sheet-panel { animation: sf-sheet-up 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }
245
+ .sf-sheet-panel a { padding-block: 0.875rem; font-size: 1.0625rem; }
246
+ @keyframes sf-sheet-up { from { transform: translateY(100%); } }
247
+
248
+ @media (max-width: 63.99rem) {
249
+ /* Room at the bottom for the tab bar, so nothing sits under it. */
250
+ .sf-shell { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
251
+ /* The cart is in the tab bar, except on a product page, which has no tab bar, as a pushed screen in an app has none. */
252
+ .sf-shell:not([data-page="shop-products"]) .sf-header-cart { display: none; }
253
+ .sf-shell[data-page="shop-products"] .sf-tabbar { display: none; }
254
+ /* A product's buttons pinned to the bottom of the screen instead. */
255
+ .sf-shell[data-page="shop-products"] { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
256
+ .sf-buybar {
257
+ position: fixed;
258
+ inset-inline: 0;
259
+ inset-block-end: 0;
260
+ z-index: 40;
261
+ padding: 0.75rem var(--site-space-gutter) calc(0.75rem + env(safe-area-inset-bottom));
262
+ border-top: 1px solid color-mix(in srgb, var(--site-color-border) 70%, transparent);
263
+ background: color-mix(in srgb, var(--site-color-page) 88%, transparent);
264
+ -webkit-backdrop-filter: blur(24px);
265
+ backdrop-filter: blur(24px);
266
+ }
267
+ .sf-shell footer { margin-top: 4rem; }
268
+ }
269
+
270
+ /*
271
+ * Moving between pages. The layout switches cross-document view transitions on (render.tsx);
272
+ * these say how they look. Each starts at html:has(.sf-shell), so they apply only to this
273
+ * theme's pages. The header and tab bar hold still while the page beneath them changes, a
274
+ * product's picture flies between its card and its page, and the bars that come and go slide.
275
+ */
276
+ @media (prefers-reduced-motion: no-preference) {
277
+ html:has(.sf-shell)::view-transition-old(root) { animation: 160ms cubic-bezier(0.4, 0, 1, 1) both sf-page-out; }
278
+ html:has(.sf-shell)::view-transition-new(root) { animation: 340ms cubic-bezier(0.2, 0.8, 0.2, 1) both sf-page-in; }
279
+ /* The picture flies above everything else, so it never passes under the header or a bar. */
280
+ html:has(.sf-shell)::view-transition-group(*.sf-product) { z-index: 10; animation-duration: 460ms; animation-timing-function: cubic-bezier(0.2, 0.9, 0.1, 1); }
281
+ /* The chosen category chip and the tab dot slide to their new place. */
282
+ html:has(.sf-shell)::view-transition-group(sf-chip),
283
+ html:has(.sf-shell)::view-transition-group(sf-tab-dot) { animation-duration: 380ms; animation-timing-function: cubic-bezier(0.3, 1.25, 0.4, 1); }
284
+ html:has(.sf-shell)::view-transition-old(*.sf-product),
285
+ html:has(.sf-shell)::view-transition-new(*.sf-product) { height: 100%; object-fit: contain; }
286
+ html:has(.sf-shell)::view-transition-new(sf-tabbar):only-child,
287
+ html:has(.sf-shell)::view-transition-new(sf-buybar):only-child { animation: 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both sf-bar-in; }
288
+ html:has(.sf-shell)::view-transition-old(sf-tabbar):only-child,
289
+ html:has(.sf-shell)::view-transition-old(sf-buybar):only-child { animation: 200ms ease-in both sf-bar-out; }
290
+
291
+ /*
292
+ * Zooming a picture on its page (a same-document transition of type sf-zoom): the page beneath
293
+ * only crossfades to the frosted backdrop, and nothing else takes part, so no named header, bar
294
+ * or other product paints over the backdrop while the picture grows.
295
+ */
296
+ html:active-view-transition-type(sf-zoom)::view-transition-old(root) { animation: 260ms ease both sf-fade-out; }
297
+ html:active-view-transition-type(sf-zoom)::view-transition-new(root) { animation: 260ms ease both sf-fade-in; }
298
+ html:active-view-transition-type(sf-zoom) :is(.sf-header, .sf-tabbar, .sf-buybar, .sf-vt-product:not(.sf-zoom-target)) { view-transition-name: none !important; }
299
+ html:active-view-transition-type(sf-zoom)::view-transition-group(*) { animation-duration: 380ms; animation-timing-function: cubic-bezier(0.2, 0.9, 0.1, 1); }
300
+
301
+ .sf-header { view-transition-name: sf-header; }
302
+ .sf-vt-product { view-transition-class: sf-product; }
303
+ @media (max-width: 63.99rem) {
304
+ .sf-tabbar { view-transition-name: sf-tabbar; }
305
+ .sf-buybar { view-transition-name: sf-buybar; }
306
+ }
307
+ }
308
+ @keyframes sf-page-out { to { opacity: 0; transform: scale(0.985); } }
309
+ @keyframes sf-page-in { from { opacity: 0; transform: translateY(1.25rem); } }
310
+ @keyframes sf-fade-out { to { opacity: 0; } }
311
+ @keyframes sf-fade-in { from { opacity: 0; } }
312
+ @keyframes sf-bar-in { from { transform: translateY(100%); } }
313
+ @keyframes sf-bar-out { to { transform: translateY(100%); } }
314
+
315
+ /* ------------------------------------------------------- the shop's parts */
316
+
317
+ /*
318
+ * The cart, orders and the shop's blocks are the shop plugin's components, styled by its
319
+ * shop.css. These rules sit outside any layer, as shop.css does, and start at .sf-shell so
320
+ * they win over it whichever file loads first.
321
+ */
322
+
323
+ .sf-shell .shop-count {
324
+ position: absolute;
325
+ inset-block-start: -0.3rem;
326
+ inset-inline-end: -0.3rem;
327
+ display: grid;
328
+ place-items: center;
329
+ min-width: 1.375rem;
330
+ height: 1.375rem;
331
+ padding: 0 0.3rem;
332
+ border: 2px solid var(--site-color-page);
333
+ border-radius: 999px;
334
+ background: var(--site-color-accent);
335
+ color: var(--site-color-on-accent);
336
+ font-size: 0.6875rem;
337
+ font-weight: 600;
338
+ line-height: 1;
339
+ }
340
+
341
+ .sf-shell .shop-button {
342
+ display: inline-flex;
343
+ align-items: center;
344
+ justify-content: center;
345
+ height: 3.5rem;
346
+ padding: 0 2rem;
347
+ border-radius: 999px;
348
+ font-weight: 600;
349
+ transition: filter 0.15s, transform 0.15s;
350
+ }
351
+ .sf-shell .shop-button:not(:disabled):hover { filter: brightness(1.1); }
352
+ .sf-shell .shop-button:not(:disabled):active { transform: scale(0.98); }
353
+ .sf-shell .shop-button:focus-visible { outline: 2px solid var(--site-color-accent); outline-offset: 2px; }
354
+ .sf-shell .shop-link-button { font-size: 0.875rem; color: var(--site-color-muted); text-underline-offset: 0.2em; }
355
+ .sf-shell .shop-link-button:hover { color: var(--site-color-text); }
356
+ .sf-shell .shop-muted { color: var(--site-color-muted); }
357
+ .sf-shell .shop-notice { padding: 1rem 1.25rem; border-radius: 1.25rem; border-color: var(--site-color-border); }
358
+ .sf-shell .shop-field input,
359
+ .sf-shell .shop-field select {
360
+ height: 3rem;
361
+ padding: 0 1rem;
362
+ border: 1px solid var(--site-color-border);
363
+ border-radius: 1rem;
364
+ background: var(--site-color-page);
365
+ }
366
+ .sf-shell .shop-field input:focus,
367
+ .sf-shell .shop-field select:focus,
368
+ .sf-shell .shop-qty input:focus { outline: none; border-color: var(--site-color-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--site-color-accent) 15%, transparent); }
369
+ .sf-shell .shop-field > span { font-size: 0.875rem; font-weight: 500; color: var(--site-color-muted); }
370
+
371
+ /* The cart: lines on the left, and on wide screens a panel on the right with where it goes and the total. */
372
+ .sf-cart .shop-cart { position: relative; isolation: isolate; gap: 1.5rem; }
373
+ .sf-cart .shop-lines { border-top: 1px solid var(--site-color-border); }
374
+ .sf-cart .shop-line {
375
+ grid-template-columns: 6rem minmax(0, 1fr) auto;
376
+ grid-template-areas: "thumb main total" "thumb qty remove";
377
+ gap: 0.75rem 1.5rem;
378
+ padding: 1.5rem 0;
379
+ border-color: var(--site-color-border);
380
+ }
381
+ .sf-cart .shop-line .shop-thumb {
382
+ width: 6rem;
383
+ height: 7.5rem;
384
+ padding: 0.5rem;
385
+ border-radius: 999px;
386
+ object-fit: contain;
387
+ background: var(--site-color-surface);
388
+ }
389
+ .sf-cart .shop-line-main { align-self: end; }
390
+ .sf-cart .shop-line-main a { color: var(--site-color-text); font-size: 1.125rem; font-weight: 600; text-decoration: none; }
391
+ .sf-cart .shop-line-main a:hover { color: var(--site-color-accent); }
392
+ .sf-cart .shop-line-total { align-self: end; font-size: 1.25rem; font-weight: 600; }
393
+ .sf-cart .shop-qty { align-self: start; }
394
+ .sf-cart .shop-qty input {
395
+ width: 5.5rem;
396
+ height: 2.75rem;
397
+ padding: 0 0.75rem;
398
+ border: 1px solid transparent;
399
+ border-radius: 999px;
400
+ background: var(--site-color-surface);
401
+ text-align: center;
402
+ font-weight: 600;
403
+ }
404
+ .sf-cart .shop-line .shop-link-button { align-self: start; padding-top: 0.6rem; }
405
+ .sf-cart .shop-address { gap: 1rem; }
406
+ .sf-cart .shop-address legend { margin-bottom: 1rem; font-size: 1.125rem; font-weight: 600; }
407
+ .sf-cart .shop-totals { gap: 0.625rem; }
408
+ .sf-cart .shop-totals dt { color: var(--site-color-muted); }
409
+ .sf-cart .shop-grand { margin-top: 0.5rem; padding-top: 1rem; border-color: var(--site-color-border); font-size: 1.375rem; }
410
+ .sf-cart .shop-grand dt { color: var(--site-color-text); }
411
+ .sf-cart .shop-cart > .shop-button { width: 100%; }
412
+
413
+ @media (min-width: 64rem) {
414
+ /* No row gap: the lines span every row, and empty rows would each add one. */
415
+ .sf-cart .shop-cart { grid-template-columns: minmax(0, 1fr) 26rem; column-gap: 4rem; row-gap: 0; align-items: start; }
416
+ .sf-cart .shop-cart > .shop-lines { grid-column: 1; grid-row: 1 / span 12; }
417
+ .sf-cart .shop-cart > :not(.shop-lines) { grid-column: 2; margin: 1.25rem 2rem 0; }
418
+ .sf-cart .shop-cart > .shop-lines + * { margin-top: 2rem; }
419
+ .sf-cart .shop-cart > :last-child { margin-bottom: 2rem; }
420
+ .sf-cart .shop-cart > .shop-button { width: auto; }
421
+ /* The panel behind the right-hand column. Positioned, so it takes no grid cell. */
422
+ .sf-cart .shop-cart::before {
423
+ content: "";
424
+ position: absolute;
425
+ grid-column: 2;
426
+ inset: 0;
427
+ z-index: -1;
428
+ border-radius: var(--site-radius-card);
429
+ background: var(--site-color-surface);
430
+ }
431
+ .sf-cart .shop-cart .shop-field input,
432
+ .sf-cart .shop-cart .shop-field select { background: var(--site-color-page); }
433
+ }
434
+
435
+ @media (max-width: 560px) {
436
+ .sf-cart .shop-line { grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 0.5rem 1rem; }
437
+ .sf-cart .shop-line .shop-thumb { width: 4.5rem; height: 5.5rem; }
438
+ }
439
+
440
+ /* Orders. */
441
+ .sf-orders .shop-orders { gap: 1.25rem; }
442
+ .sf-orders .shop-order {
443
+ gap: 1rem;
444
+ padding: 1.75rem;
445
+ border-color: var(--site-color-border);
446
+ border-radius: var(--site-radius-card);
447
+ background: var(--site-color-page);
448
+ }
449
+ .sf-orders .shop-order h2 { font-size: 1.25rem; font-weight: 600; }
450
+ .sf-orders .shop-state { padding: 0.125rem 0.75rem; font-weight: 500; }
451
+ .sf-orders .shop-order-lines li { padding: 0.375rem 0; border-bottom: 1px dashed var(--site-color-border); }
452
+ .sf-orders .shop-grand { border-color: var(--site-color-border); }
453
+ .sf-orders .shop-downloads a { color: var(--site-color-accent); font-weight: 500; }
454
+
455
+ /* The shop's product grid block, on any page. */
456
+ .sf-shell .shop-block h2 { margin-bottom: 1.5rem; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.01em; }
457
+ .sf-shell .shop-grid { gap: 2.5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); list-style: none; padding: 0; }
458
+ .sf-shell .shop-card a { gap: 1rem; text-decoration: none; }
459
+ .sf-shell .shop-card-image { aspect-ratio: 4 / 5; padding: 12%; border-radius: 3rem; object-fit: contain; background: var(--site-color-surface); }
460
+ .sf-shell .shop-card-title { font-weight: 500; }
461
+ .sf-shell .shop-card .shop-price { font-size: 1.125rem; font-weight: 600; }