/* The jersey rail (jersey-rail.js): jerseys on the shop's black rail against its grey plaster wall, in low light.
   A warm spotlight follows the jersey facing you; the rest of the rail sits in shadow. No frame around it:
   the wall fades into the dark of the section on every side. Everything is prefixed jr- so it can't collide with the page. */
.room--rail { background: #101112; }
.jr {
  --jr-dark: #101112; --jr-ink: #EEEDEA; --jr-soft: #A3A29E; --jr-brass: #DAD7D0; --jr-tag: #EDEBE6;
  margin-top: clamp(20px, 3vw, 36px); margin-inline: calc(var(--sc-gutter) * -1); background: var(--jr-dark); color: var(--jr-ink);
}
.jr [hidden] { display: none !important; }
.jr-filters {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  padding: 6px var(--sc-gutter) 10px;
}
.jr-chips, .jr-chips__set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.jr-chips__label { font-size: var(--sc-t-xs); color: var(--jr-soft); margin-right: 2px; letter-spacing: 0.04em; }
.jr-chip {
  min-height: 40px; min-width: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(218, 215, 208, 0.28); background: none; color: var(--jr-ink);
  font: 500 var(--sc-t-sm) var(--sc-font-text); letter-spacing: 0.02em; cursor: pointer; transition: transform 0.12s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.jr-chip:active { transform: scale(0.96); }
.jr-chip[aria-pressed="true"] { background: var(--jr-brass); color: #141414; border-color: var(--jr-brass); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .jr-chip:hover { border-color: rgba(218, 215, 208, 0.7); } }

/* the wall: the shop's own grey plaster (img/tex/grey-wall.webp, from the jersey wall photo), in low light, fading into the
   dark at every edge; two soft patches of light and shade stop the tile looking repeated */
.jr-stage {
  position: relative; height: 640px; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  --lx: 50%;
  background:
    radial-gradient(ellipse 40% 60% at 22% 30%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 45% 55% at 78% 72%, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0) 70%),
    linear-gradient(rgba(14, 15, 16, 0.42), rgba(14, 15, 16, 0.42)),
    url("img/tex/grey-wall.webp") 0 0 / 380px auto, #6E6E6B;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  mask-composite: intersect;
}
.jr-stage.is-dragging { cursor: grabbing; }
.jr-stage:focus-visible { outline: none; }
.jr-stage:focus-visible .jr-glow { opacity: 1; }
/* the light: everything away from the spotlight sinks into shadow, the spot itself glows warm on the wood */
.jr-dusk, .jr-glow { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.jr-dusk { background: radial-gradient(ellipse 30% 70% at var(--lx) 44%, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.3) 55%, rgba(0, 0, 0, 0.66) 100%); }
.jr-glow {
  mix-blend-mode: screen;
  background:
    radial-gradient(ellipse 17% 52% at var(--lx) 40%, rgba(255, 238, 214, 0.2) 0, rgba(255, 226, 196, 0.06) 55%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(ellipse 60% 22% at 50% 0, rgba(255, 240, 220, 0.07), rgba(0, 0, 0, 0) 100%);
}

/* the black rail, like the shop's: a matt black pipe with a soft highlight on top and its shadow on the wall below */
.jr-rail { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.jr-rail path { fill: none; stroke-linecap: butt; }
.jr-rail__pipe { stroke-width: 12; }
.jr-rail__shine { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1.4; }
.jr-rail__shadow { stroke: rgba(0, 0, 0, 0.34); stroke-width: 12; filter: blur(5px); }

.jr-pieces { position: absolute; inset: 0; z-index: 2; }
/* one jersey: hook on the rail → swings from the hook → turns on the hanger */
.jr-piece {
  position: absolute; left: 0; top: 0; width: var(--jr-w); height: var(--jr-h); margin-left: calc(var(--jr-w) / -2);
  padding: 0; border: 0; background: none; color: inherit; cursor: inherit; will-change: transform;
  transform-origin: 50% calc(var(--jr-hook) * -1);   /* grows and shrinks around the hook, so the hook stays on the rail */
}
.jr-piece:focus-visible { outline: none; }
.jr-piece:focus-visible .jr-tag { outline: 3px solid var(--sc-accent); outline-offset: 2px; }
.jr-swing { position: absolute; inset: 0; transform-origin: 50% calc(var(--jr-hook) * -1); will-change: transform; }
.jr-hook { position: absolute; left: 50%; top: calc(var(--jr-hook) * -1 - 6px); width: 22px; height: calc(var(--jr-hook) + 16px); margin-left: -11px; overflow: visible; z-index: 2; transform-origin: 50% 6px; }
.jr-hook path { fill: none; stroke: #C9CBCF; stroke-width: 2.4; stroke-linecap: round; }
.jr-tag, .jr-hook { transition: opacity 0.2s linear; }
.jr-tag {
  position: absolute; left: calc(50% + 6px); top: calc(var(--jr-hook) * -0.35); z-index: 3;
  padding: 3px 7px 3px 9px; border-radius: 3px; background: var(--jr-tag); color: #1A1A1A;
  font: 600 12px/1.2 var(--sc-font-text); white-space: nowrap; font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); transform: rotate(-4deg); transform-origin: -6px calc(var(--jr-hook) * -0.65);
}
.jr-tag::before { content: ""; position: absolute; left: 3px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: #999; }
.jr-cloth { position: absolute; left: calc(var(--jr-w) * -0.6); top: 0; width: calc(var(--jr-w) * 2.2); height: calc(var(--jr-h) * 1.3); max-width: none; pointer-events: none; }
.jr-turnbox { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.jr-turn { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.jr-shirt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 0; filter: drop-shadow(10px 24px 18px rgba(0, 0, 0, 0.6)); pointer-events: none; }
.jr-edge {
  position: absolute; top: 0; bottom: 0; width: 16%; min-width: 90px; z-index: 80; pointer-events: none; opacity: 0;
  display: flex; align-items: center; padding: 0 18px; color: var(--jr-ink);
}
.jr-edge--left { left: 0; padding-left: 9%; background: linear-gradient(90deg, rgba(16, 17, 18, 0.5), rgba(16, 17, 18, 0)); }
.jr-edge--right { right: 0; padding-right: 9%; justify-content: flex-end; background: linear-gradient(270deg, rgba(16, 17, 18, 0.5), rgba(16, 17, 18, 0)); }
.jr-edge { color: var(--jr-brass); }
.jr-edge svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jr-empty { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 0 24px; text-align: center; font-size: var(--sc-t-lg); }

.jr-scrub { position: relative; height: 28px; cursor: pointer; touch-action: none; }
.jr-scrub:focus-visible { outline: 3px solid var(--sc-accent); outline-offset: -3px; }
.jr-scrub__track { position: absolute; left: var(--sc-gutter); right: var(--sc-gutter); top: 13px; height: 1px; background: rgba(218, 215, 208, 0.22); }
.jr-scrub__thumb { position: absolute; top: -1.5px; height: 4px; border-radius: 2px; background: var(--jr-brass); }
.jr-scrub__thumb--wrap { left: 0; }
.jr-now {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px;
  padding: 10px var(--sc-gutter) 6px;
}
.jr-now__item { min-width: 0; }
.jr-now__name { font-family: var(--sc-font-display); text-transform: uppercase; font-size: var(--sc-t-xl, 28px); line-height: 1; letter-spacing: 0.01em; }
.jr-now__meta, .jr-now__hint { color: var(--jr-soft); font-size: var(--sc-t-sm); font-variant-numeric: tabular-nums; }
.jr-now__side { display: grid; justify-items: end; gap: 2px; text-align: right; }
.jr-now__count { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- a jersey off the rail ---------- */
.jr-look {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: #141416; color: #F2F1EA; --sc-ink: #F2F1EA; --sc-ink-soft: #BAB8B1;
}
.jr-look::backdrop { background: rgba(10, 10, 12, 0.6); }
.jr-look__in {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; height: 100%; align-items: center;
  padding: 56px var(--sc-gutter) 32px;
}
.jr-look__stage { position: relative; height: min(80vh, 760px); display: grid; place-items: center; min-width: 0; }
/* the photo set: a square-ish frame, the wall papered in the jersey's colours */
.jr-scene {
  position: relative; height: 100%; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 18px; overflow: hidden; perspective: 1400px;
  background: #101012; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}
.jr-scene__wall { position: absolute; inset: 0; background-size: 25% auto; background-position: 50% 0; }
/* a spotlight from above on the jersey, the corners falling into shadow */
.jr-scene__light {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 45% at 50% 32%, rgba(255, 236, 205, 0.34), rgba(255, 236, 205, 0) 72%),
    radial-gradient(115% 90% at 50% 38%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.82) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 16%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, 0.45));
}
.jr-scene__hook { position: absolute; left: 50%; top: 1.5%; width: 9%; margin-left: -4.5%; height: auto; z-index: 3; overflow: visible; }
.jr-look__turn {
  position: absolute; left: 14%; right: 14%; top: 13%; bottom: 17%; z-index: 2;
  transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.jr-look__turn.is-back { transform: rotateY(180deg); }
.jr-look__front, .jr-look__back {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: drop-shadow(0 28px 26px rgba(0, 0, 0, 0.62)) drop-shadow(0 6px 6px rgba(0, 0, 0, 0.35));
}
/* the wooden hanger's neck, in front of the collar where the hook goes in */
.jr-scene__hanger {
  position: absolute; left: 50%; top: 12.6%; width: 13%; height: 2.2%; margin-left: -6.5%; z-index: 3; border-radius: 40% 40% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.45)), url("img/tex/wood-hanger.webp") 0 0 / 200px auto, #B97A47;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.45);
}
/* the brass name plate under the jersey */
.jr-scene__plaque {
  position: absolute; left: 50%; bottom: 4.5%; transform: translateX(-50%); z-index: 3; width: 52%; padding: 2.2% 4% 2%;
  display: grid; justify-items: center; gap: 2px; border-radius: 4px; text-align: center;
  background: linear-gradient(180deg, #F3DC9C 0%, #D2AE5C 30%, #A9832F 62%, #E4C477 100%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 250, 230, 0.8), inset 0 -2px 3px rgba(80, 55, 10, 0.5);
  color: #3B2A0B; text-shadow: 0 1px 0 rgba(255, 244, 205, 0.7); font-family: Georgia, "Times New Roman", serif;
}
.jr-scene__plaque::before, .jr-scene__plaque::after {
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFF1C4, #8A6620); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
.jr-scene__plaque::before { left: 3%; } .jr-scene__plaque::after { right: 3%; }
.jr-scene__plaque span { font-size: clamp(11px, 1.35vw, 16px); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.jr-scene__plaque small { font-size: clamp(9px, 1.05vw, 12px); letter-spacing: 0.12em; text-transform: uppercase; }
.jr-look__back { transform: rotateY(180deg); }
.jr-look__nav, .jr-look__close {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(242, 241, 234, 0.12); color: #F2F1EA;
  cursor: pointer; display: grid; place-items: center;
}
.jr-look__nav { top: 50%; margin-top: -24px; }
.jr-look__nav--prev { left: 0; } .jr-look__nav--next { right: 0; }
.jr-look__close { top: 12px; right: max(12px, env(safe-area-inset-right, 0px)); }
.jr-look__nav svg, .jr-look__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jr-look__panel { display: grid; gap: 14px; align-content: center; justify-items: start; max-width: 440px; min-width: 0; }
.jr-look__panel h2 { font-size: clamp(36px, 4.6vw, 60px); }
.jr-look__price { font-size: var(--sc-t-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.jr-look__price s { margin-left: 10px; font-weight: 400; color: #BAB8B1; }
.jr-look__note { color: #BAB8B1; font-size: var(--sc-t-sm); max-width: 40ch; }
.jr-look .pill-line { color: #F2F1EA; }
.jr-pick { border: 0; margin: 0; padding: 0; min-width: 0; width: 100%; }
.jr-pick legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.jr-pick__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.jr-size { display: grid; gap: 2px; min-height: 48px; padding: 10px 6px; border-radius: 12px; border: 0; background: #26262A; color: #F2F1EA; font: 600 var(--sc-t-base) var(--sc-font-text); cursor: pointer; }
.jr-size small { font-weight: 500; font-size: 12px; color: #BAB8B1; font-variant-numeric: tabular-nums; }
.jr-size[aria-pressed="true"] { background: #F2F1EA; color: #151517; }
.jr-size[aria-pressed="true"] small { color: #46564D; }
.jr-size:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 760px) {
  /* on a phone each row of filters is one line you swipe sideways */
  .jr-filters { display: grid; gap: 8px; }
  .jr-chips, .jr-chips__set { flex-wrap: nowrap; min-width: 0; }
  .jr-chips { overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--sc-gutter) * -1); padding-inline: var(--sc-gutter); }
  .jr-chips::-webkit-scrollbar { display: none; }
  .jr-chip, .jr-chips__label { flex: none; }
  .jr-stage { height: 500px; }
  .jr-scene { height: auto; width: 100%; }
  .jr-now__side { justify-items: start; text-align: left; }
  .jr-look__in { grid-template-columns: 1fr; align-content: start; overflow-y: auto; gap: 18px; }
  .jr-look__stage { height: auto; }
  .jr-look__panel { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .jr-look__turn { transition: none; } }
