/* Keep the original three-photo thumbnail size, regardless of gallery length. */
.jdm-detail .jdm-gallery {
  min-width: 0;
  max-width: 100%;
}
.jdm-detail .jdm-gallery-thumbs {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--jdm-red, #b51118) #e4e1dc;
}
.jdm-detail .jdm-gallery-thumbs > button {
  flex: 0 0 min(160px, calc((100% - 20px) / 3));
  max-width: 160px;
  scroll-snap-align: start;
}
.jdm-detail .jdm-gallery-thumbs::-webkit-scrollbar {
  height: 6px;
}
.jdm-detail .jdm-gallery-thumbs::-webkit-scrollbar-track {
  background: #e4e1dc;
  border-radius: 3px;
}
.jdm-detail .jdm-gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--jdm-red, #b51118);
  border-radius: 3px;
}
