/* Catalog grouping and image viewer: warm, quiet JAMAIS VU interaction states. */
.filter.active,
.filter.active:hover,
.filter.active:focus-visible,
.filter.active:active {
  background: var(--jv-burgundy, #6E2C3A);
  border-color: var(--jv-burgundy, #6E2C3A);
  color: #fff;
}

.filter-scroller {
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}

.image-lightbox[hidden] { display: none; }
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 20, 18, .93);
  opacity: 0;
  transition: opacity 180ms ease;
}
.image-lightbox.is-open { opacity: 1; }
.image-lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.image-lightbox-stage img {
  display: block;
  max-width: calc(100vw - 96px);
  max-height: calc(100dvh - 96px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  will-change: transform;
  cursor: zoom-in;
}
.image-lightbox-stage img.is-zoomed { cursor: grab; }
.image-lightbox-stage img.is-zoomed:active { cursor: grabbing; }
.image-lightbox-close,
.image-lightbox-arrow {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(242, 236, 230, .72);
  background: rgba(242, 236, 230, .96);
  color: var(--jv-burgundy, #6E2C3A);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.image-lightbox-close {
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}
.image-lightbox-arrow {
  top: 50%;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  line-height: 1;
}
.image-lightbox-prev { left: max(18px, env(safe-area-inset-left)); }
.image-lightbox-next { right: max(18px, env(safe-area-inset-right)); }
.image-lightbox-close:hover,
.image-lightbox-close:focus-visible,
.image-lightbox-arrow:hover,
.image-lightbox-arrow:focus-visible {
  background: var(--jv-burgundy, #6E2C3A);
  border-color: var(--jv-burgundy, #6E2C3A);
  color: #fff;
  outline: 0;
}
.image-lightbox-counter {
  position: absolute;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  padding: 7px 10px;
  color: #fff;
  background: rgba(55, 15, 19, .78);
  font-size: 11px;
  letter-spacing: .1em;
}

@media (max-width: 600px) {
  .image-lightbox-stage img {
    max-width: calc(100vw - 34px);
    max-height: calc(100dvh - 34px);
  }
  .image-lightbox-arrow {
    top: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: none;
    width: 38px;
    height: 38px;
  }
  .image-lightbox-prev { left: max(18px, env(safe-area-inset-left)); }
  .image-lightbox-next { right: max(18px, env(safe-area-inset-right)); }
  .image-lightbox-counter { right: 50%; bottom: max(25px, env(safe-area-inset-bottom)); transform: translateX(50%); }
}

@media (prefers-reduced-motion: reduce) {
  .image-lightbox { transition: none; }
}
