﻿/* Generated from Styles/shop by ShopCart.Web.csproj. Do not edit. */
/* Layer order. Unlayered host CSS always beats every rule below, so hosts never need to raise specificity. */
@layer shop.reset, shop.base, shop.components, shop.utilities;
/* Design tokens (spec §9.2). Brand tokens are overridden per site (Phase 2 emits them from settings);
structural tokens are overridable with host CSS, e.g. .shop-root { --shop-radius: 0; } */
@layer shop.base {
:where(.shop-root) {
/* Brand */
--shop-color-primary: #1f4e79;
--shop-color-secondary: #4a6fa5;
--shop-color-accent: #d9822b;
--shop-color-text: #1f2328;
--shop-color-bg: #ffffff;
--shop-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--shop-font-heading: var(--shop-font-body);
--shop-radius: 6px;
/* Semantic */
--shop-color-success: #1a7f37;
--shop-color-warning: #9a6700;
--shop-color-danger: #cf222e;
--shop-color-info: var(--shop-color-primary);
/* Derived from brand tokens, so admins set 5 colours, not 20 */
--shop-color-primary-hover: color-mix(in oklch, var(--shop-color-primary) 85%, black);
--shop-color-on-primary: #ffffff;
--shop-color-border: color-mix(in oklch, var(--shop-color-text) 15%, var(--shop-color-bg));
--shop-color-muted: color-mix(in oklch, var(--shop-color-text) 65%, var(--shop-color-bg));
--shop-color-surface: color-mix(in oklch, var(--shop-color-text) 4%, var(--shop-color-bg));
--shop-color-success-bg: color-mix(in oklch, var(--shop-color-success) 10%, var(--shop-color-bg));
--shop-color-warning-bg: color-mix(in oklch, var(--shop-color-warning) 10%, var(--shop-color-bg));
--shop-color-danger-bg: color-mix(in oklch, var(--shop-color-danger) 10%, var(--shop-color-bg));
--shop-color-info-bg: color-mix(in oklch, var(--shop-color-info) 10%, var(--shop-color-bg));
/* Structural */
--shop-space-1: 0.25rem;
--shop-space-2: 0.5rem;
--shop-space-3: 0.75rem;
--shop-space-4: 1rem;
--shop-space-5: 1.5rem;
--shop-space-6: 3rem;
--shop-font-size-sm: 0.875rem;
--shop-font-size-base: 1rem;
--shop-font-size-lg: 1.25rem;
--shop-font-size-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
--shop-line-height: 1.5;
--shop-card-min: 14rem;
--shop-btn-padding: 0.625rem 1.25rem;
--shop-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
--shop-border: 1px solid var(--shop-color-border);
--shop-container-max: 75rem;
--shop-focus-ring: 2px solid var(--shop-color-primary);
--shop-touch-min: 44px;
}
}
/* Reset scoped to .shop-root: ShopCart never restyles the host page. */
@layer shop.reset {
:where(.shop-root),
:where(.shop-root) *,
:where(.shop-root) *::before,
:where(.shop-root) *::after {
box-sizing: border-box;
}
:where(.shop-root) :where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd) {
margin: 0;
}
:where(.shop-root) :where(ul, ol)[class] {
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-root) :where(img, svg, video) {
display: block;
max-width: 100%;
height: auto;
}
:where(.shop-root) :where(input, button, textarea, select) {
font: inherit;
color: inherit;
}
}
@layer shop.base {
:where(.shop-root) {
color: var(--shop-color-text);
background-color: var(--shop-color-bg);
font-family: var(--shop-font-body);
font-size: var(--shop-font-size-base);
line-height: var(--shop-line-height);
}
:where(.shop-root) :where(h1, h2, h3, h4) {
font-family: var(--shop-font-heading);
line-height: 1.2;
}
:where(.shop-root) :where(h1) {
font-size: var(--shop-font-size-xl);
}
:where(.shop-root) :where(h2) {
font-size: var(--shop-font-size-lg);
}
:where(.shop-root) :where(a) {
color: var(--shop-color-primary);
text-underline-offset: 0.15em;
}
:where(.shop-root) :where(a:hover) {
color: var(--shop-color-primary-hover);
}
:where(.shop-root) :focus-visible {
outline: var(--shop-focus-ring);
outline-offset: 2px;
}
:where(.shop-container) {
width: 100%;
max-width: var(--shop-container-max);
margin-inline: auto;
padding-inline: var(--shop-space-4);
padding-block: var(--shop-space-5);
}
@media (min-width: 960px) {
:where(.shop-container) {
padding-inline: var(--shop-space-5);
}
}
@media (prefers-reduced-motion: reduce) {
:where(.shop-root) *,
:where(.shop-root) *::before,
:where(.shop-root) *::after {
animation-duration: 0.01ms;
animation-iteration-count: 1;
transition-duration: 0.01ms;
scroll-behavior: auto;
}
}
}
/* Layout helpers (spec §9.1: mobile first, breakpoints 640 / 960 / 1200). */
@layer shop.components {
:where(.shop-grid) {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-min), 1fr));
gap: var(--shop-space-5);
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-cluster) {
display: flex;
flex-wrap: wrap;
gap: var(--shop-space-2);
align-items: center;
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-split) {
display: grid;
gap: var(--shop-space-5);
}
@media (min-width: 960px) {
:where(.shop-split) {
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: var(--shop-space-6);
}
}
/* Standalone header (Mode B) */
:where(.shop-site-header) {
border-block-end: var(--shop-border);
background-color: var(--shop-color-bg);
}
:where(.shop-site-header__inner) {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: var(--shop-space-3);
padding-block: var(--shop-space-3);
}
:where(.shop-site-header__brand) {
font-family: var(--shop-font-heading);
font-size: var(--shop-font-size-lg);
font-weight: 700;
color: var(--shop-color-text);
text-decoration: none;
}
:where(.shop-site-header__links) {
flex: 1 1 auto;
}
:where(.shop-site-header__links a) {
color: var(--shop-color-text);
}
/* Skip link: off screen until it has focus (WCAG 2.4.1). */
:where(.shop-skip-link) {
position: absolute;
inset-inline-start: var(--shop-space-3);
inset-block-start: var(--shop-space-3);
padding: var(--shop-space-2) var(--shop-space-3);
background-color: var(--shop-color-bg);
color: var(--shop-color-text);
border: var(--shop-border);
border-radius: var(--shop-radius);
transform: translateY(-300%);
}
:where(.shop-skip-link:focus-visible) {
transform: none;
z-index: 10;
}
/* Standalone footer (Mode B) */
:where(.shop-site-footer) {
margin-block-start: var(--shop-space-6);
padding-block: var(--shop-space-5);
border-block-start: var(--shop-border);
font-size: var(--shop-font-size-sm);
color: var(--shop-color-muted);
}
:where(.shop-category-list) {
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
gap: var(--shop-space-3);
}
:where(.shop-category-tile) {
display: flex;
align-items: center;
min-height: var(--shop-touch-min);
padding: var(--shop-space-3) var(--shop-space-4);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
color: var(--shop-color-text);
font-weight: 600;
text-decoration: none;
}
:where(.shop-category-tile:hover) {
border-color: var(--shop-color-primary);
color: var(--shop-color-primary);
}
:where(.shop-listing-controls) {
display: flex;
flex-wrap: wrap;
align-items: end;
gap: var(--shop-space-3) var(--shop-space-4);
}
:where(.shop-listing-controls__count) {
margin-inline-start: auto;
}
}
@layer shop.components {
:where(.shop-btn) {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--shop-space-2);
min-height: var(--shop-touch-min);
padding: var(--shop-btn-padding);
border: 1px solid var(--shop-color-primary);
border-radius: var(--shop-radius);
background-color: var(--shop-color-bg);
color: var(--shop-color-primary);
font-weight: 600;
line-height: 1.2;
text-decoration: none;
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease;
}
:where(.shop-btn:hover) {
background-color: var(--shop-color-surface);
}
:where(.shop-btn--primary) {
background-color: var(--shop-color-primary);
color: var(--shop-color-on-primary);
}
:where(.shop-btn--primary:hover) {
background-color: var(--shop-color-primary-hover);
border-color: var(--shop-color-primary-hover);
}
:where(.shop-btn--danger) {
border-color: var(--shop-color-danger);
background-color: var(--shop-color-danger);
color: var(--shop-color-on-primary);
}
:where(.shop-btn--secondary) {
border-color: var(--shop-color-border);
color: var(--shop-color-text);
}
:where(.shop-btn--link) {
border-color: transparent;
background-color: transparent;
text-decoration: underline;
}
:where(.shop-btn:disabled, .shop-btn[aria-disabled="true"]) {
opacity: 0.55;
cursor: not-allowed;
}
:where(.shop-icon) {
width: 1.25em;
height: 1.25em;
flex: none;
}
}
@layer shop.components {
:where(.shop-field) {
display: grid;
gap: var(--shop-space-1);
}
:where(.shop-field__label) {
font-weight: 600;
}
:where(.shop-input, .shop-select) {
min-height: var(--shop-touch-min);
padding: var(--shop-space-2) var(--shop-space-3);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-bg);
color: var(--shop-color-text);
}
:where(.shop-check) {
display: inline-flex;
align-items: center;
gap: var(--shop-space-2);
min-height: var(--shop-touch-min);
cursor: pointer;
}
:where(.shop-check input) {
width: 1.25rem;
height: 1.25rem;
accent-color: var(--shop-color-primary);
}
/* Option radios styled as chips; the native input stays focusable and visible to assistive tech. */
:where(.shop-radio-group) {
margin: 0;
padding: 0;
border: 0;
min-inline-size: 0;
}
:where(.shop-radio-group legend) {
margin-block-end: var(--shop-space-2);
padding: 0;
}
:where(.shop-option) {
position: relative;
}
:where(.shop-option input) {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
margin: 0;
opacity: 0;
cursor: pointer;
}
:where(.shop-option label) {
display: inline-flex;
align-items: center;
gap: var(--shop-space-1);
min-height: var(--shop-touch-min);
padding: var(--shop-space-2) var(--shop-space-4);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-bg);
}
:where(.shop-option input:checked + label) {
border-color: var(--shop-color-primary);
box-shadow: inset 0 0 0 1px var(--shop-color-primary);
font-weight: 600;
}
:where(.shop-option input:focus-visible + label) {
outline: var(--shop-focus-ring);
outline-offset: 2px;
}
:where(.shop-option__note) {
color: var(--shop-color-muted);
font-size: var(--shop-font-size-sm);
font-weight: 400;
}
:where(.shop-options) {
display: grid;
gap: var(--shop-space-4);
}
}
@layer shop.components {
:where(.shop-breadcrumbs ol) {
display: flex;
flex-wrap: wrap;
gap: var(--shop-space-1) var(--shop-space-2);
margin: 0;
padding: 0;
list-style: none;
font-size: var(--shop-font-size-sm);
color: var(--shop-color-muted);
}
:where(.shop-breadcrumbs li + li)::before {
content: "/";
margin-inline-end: var(--shop-space-2);
color: var(--shop-color-border);
}
:where(.shop-pagination ul) {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: var(--shop-space-2);
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-pagination a, .shop-pagination [aria-current="page"]) {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: var(--shop-touch-min);
min-height: var(--shop-touch-min);
padding: 0 var(--shop-space-3);
border: var(--shop-border);
border-radius: var(--shop-radius);
text-decoration: none;
}
:where(.shop-pagination [aria-current="page"]) {
background-color: var(--shop-color-primary);
border-color: var(--shop-color-primary);
color: var(--shop-color-on-primary);
font-weight: 600;
}
:where(.shop-search) {
display: flex;
gap: var(--shop-space-2);
max-width: 32rem;
width: 100%;
}
:where(.shop-search__input) {
flex: 1 1 auto;
min-width: 0;
}
}
@layer shop.components {
/* Product cards */
:where(.shop-card) {
display: grid;
gap: var(--shop-space-2);
height: 100%;
}
:where(.shop-card__link) {
display: grid;
gap: var(--shop-space-2);
color: var(--shop-color-text);
text-decoration: none;
}
:where(.shop-card__link:hover .shop-card__title) {
color: var(--shop-color-primary);
text-decoration: underline;
}
:where(.shop-card__media) {
aspect-ratio: 1 / 1;
overflow: hidden;
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-card__media img, .shop-gallery__figure img) {
width: 100%;
height: 100%;
object-fit: contain;
}
:where(.shop-card__placeholder, .shop-gallery__placeholder) {
display: block;
width: 100%;
height: 100%;
aspect-ratio: 1 / 1;
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-card__title) {
margin: 0;
font-size: var(--shop-font-size-base);
font-weight: 600;
}
/* Prices and stock */
:where(.shop-price) {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: var(--shop-space-2);
margin: 0;
}
:where(.shop-price__now) {
font-weight: 700;
}
:where(.shop-price--large .shop-price__now) {
font-size: var(--shop-font-size-xl);
}
:where(.shop-price__was) {
color: var(--shop-color-muted);
}
:where(.shop-stock) {
margin: 0;
font-size: var(--shop-font-size-sm);
font-weight: 600;
}
:where(.shop-stock--in) {
color: var(--shop-color-success);
}
:where(.shop-stock--low, .shop-stock--backorder) {
color: var(--shop-color-warning);
}
:where(.shop-stock--out) {
color: var(--shop-color-danger);
}
/* Product page */
:where(.shop-product) {
display: grid;
gap: var(--shop-space-5);
}
@media (min-width: 960px) {
:where(.shop-product) {
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
gap: var(--shop-space-6);
align-items: start;
}
}
:where(.shop-product__title) {
margin: 0;
}
:where(.shop-gallery) {
display: grid;
gap: var(--shop-space-3);
}
:where(.shop-gallery__figure) {
margin: 0;
aspect-ratio: 1 / 1;
overflow: hidden;
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-gallery__thumbs) {
display: flex;
flex-wrap: wrap;
gap: var(--shop-space-2);
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-gallery__thumb) {
display: block;
border: 2px solid transparent;
border-radius: var(--shop-radius);
overflow: hidden;
}
:where(.shop-gallery__thumb[aria-current="true"]) {
border-color: var(--shop-color-primary);
}
:where(.shop-gallery__thumb img) {
width: 80px;
height: 80px;
object-fit: cover;
}
/* Sanitised rich text from the admin */
:where(.shop-prose) > * + * {
margin-block-start: var(--shop-space-3);
}
:where(.shop-prose) :where(ul, ol) {
padding-inline-start: var(--shop-space-5);
}
:where(.shop-prose) :where(blockquote) {
margin-inline: 0;
padding-inline-start: var(--shop-space-4);
border-inline-start: 3px solid var(--shop-color-border);
color: var(--shop-color-muted);
}
}
/* Gallery (Phase 2b): artist line, price on application, availability markers, details list, delivery, enquiry form,
listing filter chips. */
@layer shop.components {
:where(.shop-card__artist, .shop-product__artist) {
margin: 0;
color: var(--shop-color-muted);
}
:where(.shop-product__artist) {
font-size: var(--shop-font-size-lg);
}
:where(.shop-price__poa) {
font-style: italic;
}
/* Reserved / NFS / Sold. Text always carries the meaning; the dot is decoration. */
:where(.shop-availability) {
display: inline-flex;
align-items: center;
gap: var(--shop-space-2);
margin: 0;
font-size: var(--shop-font-size-sm);
font-weight: 600;
}
:where(.shop-availability)::before {
content: "";
width: 0.625rem;
height: 0.625rem;
border-radius: 50%;
background-color: var(--shop-color-muted);
}
:where(.shop-availability--sold)::before {
background-color: var(--shop-color-danger);
}
:where(.shop-availability--reserved)::before {
background-color: var(--shop-color-warning);
}
:where(.shop-availability abbr, .shop-stock abbr) {
text-decoration: none;
}
:where(.shop-stock--reserved) {
color: var(--shop-color-warning);
}
:where(.shop-stock--nfs) {
color: var(--shop-color-muted);
}
:where(.shop-details) {
display: grid;
gap: var(--shop-space-2);
margin: 0;
padding: var(--shop-space-4) 0;
border-block: var(--shop-border);
}
:where(.shop-details__row) {
display: grid;
grid-template-columns: minmax(7rem, 35%) 1fr;
gap: var(--shop-space-3);
}
:where(.shop-details dt) {
color: var(--shop-color-muted);
}
:where(.shop-details dd) {
margin: 0;
}
:where(.shop-product__delivery) {
margin: 0;
font-size: var(--shop-font-size-sm);
}
:where(.shop-enquiry) {
display: grid;
gap: var(--shop-space-4);
padding: var(--shop-space-5);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-enquiry__title) {
margin: 0;
font-size: var(--shop-font-size-lg);
}
/* Honeypot: off-screen rather than display:none, so simple bots still fill it in. */
:where(.shop-enquiry__trap) {
position: absolute;
left: -10000px;
width: 1px;
height: 1px;
overflow: hidden;
}
:where(.shop-chips) {
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-chip) {
display: inline-flex;
align-items: center;
gap: var(--shop-space-2);
min-height: var(--shop-touch-min);
padding: 0 var(--shop-space-3);
border: var(--shop-border);
border-radius: 999px;
color: var(--shop-color-text);
text-decoration: none;
}
:where(.shop-chip:hover) {
border-color: var(--shop-color-primary);
}
:where(.shop-chip__remove) {
font-weight: 700;
}
}
/* Artists (Phase 2b): artist index grid and artist page header. */
@layer shop.components {
:where(.shop-artist-grid) {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(var(--shop-card-min), 1fr));
gap: var(--shop-space-5);
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-artist-card) {
display: grid;
gap: var(--shop-space-2);
color: var(--shop-color-text);
text-decoration: none;
}
:where(.shop-artist-card__media) {
display: block;
aspect-ratio: 1 / 1;
overflow: hidden;
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-artist-card__media img, .shop-artist__portrait img) {
width: 100%;
height: 100%;
object-fit: cover;
}
:where(.shop-artist-card__name) {
font-weight: 600;
}
:where(.shop-artist-card:hover .shop-artist-card__name) {
color: var(--shop-color-primary);
text-decoration: underline;
}
:where(.shop-artist) {
display: grid;
gap: var(--shop-space-5);
}
@media (min-width: 640px) {
:where(.shop-artist) {
grid-template-columns: minmax(12rem, 18rem) 1fr;
align-items: start;
}
}
:where(.shop-artist__portrait) {
overflow: hidden;
border-radius: var(--shop-radius);
aspect-ratio: 4 / 5;
background-color: var(--shop-color-surface);
}
:where(.shop-artist__framing) {
display: grid;
gap: var(--shop-space-2);
max-width: 40rem;
margin: 0;
}
:where(.shop-artist__framing img) {
width: 100%;
height: auto;
border-radius: var(--shop-radius);
}
:where(.shop-artist__framing figcaption) {
color: var(--shop-color-muted);
font-size: var(--shop-font-size-sm);
}
}
/* Basket (Phase 3): lines stack on narrow screens and become rows from 640 px; header basket link; shared totals.
Also: multi-line input, field errors, small/full-width buttons used by the checkout and the 2b enquiry form. */
@layer shop.components {
:where(.shop-textarea) {
min-height: calc(var(--shop-touch-min) * 2);
padding: var(--shop-space-2) var(--shop-space-3);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-bg);
color: var(--shop-color-text);
font: inherit;
resize: vertical;
}
:where(.shop-input[aria-invalid="true"], .shop-select[aria-invalid="true"], .shop-textarea[aria-invalid="true"]) {
border-color: var(--shop-color-danger);
}
:where(.shop-field__error) {
color: var(--shop-color-danger);
font-size: var(--shop-font-size-sm);
font-weight: 600;
}
:where(.shop-input--quantity) {
width: 6rem;
}
:where(.shop-btn--small) {
min-height: 2.25rem;
padding: var(--shop-space-1) var(--shop-space-3);
font-size: var(--shop-font-size-sm);
}
:where(.shop-btn--block) {
width: 100%;
justify-content: center;
}
:where(.shop-preserve-lines) {
white-space: pre-line;
overflow-wrap: anywhere;
}
:where(.shop-cart-link) {
display: inline-flex;
align-items: center;
gap: var(--shop-space-2);
min-height: var(--shop-touch-min);
color: var(--shop-color-text);
text-decoration: none;
}
:where(.shop-cart-link__count) {
min-width: 1.75rem;
padding: 0 var(--shop-space-2);
border-radius: 999px;
background-color: var(--shop-color-primary);
color: var(--shop-color-on-primary);
font-size: var(--shop-font-size-sm);
font-weight: 700;
text-align: center;
}
:where(.shop-add) {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: var(--shop-space-3);
}
:where(.shop-add .shop-alert) {
flex-basis: 100%;
}
:where(.shop-cart) {
display: grid;
gap: var(--shop-space-5);
}
@media (min-width: 960px) {
:where(.shop-cart) {
grid-template-columns: 1fr minmax(16rem, 22rem);
align-items: start;
}
}
:where(.shop-cart__lines) {
display: grid;
gap: var(--shop-space-4);
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-cart__line) {
display: grid;
grid-template-columns: 5rem 1fr;
gap: var(--shop-space-2) var(--shop-space-4);
padding-block-end: var(--shop-space-4);
border-block-end: var(--shop-border);
}
:where(.shop-cart__media) {
grid-row: span 3;
width: 5rem;
aspect-ratio: 1 / 1;
overflow: hidden;
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-cart__media img) {
width: 100%;
height: 100%;
object-fit: cover;
}
:where(.shop-cart__info) {
display: grid;
gap: var(--shop-space-1);
}
:where(.shop-cart__name) {
color: var(--shop-color-text);
font-weight: 600;
}
:where(.shop-cart__meta) {
color: var(--shop-color-muted);
font-size: var(--shop-font-size-sm);
}
:where(.shop-cart__problem) {
color: var(--shop-color-danger);
font-size: var(--shop-font-size-sm);
font-weight: 600;
}
:where(.shop-cart__quantity) {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--shop-space-2);
}
:where(.shop-cart__total) {
margin: 0;
font-weight: 700;
}
@media (min-width: 640px) {
:where(.shop-cart__line) {
grid-template-columns: 5rem 1fr auto auto;
align-items: center;
}
:where(.shop-cart__media) {
grid-row: auto;
}
:where(.shop-cart__remove) {
grid-column: 2 / -1;
}
}
:where(.shop-cart__summary) {
padding: var(--shop-space-4);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
:where(.shop-totals) {
display: grid;
gap: var(--shop-space-2);
margin: 0;
}
:where(.shop-totals__row) {
display: flex;
justify-content: space-between;
gap: var(--shop-space-3);
}
:where(.shop-totals__row dd) {
margin: 0;
font-variant-numeric: tabular-nums;
}
:where(.shop-totals__row--total) {
padding-block-start: var(--shop-space-2);
border-block-start: var(--shop-border);
font-size: var(--shop-font-size-lg);
font-weight: 700;
}
:where(.shop-summary-lines) {
display: grid;
gap: var(--shop-space-2);
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-summary-lines__item) {
display: flex;
justify-content: space-between;
gap: var(--shop-space-3);
}
}
/* External lines (Phase 5): items added by another site, with its details. */
@layer shop.components {
:where(.shop-cart__image) {
display: block;
width: 100%;
height: auto;
aspect-ratio: 1;
object-fit: cover;
border-radius: var(--shop-radius);
}
:where(.shop-cart__source) {
font-size: var(--shop-font-size-sm);
color: var(--shop-color-muted);
}
:where(.shop-cart__details) {
display: grid;
gap: var(--shop-space-1);
margin: var(--shop-space-1) 0 0;
font-size: var(--shop-font-size-sm);
}
:where(.shop-cart__details) > div {
display: flex;
flex-wrap: wrap;
gap: var(--shop-space-1);
}
:where(.shop-cart__details) dt::after {
content: ":";
}
:where(.shop-cart__details) dd {
margin: 0;
}
}
/* Discount code (Phase 6b): the basket's code form, the applied code and its messages. */
@layer shop.components {
:where(.shop-discount) {
display: grid;
gap: var(--shop-space-2);
padding-block-start: var(--shop-space-3);
border-block-start: var(--shop-border);
}
:where(.shop-discount__form) {
display: grid;
gap: var(--shop-space-1);
}
:where(.shop-discount__row) {
display: flex;
gap: var(--shop-space-2);
}
:where(.shop-discount__row .shop-input) {
flex: 1 1 auto;
min-width: 0;
text-transform: uppercase;
}
:where(.shop-discount__code) {
margin: 0;
}
}
/* Checkout and confirmation (Phase 3): form sections, delivery choices, sticky summary on wide screens. */
@layer shop.components {
:where(.shop-checkout) {
display: grid;
gap: var(--shop-space-5);
}
@media (min-width: 960px) {
:where(.shop-checkout) {
grid-template-columns: 1fr minmax(18rem, 24rem);
align-items: start;
}
:where(.shop-checkout__summary) {
position: sticky;
top: var(--shop-space-4);
}
}
:where(.shop-checkout__section) {
display: grid;
gap: var(--shop-space-4);
margin: 0;
padding: var(--shop-space-4);
border: var(--shop-border);
border-radius: var(--shop-radius);
min-inline-size: 0;
}
:where(.shop-checkout__heading) {
padding: 0;
font-family: var(--shop-font-heading);
font-size: var(--shop-font-size-lg);
font-weight: 700;
}
:where(.shop-checkout__fields) {
display: grid;
gap: var(--shop-space-3);
}
@media (min-width: 640px) {
:where(.shop-checkout__fields) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
:where(.shop-checkout__summary) {
padding: var(--shop-space-4);
border: var(--shop-border);
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
}
/* Delivery choices: the whole card is the radio's label. */
:where(.shop-choice-list) {
display: grid;
gap: var(--shop-space-2);
}
:where(.shop-choice) {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: var(--shop-space-1) var(--shop-space-3);
min-height: var(--shop-touch-min);
padding: var(--shop-space-3);
border: var(--shop-border);
border-radius: var(--shop-radius);
cursor: pointer;
}
:where(.shop-choice:has(input:checked)) {
border-color: var(--shop-color-primary);
box-shadow: inset 0 0 0 1px var(--shop-color-primary);
}
:where(.shop-choice input) {
width: 1.25rem;
height: 1.25rem;
accent-color: var(--shop-color-primary);
}
:where(.shop-choice__label) {
font-weight: 600;
}
:where(.shop-choice__price) {
font-variant-numeric: tabular-nums;
}
:where(.shop-choice__detail) {
grid-column: 2 / -1;
color: var(--shop-color-muted);
font-size: var(--shop-font-size-sm);
}
:where(.shop-address) {
font-style: normal;
}
:where(.shop-confirmation) {
max-width: 48rem;
}
/* Pay link page (Phase 3b): Pay and Decline side by side, wrapping on narrow screens. */
:where(.shop-pay__actions) {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--shop-space-3);
}
}
/* Customer accounts (Phase 6a): narrow forms, section navigation, order and address lists, header account link. */
@layer shop.components {
:where(.shop-account) {
display: grid;
gap: var(--shop-space-5);
}
@media (min-width: 768px) {
:where(.shop-account--with-nav) {
grid-template-columns: minmax(12rem, 16rem) 1fr;
align-items: start;
}
}
:where(.shop-account-form) {
display: grid;
gap: var(--shop-space-4);
max-width: 32rem;
}
:where(.shop-account-nav__list) {
display: flex;
flex-wrap: wrap;
gap: var(--shop-space-2) var(--shop-space-4);
margin: 0;
padding: 0;
list-style: none;
}
@media (min-width: 768px) {
:where(.shop-account-nav__list) {
flex-direction: column;
}
}
:where(.shop-account-nav__link[aria-current="page"]) {
font-weight: 700;
}
:where(.shop-field__hint) {
color: var(--shop-color-muted);
font-size: var(--shop-font-size-sm);
}
:where(.shop-inline-form) {
display: inline;
}
:where(.shop-link-button) {
padding: 0;
border: 0;
background: none;
color: var(--shop-color-primary);
font: inherit;
text-decoration: underline;
cursor: pointer;
}
:where(.shop-order-list) {
width: 100%;
border-collapse: collapse;
}
:where(.shop-order-list th, .shop-order-list td) {
padding: var(--shop-space-2) var(--shop-space-3);
border-block-end: var(--shop-border);
text-align: start;
}
:where(.shop-order-list .shop-order-list__amount) {
text-align: end;
white-space: nowrap;
}
:where(.shop-address-list) {
display: grid;
gap: var(--shop-space-4);
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
margin: 0;
padding: 0;
list-style: none;
}
:where(.shop-address-card) {
display: grid;
gap: var(--shop-space-3);
padding: var(--shop-space-4);
border: var(--shop-border);
border-radius: var(--shop-radius);
}
:where(.shop-address-card__actions) {
display: flex;
flex-wrap: wrap;
gap: var(--shop-space-3);
}
:where(.shop-badge) {
display: inline-block;
padding: 0 var(--shop-space-2);
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
font-size: var(--shop-font-size-sm);
}
:where(.shop-account-link) {
white-space: nowrap;
}
}
/* The single alert component (spec §9.5). Text stays --shop-color-text for contrast. */
@layer shop.components {
:where(.shop-alert) {
padding: var(--shop-space-3) var(--shop-space-4);
border: var(--shop-border);
border-inline-start-width: 4px;
border-radius: var(--shop-radius);
background-color: var(--shop-color-surface);
color: var(--shop-color-text);
}
:where(.shop-alert + .shop-alert) {
margin-block-start: var(--shop-space-3);
}
:where(.shop-alert--success) {
border-inline-start-color: var(--shop-color-success);
background-color: var(--shop-color-success-bg);
}
:where(.shop-alert--warning) {
border-inline-start-color: var(--shop-color-warning);
background-color: var(--shop-color-warning-bg);
}
:where(.shop-alert--error) {
border-inline-start-color: var(--shop-color-danger);
background-color: var(--shop-color-danger-bg);
}
:where(.shop-alert--info) {
border-inline-start-color: var(--shop-color-info);
background-color: var(--shop-color-info-bg);
}
}
@layer shop.utilities {
.shop-visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
}
.shop-stack > * + * {
margin-block-start: var(--shop-space-4);
}
.shop-text-muted {
color: var(--shop-color-muted);
}
}
