/* ---------- Shop ---------- */

.store-page .page-lead { text-wrap: balance; }
.shop-section {
  position: relative;
  z-index: 1;
  margin-top: -88px;
  padding-top: 0;
}
html.is-locked { overflow: hidden; }

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.shop-chips li[hidden] { display: none; }
/* the same shape as the site's buttons (.btn): 15px corners and the 5px navy edge */
.shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 7px 18px 7px 10px;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 15px;
  box-shadow: var(--edge);
  font: 600 16.5px/1 var(--font-display);
  color: var(--navy);
  transition: transform 0.18s var(--ease-soft), box-shadow 0.18s var(--ease-soft), background-color 0.25s ease;
}
.shop-chip:hover {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--navy);
  background: var(--aqua-soft);
}
.shop-chip:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--navy);
  transition-duration: 0.06s;
}
.shop-chip[aria-current="true"] {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--navy);
  background: var(--aqua);
}
.shop-chip-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}
.shop-chip-ico {
  width: 30px;
  height: 30px;
  padding: 3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* the username chip leads the bar; it is an action, so it wears its own colour */
.shop-chip--who {
  margin-right: 6px;
  background: var(--aqua-soft);
  cursor: pointer;
}
.shop-chip--who.is-set { background: var(--cloud); }
.shop-chip--who .shop-head {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.shop-offline {
  display: none;
  max-width: 40em;
  margin: 18px auto 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-mute);
}
.shop-section.is-offline .shop-offline { display: block; }

/* ---------- Views ---------- */

/* with JavaScript one view shows at a time (rules in the page head); without it all of them stack */
.shop-views {
  display: grid;
  gap: clamp(60px, 6.5vw, 92px);
  margin-top: clamp(40px, 4.4vw, 60px);
}
.shop-view:focus { outline: none; }
.shop-view[hidden] { display: none !important; }

/* ---------- Home ---------- */

.shop-home {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
}

/* ---------- Featured carousel ---------- */

.feat {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 3vw, 36px) clamp(72px, 7vw, 92px) 64px;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 55%, var(--sky-low) 100%);
  border: 2px solid var(--navy);
  border-radius: 26px;
  box-shadow: var(--edge-card);
}
/* the cloud bank drifts like the ones on the landing page; main.js runs it only while it is on screen */
.feat-clouds {
  --cw: 320px;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: calc(100% + var(--cw));
  height: 52px;
  background: var(--cloud);
  -webkit-mask: url("../assets/img/cloud-a.svg") left bottom / 320px 52px repeat-x;
  mask: url("../assets/img/cloud-a.svg") left bottom / 320px 52px repeat-x;
  pointer-events: none;
  animation: drift 26s linear infinite;
  animation-play-state: paused;
}
.feat-clouds.is-running { animation-play-state: running; }
.feat-track { display: grid; }
.feat-slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(18px);
  transition: opacity 0.45s ease, transform 0.6s var(--ease-out), visibility 0s linear 0.45s;
}
.feat-slide.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s ease, transform 0.6s var(--ease-out), visibility 0s;
}
.feat-slide[hidden] { display: none; }
.feat-art {
  display: grid;
  place-items: center;
  width: clamp(150px, 16vw, 210px);
  aspect-ratio: 1;
}
.feat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(0, 22, 53, 0.28));
  animation: feat-float 5s ease-in-out infinite;
}
@keyframes feat-float {
  50% { transform: translateY(-7px); }
}
.feat-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feat-pill {
  padding: 7px 11px 6px;
  background: var(--tag, var(--aqua));
  border: 2px solid var(--navy);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--navy);
  font: 700 12.5px/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
}
.feat-pill--line { background: var(--cloud); }
.feat-name {
  margin-top: 14px;
  font-family: "Bricolage Grotesque", var(--font-display);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.feat-price {
  flex-wrap: wrap;
  margin-top: 10px;
}
.feat-price .price { font-size: 28px; }
.feat-price .price-was { color: rgba(0, 22, 53, 0.66); }
.feat-price .price-off {
  border: 2px solid var(--navy);
  background: var(--cloud);
  color: var(--navy);
}
.price-off[hidden] { display: none; }
.feat-actions {
  display: grid;
  gap: 12px;
}
.feat-actions .btn {
  min-height: 56px;
  padding-inline: 22px;
  font-size: 17.5px;
  font-weight: 700;
}
.feat-arrow {
  position: absolute;
  top: calc(50% - 6px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--navy);
  color: var(--navy);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.25s ease, box-shadow 0.18s var(--ease-soft), transform 0.18s var(--ease-soft);
}
.feat-arrow:hover {
  background: var(--aqua-soft);
  box-shadow: 0 1px 0 var(--navy);
  transform: translateY(calc(-50% + 2px));
}
.feat-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feat-arrow--prev { left: 18px; }
.feat-arrow--next { right: 18px; }
.feat-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.feat-dot {
  position: relative;
  width: 24px;
  height: 12px;
  padding: 0;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 7px;
  cursor: pointer;
  transition: width 0.35s var(--ease-out), background-color 0.25s ease;
}
.feat-dot::before {
  content: "";
  position: absolute;
  inset: -11px -5px;
}
.feat-dot[aria-current="true"] {
  width: 44px;
  background: var(--aqua);
}
.feat-dot[hidden] { display: none; }
.no-js .feat-arrow,
.no-js .feat-dots,
.no-js .feat-actions { display: none; }

/* ---------- Category cards ---------- */

.cat-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(26px, 3vw, 36px);
}
.cat-cards li { display: flex; }
.cat-cards li[hidden] { display: none; }
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: clamp(236px, 22vw, 280px);
  padding: 24px 26px 60px;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid var(--navy);
  border-radius: 26px;
  box-shadow: var(--edge-card);
  color: var(--navy);
  transition: transform 0.18s var(--ease-soft), box-shadow 0.18s var(--ease-soft);
}
/* a sky each: gold morning, day blue, twilight violet, dusk pink */
.cat-card--1 { background: linear-gradient(160deg, #F2A11D 0%, #FFC94D 52%, #FFE6A3 100%); }
.cat-card--2 { background: linear-gradient(160deg, #2E9BEA 0%, #5CBDF4 52%, #A6E1FD 100%); }
.cat-card--3 { background: linear-gradient(160deg, #6555DE 0%, #9081F1 52%, #CBC1FF 100%); }
.cat-card--4 { background: linear-gradient(160deg, #D5419B 0%, #EE7CBF 52%, #FFC4E5 100%); }
/* each card's clouds drift at their own pace, so the four never move in step */
.cat-clouds {
  --cw: 320px;
  position: absolute;
  left: 0;
  bottom: -1px;
  z-index: 0;
  width: calc(100% + var(--cw));
  height: 52px;
  background: var(--cloud);
  -webkit-mask: url("../assets/img/cloud-a.svg") left bottom / 320px 52px repeat-x;
  mask: url("../assets/img/cloud-a.svg") left bottom / 320px 52px repeat-x;
  pointer-events: none;
  animation: drift 24s linear infinite;
  animation-play-state: paused;
}
.cat-clouds.is-running { animation-play-state: running; }
.cat-card--2 .cat-clouds { animation-duration: 29s; animation-delay: -9s; }
.cat-card--3 .cat-clouds { animation-duration: 26s; animation-delay: -4s; }
.cat-card--4 .cat-clouds { animation-duration: 31s; animation-delay: -15s; }
.cat-card:hover {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--navy);
}
.cat-card:active {
  transform: translateY(8px);
  box-shadow: 0 0 0 var(--navy);
  transition-duration: 0.06s;
}
.cat-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
/* in the flow above the name, so it moves the title down instead of covering it */
.cat-sale {
  position: relative;
  z-index: 3;
  margin: 0 0 16px 2px;
  padding: 8px 13px 7px;
  background: var(--aqua);
  border: 2px solid var(--navy);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--navy);
  font: 700 14px/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  transform: rotate(-4deg);
}
.cat-sale[hidden] { display: none; }
/* white letters in a navy outline with a hard drop, the way the SMC graphics are drawn */
.cat-name {
  position: relative;
  z-index: 2;
  max-width: 60%;
  font: 700 clamp(40px, 4.4vw, 60px)/1 var(--font-display);
  color: #fff;
  -webkit-text-stroke: 3px var(--navy);
  paint-order: stroke fill;
  text-shadow: 0 5px 0 var(--navy);
}
.cat-go {
  position: relative;
  z-index: 2;
  margin-top: 18px;
}
.cat-art {
  position: absolute;
  top: 46%;
  right: 5%;
  z-index: 1;
  width: 42%;
  max-width: 250px;
  height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(0, 22, 53, 0.3));
  transform: translateY(-50%) rotate(-6deg);
  transition: transform 0.8s var(--ease-out);
}
.cat-card:hover .cat-art { transform: translateY(-53%) rotate(-10deg) scale(1.04); }

.home-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(56px, 6vw, 84px);
  padding: clamp(26px, 3.4vw, 44px);
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 26px;
  box-shadow: var(--edge-card);
}
.home-title {
  font-family: "Bricolage Grotesque", var(--font-display);
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}
.home-lead {
  margin-top: 14px;
  font-size: clamp(16.5px, 1.3vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
}
.home-frame { margin: 0; }
.home-info {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 20px;
  margin-top: 24px;
}
.home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 22px;
  box-shadow: var(--edge);
}
/* the Discord cloud from the SMC graphics peeks in from the corner of the Support card */
.home-card--support { padding-bottom: 132px; }
/* it shrinks with a narrow card, so Join us! beside it always keeps clear */
.home-card-art {
  position: absolute;
  right: -16px;
  bottom: -20px;
  width: min(180px, 46%);
  pointer-events: none;
}
.home-card-art img {
  width: 100%;
  height: auto;
}
.home-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 clamp(21px, 1.8vw, 24px)/1.2 var(--font-display);
  color: var(--navy);
}
.home-card-title::before {
  content: "";
  flex: none;
  width: 27px;
  height: 19px;
  background: url("../assets/img/cloud-bullet.svg") center / contain no-repeat;
}
.home-card p {
  margin-top: 10px;
  line-height: 1.65;
  color: var(--ink-soft);
}
/* the official Tebex wordmark, unaltered: the dark one is the variant for white surfaces */
.home-tebex {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  font: 600 14.5px/1.2 var(--font-body);
  color: var(--ink-mute);
}
.home-tebex img {
  width: auto;
  height: 38px;
}
/* Join us! sits in the space kept free beside the Discord cloud */
.home-join {
  position: absolute;
  left: clamp(22px, 2.4vw, 30px);
  bottom: 30px;
  z-index: 2;
}

/* ---------- Categories ---------- */

.shop-cat {
  --cols: 3;
  width: 100%;
  max-width: calc(var(--cols) * 272px + (var(--cols) - 1) * 24px);
  margin-inline: auto;
  scroll-margin-top: 112px;
}
.shop-cat-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
.shop-cat-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  background: var(--aqua-soft);
  border: 2px solid var(--navy);
  border-radius: 18px;
  box-shadow: 0 4px 0 var(--navy);
}
.shop-cat-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.shop-cat-title {
  padding-top: 4px;
  font: 700 clamp(27px, 2.6vw, 34px)/1.1 var(--font-display);
  color: var(--navy);
}
.shop-cat-lead {
  max-width: 64ch;
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.shop-cat-lead p + p { margin-top: 4px; }

.shop-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 24px;
}
.shop-item { display: flex; }

/* ---------- Card ---------- */

.shop-card:hover .shop-img { transform: translateY(-6px) rotate(-4deg); }
.shop-stage { aspect-ratio: 1 / 0.84; }
.product-stage .shop-img,
.product-stage .pkg-img {
  position: relative;
  z-index: 1;
  width: 62%;
  height: 68%;
  margin-bottom: 26px;
  object-fit: contain;
}
.shop-body {
  flex: 1;
  gap: 8px;
  padding: 8px 20px 20px;
}
.shop-name {
  font: 700 clamp(19px, 1.6vw, 22px)/1.2 var(--font-display);
  color: var(--navy);
}
.shop-price {
  flex-wrap: wrap;
  row-gap: 4px;
}
.price-was {
  font: 600 15.5px/1 var(--font-display);
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
/* the price waits for Tebex so a visitor never sees it change; after 5s it shows anyway */
.js .shop-section:not(.is-live) .shop-price,
.js .shop-section:not(.is-live) .product-badge {
  opacity: 0;
  animation: price-late 0.3s ease 5s forwards;
}
@keyframes price-late {
  to { opacity: 1; }
}
.shop-price,
.shop-card .product-badge { transition: opacity 0.3s ease; }

/* a tag set in Tebex takes the corner, and a sale badge moves over to the other one */
.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  overflow: hidden;
  padding: 7px 11px 6px;
  background: var(--tag, var(--aqua));
  border: 2px solid var(--navy);
  border-radius: 11px;
  box-shadow: 0 3px 0 var(--navy);
  font: 700 12.5px/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--navy);
}
.shop-card.has-tag .product-badge {
  left: auto;
  right: 12px;
}
.shop-card.has-tag:has(.product-badge:not([hidden])) .product-tag { max-width: calc(100% - 96px); }

/* an end date set in Tebex counts down under the price */
.shop-ends {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 14px/1.25 var(--font-display);
  color: var(--blue);
}
.shop-ends::before {
  content: "";
  flex: none;
  width: 15px;
  height: 15px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.shop-ends[hidden] { display: none; }
.feat-ends {
  margin-top: 10px;
  color: var(--navy);
}
.feat[hidden] { display: none; }

/* the whole card opens the details; the basket button sits above that */
.shop-more {
  align-self: flex-start;
  padding: 2px 0;
  background: none;
  border: 0;
  font: 600 14.5px/1.3 var(--font-body);
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.shop-more::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 20px;
}
.shop-more:focus-visible { outline: none; }
.shop-more:focus-visible::after {
  outline: 3px solid var(--blue);
  outline-offset: -5px;
}
.shop-add {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: auto;
}
.shop-add.is-done,
.pkg-add.is-done { background: var(--aqua-hi); }
.is-busy {
  opacity: 0.6;
  cursor: progress;
}
.no-js .shop-more,
.no-js .shop-add,
.no-js .shop-chip--who { display: none; }
.shop-noscript {
  margin-top: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- Minecraft head ---------- */

.shop-head {
  flex: none;
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--frost) center / cover no-repeat;
  border: 2px solid var(--navy);
  border-radius: 7px;
  image-rendering: pixelated;
}
.shop-head[hidden] { display: none; }

/* ---------- Basket button ---------- */

.basket-fab {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 20px 10px 16px;
  background: var(--aqua);
  border: 2px solid var(--navy);
  border-radius: 18px;
  box-shadow: var(--edge);
  font: 700 17.5px/1 var(--font-display);
  color: var(--navy);
  cursor: pointer;
  transition: transform 0.18s var(--ease-soft), box-shadow 0.18s var(--ease-soft);
}
.basket-fab[hidden] { display: none; }
.basket-fab:hover {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--navy);
}
.basket-fab-count {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  padding: 0 7px;
  background: var(--navy);
  border-radius: 9px;
  font-size: 14.5px;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.basket-fab-total { font-variant-numeric: tabular-nums; }
.basket-fab.is-bump { animation: fab-bump 0.55s var(--ease-out); }
@keyframes fab-bump {
  35% { transform: translateY(-7px) scale(1.04); }
}
.store-page .toast { bottom: 104px; }

/* ---------- Dialogs ---------- */

.shop-dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  color: var(--ink);
  background: transparent;
  border: 0;
}
.shop-dialog::backdrop {
  background: rgba(0, 22, 53, 0.5);
}
.shop-dialog[open] { animation: dialog-in 0.35s var(--ease-out); }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(14px); }
}
.dialog-box {
  position: relative;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 24px;
  box-shadow: var(--edge-card);
}
.dialog-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 13px;
  box-shadow: 0 3px 0 var(--navy);
  color: var(--navy);
  cursor: pointer;
  transition: transform 0.18s var(--ease-soft), box-shadow 0.18s var(--ease-soft), background-color 0.25s ease;
}
.dialog-x:hover {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--navy);
  background: var(--aqua-soft);
}
.dialog-x svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

