/* ── shop.html ────────────────────────────────────────────────────
   A bento of bone tiles on the void. Its own file because no other page has a
   product grid or a cart. */

.sp { padding: calc(var(--chrome-h) + clamp(28px, 6vh, 64px)) 0 clamp(70px, 12vw, 150px); }

/* The page name, centred and at the size every page name on the site is
   (--t-page), with no intro under it: the tiles start straight away. */
.sp-title { margin: 0 auto clamp(26px, 4.5vh, 50px); font-size: var(--t-page); font-weight: 400; text-align: center; }

/* ── The tiles ────────────────────────────────────────────────────
   A bento of bone tiles in four sizes, packed dense: four columns on a
   wide screen, two on a phone. Rows are as tall as a column is wide, so a
   one-cell tile is square and a big one is a square twice the size. The
   width comes from the page (a container), because a row height cannot be
   read off the grid it belongs to. */
.sp { container-type: inline-size; }

.sp-grid {
  --cols: 4;
  --gap: clamp(10px, 1.4vw, 18px);
  --cell: calc((min(100cqw - 2 * var(--gutter), 1280px) - (var(--cols) - 1) * var(--gap)) / var(--cols));
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  grid-auto-rows: var(--cell);
  grid-auto-flow: row dense;
  gap: var(--gap);
  justify-content: center;
  padding: 0;
  max-width: none;
}

.sp-tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bone);
  color: var(--void);
}
.sp-tile--big  { grid-column: span 2; grid-row: span 2; }
.sp-tile--tall { grid-row: span 2; }
.sp-tile--wide { grid-column: span 2; }

/* The object, centred and contained: on a wide or a tall tile the bone
   simply runs on either side, since every image's ground is the tile's. */
.sp-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14% 8% 6%;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.sp-tile--big .sp-img { padding: 10% 8% 4%; }
.sp-tile--tall .sp-img { padding: 30% 4% 6%; }
a.sp-tile:hover .sp-img { transform: scale(1.035); }

/* The Action Plan is a page, so it gets a shadow to lift it off the tile. */
.sp-tile--paper .sp-img { padding: 22% 16% 12%; filter: drop-shadow(0 10px 18px rgba(var(--rgb-void), 0.18)); }

.sp-label {
  position: absolute;
  top: clamp(12px, 1.4vw, 20px);
  left: clamp(12px, 1.4vw, 20px);
  right: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-family: var(--prose);
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.25;
}
.sp-name { font-weight: 500; }
.sp-price { font-weight: 400; color: rgba(var(--rgb-void), 0.7); }
.sp-was { color: rgba(var(--rgb-void), 0.4); margin-right: 4px; }

.sp-tile.is-off { cursor: default; }

/* A slot held open for a product that is not ready: nothing in it, and on a
   phone it gives way rather than leave a hole. */
.sp-slot { display: block; }

/* One photograph per design, side by side under the label. */
.sp-imgs {
  position: absolute;
  inset: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: clamp(50px, 4.5vw, 64px) 12px 12px;
}
.sp-pick { display: block; min-height: 0; }
.sp-pick img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
a.sp-pick:hover img, .sp-tile[data-sheet] .sp-pick:hover img { transform: scale(1.04); }
/* A poster's room shot over its flat sheet, up on hover. A tap is not a hover: on a touch
   screen :hover latches on the last thing touched, so it is mouse only (BLUZG, site.css). */
