/* A Plus Trading gallery interaction repair.
   Loaded after the existing gallery CSS. */

.apg .apg__tabs,
.apg .apg__tab,
.apg .apg__stage,
.apg .apg__viewport,
.apg .apg__track {
  pointer-events: auto !important;
}

.apg .apg__tabs {
  position: relative !important;
  z-index: 30 !important;
}

.apg .apg__tab {
  position: relative !important;
  z-index: 31 !important;
  touch-action: manipulation !important;
}

.apg .apg__viewport {
  overflow: hidden !important;
}

.apg .apg__track {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  transform: none !important;
  transition: none !important;
  touch-action: pan-x pan-y !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  will-change: scroll-position;
}

.apg .apg__track::-webkit-scrollbar {
  display: none;
}

.apg .apg__track[hidden] {
  display: none !important;
}

.apg .apg__track.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.apg .apg__card {
  flex-shrink: 0 !important;
  scroll-snap-align: center;
}

.apg .apg__arrow {
  pointer-events: auto !important;
  z-index: 40 !important;
}

.apg .apg__modal {
  pointer-events: none !important;
}

.apg .apg__modal.is-open {
  pointer-events: auto !important;
}

@media (max-width: 820px) {
  .apg .apg__viewport {
    overflow: visible !important;
  }

  .apg .apg__track {
    touch-action: pan-x pan-y !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apg .apg__track {
    scroll-behavior: auto !important;
  }
}