/* ---------- Package details ---------- */

.pkg-dialog { width: min(960px, calc(100vw - 32px)); }
.pkg-box {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  height: min(640px, calc(100dvh - 48px));
  overflow: hidden;
}
.pkg-stage {
  aspect-ratio: auto;
  border-right: 2px solid var(--navy);
}
.product-stage .pkg-img {
  width: 66%;
  height: 58%;
  margin-bottom: 56px;
}
.pkg-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 30px 30px 26px;
}
.pkg-title {
  padding-right: 52px;
  font: 700 clamp(26px, 2.6vw, 33px)/1.12 var(--font-display);
  color: var(--navy);
}
.pkg-price {
  flex-wrap: wrap;
  margin-top: 12px;
}
.pkg-price .price { font-size: 27px; }
.pkg-tags { margin-bottom: 12px; }
.pkg-tags[hidden] { display: none; }
.pkg-tags .product-tag {
  position: static;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}
.pkg-ends { margin-top: 10px; }
.pkg-desc {
  flex: 1;
  min-height: 0;
  margin-top: 18px;
  padding: 2px 10px 6px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.pkg-desc > * + * { margin-top: 10px; }
.pkg-desc h3,
.pkg-desc h4 {
  margin: 18px 0 0;
  font: 700 18px/1.25 var(--font-display);
  color: var(--navy);
}
.pkg-desc blockquote {
  margin: 10px 0 0;
  padding-left: 14px;
  border-left: 4px solid var(--aqua);
}
.pkg-desc strong { color: var(--navy); }
.pkg-desc a {
  font-weight: 600;
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.pkg-desc ul,
.pkg-desc ol {
  display: grid;
  gap: 4px;
}
.pkg-desc ul > li {
  position: relative;
  padding-left: 26px;
}
.pkg-desc ul > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(0.8em - 6px);
  width: 18px;
  height: 13px;
  background: url("../assets/img/cloud-bullet.svg") center / contain no-repeat;
}
.pkg-desc ol {
  padding-left: 1.4em;
  list-style: decimal;
}
.pkg-desc img {
  max-width: min(100%, 300px);
  height: auto;
  margin-inline: auto;
  border-radius: 12px;
}
.pkg-desc code {
  padding: 1px 5px;
  background: var(--frost);
  border-radius: 6px;
  font-size: 0.92em;
}
.pkg-wait { color: var(--ink-mute); }
.pkg-buy {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}
.pkg-add { flex: 1; }

.qty {
  display: inline-flex;
  align-items: center;
  flex: none;
  height: 52px;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 15px;
  overflow: hidden;
}
.qty[hidden] { display: none; }
.qty-btn {
  width: 42px;
  height: 100%;
  padding: 0;
  background: none;
  border: 0;
  font: 700 22px/1 var(--font-display);
  color: var(--navy);
  cursor: pointer;
}
.qty-btn:hover { background: var(--aqua-soft); }
.qty-btn:disabled {
  color: var(--line-strong);
  cursor: default;
  background: none;
}
.qty-input,
.qty-value {
  width: 44px;
  text-align: center;
  font: 700 18px/1 var(--font-display);
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.qty-input {
  height: 100%;
  padding: 0;
  background: none;
  border: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}
.qty--small {
  height: 38px;
  border-radius: 11px;
}
.qty--small .qty-btn {
  width: 32px;
  font-size: 18px;
}
.qty--small .qty-value {
  width: 26px;
  font-size: 15.5px;
}

/* ---------- Who it is for ---------- */

.who-dialog { width: min(480px, calc(100vw - 32px)); }
.who-box { padding: 32px 30px 28px; }
.who-title {
  padding-right: 52px;
  font: 700 clamp(26px, 2.4vw, 30px)/1.15 var(--font-display);
  color: var(--navy);
}
.who-text {
  margin-top: 8px;
  color: var(--ink-soft);
}
.who-label {
  display: block;
  margin-top: 22px;
  font: 700 15px/1.2 var(--font-display);
  color: var(--navy);
}
.who-field {
  position: relative;
  margin-top: 8px;
}
.who-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 15px;
  font: 600 19px/1 var(--font-display);
  color: var(--navy);
  transition: padding-left 0.18s ease;
}
.who-input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}
.who-input[aria-invalid="true"] { border-color: #B42318; }
/* the Br_ the server puts in front of Bedrock names, shown inside the field */
.who-prefix {
  position: absolute;
  top: 50%;
  left: 12px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 30px;
  background: var(--frost);
  border-radius: 9px;
  font: 600 15px/1 var(--font-mono);
  color: var(--blue);
  opacity: 0;
  transform: translateY(-50%) scale(0.7);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}
.who-field.is-bedrock .who-prefix {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.who-field.is-bedrock .who-input { padding-left: 66px; }
.who-hint {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-mute);
}
.who-hint code,
.who-check code,
.shop-steps code {
  padding: 1px 6px;
  background: var(--frost);
  border-radius: 6px;
  font-size: 0.92em;
  color: var(--navy);
}
.who-error {
  margin-top: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #B42318;
}
.who-error:empty { display: none; }
.who-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 16px 14px 14px;
  background: var(--cloud);
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.who-check:hover { border-color: var(--blue); }
.who-check:has(input:checked) {
  background: var(--aqua-soft);
  border-color: var(--navy);
}
.who-check:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.who-check strong {
  display: block;
  margin-bottom: 2px;
  font: 700 16px/1.3 var(--font-display);
  color: var(--navy);
}
.who-check input {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 7px;
  appearance: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.who-check input:focus-visible { outline: none; }
.who-check input::before {
  content: "";
  width: 6px;
  height: 11px;
  margin-top: -3px;
  border: solid var(--cloud);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}
.who-check input:checked { background: var(--navy); }
.who-check input:checked::before { transform: rotate(45deg) scale(1); }
.who-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Basket ---------- */

.basket {
  width: min(440px, 100vw);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 0 0 auto;
}
.basket[open] { animation: drawer-in 0.4s var(--ease-out); }
@keyframes drawer-in {
  from { opacity: 0; transform: translateX(48px); }
}
.basket-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--cloud);
  border-left: 2px solid var(--navy);
}
.basket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 2px solid var(--line);
}
.basket-head .dialog-x { position: static; }
.basket-title {
  font: 700 26px/1.1 var(--font-display);
  color: var(--navy);
}
.basket-scroll {
  flex: 1;
  min-height: 0;
  padding: 18px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.basket-who {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--frost);
  border-radius: 14px;
  font-size: 15px;
  color: var(--ink-soft);
}
.basket-who strong { color: var(--navy); }
.basket-link {
  margin-left: auto;
  padding: 2px 0;
  background: none;
  border: 0;
  font: 600 14.5px/1.3 var(--font-body);
  color: var(--blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.basket-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.basket-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 2px solid var(--line-strong);
  border-radius: 16px;
  transition: opacity 0.2s ease;
}
.basket-item.is-busy {
  opacity: 0.5;
  pointer-events: none;
}
.basket-thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: var(--aqua-soft);
  border-radius: 12px;
}
.basket-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.basket-item-name {
  font: 600 16px/1.25 var(--font-display);
  color: var(--navy);
  overflow-wrap: anywhere;
}
.basket-item-price {
  margin-top: 3px;
  font: 700 15px/1 var(--font-display);
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.basket-remove {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: 11px;
  color: var(--ink-mute);
  cursor: pointer;
}
.basket-remove:hover {
  border-color: var(--navy);
  color: #B42318;
}
.basket-remove svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.basket-empty {
  padding: 30px 0 10px;
  text-align: center;
  color: var(--ink-mute);
}
.basket-empty[hidden],
.basket-codes[hidden] { display: none; }
.basket-codes { margin-top: 20px; }
.basket-code-label {
  display: block;
  font: 700 14.5px/1.2 var(--font-display);
  color: var(--navy);
}
.basket-code-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.basket-code-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  background: var(--cloud);
  border: 2px solid var(--line-strong);
  border-radius: 13px;
  font: 600 16px/1 var(--font-display);
  color: var(--navy);
}
.basket-code-input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--navy);
}
.basket-code-msg {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}
.basket-code-msg.is-bad { color: #B42318; }
.basket-code-msg:empty { display: none; }
.basket-applied {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.basket-applied li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--aqua-soft);
  border-radius: 12px;
  font-size: 14.5px;
}
.basket-applied strong { color: var(--navy); }
.basket-foot {
  padding: 16px 22px calc(18px + env(safe-area-inset-bottom));
  border-top: 2px solid var(--line);
}
.basket-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font: 700 18px/1 var(--font-display);
  color: var(--navy);
}
.basket-total strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}
.basket-note {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-mute);
}
.basket-pay {
  width: 100%;
  min-height: 60px;
  margin-top: 14px;
  font-size: 19px;
  font-weight: 700;
}
.basket-pay:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.basket-secure {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
}

