/* Browsing two views of the same garment is a native horizontal gesture. */
.gallery .item-image.swipe-photos {
  direction:ltr;
  display:flex;
  align-items:stretch;
  justify-content:flex-start;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.swipe-photos::-webkit-scrollbar { display:none; }
.gallery .swipe-photos img {
  display:block;
  flex:0 0 100%;
  min-width:100%;
  height:100%;
  scroll-snap-align:start;
  object-fit:contain;
}
.swipe-photos:focus-visible { outline:3px solid var(--accent-ink); outline-offset:3px; }
.photo-switch { gap:0; }
.photo-switch button {
  position:relative;
  color:var(--muted-ink);
  border-color:transparent;
  transition:color .22s ease;
}
.photo-switch button[aria-pressed=true] { border-color:transparent; color:var(--graphite); }
.photo-switch button::after {
  content:"";
  position:absolute;
  inset:auto 10px -1px;
  height:3px;
  background:var(--accent-ink);
  transform:scaleX(0);
  transition:transform .32s ease;
}
.photo-switch button[aria-pressed=true]::after { transform:scaleX(1); }

:is(#sizes, #rack-sizes) label span {
  position:relative;
  pointer-events:none;
  transition:background-color .23s, color .23s, border-color .23s;
}
:is(#sizes, #rack-sizes) label span::before {
  content:"";
  position:absolute;
  inset:auto 3px 3px;
  height:4px;
  background:repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 5px);
  opacity:.22;
}
:is(#sizes, #rack-sizes) input:checked + span::before { color:var(--seam); opacity:.92; }
.bag-link i { transform-origin:50% -3px; }
.bag-link [data-cart-count] { display:inline-block; font-variant-numeric:tabular-nums; }
.primary { transition:background-color .24s, box-shadow .24s; }
.primary:active { box-shadow:inset 0 0 0 2px var(--accent-ink); }
.primary.bag-confirmed { background-color:var(--graphite); color:var(--surface); }
.purchase-mark {
  display:inline-grid; width:30px; height:30px; place-items:center; flex:none;
  font:600 20px/1 Arial,sans-serif; pointer-events:none;
}
.primary.bag-confirmed .purchase-mark { color:var(--seam); }
.quantity button { transition:background-color .18s; }
.quantity button:active:not(:disabled) { background:var(--accent-wash); }
#receiver input, #receiver textarea { transition:border-color .22s, box-shadow .22s; }
#receiver :is(input, textarea):focus {
  border-color:var(--accent-ink);
  outline:1px solid var(--accent-ink);
  outline-offset:1px;
}
#receiver:has(.receiver-progress) h2 { margin-bottom:0; }
.receiver-progress { display:flex; gap:3px; height:4px; margin:0 0 5px; }
.receiver-progress i { flex:1; background:var(--hairline); }
.receiver-progress i::before {
  content:"";
  display:block;
  height:100%;
  background:var(--accent-ink);
  transform:scaleX(0);
  transform-origin:right;
  transition:transform .4s cubic-bezier(.18,.7,.25,1);
}
.receiver-progress i.complete::before { transform:scaleX(1); }
@media (prefers-reduced-motion:reduce) {
  .photo-switch button, .photo-switch button::after, :is(#sizes, #rack-sizes) label span,
  .primary, .quantity button, #receiver :is(input, textarea), .receiver-progress i::before { transition:none; }
}
