/* The shop (/shop, /shop/usb, /shop/thanks), on top of site.css: the product floats in a
   white frame beside its sizes, which are picked like keys on a tray. */

/* ---------- product page opening ---------- */

.shop-hero { align-items: center; }
/* the picture is wide, so it gets the larger share of the row */
@media (min-width: 1081px) {
  .shop-hero.opening--split > .opening__text { grid-column: 1 / span 5; }
  .shop-hero.opening--split > .opening__pic { grid-column: 6 / span 7; }
}
.shop-hero h1 { max-width: 12ch; }
.shop-crumb { text-decoration: none; transition: background-color var(--t-hover) var(--spring); }
@media (hover: hover) and (pointer: fine) {
  .shop-crumb:hover { background: rgb(15 46 59 / 0.1); }
}

/* stacked, the picture comes straight after the name, so switching size is seen to change it */
@media (max-width: 1080px) {
  .shop-hero.opening--split { display: flex; flex-direction: column; align-items: stretch; }
  .shop-hero > .opening__text { display: contents; }
  .shop-hero .shop-crumb { order: 0; }
  .shop-hero h1 { order: 1; }
  .shop-hero > .shop-pic { order: 2; margin-top: 32px; }
  .shop-hero .opening__lead { order: 3; }
  .shop-hero .shop-buy { order: 4; }
  .shop-hero .shop-wait-wrap { order: 5; }
}

/* the product picture fills the bezel at its own shape; the sheets bring their own white edge */
.shop-pic .frame > img { height: auto; }
.shop-pic--square { aspect-ratio: 1 / 1; }
.shop-pic__blank { display: grid; place-items: center; align-content: center; gap: 20px; width: 100%; height: 100%; background: linear-gradient(160deg, var(--c-surface), var(--c-ground-2)); }
.shop-pic__blank img { width: 28%; height: auto; border-radius: 22%; box-shadow: var(--shadow-soft); }
.shop-pic__blank span { font-size: var(--step-small); font-weight: 600; letter-spacing: 0.2em; color: var(--c-muted); }

/* tap the picture to see it full size */
.shop-zoom { display: block; cursor: zoom-in; }
.shop-zoom__hint {
  position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 2.5rem; height: 2.5rem;
  border-radius: 999px; background: rgb(255 255 255 / 0.85); color: var(--c-ink);
  box-shadow: inset 0 0 0 1px var(--c-hair), 0 6px 16px -8px rgb(15 46 59 / 0.4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: transform var(--t-hover) var(--spring);
}
@media (hover: hover) and (pointer: fine) {
  .shop-zoom:hover .shop-zoom__hint { transform: scale(1.08); }
}

.shop-lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 3vw, 40px);
  border: 0; background: transparent; cursor: zoom-out;
}
.shop-lightbox[open] { display: grid; place-items: center; animation: modal-in var(--t-hover) var(--spring); }
.shop-lightbox::backdrop { background: rgb(11 20 24 / 0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.shop-lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 1rem; }
.shop-lightbox form { position: fixed; top: 16px; right: 16px; }
.shop-lightbox__close {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.92); color: var(--c-ink); font-size: 1.5rem; line-height: 1; cursor: pointer;
}

/* ---------- the buy form ---------- */

.shop-buy { margin-top: 40px; }
.shop-sizes { margin: 0; padding: 0; border: 0; min-width: 0; }
.shop-sizes legend { margin-bottom: 14px; font-size: var(--step-micro); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-muted); }
.shop-sizes__list { display: flex; flex-wrap: wrap; gap: 10px; }
.shop-size {
  position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 9rem;
  padding: 14px 20px; border-radius: 1.25rem; cursor: pointer;
  background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-hair);
  transition: box-shadow var(--t-hover) var(--spring), transform var(--t-press) var(--spring);
}
/* the real radio covers its label, so it stays clickable and focusable */
.shop-size input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.shop-size:has(input:checked) { box-shadow: inset 0 0 0 2px var(--c-ink), var(--shadow-soft); }
.shop-size:has(input:focus-visible) { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.shop-size:active { transform: scale(0.98); }
.shop-size__label { font-weight: 650; letter-spacing: -0.01em; color: var(--c-ink); }
.shop-size__price { font-size: var(--step-small); color: var(--c-muted); }

.shop-price { display: flex; align-items: baseline; gap: 10px; }
.shop-price__amount { font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); font-weight: 750; letter-spacing: -0.04em; line-height: 1; color: var(--c-ink); }
.shop-price__cur { font-size: var(--step-small); font-weight: 500; color: var(--c-muted); }

