/* DISCOVERY Product Image Viewer v3.11.0 */
body.discovery-image-viewer-open {
  position: fixed;
  left: 0;
  width: 100%;
  overflow: hidden;
}

.discovery-image-viewer {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  color: #222;
  overflow: hidden;
}

.discovery-image-viewer__stage {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 58px 72px 48px;
  overflow: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.discovery-image-viewer__image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: min(1200px, 100%) !important;
  max-height: min(1200px, 100%) !important;
  margin: auto !important;
  object-fit: contain !important;
  opacity: 1 !important;
  visibility: visible !important;
  user-select: none;
  -webkit-user-drag: none;
}

.discovery-image-viewer__close,
.discovery-image-viewer__prev,
.discovery-image-viewer__next,
.discovery-image-viewer__zoom {
  position: absolute;
  z-index: 2147483002;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, .94);
  color: #222;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  touch-action: manipulation;
}

.discovery-image-viewer__close {
  top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  font-size: 38px;
  line-height: 44px;
}

.discovery-image-viewer__prev,
.discovery-image-viewer__next {
  top: 50%;
  width: 52px;
  height: 70px;
  font-size: 54px;
  line-height: 62px;
  transform: translateY(-50%);
}
.discovery-image-viewer__prev { left: 10px; }
.discovery-image-viewer__next { right: 10px; }

.discovery-image-viewer__counter {
  position: absolute;
  z-index: 2147483002;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 5px 10px;
  background: rgba(255, 255, 255, .94);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .06em;
  pointer-events: none;
}

.discovery-image-viewer__zoom { display: none; }

.item-slider img,
.item-thum-list .item-thum-list-col { cursor: pointer; }

@media (hover: hover) {
  .discovery-image-viewer__close:hover,
  .discovery-image-viewer__prev:hover,
  .discovery-image-viewer__next:hover,
  .discovery-image-viewer__zoom:hover { opacity: .82; }

  .item-thum-list .item-thum-list-col { transition: opacity .2s ease; }
  .item-thum-list .item-thum-list-col:hover { opacity: .7; }
}

/* Fullscreen affordance. The small icon remains visible after the hint disappears. */
.item-slider .item-slider-col {
  position: relative;
}

.item-slider .item-slider-col::after {
  content: "";
  position: absolute;
  z-index: 6;
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background-color: rgba(34, 34, 34, .48);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 16v-5h5M22 11h5v5M27 22v5h-5M16 27h-5v-5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 30px 30px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  transform: translateZ(0);
  transition: opacity .18s ease, background-color .18s ease;
}


/* One-time text hint. It is a separate overlay, so Slick slide changes cannot restart it. */
.discovery-image-viewer-hint-host {
  position: relative;
}

.discovery-image-viewer__page-hint {
  position: absolute;
  z-index: 8;
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 14px 0 6px;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 19px;
  background: rgba(34, 34, 34, .72);
  color: #fff;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .03em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity .28s ease, transform .28s ease;
}

.discovery-image-viewer__page-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.discovery-image-viewer__page-hint.is-finished {
  display: none;
}

.discovery-image-viewer__page-hint-icon {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-right: 5px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 16v-5h5M22 11h5v5M27 22v5h-5M16 27h-5v-5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 28px 28px;
}

@media (hover: hover) {
  .item-slider.slick-initialized .item-slider-col.slick-current:hover::after,
  .item-slider:not(.slick-initialized) .item-slider-col:first-child:hover::after {
    background-color: rgba(34, 34, 34, .66);
  }
}

@media screen and (max-width: 767px) {
  .discovery-image-viewer__page-hint {
    height: 36px;
    padding-right: 13px;
    border-radius: 18px;
    font-size: 12px;
  }

  .item-slider .item-slider-col::after {
    left: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    background-size: 28px 28px;
  }


  .item-slider-wrap .item-slider .item-slider-col img {
    display: block !important;
    width: calc(100% - 2px) !important;
    max-width: calc(100% - 2px) !important;
    height: auto !important;
    margin: 1px auto !important;
    object-fit: contain !important;
  }

  .discovery-image-viewer__stage {
    padding: calc(54px + env(safe-area-inset-top)) 10px calc(58px + env(safe-area-inset-bottom));
  }

  .discovery-image-viewer__prev,
  .discovery-image-viewer__next {
    width: 42px;
    height: 64px;
    background: rgba(255, 255, 255, .76);
    font-size: 46px;
    line-height: 56px;
  }
  .discovery-image-viewer__prev { left: 0; }
  .discovery-image-viewer__next { right: 0; }

  /* Not zoomed: JS places this directly under the image's lower-right edge. */
  .discovery-image-viewer__zoom {
    display: flex;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 66px;
    height: 36px;
    padding: 0 11px;
    border: 0;
    border-radius: 18px;
    background: rgba(30, 30, 30, .78);
    color: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    transition: opacity .18s ease, background-color .18s ease;
  }

  .discovery-image-viewer__zoom-symbol {
    font-size: 17px;
    line-height: 1;
  }

  .discovery-image-viewer.is-zoomed .discovery-image-viewer__zoom {
    top: auto !important;
    right: max(12px, env(safe-area-inset-right)) !important;
    bottom: max(14px, env(safe-area-inset-bottom)) !important;
    background: rgba(30, 30, 30, .78);
    color: #fff;
    border: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  }

  .discovery-image-viewer.is-zoomed .discovery-image-viewer__prev,
  .discovery-image-viewer.is-zoomed .discovery-image-viewer__next {
    visibility: hidden;
    pointer-events: none;
  }

  .discovery-image-viewer.is-zoomed .discovery-image-viewer__stage {
    display: block;
    overflow: auto;
    padding: calc(54px + env(safe-area-inset-top)) 0 calc(58px + env(safe-area-inset-bottom));
    touch-action: pan-x pan-y;
    overscroll-behavior: contain;
  }

  .discovery-image-viewer.is-zoomed .discovery-image-viewer__image {
    width: 160vw !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .item-slider .item-slider-col::after,
  .discovery-image-viewer__zoom {
    transition: none;
  }

}
