/* NFC product gallery and scroll reveal: intentionally scoped to these two buy pages. */
.hlgear-page .hlgear-gallery {
  position: relative;
  z-index: 3;
  width: 100%;
  min-width: 0;
}
.hlgear-page .hlgear-gallery-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 15px;
  isolation: isolate;
}
.hlgear-page .hlgear-gallery-track {
  display: flex;
  width: 100%;
  height: 305px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.hlgear-page .hlgear-gallery-track::-webkit-scrollbar { display: none; }
.hlgear-page .hlgear-gallery-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 100%;
  width: 100%;
  height: 305px;
  padding: 0 6px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
/* Keep the original product photo sizing and object-fit from Phase 2. */
.hlgear-page .hlgear-image-stage .hlgear-gallery-slide img {
  display: block;
  width: 100%;
  height: 305px;
  max-height: 305px;
  max-width: 480px;
  object-fit: contain;
  margin: 0 auto;
}
.hlgear-page .hlgear-gallery-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 36px;
  height: 36px;
  padding: 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(18, 20, 24, .13);
  background: rgba(255, 255, 255, .95);
  color: #17191e;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .10);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color .18s ease, box-shadow .18s ease;
}
.hlgear-page .hlgear-gallery-arrow:hover {
  background: #f0f7dc;
  box-shadow: 0 9px 22px rgba(0,0,0,.13);
}
.hlgear-page .hlgear-gallery-prev { left: 4px; }
.hlgear-page .hlgear-gallery-next { right: 4px; }
.hlgear-page .hlgear-gallery-arrow svg { display: block; width: 19px; height: 19px; }
.hlgear-page .hlgear-gallery-counter {
  position: absolute;
  z-index: 4;
  right: 10px;
  bottom: 9px;
  background: rgba(20, 22, 26, .76);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.hlgear-page .hlgear-gallery-thumbs {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 7px;
  margin-top: 10px;
}
.hlgear-page .hlgear-gallery-thumb {
  flex: 0 1 66px;
  min-width: 0;
  height: 48px;
  padding: 3px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid #dedfe3;
  border-radius: 9px;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease;
}
.hlgear-page .hlgear-gallery-thumb:hover { transform: translateY(-2px); }
.hlgear-page .hlgear-gallery-thumb[aria-pressed="true"] { border-color: #566c18; }
.hlgear-page .hlgear-gallery-thumb img {
  width: 100%;
  height: 100%;
  max-height: none;
  max-width: none;
  display: block;
  object-fit: contain;
  border-radius: 5px;
}
.hlgear-page .hlgear-gallery-arrow:focus-visible,
.hlgear-page .hlgear-gallery-thumb:focus-visible,
.hlgear-page .hlgear-gallery-track:focus-visible {
  outline: 3px solid #93b92b;
  outline-offset: 3px;
}
@media (max-width: 420px) {
  .hlgear-page .hlgear-gallery-thumb { height: 42px; }
  .hlgear-page .hlgear-gallery-thumbs { gap: 5px; }
  .hlgear-page .hlgear-gallery-arrow { width: 32px; height: 32px; padding: 6px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hlgear-page.hlgear-gallery-motion [data-hlgear-reveal]:not(.hlgear-in-view) {
    opacity: 0;
    transform: translateY(18px);
  }
  .hlgear-page.hlgear-gallery-motion [data-hlgear-reveal] {
    transition: opacity .65s ease, transform .65s cubic-bezier(.2,.7,.3,1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hlgear-page .hlgear-gallery-track { scroll-behavior: auto; }
  .hlgear-page .hlgear-gallery-thumb { transition: none; }
}

/* Layout-only fix: keep the gallery, thumbnails and copy in normal flow.
   Phase 2 reserved a shorter image-stage height than the gallery needs on mobile. */
.hlgear-page .hlgear-product-stage {
  height: auto;
  min-height: 0;
  justify-content: flex-start;
}
.hlgear-page .hlgear-image-stage {
  display: block;
  flex: none;
  height: auto;
  min-height: 0;
  overflow: visible;
}
.hlgear-page .hlgear-gallery {
  display: block;
}
.hlgear-page .hlgear-image-stage .hlgear-gallery-slide img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  transform: none;
}
.hlgear-page .hlgear-product-stage:hover .hlgear-gallery-slide img {
  transform: none;
}
.hlgear-page .hlgear-gallery-thumbs {
  position: relative;
  z-index: 2;
}
.hlgear-page .hlgear-stage-copy {
  flex: 0 0 auto;
  margin-top: 0;
}
@media (max-width: 720px) {
  .hlgear-page .hlgear-gallery-track,
  .hlgear-page .hlgear-gallery-slide { height: 260px; }
}
@media (max-width: 480px) {
  .hlgear-page .hlgear-gallery-track,
  .hlgear-page .hlgear-gallery-slide { height: 245px; }
}