/* how many: a key like the sizes, with the free-shipping line beside it */
.shop-qty { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 24px; }
.shop-qty label { flex-basis: 100%; margin-bottom: 14px; font-size: var(--step-micro); font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--c-muted); }
.shop-qty select {
  appearance: none; -webkit-appearance: none; min-width: 6.5rem; padding: 14px 44px 14px 20px; border: 0; border-radius: 1.25rem; cursor: pointer;
  font: inherit; font-weight: 650; color: var(--c-ink);
  background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1418' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center / 16px;
  box-shadow: inset 0 0 0 1px var(--c-hair);
}
.shop-qty select:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 3px; }
.shop-qty__free { color: var(--c-muted); }

/* compatibility, read before paying */
.shop-req { margin-top: 24px; padding: 12px 16px; border-radius: 1rem; background: rgb(15 46 59 / 0.05); box-shadow: inset 0 0 0 1px var(--c-hair); color: var(--c-ink); font-weight: 500; }
.shop-buy__acts { margin-top: 20px; }
.shop-fine { margin-top: 16px; color: var(--c-muted); }
/* shown when checkout sends the customer back to #checkout-failed */
.shop-notice { display: none; margin-top: 16px; padding: 14px 18px; border-radius: 1rem; background: rgb(180 35 24 / 0.08); color: #b42318; font-weight: 600; }
.shop-notice:target { display: block; scroll-margin-top: 120px; }
.shop-notice:focus { outline: none; } /* it takes focus as the target, so readers land on it */
.shop-notice .link-plain { color: inherit; }

/* before the shop opens: the Buy button's place, quiet and not a control */
.btn.shop-soon, .btn.shop-soon:hover { background: rgb(15 46 59 / 0.08); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-hair); cursor: default; }
.btn.shop-soon:active { transform: none; }

/* ---------- product page sections ---------- */

.shop-section { padding-block: clamp(80px, 10vw, 152px); }
.shop-tile__k { margin-top: 20px; }

/* ---------- the shop: one row per product ---------- */

.shop-main { padding-block: 0 var(--section); }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(20px, 3vw, 40px); }
.shop-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; text-decoration: none; color: inherit; }
.shop-row__pic { grid-column: 1 / span 5; }
.shop-row__pic .frame { box-shadow: inset 0 0 0 1px var(--c-hair); border-radius: 1.25rem; }
.shop-row__pic .shop-pic__blank { aspect-ratio: 1 / 1; }
.shop-row__text { grid-column: 7 / span 6; }
.shop-row h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.5rem); line-height: 1; letter-spacing: -0.045em; }
.shop-row__text > p.muted { margin-top: 16px; }
.shop-row__price { margin-top: 24px; font-size: var(--step-lead); font-weight: 650; color: var(--c-ink); }
.shop-row__go { margin-top: 28px; }
@media (hover: hover) and (pointer: fine) {
  .shop-row:hover .btn__icon { transform: translate(3px, -1px) scale(1.05); }
}
.shop-empty { max-width: 40rem; }
.shop-empty h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem); line-height: 1.05; letter-spacing: -0.04em; }
.shop-empty p { margin-top: 12px; }

/* ---------- phone ---------- */

@media (max-width: 767px) {
  .shop-sizes__list { display: grid; grid-template-columns: 1fr 1fr; }
  .shop-size { min-width: 0; }
  .shop-buy__acts .btn { width: 100%; justify-content: space-between; }
  .shop-row { display: block; }
  .shop-row__text { margin-top: 28px; }
}

/* ---------- the waitlist, in place of Buy until it's on sale ---------- */

.shop-wait-wrap { margin-top: 32px; }
.shop-wait { padding: clamp(22px, 2.6vw, 30px); border-radius: 1.5rem; background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-hair), var(--shadow-soft); }
.shop-wait__title { font-size: var(--step-lead); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--c-ink); }
.shop-wait__lead { margin-top: 8px; color: var(--c-muted); }
.shop-wait .waitlist__form { margin-top: 20px; max-width: none; }
.shop-wait .waitlist__status:empty { min-height: 0; margin-top: 0; }
.shop-wait.is-done .shop-wait__lead { display: none; }
@media (max-width: 767px) {
  .shop-wait .waitlist__form { flex-direction: column; border-radius: 1.5rem; }
  .shop-wait .waitlist__form .btn { justify-content: space-between; }
}
