/* Shared WebP previews and native, keyboard-accessible mockup galleries. */
.goods-preview {
  --goods-frame:#10131a;
  aspect-ratio:1.45;
  min-width:0;
  overflow:hidden;
  background:var(--goods-frame);
}
.goods-preview--bag { --goods-frame:#eee4d7; }
.goods-preview > img,
.goods-home-grid .goods-preview > img {
  display:block;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  object-fit:contain;
  margin:0;
}
.goods-preview-link,.goods-home-photo,.goods-gallery__item > a { display:block; min-width:0; }
.goods-home-grid .goods-preview {
  aspect-ratio:1.65;
  border-top:2px solid var(--ink);
}
.goods-home-photo__label {
  display:block;
  margin-block:.72rem 0;
  color:var(--ink);
  font-size:.8rem;
  line-height:1.4;
  letter-spacing:.06em;
}
.goods-preview-link:focus-visible,.goods-home-photo:focus-visible,.goods-gallery__item > a:focus-visible,.goods-gallery summary:focus-visible {
  outline:2px solid var(--signal);
  outline-offset:4px;
}
.goods-galleries {
  padding:clamp(2.75rem,6.5vw,7rem) var(--page-pad);
  color:var(--ink);
  background:var(--chapter-tint-soft,var(--paper));
  border-block-start:1px solid var(--chapter-seam,var(--line));
}
.goods-galleries__heading { margin-block:0 2rem; }
.goods-galleries__heading h2 {
  margin:.3em 0 0;
  font-size:clamp(2.1rem,5vw,5rem);
  line-height:.94;
  letter-spacing:-.055em;
}
.goods-gallery {
  border-block-start:1px solid var(--chapter-seam,var(--line));
  scroll-margin-block-start:1.5rem;
}
.goods-gallery:last-child { border-block-end:1px solid var(--chapter-seam,var(--line)); }
.goods-gallery summary {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto 1.4rem;
  align-items:center;
  gap:.65rem clamp(.65rem,2vw,2rem);
  min-height:3.75rem;
  padding:1rem .25rem;
  cursor:pointer;
  list-style:none;
  font-size:clamp(.85rem,1.6vw,1.15rem);
  font-weight:800;
}
.goods-gallery summary::-webkit-details-marker { display:none; }
.goods-gallery summary::after {
  content:"";
  inline-size:1rem;
  block-size:1rem;
  justify-self:end;
  background:
    linear-gradient(currentColor,currentColor) center / 100% 1px no-repeat,
    linear-gradient(currentColor,currentColor) center / 1px 100% no-repeat;
}
.goods-gallery[open] summary::after { background-size:100% 1px,1px 0; }
.goods-gallery:is(:target,[open]) summary { color:var(--signal); }
.goods-gallery summary small {
  font-size:.73rem;
  white-space:nowrap;
  letter-spacing:.06em;
}
.goods-gallery__grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1.4rem clamp(.6rem,1.55vw,1.45rem);
  padding-block:.6rem 1.7rem;
}
.goods-gallery__item { margin:0; min-width:0; }
.goods-gallery__item .goods-preview { aspect-ratio:4/3; }
.goods-gallery__item figcaption { padding-top:.38rem; font-size:.76rem; font-variant-numeric:tabular-nums; }
@media(max-width:900px) { .goods-gallery__grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:540px) { .goods-gallery__grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