/* ---------- Thanks ---------- */

.thanks-dialog { width: min(460px, calc(100vw - 32px)); }
.thanks-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 34px 28px 30px;
  text-align: center;
}
.thanks-cloud {
  width: 110px;
  height: auto;
}
.thanks-title {
  font: 700 32px/1.1 var(--font-display);
  color: var(--navy);
}
.thanks-text {
  max-width: 30em;
  color: var(--ink-soft);
}
.thanks-box .btn { margin-top: 10px; }

/* ---------- How buying works ---------- */

.shop-how { margin-top: clamp(52px, 5.6vw, 76px); }
.shop-how-title {
  text-align: center;
  font: 700 clamp(27px, 2.6vw, 34px)/1.1 var(--font-display);
  color: var(--navy);
}
.shop-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 28px;
}
.shop-steps li {
  padding: 24px 22px 22px;
  background: var(--cloud);
  border: 2px solid var(--navy);
  border-radius: 22px;
  box-shadow: var(--edge);
}
.shop-step-num {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 38px;
  background: var(--aqua);
  border: 2px solid var(--navy);
  border-radius: 11px;
  box-shadow: 0 3px 0 var(--navy);
  font: 700 17px/1 var(--font-display);
  color: var(--navy);
}
/* the site reset leaves h4 and blockquote with browser margins */
.shop-steps h4 {
  margin: 14px 0 0;
  font: 700 20px/1.2 var(--font-display);
  color: var(--navy);
}
.shop-steps p {
  margin-top: 6px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Responsive ---------- */

/* ---------- Tebex legal bar ---------- */

/* Tebex's merchant-of-record notice, as on their own stores, in the colors of the night footer */
.tebex-legal {
  background: var(--navy-2);
  border-top: 1px solid rgba(207, 226, 246, 0.12);
  color: rgba(207, 226, 246, 0.72);
  font-size: 12.5px;
  line-height: 1.5;
}
.tebex-legal :focus-visible { outline-color: var(--aqua); }
.tebex-legal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 32px;
  padding-block: 12px calc(12px + env(safe-area-inset-bottom));
}
.tebex-legal-logo {
  display: inline-flex;
  flex: none;
  color: #9C9FA9;
}
.tebex-legal-logo svg {
  display: block;
  width: 61px;
  height: 29px;
}
.tebex-legal-logo path { fill: currentColor; }
.tebex-legal-text { flex: 1 1 360px; }
/* on a phone the line breaks after the comma, not after the ampersand */
.tebex-legal-text span { display: inline-block; }
.tebex-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.tebex-legal-links a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tebex-legal-links a:hover { color: #fff; }

@media (max-width: 899px) {
  .pkg-box { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
  .shop-steps { grid-template-columns: minmax(0, 1fr); }
  .home-welcome { grid-template-columns: minmax(0, 1fr); }
  .home-info { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 759px) {
  /* on a narrow card a tag and a sale badge sit one above the other */
  .shop-card.has-tag .product-badge {
    top: 50px;
    right: auto;
    left: 12px;
  }
  .shop-card.has-tag:has(.product-badge:not([hidden])) .product-tag { max-width: calc(100% - 24px); }
  .shop-section { margin-top: -44px; }
  .shop-chips { gap: 8px; }
  .shop-chip {
    min-height: 44px;
    padding: 5px 14px 5px 8px;
    border-radius: 13px;
    font-size: 15px;
  }
  .shop-chip-img,
  .shop-chip-ico {
    width: 26px;
    height: 26px;
  }
  .home-welcome { border-radius: 22px; }

  .feat { padding: 22px 18px 62px; }
  .feat-slide {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 14px;
    text-align: center;
  }
  .feat-art { width: 150px; }
  .feat-kicker,
  .feat-price { justify-content: center; }
  .feat-name { margin-top: 12px; }
  .feat-actions { width: 100%; }
  .feat-arrow { display: none; }

  .cat-cards { grid-template-columns: minmax(0, 1fr); }
  .cat-card {
    min-height: 200px;
    padding: 20px 20px 56px;
    border-radius: 22px;
  }
  .cat-name {
    max-width: 58%;
    font-size: clamp(34px, 10vw, 44px);
    -webkit-text-stroke-width: 2.5px;
    text-shadow: 0 4px 0 var(--navy);
  }
  .cat-art {
    top: 50%;
    right: 2%;
    width: 37%;
    height: 64%;
  }
  .shop-cat {
    max-width: none;
    scroll-margin-top: 96px;
  }
  /* the description takes the full width under the icon and the title */
  .shop-cat-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
  }
  .shop-cat-text { display: contents; }
  .shop-cat-title { padding-top: 0; }
  .shop-cat-lead {
    grid-column: 1 / -1;
    margin-top: 12px;
  }
  .shop-cat-icon {
    width: 54px;
    height: 54px;
    border-radius: 15px;
  }
  .shop-cat-img {
    width: 38px;
    height: 38px;
  }
  .shop-cat-lead { font-size: 15px; }
  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .shop-body { padding: 6px 12px 14px; }
  .shop-name { font-size: 16.5px; }
  .shop-price .price { font-size: 19px; }
  .price-was { font-size: 13.5px; }
  .shop-more { font-size: 13.5px; }
  .shop-add {
    min-height: 42px;
    padding-inline: 10px;
    font-size: 15px;
  }
  .basket-fab {
    left: 16px;
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    justify-content: center;
  }
  .store-page .toast { bottom: 96px; }
  /* the basket bar must not cover the end of the footer */
  .has-basket { padding-bottom: 88px; }

  .pkg-dialog,
  .basket {
    width: 100vw;
    margin: auto 0 0;
  }
  .pkg-dialog[open],
  .basket[open] { animation: sheet-in 0.4s var(--ease-out); }
  @keyframes sheet-in {
    from { opacity: 0; transform: translateY(40px); }
  }
  .pkg-box {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 92dvh;
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: none;
  }
  .pkg-stage {
    flex: none;
    height: 200px;
    border-right: 0;
    border-bottom: 2px solid var(--navy);
  }
  .product-stage .pkg-img {
    width: 56%;
    height: 66%;
    margin-bottom: 34px;
  }
  .pkg-info {
    flex: 1;
    padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  }
  .pkg-title { padding-right: 0; }
  /* fit-content, because a dialog pinned top and bottom would stretch to the full height */
  .pkg-dialog,
  .basket {
    height: fit-content;
    max-height: 92dvh;
  }
  .basket-box {
    max-height: 92dvh;
    border-left: 0;
    border-top: 2px solid var(--navy);
    border-radius: 24px 24px 0 0;
  }
}

@media (max-width: 359px) {
  .shop-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .shop-dialog[open],
  .basket-fab.is-bump,
  .feat-img { animation: none; }
  .feat-slide,
  .feat-slide.is-on { transform: none; }
  .shop-card:hover .shop-img { transform: none; }
  .cat-card:hover .cat-art { transform: translateY(-50%) rotate(-6deg); }
}
