/* ⭐ Shop product cards (Commerce.ProductCards): the CMS's card grid and card, with a badge, a price line and a list heading. Theme tokens only. */
.commerce-cards { display: grid; gap: var(--space-6, 2rem); }
.commerce-cards-heading { margin: 0; }
.commerce-cards-list { display: grid; gap: var(--space-3, 0.75rem); }
.commerce-cards-list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2, 0.5rem); }
.commerce-cards-list-heading { margin: 0; }
.commerce-cards-view-all { font-weight: var(--font-weight-strong, 600); white-space: nowrap; }
.commerce-card-picture-link { position: relative; display: block; }
/* ⭐ A product picture is shown whole (decision 301 S1: never cropped) — a tall or wide photo sits inside the square card, not cut to it. */
.commerce-card-picture { aspect-ratio: 1 / 1; object-fit: contain; }
.commerce-card-no-picture { display: block; width: 100%; background: var(--color-border); }
.commerce-card-badge {
  position: absolute; top: var(--space-2, 0.5rem); left: var(--space-2, 0.5rem);
  padding: 0.15em 0.6em; border-radius: var(--size-radius, 4px);
  background: var(--color-accent, #2f5d8a); color: var(--color-accent-text, #fff);
  font-size: var(--font-size-small, 0.85rem); font-weight: var(--font-weight-strong, 600);
}
.commerce-card-name { font-size: 1rem; }
.commerce-card-name a { color: inherit; text-decoration: none; }
.commerce-card-name a:hover, .commerce-card-name a:focus-visible { text-decoration: underline; }
.commerce-card-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25em 0.6em; margin: 0; }
.commerce-card-price-label { color: var(--color-text-muted, #5b6878); font-size: var(--font-size-small, 0.85rem); }
.commerce-card-price { font-size: 1.25rem; font-weight: var(--font-weight-strong, 600); font-variant-numeric: tabular-nums; }
.commerce-card-was { color: var(--color-text-muted, #5b6878); }
.commerce-card-colours { margin-left: auto; color: var(--color-text-muted, #5b6878); font-size: var(--font-size-small, 0.85rem); }

/* ⭐ A gallery picture's optional caption (owner, 2026-11-14: "20 oz" and "30 oz" under the pictures): small, under its picture. */
.commerce-gallery-caption { display: block; margin-top: var(--space-1, 0.25rem); color: var(--color-text-muted, #5b6878);
  font-size: var(--font-size-small, 0.85rem); }
/* The more pictures beneath the main one: a row of tiles, as wide as their sizes say (8rem), wrapping — not a bulleted list. */
.commerce-gallery-more { list-style: none; margin: var(--space-3, 0.75rem) 0 0; padding: 0; display: flex; flex-wrap: wrap;
  gap: var(--space-3, 0.75rem); }
.commerce-gallery-more li { width: 8rem; }
.commerce-gallery-more img { display: block; width: 100%; height: auto; }

/* ⭐ Decision 301 S1: a product picture (Shop product, Product pictures) is NO TALLER than a share of the screen — scaled to fit, never
   cropped, never enlarged. Its width stays the CMS class's share of the column (cms-image-small / -medium / -wide). */
.commerce-picture-h40 { --commerce-picture-max: 40vh; }
.commerce-picture-h60 { --commerce-picture-max: 60vh; }
.commerce-picture-h70 { --commerce-picture-max: 70vh; }
.commerce-picture-h80 { --commerce-picture-max: 80vh; }
.cms-image.commerce-picture img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: var(--commerce-picture-max, 70vh);
  object-fit: contain;
}

/* ⭐ The product page's main picture sits in a FIXED BOX (owner, 2026-11-19): the column's width, at most square, and no taller than the block's
   picture height or the window less the header and title above it (about 14rem) — so the whole box is on screen; ⚠ "70vh" alone put its
   bottom below a laptop's window. A larger picture is scaled down to fit; a smaller one is shown as it is (decision 301: never enlarged —
   its sizes are capped at its own width), centered both ways. A variant's own picture (C1) takes the same box, so nothing jumps. Until
   pictures are normalized, a small upload looks small rather than blurred. */
.commerce-gallery-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: min(var(--commerce-picture-max, 70vh), calc(100svh - 14rem));
}
.cms-image.commerce-picture .commerce-gallery-frame img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ⭐ The header cart (Commerce.MiniCart), owner 2026-11-14: a cart icon with the number of items over its top right corner. Theme tokens only;
   the icon takes the link's colour (currentColor). */
.commerce-mini-cart-icon { display: inline-flex; align-items: center; gap: var(--space-2, 0.5rem); color: inherit; text-decoration: none; }
.commerce-mini-cart-glyph { position: relative; display: inline-flex; line-height: 0; }
.commerce-mini-cart-badge {
  position: absolute; top: -0.45em; right: -0.6em;
  min-width: 1.35em; height: 1.35em; padding: 0 0.3em; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--color-accent, #2f5d8a); color: var(--color-accent-text, #fff);
  font-size: 0.75rem; line-height: 1; font-weight: var(--font-weight-strong, 600); font-variant-numeric: tabular-nums;
}
.commerce-mini-cart-icon .commerce-mini-cart-subtotal { font-variant-numeric: tabular-nums; }

/* ⭐ The category list (Commerce.CategoryList), owner 2026-11-15: a sidebar of the shop's categories, or a bar across. Theme tokens only. */
.commerce-category-list ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1, 0.25rem); }
.commerce-category-list-across ul { flex-direction: row; flex-wrap: wrap; gap: var(--space-2, 0.5rem) var(--space-4, 1rem); }
.commerce-category-list-heading { font-size: 1.1rem; margin: 0 0 var(--space-2, 0.5rem); }
.commerce-category-list a { display: block; padding: var(--space-1, 0.25rem) 0; color: inherit; text-decoration: none; }
.commerce-category-list a:hover, .commerce-category-list a:focus-visible { text-decoration: underline; }
.commerce-category-list a.commerce-category-current { font-weight: var(--font-weight-strong, 600); color: var(--color-accent, #2f5d8a); }
