/* The merch shop (2026-09-28; redesigned the same day, asked for as "make the
   UI and UX much more appealing"). Borderless like the rest of the site:
   hairlines between things, no boxed cards.

   The product photos all come on white. They sit on a pale studio grey here
   instead, their white multiplied into it, so on the black page they read as
   one lit set rather than three white boxes. */

:root { --tile: #ecebe8; }

/* The hidden attribute loses to any display rule below, so it is restated. */
.shop [hidden], .drawer[hidden], .bag-bar[hidden], .drawer [hidden] { display: none !important; }

.shop { padding: 112px 0 24px; position: relative; z-index: 1; }

/* ── Top ─────────────────────────────────────────────────────────────── */

.shop-hero { max-width: 760px; margin-bottom: 48px; }
.shop-hero h1 { font-size: clamp(52px, 8vw, 104px); line-height: 0.92; letter-spacing: -0.055em; font-weight: 800; margin: 0 0 24px; }
.shop-sub { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.6; color: var(--text2); max-width: 620px; }

.promises { list-style: none; margin: 0 0 64px; padding: 24px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.promises li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; row-gap: 3px; align-content: start; padding: 2px 24px; border-left: 1px solid var(--line); }
.promises li:first-child { padding-left: 0; border-left: 0; }
.promises svg { width: 22px; height: 22px; grid-row: span 2; color: var(--text); margin-top: 1px; }
.promises strong { font-size: 15px; font-weight: 700; color: var(--text); }
.promises span { font-size: 14px; line-height: 1.5; color: var(--text2); }

/* The three at a glance, each a link down to its own section. */
.lineup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 104px; }
.lineup-item { display: block; }
.lineup-img { display: block; aspect-ratio: 1 / 1; background: var(--tile); border-radius: 20px; overflow: hidden; }
.lineup-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.7s var(--ease); }
.lineup-item:hover .lineup-img img { transform: scale(1.035); }
.lineup-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; }
.lineup-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.lineup-price { font-size: 15px; color: var(--text2); white-space: nowrap; }

/* ── A product ───────────────────────────────────────────────────────── */

.product { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 72px; padding: 80px 0; border-top: 1px solid var(--line); align-items: start; scroll-margin-top: 64px; }
.products > .product:first-child { border-top: 0; padding-top: 0; }

.gallery { position: relative; }
.gallery-frame { position: relative; }
.gallery-track { display: flex; aspect-ratio: 1 / 1; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; background: var(--tile); border-radius: 24px; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.gallery-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; scroll-snap-stop: always; }
.gallery-slide img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; user-select: none; -webkit-user-drag: none; }

.gallery-arrow { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.92); color: #111; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); opacity: 0; transition: opacity 0.2s ease, transform 0.2s var(--ease); }
.gallery-arrow svg { width: 18px; height: 18px; }
.gallery-arrow.prev { left: 16px; }
.gallery-arrow.next { right: 16px; }
.gallery-frame:hover .gallery-arrow:not(:disabled), .gallery-arrow:focus-visible { opacity: 1; }
.gallery-arrow:active { transform: scale(0.94); }
.gallery-arrow:disabled { pointer-events: none; }

.gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; }
.gallery-thumb { width: 68px; height: 68px; padding: 0; border: 0; border-radius: 14px; background: var(--tile); overflow: hidden; cursor: pointer; opacity: 0.5; transition: opacity 0.2s ease, box-shadow 0.2s ease; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery-thumb:hover { opacity: 0.8; }
.gallery-thumb[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text); }

.gallery-dots { display: none; justify-content: center; gap: 7px; margin-top: 14px; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); transition: background 0.2s ease, width 0.25s var(--ease); }
.gallery-dots span.on { width: 18px; border-radius: 3px; background: var(--text); }

.product-info { position: sticky; top: 104px; }
.product-made { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hint); margin-bottom: 14px; }
.product-info h2 { font-size: clamp(34px, 3.8vw, 52px); line-height: 1; letter-spacing: -0.04em; font-weight: 800; margin-bottom: 14px; }
.product-price { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 22px; font-variant-numeric: tabular-nums; }
.product-desc { font-size: 17px; line-height: 1.65; color: var(--text2); max-width: 500px; margin-bottom: 30px; }

.sizes { margin-bottom: 22px; }
.sizes-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px; }
.sizes-label { font-weight: 700; color: var(--text); }
.sizes-picked { color: var(--text2); }
/* Up to six sizes sit in one row; more split into two even rows, so a last
   size is never left on its own. The script sets --cols. */
.size-grid { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 8px; }
.size { height: 50px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 600 15px var(--font-body); cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s var(--ease); }
.size:hover { border-color: rgba(255, 255, 255, 0.45); }
.size:active { transform: scale(0.96); }
.size[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.size-hint { font-size: 14px; color: var(--text); margin-top: 10px; }
.fit-note { font-size: 14px; line-height: 1.55; color: var(--text2); margin-top: 12px; }
.sizes.shake { animation: shake 0.4s var(--ease); }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }

