/* One stylesheet for every store. It reads the theme only through what the
   layout puts on <body>: custom properties (ThemeSettings::
   css_custom_properties) and data-* style switches (data-button, data-cards,
   data-header, data-case). Nothing here names a store. The fallbacks are for
   pages with no store. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--type-scale, 100%);
}

/* `hidden` wins over any display a class gives (buttons, flex rows). */
[hidden] {
  display: none !important;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-muted);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

button.link:hover {
  color: var(--color-text);
}

body {
  margin: 0;
  background: var(--color-background, #fff);
  color: var(--color-text, #111);
  font-family: var(--font-body, system-ui, sans-serif);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.logo,
.tile-title,
.banner h2 {
  font-family: var(--font-heading, system-ui, sans-serif);
  font-weight: var(--heading-weight, 700);
  text-transform: var(--heading-transform, none);
  letter-spacing: var(--heading-tracking, -0.01em);
  line-height: 1.12;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--content-width, 1200px);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 3vw, 2.5rem);
}

.narrow {
  max-width: 720px;
}

.muted {
  color: var(--color-muted, #666);
}

.lead {
  color: var(--color-muted, #666);
  font-size: 1.125rem;
  margin-top: 0;
}

.small {
  font-size: 0.85rem;
  margin-top: 0.75rem;
  text-align: center;
}

/* Buttons: shape from --button-radius, fill from data-button. */

.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 2px solid var(--color-primary, #111);
  border-radius: var(--button-radius, 8px);
  background: var(--color-primary, #111);
  color: var(--color-on-primary, #fff);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}

.button:hover {
  filter: brightness(1.08);
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

/* One visible focus ring for every control, in the store's colour. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-primary, #111);
  outline-offset: 2px;
}

.button:focus-visible {
  outline-offset: 3px;
}

[data-button="outline"] .button {
  background: transparent;
  color: var(--color-primary);
}

[data-button="outline"] .button:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
  filter: none;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

.button.wide {
  width: 100%;
  margin-top: 1rem;
}

/* Preview bar and announcement */

.preview-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: #fef08a;
  color: #422006;
  font: 600 0.85rem/1.4 system-ui, sans-serif;
  text-transform: none;
}

.preview-bar form {
  margin: 0;
}

.preview-bar button {
  border: 1px solid #a16207;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.15rem 0.6rem;
  cursor: pointer;
}

.announcement {
  padding: 0.55rem 1rem;
  background: var(--color-accent);
  color: var(--color-on-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.announcement a {
  text-decoration: none;
}

.announcement a:hover {
  text-decoration: underline;
}

/* Header: classic (logo left, menu right), centered (logo over menu),
   minimal (logo, the first link, icons). On phones every style is the
   same row: the menu drawer's button, the logo, search and cart. */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--button-radius, 8px);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
}

.skip-link:focus {
  top: 0.5rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background);
  position: sticky;
  top: 0;
  z-index: 20;
  view-transition-name: site-header;
}

.header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo nav actions";
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.logo {
  grid-area: logo;
  font-size: 1.3rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1.5rem;
  align-items: center;
}

.nav a {
  text-decoration: none;
  text-underline-offset: 0.3em;
}

.nav a:hover {
  text-decoration: underline;
}

.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-right: -0.6rem;
}

.icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.icon-button:hover {
  background: color-mix(in srgb, var(--color-text) 8%, transparent);
}

.menu-button {
  grid-area: menu;
  display: none;
  margin-left: -0.6rem;
}

[data-header="centered"] .header-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas:
    ". logo actions"
    "nav nav nav";
  padding-top: 1rem;
  padding-bottom: 0.25rem;
  gap: 0.25rem 1rem;
}

[data-header="centered"] .logo {
  font-size: 2rem;
  letter-spacing: 0.02em;
}

[data-header="centered"] .nav {
  justify-content: center;
  padding: 0.6rem 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

[data-header="centered"] .header-actions {
  justify-self: end;
}

[data-header="minimal"] .site-header {
  border-bottom-color: transparent;
}

[data-header="minimal"] .header-row {
  min-height: 3.5rem;
}

[data-header="minimal"] .nav-collection {
  display: none;
}

/* The rest of a minimal header's menu is one drawer away, at any width. */
[data-header="minimal"] .header-row {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "menu logo nav actions";
  gap: 0.75rem;
}

[data-header="minimal"] .menu-button {
  display: inline-grid;
}

[data-header="minimal"] .nav {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cart-count {
  position: absolute;
  top: 0.2rem;
  right: 0.05rem;
  display: inline-grid;
  place-items: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.cart-count[data-empty] {
  display: none;
}

.cart-count.bump {
  animation: bump 0.45s ease;
}

@keyframes bump {
  40% {
    transform: scale(1.35);
  }
}

@media (max-width: 800px) {
  .header-row,
  [data-header="centered"] .header-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "menu logo actions";
    min-height: 3.5rem;
    padding-top: 0;
    padding-bottom: 0;
    gap: 0.5rem;
  }

  .menu-button {
    display: inline-grid;
    justify-self: start;
  }

  .nav {
    display: none;
  }

  .logo,
  [data-header="centered"] .logo {
    font-size: 1.2rem;
    text-align: center;
  }

  .header-actions {
    justify-self: end;
  }

  /* Two icons on a phone; the wishlist is in the menu. */
  .wish-link {
    display: none;
  }
}

/* Drawers and the search panel: popovers (the top layer, Esc and a click
   outside close them), sliding in where motion is welcome. */

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(22rem, 88vw);
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0.75rem 1.25rem 2rem;
  border: 0;
  background: var(--color-background);
  color: var(--color-text);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  transform: translateX(-100%);
}

.drawer.drawer-right {
  inset: 0 0 0 auto;
  transform: translateX(100%);
}

.drawer:popover-open,
.drawer[open] {
  transform: none;
}

.drawer::backdrop,
.search-panel::backdrop {
  background: rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .drawer {
    transition:
      transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1),
      overlay 0.28s allow-discrete,
      display 0.28s allow-discrete;
  }

  @starting-style {
    .drawer:popover-open {
      transform: translateX(-100%);
    }

    .drawer.drawer-right:popover-open {
      transform: translateX(100%);
    }
  }
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  margin: 0 -0.6rem 1rem 0;
}

.drawer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-links a {
  display: block;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 1.15rem;
  text-decoration: none;
}

.drawer-links.secondary {
  margin-top: 1.5rem;
}

.drawer-links.secondary a {
  padding: 0.45rem 0;
  border: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.search-panel {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  max-height: 85dvh;
  margin: 0;
  padding: 0.75rem 0 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-background);
  color: var(--color-text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
}

.search-panel-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.search-panel-form input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 1.25rem;
  outline: none;
}

.search-panel-form:focus-within {
  border-bottom-color: var(--color-text);
}

.suggestions.rich {
  position: static;
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.suggestions.rich a {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.5rem;
  border-radius: var(--button-radius, 8px);
}

.suggestion-image {
  width: 3rem;
  height: 3rem;
  border-radius: calc(var(--radius, 8px) / 2);
  object-fit: cover;
  background: var(--color-surface, var(--color-border));
}

.suggestions.rich .suggestion-all {
  display: block;
  margin-top: 0.25rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

/* The cart drawer (cart.js): the lines, progress to free shipping, the
   sums and checkout; the foot stays at the bottom while the lines scroll. */

.cart-drawer {
  display: none;
  width: min(27rem, 94vw);
  padding: 0.75rem 1.25rem 1.25rem;
}

.cart-drawer:popover-open {
  display: flex;
  flex-direction: column;
}

.drawer-title {
  margin: 0;
  font-size: 1.35rem;
  outline: none;
}

.cart-drawer-status {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.cart-drawer-status:not(:empty) {
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: var(--button-radius, 8px);
  background: var(--color-surface);
  color: var(--color-text);
}

.cart-drawer-body {
  flex: 1;
  min-height: 0;
  margin: 0 -1.25rem;
  padding: 0 1.25rem;
  overflow-y: auto;
}

.cart-drawer[aria-busy] .cart-drawer-body {
  opacity: 0.6;
  transition: opacity 0.2s 0.1s;
}

.cart-drawer-empty {
  display: grid;
  justify-items: start;
  gap: 0.5rem;
  padding: 1rem 0;
  color: var(--color-muted);
}

.free-ship {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.free-ship p {
  margin: 0 0 0.45rem;
}

.meter {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-border);
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
  transition: width 0.4s ease;
}

.free-ship.reached .meter-fill {
  background: var(--color-accent, var(--color-primary));
}

.drawer-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.drawer-line {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}

.drawer-line img,
.drawer-line-image {
  width: 4.5rem;
  height: 5.6rem;
  border-radius: calc(var(--radius, 8px) / 2);
  object-fit: cover;
  background: var(--color-surface);
}

.drawer-line-text {
  display: grid;
  gap: 0.15rem;
  font-size: 0.95rem;
}

.drawer-line-text a {
  font-weight: 600;
  text-decoration: none;
}

.drawer-line-text a:hover {
  text-decoration: underline;
}

.drawer-line-text .muted {
  font-size: 0.85rem;
}

.drawer-line-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.drawer-line-actions .link {
  font-size: 0.85rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
}

.stepper button {
  width: 2rem;
  height: 2rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.stepper button:disabled {
  opacity: 0.35;
  cursor: default;
}

.stepper span {
  min-width: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.drawer-line-price {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
}

.cart-drawer-foot {
  display: grid;
  gap: 0.6rem;
  margin: 0 -1.25rem -1.25rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}

.cart-drawer-foot[hidden] {
  display: none;
}

.cart-drawer-sums {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem 1rem;
  margin: 0;
}

.cart-drawer-sums dt {
  font-weight: 600;
}

.cart-drawer-sums dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.cart-drawer-sums select {
  max-width: 12rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
}

.cart-drawer-note {
  margin: 0;
  font-size: 0.85rem;
}

.cart-drawer-foot .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.cart-drawer-view {
  justify-self: center;
  font-size: 0.9rem;
}

/* Save for later (wishlist.js): a heart in a card's top corner and beside
   Share on a product page; filled once saved. */
.wish {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-background) 88%, transparent);
  color: var(--color-text);
  box-shadow: 0 1px 6px rgb(0 0 0 / 12%);
  cursor: pointer;
  transition: transform 0.15s;
}

.wish:hover {
  transform: scale(1.08);
}

.wish[aria-pressed="true"] .icon path,
.wish-button[aria-pressed="true"] .icon path {
  fill: currentColor;
}

.wish[aria-pressed="true"],
.wish-button[aria-pressed="true"] {
  color: var(--color-primary);
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.recent[hidden] {
  display: none;
}

/* A card's quick add: a round button in the picture's corner, shown on
   hover where there is a mouse and always on touch screens. */
.quick-add {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-background);
  color: var(--color-text);
  box-shadow: 0 2px 10px rgb(0 0 0 / 18%);
  cursor: pointer;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s, background 0.2s;
}

.quick-add[hidden] {
  display: none;
}

.product-card:hover .quick-add,
.quick-add:focus-visible {
  opacity: 1;
  transform: none;
}

.quick-add:hover {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

@media (hover: none) {
  .quick-add {
    opacity: 1;
    transform: none;
  }
}

/* Footer: the store, its menus and how to reach it; the fine print below. */

.site-footer {
  margin-top: var(--section-space, 3.5rem);
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.925rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.footer-brand p {
  max-width: 32ch;
  margin: 0;
  color: var(--color-muted);
}

.footer-col h2 {
  margin: 0 0 0.85rem;
  color: var(--color-muted);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-col ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col p {
  margin: 0 0 0.55rem;
}

.footer-col a {
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 0.85rem;
}

.footer-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 800px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Moving between pages cross-fades, and the header stays put. */

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* Sections: spacing from --section-space */

.section {
  padding-top: var(--section-space, 3.5rem);
  padding-bottom: 0.5rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

/* Hero: size, alignment, and tone (surface / primary / dark / image) */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  padding: clamp(3.5rem, 9vw, 7rem) 0;
}

.hero.size-compact {
  padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.hero.size-tall {
  padding: clamp(5rem, 14vw, 11rem) 0;
}

.hero.tone-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.hero.tone-inverse {
  background: var(--color-text);
  color: var(--color-background);
}

.hero.tone-primary .button {
  background: var(--color-on-primary);
  border-color: var(--color-on-primary);
  color: var(--color-primary);
}

/* Over a photo: the picture fills the band edge to edge, a shade keeps
   the words readable, and the words sit low (left) or in the middle. */
.hero.tone-image {
  display: grid;
  align-items: end;
  min-height: clamp(26rem, 74vh, 46rem);
  padding: clamp(3rem, 8vw, 6rem) 0;
  background: #1a1a1a;
  color: #fff;
}

.hero.tone-image.size-compact {
  min-height: clamp(18rem, 48vh, 30rem);
}

.hero.tone-image.size-tall {
  min-height: clamp(32rem, 90vh, 60rem);
}

.hero.tone-image.align-center {
  align-items: center;
}

.hero.tone-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
}

.hero.tone-image.align-center::after {
  background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.25) 75%);
}

.hero.tone-image .hero-inner {
  z-index: 1;
}

.hero.tone-image h1 {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.25);
}

.hero.tone-image .hero-sub {
  opacity: 0.92;
}

/* Beside the words: two halves on the band's tone, the picture filling
   its half to the screen's edge; on phones the picture comes first. */
.hero.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: clamp(26rem, 72vh, 44rem);
  padding: 0;
}

.hero.layout-split.size-compact {
  min-height: clamp(20rem, 50vh, 30rem);
}

.hero.layout-split picture {
  position: relative;
  grid-column: 2;
  grid-row: 1;
}

.hero.layout-split .hero-image {
  animation: none;
}

.hero.layout-split .hero-inner {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: none;
  margin: 0;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 5rem)
    clamp(3rem, 7vw, 6rem) max(clamp(1.25rem, 3vw, 2.5rem), calc((100vw - var(--content-width, 1200px)) / 2 + clamp(1.25rem, 3vw, 2.5rem)));
}

@media (max-width: 800px) {
  .hero.layout-split {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero.layout-split picture {
    grid-column: 1;
    aspect-ratio: 4 / 3;
  }

  .hero.layout-split .hero-inner {
    grid-row: 2;
    padding: 2rem 1.25rem 2.5rem;
  }
}

.hero-image,
.banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-image {
    animation: settle 1.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-inner > * {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-inner > :nth-child(2) {
    animation-delay: 0.08s;
  }

  .hero-inner > :nth-child(3) {
    animation-delay: 0.16s;
  }
}

@keyframes settle {
  from {
    transform: scale(1.06);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.hero-inner {
  position: relative;
}

.hero.align-center .hero-inner {
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  max-width: 16ch;
  margin-bottom: 1.25rem;
}

.hero.align-center h1,
.hero.align-center .hero-sub {
  margin-left: auto;
  margin-right: auto;
}

.hero-sub {
  font-size: 1.2rem;
  opacity: 0.8;
  max-width: 46ch;
  margin: 0 0 2rem;
}

.rich-text {
  max-width: 760px;
  font-size: 1.1rem;
}

.image-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.image-text.no-image {
  grid-template-columns: minmax(0, 760px);
}

.image-text-media {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
}

.image-text-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-text.image-right .image-text-media {
  order: 2;
}

.image-text-copy h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  margin-bottom: 1rem;
}

.image-text-copy p {
  max-width: 46ch;
  color: var(--color-muted);
  font-size: 1.075rem;
}

.image-text-copy .button {
  margin-top: 1rem;
}

/* Features */

.feature-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 1rem;
}

.feature {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 1.1rem 0 0;
  border-top: 2px solid var(--color-text);
}

.feature strong {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: var(--heading-weight, 700);
  text-transform: var(--heading-transform, none);
  letter-spacing: var(--heading-tracking, 0);
}

.feature span {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.feature-grid {
  gap: 1.25rem 2rem;
}

/* Quote */

.quote blockquote {
  margin: 0 auto;
  max-width: 820px;
  text-align: center;
}

.quote p {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  line-height: 1.3;
  margin: 0 0 1rem;
}

.quote footer {
  color: var(--color-muted);
}

/* Banner */

.banner {
  margin-top: var(--section-space, 3.5rem);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background: var(--color-surface);
}

.banner.tone-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.banner.tone-primary .button {
  background: var(--color-on-primary);
  border-color: var(--color-on-primary);
  color: var(--color-primary);
}

.banner.tone-inverse {
  background: var(--color-text);
  color: var(--color-background);
}

.banner.tone-inverse .button {
  background: var(--color-background);
  border-color: var(--color-background);
  color: var(--color-text);
}

.banner.tone-image {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 7.5rem) 0;
  background: #1a1a1a;
  color: #fff;
}

.banner.tone-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.2) 75%);
}

@media (max-width: 800px) {
  .banner.tone-image::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.7));
  }
}

