[data-product-gallery-v2] > .nxc-product-gallery-navigation {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  justify-self: center;
  width: min(100%, 336px);
  gap: 7px;
  position: static;
  inset: auto;
  z-index: auto;
  pointer-events: auto;
}
[data-product-gallery-v2] > .nxc-product-gallery-navigation[hidden] {display: none}
[data-product-gallery-v2] .nxc-gallery-navigation-middle {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 3px 4px;
  color: var(--nxc-text, #1a1725);
}
[data-product-gallery-v2] .nxc-gallery-navigation-middle .nxc-gallery-indicator {
  display: flex !important;
  align-items: center;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  flex-wrap: wrap;
  min-width: 0;
  border: 0;
  padding: 0 !important;
  gap: 4px;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}
[data-product-gallery-v2] .nxc-gallery-indicator.is-counter .nxc-gallery-counter {
  position: static;
  inset: auto;
  transform: none;
}
[data-product-gallery-v2] .nxc-gallery-navigation-middle .nxc-gallery-indicator .nxc-gallery-indicator-item {
  display: grid !important;
  position: relative;
  place-items: center;
  transform: none !important;
  color: var(--nxc-text, #1a1725);
  width: 18px !important;
  height: 28px !important;
  min-height: 0 !important;
  border: 0;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
  cursor: pointer;
}
[data-product-gallery-v2] .nxc-gallery-indicator-item:not(.is-video)::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 12px;
  background: currentColor;
  opacity: .44;
}
[data-product-gallery-v2] .nxc-gallery-indicator-item.is-active:not(.is-video)::before {
  width: 13px;
  opacity: 1;
}
[data-product-gallery-v2] .nxc-gallery-navigation-middle [data-commerce-gallery-progress] {display: none}
[data-product-gallery-v2] .nxc-gallery-navigation-middle .nxc-gallery-indicator .nxc-gallery-indicator-item.is-video {
  width: 24px !important;
  color: var(--nxc-text, #1a1725);
}
[data-product-gallery-v2] .nxc-gallery-indicator-item.is-video.is-active .setup-icon {
  color: var(--nxc-primary-contrast, #fff);
}
[data-product-gallery-v2] .nxc-gallery-navigation-middle .nxc-gallery-indicator .nxc-gallery-indicator-item.is-video.is-active {
  background: var(--nxc-primary, #5d43d6) !important;
  border-radius: 7px;
}
[data-product-gallery-v2] :is(.nxc-gallery-indicator-item.is-video, .nxc-gallery-video-link) .setup-icon {
  width: 12px;
  height: 12px;
}
[data-product-gallery-v2] :is([data-product-gallery-step], .nxc-gallery-video-link) {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--nxc-border, #e1dee6);
  border-radius: 12px;
  background: var(--nxc-surface, #fff);
  color: var(--nxc-text, #1a1725);
  cursor: pointer;
  touch-action: manipulation;
}
[data-product-gallery-v2] [data-product-gallery-step] i {
  width: 15px;
  height: 15px;
  background: currentColor;
  mask: url('/assets/icons/customer/chevron-left-45.0.451.png') center / contain no-repeat;
}
[data-product-gallery-v2]:dir(rtl) [data-product-gallery-step="-1"] i,
[data-product-gallery-v2]:dir(ltr) [data-product-gallery-step="1"] i {transform: scaleX(-1)}
[data-product-gallery-v2] [data-product-gallery-step]:disabled {opacity: .45; cursor: default}
[data-product-gallery-v2] .nxc-gallery-stage > .nxc-gallery-tools {
  z-index: 15 !important;
  position: absolute !important;
  inset: 12px 12px auto auto !important;
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  pointer-events: auto !important;
}
[data-product-gallery-v2] .nxc-gallery-stage > .nxc-gallery-tools > button {
  display: grid !important;
  place-items: center;
  width: 42px !important;
  height: 42px !important;
  border-radius: 13px !important;
}
[data-product-gallery-v2] .nxc-gallery-thumb.is-video {
  background: color-mix(in srgb, var(--nxc-primary, #5d43d6) 19%, #18121d);
}
[data-product-gallery-v2] .nxc-gallery-play {
  display: grid;
  place-items: center;
  color: #fff;
  background: #191523db;
}
[data-product-gallery-v2] .nxc-gallery-thumb.is-video.is-active .nxc-gallery-play {
  background: var(--nxc-primary, #5d43d6);
  color: var(--nxc-primary-contrast, #fff);
}
[data-product-gallery-v2] .nxc-gallery-play .setup-icon {width: 15px; height: 15px}
[data-product-gallery-v2] .nxc-gallery-media[hidden],
[data-product-gallery-v2] .nxc-gallery-thumb[hidden],
[data-product-gallery-v2] .nxc-gallery-indicator-item[hidden],
[data-product-gallery-v2] .nxc-gallery-video-link[hidden] {display: none !important}

[data-product-gallery-v2] .nxc-gallery-stage .nxc-product-video {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
  isolation: isolate;
  background: #15121c;
  cursor: default;
  touch-action: pan-y;
}
[data-product-gallery-v2] .nxc-product-video .setup-player {
  --setup-panel: #181620;
  --setup-line: #44404b;
  --setup-field-line: #6d6776;
  --setup-tint: #ffffff19;
  --setup-text: #f7f4fb;
  --setup-muted: #e3deea;
  --setup-accent: color-mix(in srgb, var(--nxc-primary, #836aff) 65%, #fff);
  --setup-button: #252032;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--setup-panel);
}
[data-product-gallery-v2] .nxc-product-video .setup-video-stage {
  min-height: 0;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  background: #0e0c13;
}
[data-product-gallery-v2] .nxc-product-video .setup-video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
}
[data-product-gallery-v2] .nxc-product-video .setup-video-cover {
  background: radial-gradient(ellipse at 32% 75%, color-mix(in srgb, var(--nxc-primary, #7151da) 27%, #21182b), #13111a 76%);
}
[data-product-gallery-v2] .nxc-product-video .setup-video-seek {
  background: transparent;
  padding: 0;
  border: 0;
}
[data-product-gallery-v2] .nxc-product-video .setup-video-bar button {min-width: 36px; padding-inline: 5px}
[data-product-gallery-v2] .nxc-product-video .setup-video-bar .setup-icon {width: 19px; height: 19px}
[data-product-gallery-v2] .nxc-product-video .setup-player:is(:fullscreen, :-webkit-full-screen) {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
}
[data-product-gallery-v2] .nxc-product-video .setup-player:is(:fullscreen, :-webkit-full-screen) .setup-video-controls {
  padding-block-end: max(8px, env(safe-area-inset-bottom));
}

@media (min-width: 821px) {
  [data-product-gallery-v2]:is(.style-stacked,.style-mosaic) > .nxc-product-gallery-navigation {display: none}
  [data-product-gallery-v2].has-active-video:not(.style-stacked,.style-mosaic) .nxc-gallery-stage {
    height: clamp(300px, calc(100svh - 230px), 650px) !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }
}
@media (max-width: 767px) {
  /* Keep the selector row visible when the mobile header and buy bar are also on screen. */
  .nxc-product-detail-shell .nxc-product-gallery[data-product-gallery-v2]:not(.mobile-stack):has(> .nxc-product-gallery-navigation:not([hidden])) > .nxc-gallery-stage {
    max-height: max(180px, calc(100svh - 265px)) !important;
    min-height: 0 !important;
  }
  .nxc-product-detail-shell .nxc-product-gallery[data-product-gallery-v2].has-active-video:not(.mobile-stack):has(> .nxc-product-gallery-navigation:not([hidden])) > .nxc-gallery-stage {
    height: clamp(228px, 52svh, 510px) !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }
  [data-product-gallery-v2].mobile-stack > .nxc-product-gallery-navigation {display: none}
  [data-product-gallery-v2] .nxc-gallery-stage > .nxc-gallery-tools {inset: 10px 10px auto auto !important}
  [data-product-gallery-v2] .nxc-gallery-stage > .nxc-gallery-tools > button {width: 40px !important;height: 40px !important}

  /* Keep the fixed bar out of the product section's stacking and clipping contexts. */
  .nxc-product-detail:has([data-commerce-mobile-buybar]),
  .nxc-product-detail:has([data-commerce-mobile-buybar]) > .nxc-commerce-wrap,
  .nxc-product-detail-shell:has([data-commerce-mobile-buybar]),
  .nxc-product-detail-summary:has([data-commerce-mobile-buybar]),
  [data-commerce-product-summary]:has([data-commerce-mobile-buybar]) {
    isolation: auto !important;
    z-index: auto !important;
    overflow: visible !important;
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    contain: none !important;
    content-visibility: visible !important;
    will-change: auto !important;
  }
  .nxc-product-detail-shell:has([data-commerce-mobile-buybar]) > .nxc-product-detail-summary {
    position: relative !important;
    inset: auto !important;
  }
  .nxc-product-detail [data-commerce-mobile-buybar] {
    position: fixed !important;
    z-index: 1100 !important;
  }
  body:has(.nxc-product-detail [data-commerce-mobile-buybar]) {
    --nxc-product-buybar-space: var(--nxc-product-buybar-clearance, calc(94px + env(safe-area-inset-bottom)));
    padding-block-end: var(--nxc-product-buybar-space) !important;
  }
  body:has(.nxc-product-detail [data-commerce-mobile-buybar]) .nxc-compare-dock.is-visible {
    bottom: var(--nxc-product-buybar-space) !important;
  }
  body:has(.nxc-product-detail [data-commerce-mobile-buybar]) .nxc-product-detail.is-reviews[data-reviews-mobile-sticky="1"] .nxc-review-mobile-write {
    bottom: var(--nxc-product-buybar-space);
  }
}