.add { width: 100%; height: 56px; font-size: 16px; gap: 10px; font-variant-numeric: tabular-nums; }
.add svg { width: 18px; height: 18px; }

.product-delivery { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; font-size: 14px; line-height: 1.55; color: var(--text2); }
.product-delivery svg { flex: none; width: 20px; height: 20px; color: var(--text); margin-top: 1px; }

.product-facts { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--line); }
.product-facts li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text2); }

/* While the products load. */
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--panel) 20%, var(--panel2) 50%, var(--panel) 80%); background-size: 250% 100%; animation: sk 1.5s ease-in-out infinite; }
.sk-img { aspect-ratio: 1 / 1; border-radius: 24px; }
.sk-title { height: 48px; width: 70%; margin: 16px 0 18px; }
.sk-line { height: 14px; margin-bottom: 12px; }
.sk-btn { height: 56px; border-radius: var(--radius-pill); margin-top: 28px; }
.w25 { width: 25%; } .w40 { width: 40%; } .w80 { width: 80%; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -150% 0; } }

.shop-soon img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); }
.shop-soon p, .shop-noscript { color: var(--text2); font-size: 17px; margin: 22px 0 0; }

/* ── After checkout ──────────────────────────────────────────────────── */

.order-note { margin: -8px 0 56px; padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 4px 22px; }
.order-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #04210d; grid-row: span 3; }
.order-mark svg { width: 26px; height: 26px; }
.order-mark.is-plain { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.order-note h2 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; font-weight: 800; line-height: 1.1; }
.order-lead { font-size: 16px; line-height: 1.6; color: var(--text2); max-width: 640px; margin-top: 6px; }
.order-note .btn { justify-self: start; margin-top: 14px; }
.order-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.order-steps li { position: relative; padding-top: 16px; font-size: 14px; line-height: 1.45; color: var(--hint); }
.order-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 2px; background: var(--line-strong); }
.order-steps li.done { color: var(--text); }
.order-steps li.done::before { background: var(--success); }
.order-steps li.now { color: var(--text); }
.order-steps li.now::before { background: linear-gradient(90deg, var(--success), var(--line-strong)); background-size: 200% 100%; animation: sk 1.6s ease-in-out infinite; }
.order-steps small { display: block; color: var(--hint); font-size: 13px; }
.order-receipt { margin: 24px 0 0; padding: 0; max-width: 640px; }
.order-receipt div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 15px; color: var(--text2); }
.order-receipt dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.order-receipt .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--text); font-weight: 700; }

/* ── Questions ───────────────────────────────────────────────────────── */

.questions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 72px; padding: 88px 0 48px; border-top: 1px solid var(--line); }
.questions h2 { font-size: clamp(34px, 3.8vw, 52px); letter-spacing: -0.04em; font-weight: 800; line-height: 1; }
.questions .faq { margin-top: 0; }
.questions .faq-item:first-child { border-top: 0; }
.questions .faq-item summary { padding-top: 0; }
.questions .faq-item + .faq-item summary { padding-top: 26px; }
.faq-item p + p { margin-top: -12px; }
.faq-item p strong { color: var(--text); font-weight: 700; }

/* ── The bag ─────────────────────────────────────────────────────────── */

.bag-button { position: relative; width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text); display: grid; place-items: center; cursor: pointer; transition: border-color 0.15s ease, transform 0.2s var(--ease); }
.bag-button:hover { border-color: rgba(255, 255, 255, 0.4); }
.bag-button:active { transform: scale(0.94); }
.bag-button svg { width: 20px; height: 20px; }
.bag-count { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--text); color: var(--bg); font: 800 11px/19px var(--font-body); text-align: center; font-variant-numeric: tabular-nums; }
.bag-button.bump { animation: bump 0.5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.18); } 100% { transform: none; } }

html.bag-lock { overflow: hidden; }