.banner.tone-image .banner-inner {
  position: relative;
  z-index: 1;
}

.banner.tone-image .button {
  background: #fff;
  border-color: #fff;
  color: #111;
}

.banner-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.banner h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin: 0 0 0.4rem;
}

.banner p {
  margin: 0;
  max-width: 56ch;
  opacity: 0.85;
}

/* Collection tiles */

.collection-tiles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
  gap: 1rem;
}

.collection-tile {
  display: grid;
  align-content: end;
  gap: 0.35rem;
  min-height: 11rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--color-primary) 28%, transparent), transparent 55%),
    var(--color-surface);
  text-decoration: none;
  transition: transform 0.15s;
}

.collection-tile:hover {
  transform: translateY(-2px);
}

/* Over its first product's picture: the words at the bottom, in white on
   a shade; the picture drifts closer on hover. */
.collection-tile.has-image {
  position: relative;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: var(--tile-ratio, 4 / 5);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #1a1a1a;
  color: #fff;
}

.collection-tiles[style*="--columns:2"] {
  --tile-ratio: 16 / 10;
}

.collection-tiles[style*="--columns:1"] {
  --tile-ratio: 21 / 9;
}

.collection-tile.has-image:hover {
  transform: none;
}

.tile-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.collection-tile.has-image:hover .tile-image {
  transform: scale(1.04);
}