.sp-pick:has(.sp-room) { position: relative; }
.sp-pick .sp-room { position: absolute; inset: 0; opacity: 0; transition: opacity 0.28s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@media (hover: hover) {
  .sp-pick:hover .sp-room { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-pick .sp-room { transition: none; }
}

@media (max-width: 760px) {
  .sp-grid { --cols: 2; }
  .sp-slot { display: none; }
  .sp-imgs { padding: 50px 8px 8px; }
  .sp-label { font-size: 12px; }
}

/* ── The sheet ────────────────────────────────────────────────────
   BLUZG's product sheet in this site's colours: the photograph on bone on
   the left, everything else on the void on the right. Stacked on a phone,
   the photograph first. */
.sp-sheet {
  width: min(960px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--hair);
  background: var(--void);
  color: var(--bone);
  overflow: auto;
}
.sp-sheet[open] { display: grid; grid-template-columns: 1fr 1fr; }
.sp-sheet::backdrop { background: rgba(var(--rgb-void), 0.85); }

.sp-sheet-shot { background: var(--bone); display: flex; flex-direction: column; }
.sp-sheet-img { width: 100%; aspect-ratio: 1; height: auto; object-fit: contain; padding: 6%; }

/* Zoom, js/zoom.js: a mouse magnifies in place, a finger gets the whole screen. */
.sp-zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; overflow: hidden; cursor: zoom-in; }
.sp-zoom[data-zoom="true"] { cursor: zoom-out; }
.sp-zoom img { display: block; transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .28s ease-out; }
.sp-zoom[data-zoom="true"] img { transform: scale(2.4); }
/* a finger cannot hover, so the sign that a photo opens is drawn */
@media (hover: none) {
  .sp-zoom::after { content: '+'; position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px; border: 1px solid var(--hair-dark); background: var(--bone); color: var(--void); font-size: 20px; line-height: 30px; text-align: center; }
}
/* The ground is set from the panel. */
.zoom { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; touch-action: none; }
.zoom-pic { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .28s ease-out; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.zoom-x { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border: 1px solid var(--hair-dark); background: var(--bone); color: var(--void); cursor: pointer; font-size: 24px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .sp-zoom img, .zoom-pic { transition: none; } }

/* Thumbnails under the photograph; a tote's follow the colour picked. */
.sp-thumbs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.sp-thumb { width: 56px; height: 56px; padding: 0; border: 1px solid var(--hair-dark); cursor: pointer; background: var(--bone); }
.sp-thumb[hidden] { display: none; }
.sp-thumb:hover { border-color: var(--void); }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; }

.sp-sheet-info { padding: clamp(28px, 4vw, 48px) clamp(22px, 3.5vw, 44px); display: flex; flex-direction: column; }
.sp-sheet-name { font-size: clamp(30px, 3.4vw, 44px); line-height: 0.95; margin: 0 28px 24px 0; }

.sp-opt {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(var(--rgb-bone), 0.55);
  margin: 0 0 10px;
}
.sp-opt-v { color: var(--bone); margin-left: 6px; }

.sp-colours { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.sp-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--bone);
  cursor: pointer;
  transition: border-color 0.15s;
}
.sp-chip:hover { border-color: rgba(var(--rgb-bone), 0.5); }
.sp-sizes[hidden] { display: none; }
.sp-size-select { width: 100%; margin-bottom: 18px; padding: 12px 40px 12px 12px; border: 1px solid var(--hair); border-radius: 0; background-color: transparent; color: var(--bone); cursor: pointer; font-family: var(--mono); font-size: 16px; appearance: none; -webkit-appearance: none; background-image:linear-gradient(45deg,transparent 50%,var(--bone) 50%),linear-gradient(135deg,var(--bone) 50%,transparent 50%);background-position:calc(100% - 20px) 50%,calc(100% - 14px) 50%;background-size:6px 6px,6px 6px;background-repeat:no-repeat; }
.sp-size-select:hover { border-color: rgba(var(--rgb-bone), 0.5); }
/* the framed labels are cut off at 16 px in the panel's width; a finger keeps 16, under which iOS zooms the page */
@media (hover: hover) and (pointer: fine) { .sp-size-select { font-size: 13px; } }
.sp-size-select option { color: #111; background: #fff; }
.sp-chip[aria-checked='true'] { border-color: var(--bone); }

/* Round swatches: a ring round the dot marks the one picked. */
.sp-swatch { padding: 3px; border-radius: 50%; }
.sp-dot { display: block; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(var(--rgb-bone), 0.25); }
.sp-dot--black { background: #111; }
.sp-dot--red { background: #B3202A; }
.sp-dot--natural { background: #E6DCC8; }
.sp-dot--blue { background: #0A0A8C; }
.sp-dot--paper { background: #F4F1EA; }
.sp-dot--bone { background: #EFEBE4; }

.sp-sheet-price { font-size: clamp(26px, 2.6vw, 34px); margin: 0 0 6px; }
.sp-sheet-price .sp-was { font-size: 0.6em; color: rgba(var(--rgb-bone), 0.4); margin-right: 8px; }
.sp-ship { font-family: var(--mono); font-size: 11px; line-height: 1.4; color: var(--signal); margin: 0 0 6px; }

.sp-add {
  margin-top: 14px;
  width: 100%;
  padding: 14px;
  background: var(--bone);
  color: var(--void);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sp-add:hover { background: var(--signal); color: var(--void); }

/* In place of the button while a product is held back. */
.sp-soon {
  margin: 14px 0 0;
  padding: 13px;
  border: 1px solid var(--hair);
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(var(--rgb-bone), 0.6);
}
.sp-add:active { transform: scale(0.98); }

/* The facts: label left, value right, a hairline between rows. */
.sp-specs { list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.sp-spec { padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 13px; line-height: 1.45; }
.sp-spec dt { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(var(--rgb-bone), 0.55); flex: 0 0 auto; }
.sp-spec dd { margin: 0; text-align: right; }

.sp-more { border-bottom: 1px solid var(--hair); margin-top: 14px; }
.sp-more summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 12px 24px 12px 0;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.sp-more summary::-webkit-details-marker { display: none; }
.sp-more summary::after { content: '+'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 400; transition: transform 0.2s; }
.sp-more[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.sp-more p { margin: 0 0 14px; font-size: 13px; line-height: 1.55; color: rgba(var(--rgb-bone), 0.8); }
.sp-more a { color: var(--bone); border-bottom: 1px solid var(--signal); }

.sp-sheet-x {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 26px;
  line-height: 1;
  color: var(--bone);
  cursor: pointer;
}
.sp-sheet-x:hover { color: var(--signal); }

@media (max-width: 700px) {
  .sp-sheet[open] { grid-template-columns: 1fr; }
  .sp-sheet-img { aspect-ratio: 5 / 4; }
  .sp-sheet-x { color: var(--void); }
}

/* ── The questions ────────────────────────────────────────────── */
/* As the Action Plan page's questions: the heading centred, the list a
   centred column read left to right, each question in Anton. */
.sp-faq { margin-top: clamp(100px, 15vh, 170px); max-width: calc(720px + 2 * var(--gutter)); }
.sp-faq-title { font-size: clamp(30px, 5vw, 66px); margin: 0 0 clamp(36px, 6vh, 60px); text-align: center; }

.sp-q { border-top: 1px solid var(--hair); }
.sp-q:last-of-type { border-bottom: 1px solid var(--hair); }
.sp-q summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 36px 18px 0;
  position: relative;
  font-family: 'Anton', 'Arial Narrow', Impact, sans-serif;
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.sp-q summary::-webkit-details-marker { display: none; }
.sp-q summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 400;
  transition: transform 0.2s;
}
.sp-q[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.sp-q summary:hover { color: var(--signal); }
.sp-q p { margin: 0 0 20px; max-width: 64ch; font-size: 15px; line-height: 1.6; color: rgba(var(--rgb-bone), 0.82); }

/* ── The cart ─────────────────────────────────────────────────── */
.sp-bag-btn {
  position: fixed;
  right: var(--gutter);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: var(--signal);
  color: var(--void);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
}
.sp-bag-btn[hidden] { display: none; }
.sp-count { background: var(--void); color: var(--bone); padding: 2px 7px; letter-spacing: 0; }

.sp-bag {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bone);
  color: var(--void);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 22px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s 0.32s;
}
.sp-bag[data-open='true'] { transform: none; visibility: visible; transition: transform 0.32s cubic-bezier(0.2, 0.7, 0.2, 1); }
.sp-locked, .sp-locked body { overflow: hidden; }

.sp-bag-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 14px; border-bottom: 1px solid var(--hair-dark); }
.sp-bag-title { font-size: 32px; margin: 0; }
.sp-bag-close { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--void); cursor: pointer; }
.sp-bag-close:hover { color: var(--signal); }

.sp-lines { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1 1 auto; }
.sp-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--hair-dark); font-family: var(--mono); font-size: 12px; }
.sp-line-info { display: flex; flex-direction: column; gap: 3px; grid-column: 1 / -1; }
.sp-line-name { font-weight: 700; }
.sp-line-opt { color: rgba(var(--rgb-void), 0.6); }
.sp-line-price { justify-self: end; align-self: center; font-weight: 700; }
.sp-qty { display: inline-flex; align-items: center; border: 1px solid var(--hair-dark); justify-self: start; }
.sp-qty-b { width: 30px; height: 28px; font-size: 15px; color: var(--void); cursor: pointer; }
.sp-qty-b:hover { background: var(--void); color: var(--bone); }
.sp-qty-n { min-width: 26px; text-align: center; }
.sp-empty { font-family: var(--mono); font-size: 12px; color: rgba(var(--rgb-void), 0.6); margin: 18px 0 auto; }
.sp-empty[hidden] { display: none; }

.sp-bag-foot { padding-top: 16px; font-family: var(--mono); }
.sp-total { font-size: 14px; font-weight: 700; margin: 0 0 10px; }
.sp-note { font-size: 11px; line-height: 1.45; color: var(--signal); margin: 0 0 10px; }
.sp-note:empty { display: none; }
.sp-checkout {
  width: 100%;
  padding: 15px;
  background: var(--void);
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
}
.sp-checkout:hover:not(:disabled) { background: var(--signal); color: var(--void); }
.sp-checkout:disabled { opacity: 0.4; cursor: default; }
.sp-fine { font-size: 10px; color: rgba(var(--rgb-void), 0.55); margin: 10px 0 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .sp-img, .sp-bag, .sp-bag[data-open='true'] { transition: none; }
}

.sp-faq-more { margin: 28px 0 0; text-align: center; font-size: 14px; color: rgba(var(--rgb-bone), 0.7); }
.sp-faq-more a { color: var(--bone); border-bottom: 1px solid var(--signal); }
.sp-faq-more a:hover { color: var(--signal); }


.sp-chip[hidden], .sp-spec[hidden], .sp-add[hidden], .sp-soon[hidden] { display: none; }

/* Shipping, returns and payment, the last thing on the shop page. The payment marks are the
   schemes' own files (assets/pay), so the row adds only the spacing and a hairline. */
.sp-trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(70px, 10vh, 120px); border-top: 1px solid var(--hair); }
.sp-trust > div { padding: clamp(36px, 5vw, 64px) var(--gutter); border-right: 1px solid var(--hair); text-align: center; }
.sp-trust > div:last-child { border-right: 0; }
.sp-trust-mark { display: block; line-height: 0; color: var(--bone); }
.sp-trust h3 { margin: 14px 0 8px; font-size: 16px; line-height: 1.2; font-weight: 600; }
.sp-trust p { margin: 0; font-size: 15px; color: rgba(var(--rgb-bone), 0.7); }
.sp-trust a { color: var(--bone); border-bottom: 1px solid var(--signal); }
.sp-pay { display: flex; justify-content: center; gap: 5px; margin: 0 auto; max-width: 306px; }
.sp-pay img { flex: 0 1 38px; min-width: 0; width: 38px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px var(--hair); }
@media (max-width: 860px) {
  .sp-trust { grid-template-columns: 1fr; }
  .sp-trust > div { border-right: 0; border-bottom: 1px solid var(--hair); }
  .sp-trust > div:last-child { border-bottom: 0; }
}