.drawer { position: fixed; inset: 0; z-index: 100; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.62); opacity: 0; transition: opacity 0.35s ease; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--bg-raised); border-left: 1px solid var(--line); box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5); transform: translateX(100%); transition: transform 0.45s var(--ease); }
.drawer.is-open .drawer-scrim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: none; }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 18px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; letter-spacing: -0.025em; }
.drawer-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.07); color: var(--text); display: grid; place-items: center; cursor: pointer; }
.drawer-close:hover { background: rgba(255, 255, 255, 0.12); }
.drawer-close svg { width: 18px; height: 18px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px; }
.drawer-foot { padding: 18px 24px calc(20px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }

.bag-empty { padding: 72px 0; text-align: center; color: var(--text2); font-size: 16px; }
.bag-empty .btn { margin-top: 18px; }

.bag-lines { list-style: none; margin: 0; padding: 0; }
.bag-line { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 0 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.bag-line:last-child { border-bottom: 0; }
.bag-line-img { width: 80px; height: 80px; border-radius: 14px; background: var(--tile); overflow: hidden; grid-row: span 2; }
.bag-line-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.bag-line-name { font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--text); }
.bag-line-size { display: block; font-weight: 500; font-size: 13px; color: var(--text2); margin-top: 2px; }
.bag-line-price { font-weight: 700; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums; }
.bag-line-controls { grid-column: 2 / 4; display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.stepper { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); }
.stepper button { width: 36px; height: 34px; border: 0; background: none; color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; border-radius: var(--radius-pill); }
.stepper button:disabled { opacity: 0.3; cursor: default; }
.stepper span { min-width: 20px; text-align: center; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.bag-remove { border: 0; background: none; padding: 6px 0; color: var(--hint); font: 600 13px var(--font-body); cursor: pointer; }
.bag-remove:hover { color: var(--text); }

.bag-sum { margin: 0 0 14px; }
.bag-sum div { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 15px; color: var(--text2); }
.bag-sum dd { margin: 0; color: var(--text); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
.bag-sum .bag-total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 18px; font-weight: 800; color: var(--text); }
.bag-sum dd.is-loading { color: transparent; border-radius: 6px; background: linear-gradient(90deg, var(--panel) 20%, var(--panel2) 50%, var(--panel) 80%); background-size: 250% 100%; animation: sk 1.5s ease-in-out infinite; }
.bag-parcels { font-size: 13px; line-height: 1.5; color: var(--text2); margin-bottom: 14px; }
.bag-checkout { height: 56px; font-size: 16px; font-variant-numeric: tabular-nums; }
.bag-checkout:disabled { opacity: 0.6; cursor: progress; }
.bag-error { font-size: 14px; color: var(--danger); margin-top: 12px; }
.bag-small { font-size: 12.5px; line-height: 1.55; color: var(--hint); margin-top: 12px; text-align: center; }
.bag-small a { color: var(--text2); text-decoration: underline; text-underline-offset: 2px; }

/* On a phone the bag is always a thumb away. */
.bag-bar { display: none; }
.bag-bar-button { width: 100%; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 22px 0 10px; border: 0; border-radius: var(--radius-pill); background: var(--text); color: var(--bg); font: 700 16px var(--font-body); cursor: pointer; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4); }
.bag-bar-button:active { transform: scale(0.98); }
.bag-bar-count { min-width: 38px; height: 38px; padding: 0 8px; border-radius: 19px; background: var(--bg); color: var(--text); display: grid; place-items: center; font-size: 15px; font-variant-numeric: tabular-nums; }
.bag-bar-label { flex: 1; text-align: left; }
.bag-bar-total { font-variant-numeric: tabular-nums; }

/* ── Smaller screens ─────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .product { gap: 48px; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .promises li:nth-child(3) { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
  .shop { padding-top: 96px; }
  .product { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 56px 0; }
  .product-info { position: static; }
  .questions { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 64px; }
}

@media (max-width: 760px) {
  .shop-hero { margin-bottom: 36px; }
  .promises { margin-bottom: 48px; }
  .promises li { padding: 0 0 0 16px; }
  .promises li:nth-child(odd) { padding-left: 0; }
  .lineup { gap: 10px; margin-bottom: 64px; }
  .lineup-img { border-radius: 14px; }
  .lineup-cap { flex-direction: column; gap: 2px; margin-top: 10px; }
  .lineup-name { font-size: 14px; line-height: 1.25; }
  .lineup-price { font-size: 13px; }
  .gallery-track { border-radius: 20px; }
  .gallery-thumbs, .gallery-arrow { display: none; }
  .gallery-dots { display: flex; }
  .product-desc { font-size: 16px; }
  .bag-bar { display: block; position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60; }
  body.has-bag-bar .footer { padding-bottom: 104px; }
  .order-note { grid-template-columns: minmax(0, 1fr); }
  .order-mark { grid-row: auto; margin-bottom: 10px; }
  .order-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

/* The bag rises from the bottom on a phone, as a sheet. */
@media (max-width: 560px) {
  .drawer-panel { top: auto; left: 0; width: 100%; max-height: calc(100% - 48px); border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; transform: translateY(100%); box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5); }
  .drawer-head { padding: 16px 16px 16px 20px; }
  .drawer-body { padding: 0 20px; }
  .drawer-foot { padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); }
}

/* On the smallest phones the page's own Merch link gives way to the bag. */
@media (max-width: 480px) {
  .nav-links a[aria-current="page"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-scrim, .drawer-panel, .lineup-img img, .gallery-dots span, .size, .bag-button { transition: none; }
  .sk, .bag-sum dd.is-loading, .order-steps li.now::before, .sizes.shake, .bag-button.bump { animation: none; }
}