.collection-tile.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.75) 100%);
}

.collection-tile.has-image .tile-text {
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.tile-text {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
}

.collection-tile.has-image .tile-body {
  color: rgba(255, 255, 255, 0.86);
}

.collection-tile.has-image .tile-cta {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.tile-title {
  font-size: 1.5rem;
}

.tile-body {
  color: var(--color-muted);
}

.tile-cta {
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Newsletter */

.newsletter {
  background: var(--color-surface);
  margin-top: var(--section-space, 3.5rem);
  padding-bottom: var(--section-space, 3.5rem);
  text-align: center;
}

.inline-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.newsletter h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.5rem;
}

.newsletter p {
  margin: 0 auto;
  max-width: 46ch;
}

.newsletter-form {
  max-width: 30rem;
  margin: 1.5rem auto 0;
}

.newsletter-form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.newsletter-status:not(:empty) {
  margin-top: 1rem;
  font-weight: 600;
}

.newsletter-status[data-ok="false"] {
  color: var(--color-sale, #b42318);
}

.newsletter-small {
  margin-top: 0.85rem !important;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.inline-form input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
}

/* Product grid and cards: ratio from --image-ratio, style from data-cards */

.product-grid {
  --columns: 4;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: grid;
  grid-template-rows: auto;
  align-content: start;
  gap: 0.3rem;
  height: 100%;
  text-decoration: none;
  border-radius: var(--radius);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* Bordered and shadowed cards: the picture meets the card's edges and the
   words sit in the card's padding. */
[data-cards="bordered"] .product-card,
[data-cards="shadow"] .product-card {
  overflow: hidden;
  padding-bottom: 1rem;
}

[data-cards="bordered"] .product-card {
  border: 1px solid var(--color-border);
}

[data-cards="shadow"] .product-card {
  background: var(--color-background);
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 6px 20px rgb(0 0 0 / 6%);
}

[data-cards="bordered"] .product-card > :not(.card-media-box),
[data-cards="shadow"] .product-card > :not(.card-media-box) {
  margin-inline: 1rem;
}

[data-cards="bordered"] .card-media-box,
[data-cards="shadow"] .card-media-box {
  margin-bottom: 0.5rem;
}

[data-cards="bordered"] .card-media-box .product-image,
[data-cards="shadow"] .card-media-box .product-image {
  border-radius: 0;
}

[data-cards="shadow"] .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgb(0 0 0 / 6%), 0 14px 32px rgb(0 0 0 / 10%);
}

[data-cards="bordered"] .product-card:hover {
  transform: translateY(-2px);
}

.card-media-box {
  position: relative;
  margin-bottom: 0.35rem;
}

.card-media-box > .badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  pointer-events: none;
}

.card-media-box > .badge-muted {
  border-color: transparent;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

/* A plain card's single picture drifts closer on hover. */
.card-media {
  overflow: hidden;
  border-radius: var(--radius);
}

[data-cards="bordered"] .card-media,
[data-cards="shadow"] .card-media {
  border-radius: 0;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  a.card-media .product-image {
    transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .product-card:hover a.card-media .product-image {
    transform: scale(1.035);
  }
}

.product-card.sold-out .card-media-box img {
  opacity: 0.72;
}

.card-note {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.product-card:hover .product-title {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.product-image {
  display: block;
  width: 100%;
  /* The img's width/height attributes (media library pictures) would
     otherwise fix its height and beat the theme's ratio. */
  height: auto;
  aspect-ratio: var(--image-ratio, 4 / 5);
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-surface);
}

.placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: var(--heading-weight, 700);
  color: color-mix(in srgb, var(--color-primary) 60%, var(--color-surface));
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent 60%),
    var(--color-surface);
}

.product-title {
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}

.price {
  font-weight: 600;
}

.compare-at {
  color: var(--color-muted);
  font-weight: 400;
}

.price:has(.compare-at) {
  color: var(--color-accent);
}

/* Product page */

.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.product .price {
  font-size: 1.4rem;
}

.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.variant {
  min-width: 3rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}

.variant[aria-pressed="true"] {
  border-color: var(--color-primary);
  box-shadow: inset 0 0 0 1px var(--color-primary);
  font-weight: 600;
}

.buy {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}

.buy .add {
  flex: 1;
}

.quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
}

.quantity button {
  width: 2.5rem;
  height: 100%;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.quantity span {
  min-width: 2rem;
  text-align: center;
}

.status {
  min-height: 1.5rem;
  margin: 0.6rem 0 0;
  color: var(--color-muted);
}

.description {
  margin-top: 1.5rem;
}

/* The product page's answers (round 4, R14): where it sits, the saving,
   stock, delivery and returns, details in folds, a buy bar on phones. */

.breadcrumbs {
  padding-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
  opacity: 0.6;
}

.breadcrumbs a {
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-current] {
  color: var(--color-text);
}

.breadcrumbs + .section {
  padding-top: 1.25rem;
}

@media (min-width: 801px) {
  .product-info {
    position: sticky;
    top: 5.5rem;
  }
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.price-row .price {
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.badge[hidden] {
  display: none;
}

.badge-sale {
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.badge-muted {
  background: var(--color-background);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.price-note {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
}

.stock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  font-size: 0.95rem;
}

.stock-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #1f9d55;
  box-shadow: 0 0 0 3px color-mix(in srgb, #1f9d55 22%, transparent);
}

.stock[data-level="low"] .stock-dot {
  background: #e08a00;
  box-shadow: 0 0 0 3px color-mix(in srgb, #e08a00 25%, transparent);
}

.stock[data-level="low"] {
  font-weight: 600;
}

.stock[data-level="out"] .stock-dot {
  background: var(--color-muted);
  box-shadow: none;
}

.stock + .buy {
  margin-top: 0.75rem;
}

.promises {
  display: grid;
  gap: 0.6rem;
  margin: 1.25rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 8px);
  list-style: none;
  font-size: 0.925rem;
}

.promises li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.promises .icon {
  flex: none;
  margin-top: 0.05rem;
  color: var(--color-muted);
}

.folds {
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.fold {
  border-bottom: 1px solid var(--color-border);
}

.fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.fold summary::-webkit-details-marker {
  display: none;
}

.fold summary .icon {
  transition: transform 0.2s ease;
}

.fold[open] summary .icon {
  transform: rotate(180deg);
}

.fold-body {
  margin: 0 0 1.1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.fold-body p {
  margin: 0 0 0.6rem;
}

.shipping-table dt {
  margin-top: 0.6rem;
  color: var(--color-text);
  font-weight: 600;
}

.shipping-table dt:first-child {
  margin-top: 0;
}

.shipping-table dd {
  margin: 0.2rem 0 0;
}

.share-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.25rem;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.share-button:hover span {
  text-decoration: underline;
}

.buy-bar {
  display: none;
}

@media (max-width: 800px) {
  .buy-bar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-border);
    background: var(--color-background);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }

  .buy-bar[data-shown] {
    transform: none;
  }

  .buy-bar-text {
    display: grid;
    flex: 1;
    min-width: 0;
  }

  .buy-bar-title {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .buy-bar .price {
    font-size: 0.95rem;
  }

  .buy-bar .button {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .buy-bar {
    transition: none;
  }
}

/* Cart and checkout */

.cart-page h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

.cart-page-count {
  color: var(--color-muted);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* The lines on the left, the summary beside them and staying in view. */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-top: 1.5rem;
}

.cart-side {
  position: sticky;
  top: 5.5rem;
  padding: 1.5rem;
  border-radius: var(--radius, 8px);
  background: var(--color-surface);
}

.cart-side h2 {
  font-size: 1.2rem;
  margin: 0 0 1rem;
}

.cart-side .cart-summary {
  margin-top: 0;
}

.cart-side .cart-choice label {
  min-width: 0;
  flex-basis: 100%;
  font-size: 0.9rem;
}

.cart-side .cart-choice select,
.cart-side .cart-choice input {
  background: var(--color-background);
}

.cart-side .button.wide {
  width: 100%;
  margin-top: 1.25rem;
}

.promises.compact {
  margin-top: 1.25rem;
  padding: 0;
  border: 0;
  font-size: 0.875rem;
}

.cart-empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 3rem 1rem 1rem;
  color: var(--color-muted);
  text-align: center;
}

.cart-empty p {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.cart-suggestions {
  margin-top: var(--section-space, 3.5rem);
}

.continue {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.cart-lines {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.cart-line {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  gap: 1.1rem;
  align-items: start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-line .product-image {
  font-size: 1.5rem;
  width: 6rem;
}

.cart-line-text {
  display: grid;
  gap: 0.15rem;
}

.cart-line-title {
  font-weight: 600;
  text-decoration: none;
}

.cart-line-title:hover {
  text-decoration: underline;
}

.small-left {
  font-size: 0.85rem;
}

.cart-main .free-ship {
  margin-bottom: 1.25rem;
}

@media (max-width: 800px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-side {
    position: static;
  }

  .cart-line {
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  }

  .cart-line .product-image {
    width: 4.5rem;
  }
}

.order-line {
  grid-template-columns: 1fr auto;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0 0;
  font-size: 1.2rem;
}

.cart-total + .button {
  margin-top: 1.5rem;
}

.line-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.line-quantity > button:not(.link) {
  min-width: 1.8rem;
  height: 1.8rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}

.line-quantity button.link {
  border: 0;
  background: none;
  color: var(--color-muted);
  text-decoration: underline;
  font-size: 0.85rem;
}

.page-message {
  padding: 6rem 1.25rem;
  text-align: center;
}

@media (max-width: 800px) {
  .product-grid,
  .collection-tiles,
  .feature-grid {
    grid-template-columns: repeat(min(var(--columns), 2), minmax(0, 1fr));
  }

  .product,
  .image-text {
    grid-template-columns: 1fr;
  }

  .image-text.image-right .image-text-media {
    order: 0;
  }

  .collection-tiles {
    grid-template-columns: 1fr;
    --tile-ratio: 16 / 10;
  }

  .collection-tiles[style*="--columns:2"] {
    --tile-ratio: 16 / 10;
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Two a row: an odd last card would stand alone. */
  .product-grid.whole-rows > li:last-child:nth-child(odd) {
    display: none;
  }
}

/* Product pictures from the media library (media.rs, pages.rs). */
.product-media {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.product-media picture,
.product-thumbs picture {
  display: block;
}

.product-media img {
  display: block;
  width: 100%;
  height: auto;
}

.product-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-thumbs img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius, 6px);
}

picture img.product-image {
  object-fit: cover;
}

/* Options (pages.rs): a row of values per option; combinations that do not
   exist or are sold out stay clickable but look it. */
.option {
  margin: 0 0 1rem;
}

.option-name {
  margin: 0 0 0.4rem;
  font-size: 0.9em;
}

.option .variants {
  margin: 0;
}

.variant[data-unavailable="true"] {
  opacity: 0.45;
  text-decoration: line-through;
}

/* Reviews (round 4, R21): stars filled to the rating in the text's own
   colour, the summary beside the newest reviews, a picker for writing. */

.stars {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-text) var(--pct, 0%), var(--color-border) var(--pct, 0%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  line-height: 1;
}

.stars.small {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.rating-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
  font-size: 0.925rem;
  text-decoration: none;
}

.rating-link:hover .muted {
  text-decoration: underline;
}

.card-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.reviews h2 {
  margin-bottom: 1.5rem;
}

.reviews-layout {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.reviews-summary {
  position: sticky;
  top: 5.5rem;
}

.reviews-average {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: var(--heading-weight, 700);
  line-height: 1;
}

.reviews-summary .stars {
  font-size: 1.3rem;
}

.reviews-summary > .muted {
  margin: 0.5rem 0 1rem;
  font-size: 0.9rem;
}

.reviews-bars {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.reviews-bars li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) 1.5rem;
  gap: 0.6rem;
  align-items: center;
}

.reviews-bars .meter-fill {
  background: var(--color-text);
}

.review-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.review:first-child {
  padding-top: 0;
}

.review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.review p.lines {
  margin: 0.5rem 0;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--color-accent, var(--color-text));
  font-weight: 600;
}

.review-cta {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 8px);
}

.review-cta h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.review-cta p {
  margin: 0 0 0.75rem;
}

.review-cta ul {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-cta li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.reviewed {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.review-page {
  max-width: 40rem;
}

.star-picker {
  margin: 0;
  padding: 0;
  border: 0;
}

.star-picker legend {
  margin-bottom: 0.35rem;
  padding: 0;
  font-weight: 600;
}

/* Five radios, highest first in the markup and shown lowest first: a
   choice fills itself and every star to its left. */
.star-options {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.2rem;
}

.star-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.star-options label {
  display: inline-grid;
  color: var(--color-border);
  cursor: pointer;
}

.star-options label .icon path {
  fill: currentColor;
}

.star-options input:checked ~ label,
.star-options label:hover,
.star-options label:hover ~ label {
  color: var(--color-text);
}

.star-options input:focus-visible + label {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .reviews-layout {
    grid-template-columns: 1fr;
  }

  .reviews-summary {
    position: static;
  }
}

/* A shopper's order (checkout.rs, order_page): the thanks, a timeline,
   the items beside the summary. */

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-hero {
  max-width: 44rem;
}

.order-check {
  display: inline-grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  background: var(--color-accent, var(--color-primary));
  color: var(--color-on-primary);
}

@media (prefers-reduced-motion: no-preference) {
  .order-check {
    animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
  }
}

@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

.order-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.order-steps li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 3px solid var(--color-border);
}

.order-steps li.done {
  border-top-color: var(--color-accent, var(--color-primary));
}

.order-steps li.current {
  border-top-color: color-mix(in srgb, var(--color-accent, var(--color-primary)) 45%, var(--color-border));
}

.step-dot {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-muted);
}

.order-steps li.done .step-dot {
  background: var(--color-accent, var(--color-primary));
  color: var(--color-on-primary);
}

.step-text {
  display: grid;
  gap: 0.1rem;
  font-size: 0.925rem;
}

.step-text span {
  color: var(--color-muted);
}

.tracking {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 8px);
}

.tracking h2 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.tracking p {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.3rem 0;
}

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-bottom: 2rem;
}

.order-main h2 {
  font-size: 1.2rem;
}

.order-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.order-item {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.order-item img,
.order-item-image {
  width: 4.5rem;
  height: 5.6rem;
  border-radius: calc(var(--radius, 8px) / 2);
  object-fit: cover;
  background: var(--color-surface);
}

.order-item-text {
  display: grid;
  gap: 0.1rem;
}

.order-item-text .muted {
  font-size: 0.9rem;
}

.order-item-price {
  font-weight: 600;
}

.order-side {
  padding: 1.5rem;
  border-radius: var(--radius, 8px);
  background: var(--color-surface);
}

.order-side .cart-sums {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.order-links {
  display: grid;
  gap: 0.4rem;
  margin: 1.25rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
  font-size: 0.95rem;
}

.order-lookup {
  max-width: 34rem;
}

.not-found .lead {
  margin: 0.5rem auto 1.5rem;
}

.not-found-search {
  display: flex;
  gap: 0.5rem;
  max-width: 28rem;
  margin: 0 auto 1.5rem;
}

.not-found-search input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
}

@media (max-width: 800px) {
  .order-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .order-layout {
    grid-template-columns: 1fr;
  }
}

/* Cart sums and choices (shipping country, discount code) */

.cart-summary {
  margin-top: 1.5rem;
}

.cart-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
}

.cart-choice label {
  min-width: 7rem;
  font-weight: 600;
}

.cart-choice select,
.cart-choice input {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
}

.cart-choice .link {
  border: 0;
  background: none;
  color: var(--color-muted);
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}

.button.small-button {
  padding: 0.5rem 1rem;
}

.notice {
  margin: 0 0 0.75rem;
  color: var(--color-sale, #b42318);
}

.cart-sums {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}

.cart-sums dd {
  margin: 0;
  text-align: right;
}

.vat-note {
  margin: 0.25rem 0 0;
  text-align: right;
  font-size: 0.85rem;
}

.ship-to {
  margin: 1.5rem 0;
}

.ship-to h2 {
  font-size: 1rem;
  margin: 0 0 0.4rem;
}

.ship-to address {
  font-style: normal;
  color: var(--color-muted);
}

@media (max-width: 600px) {
  .cart-choice label {
    flex-basis: 100%;
  }
}

/* Search and listings */

.search-form {
  display: flex;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
}

.suggestions {
  position: absolute;
  z-index: 10;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.3rem 0;
  list-style: none;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-surface, var(--color-background));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.suggestions a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  color: var(--color-text);
  text-decoration: none;
}

.suggestions [aria-selected="true"] a,
.suggestions a:hover {
  background: var(--color-border);
}

.suggestions .price {
  color: var(--color-muted);
  white-space: nowrap;
}

.listing-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.listing-bar select,
.price-range input {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
}

.listing-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sort {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.filter-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

/* The count and the chips share the row with the tools: a chip coming or
   going moves nothing below it. */
.listing-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-width: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.listing-bar {
  min-height: 2.75rem;
  margin-bottom: 1.25rem;
}

.listing-results[aria-busy="true"] {
  opacity: 0.55;
  transition: opacity 0.2s 0.1s;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.875rem;
  text-decoration: none;
}

.chip:hover {
  background: var(--color-border);
}

.chip-clear {
  font-size: 0.875rem;
}

/* Filters beside the results; on phones a drawer (the same form). */
.listing-body {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.filter-panel fieldset {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  margin: 0;
  padding: 0 0 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--color-border);
}

.filter-panel legend {
  float: left;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 600;
}

.filter-panel legend + * {
  clear: left;
}

.listing-empty {
  padding: 2rem 0;
}

/* The price slider (search.js): two range inputs over one rail. The
   inputs themselves let clicks through; only their thumbs take them. */
.range-slider {
  margin: 0.25rem 0 0.75rem;
}

.range-label {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.range-rail {
  position: relative;
  height: 1.5rem;
}

.range-rail::before,
.range-fill {
  content: "";
  position: absolute;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  transform: translateY(-50%);
}

.range-rail::before {
  left: 0;
  right: 0;
  background: var(--color-border);
}

.range-fill {
  left: 0;
  right: 0;
  background: var(--color-primary);
}

.range-rail input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.range-rail input[type="range"]::-webkit-slider-runnable-track {
  height: 100%;
  background: none;
}

.range-rail input[type="range"]::-moz-range-track {
  background: none;
}

.range-rail input[type="range"]::-webkit-slider-thumb {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-background);
  box-shadow: 0 1px 4px rgb(0 0 0 / 20%);
  cursor: grab;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
}

.range-rail input[type="range"]::-moz-range-thumb {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-background);
  box-shadow: 0 1px 4px rgb(0 0 0 / 20%);
  cursor: grab;
  pointer-events: auto;
}

.range-rail input[type="range"]:active::-webkit-slider-thumb {
  cursor: grabbing;
  transform: scale(1.1);
}

.range-rail input[type="range"]:focus-visible {
  outline: none;
}

.range-rail input[type="range"]:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.range-rail input[type="range"]:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.filter-panel .filter-actions {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin: 0;
}

.filter-panel .filter-actions .button {
  width: 100%;
}

.filter-panel .filter-actions a {
  font-size: 0.9rem;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--color-primary);
}

@media (min-width: 901px) {
  .filter-panel[popover] {
    position: sticky;
    top: 5.5rem;
    inset: auto;
    display: grid;
    align-content: start;
    gap: 1.25rem;
    width: auto;
    height: auto;
    max-height: calc(100vh - 7rem);
    margin: 0;
    padding: 0 0.25rem 0 0;
    border: 0;
    background: none;
    box-shadow: none;
    overflow-y: auto;
    transform: none;
  }

  .filter-head {
    display: none;
  }
}

@media (max-width: 900px) {
  .listing-body {
    grid-template-columns: 1fr;
  }

  .filter-toggle {
    display: inline-flex;
  }

  .filter-panel:popover-open {
    display: grid;
    align-content: start;
    gap: 1.25rem;
  }

  .filter-panel .filter-actions {
    position: sticky;
    bottom: -2rem;
    margin: 0 -1.25rem;
    padding: 1rem 1.25rem 2rem;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
  }
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.price-range input {
  width: 100%;
  min-width: 0;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 2.5rem 0 0;
}

.pagination a,
.pagination span {
  min-width: 2.2rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
}

.pagination [aria-current="page"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-on-primary);
}

.pagination .gap {
  border: 0;
}

@media (max-width: 600px) {
  .search-form {
    flex-direction: column;
  }
}

/* Content pages, the footer's menu, contact */

.page-title {
  max-width: 760px;
  padding-bottom: 0;
}

/* Legal text reads as one document, not a stack of bands. */
.legal-page .rich-text {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.page-title h1 {
  margin-bottom: 0;
}

.contact-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.contact-details {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius, 8px);
  background: var(--color-surface);
  color: var(--color-text);
}

.contact-details p {
  margin: 0;
}

.contact-help {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-main {
  padding-top: 0.5rem;
}

@media (max-width: 800px) {
  .contact-page {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  font-weight: 400;
}

.contact-form .button {
  justify-self: start;
}

.contact-form .hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice-good {
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius, 8px);
}

p.lines {
  white-space: pre-line;
}

/* Invoices (and printing them) */

.invoice-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.invoice-head h1 {
  margin: 0 0 0.5rem;
}

.invoice-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1rem;
  margin: 0;
}

.invoice-meta dd {
  margin: 0;
}

.invoice-seller {
  text-align: right;
  color: var(--color-muted);
}

.invoice-buyer h2 {
  font-size: 1rem;
  margin: 0 0 0.3rem;
}

.invoice-buyer .lines {
  white-space: pre-line;
  margin: 0 0 1.5rem;
}

.invoice-lines,
.invoice-vat {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

.invoice-lines th,
.invoice-lines td,
.invoice-vat th,
.invoice-vat td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.invoice .num {
  text-align: right;
  white-space: nowrap;
}

.invoice-totals {
  display: grid;
  gap: 1rem;
}

.invoice-sum {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1.5rem;
  justify-self: end;
  min-width: 16rem;
  margin: 0;
}

.invoice-sum dd {
  margin: 0;
  text-align: right;
}

.invoice-sum .total {
  font-weight: 700;
}

.row-links {
  margin: 1.5rem 0 0.5rem;
}

@media print {
  .announcement,
  .site-header,
  .site-footer,
  .preview-bar,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .invoice {
    padding: 0;
    max-width: none;
  }
}

/* The larger picture (round 2, R7; pages.rs, zoom.js): pictures are buttons
   that open it in a <dialog>. */
.zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.zoom:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgb(0 0 0 / 0.85);
}
.lightbox img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius, 6px);
}
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: #111;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* The product page's thumbnails (pages.rs): each shows its picture in the
   main spot; the one shown is marked. */
.product-thumbs .thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: calc(var(--radius, 6px) + 2px);
  background: none;
  cursor: pointer;
}
.product-thumbs .thumb[aria-pressed="true"] {
  border-color: var(--color-primary);
}
.product-thumbs .thumb:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
.product-thumbs .thumb img {
  width: 100%;
  height: auto;
}

/* The product page's carousel (pages.rs, gallery.js): a row of slides that
   snaps, with chevrons over it. Without JavaScript it still swipes. */
.carousel {
  position: relative;
}
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--radius, 6px);
}
.slides::-webkit-scrollbar {
  display: none;
}
.slides:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.9);
  color: #111;
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.25);
  cursor: pointer;
}
.carousel-prev {
  left: 12px;
}
.carousel-next {
  right: 12px;
}
.carousel-prev[hidden],
.carousel-next[hidden] {
  display: none;
}
.carousel-prev:focus-visible,
.carousel-next:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* A card's glance at a product's pictures (sections.rs, gallery.js): a row
   that swipes, chevrons on hover where there is a mouse, dots for how many
   there are. The rest of each picture is a link to the product. */
.card-media {
  position: relative;
  display: block;
}
.card-slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.card-slides::-webkit-scrollbar {
  display: none;
}
.card-slide {
  display: block;
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.card-slide:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
  border-radius: var(--radius);
}
.card-prev,
.card-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: #111;
  box-shadow: 0 1px 5px rgb(0 0 0 / 0.25);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}
.card-prev {
  left: 8px;
}
.card-next {
  right: 8px;
}
.product-card:hover .card-prev,
.product-card:hover .card-next {
  opacity: 1;
}
@media (hover: none) {
  .card-prev,
  .card-next {
    display: none;
  }
}
.card-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
}
.card-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.55);
  box-shadow: 0 0 2px rgb(0 0 0 / 0.45);
}
.card-dots .dot[data-active] {
  background: #fff;
}
