/* Hover magnification and full-screen photo viewer. */
.product-photo-open {
  position: relative;
  display: block;
  width: 100%;
  height: 440px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  cursor: zoom-in;
  touch-action: manipulation
}

.product-photo-open:disabled {
  cursor: default
}

.product-photo-open>img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: none
}

.product-photo-open.photo-magnified>img {
  transform: scale(2.5)
}

.product-photo-open>span {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 25px;
  color: #a13d00;
  pointer-events: none
}

.live-product .photo-hint {
  font-size: 11px;
  margin: 10px 0 0
}

.photo-thumbnails button[aria-pressed=true] {
  border: 2px solid #b74600;
  padding: 4px
}

.photo-viewer {
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: #17181b;
  overflow: hidden
}

.photo-viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto
}

.photo-viewer::backdrop {
  background: #fff
}

.photo-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 24px;
  border-bottom: 1px solid #ddd
}

.photo-viewer-bar>div {
  display: flex;
  gap: 12px
}

.photo-viewer-bar button {
  background: #f3f3f5;
  border: 1px solid #ddd;
  padding: 10px 16px;
  border-radius: 4px;
  cursor: pointer
}

.photo-viewer-bar [data-close] {
  background: #17181b;
  color: white
}

.photo-viewer-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: zoom-in
}

.photo-viewer-stage.is-zoomed {
  cursor: grab;
  touch-action: none
}

.photo-viewer-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none
}

.photo-viewer-stage>button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  background: #fffffff0;
  font-size: 35px;
  cursor: pointer
}

.photo-viewer-stage>button[hidden] {
  display: none
}

.photo-prev {
  left: 18px
}

.photo-next {
  right: 18px
}

.photo-viewer-hint {
  text-align: center;
  font-size: 12px;
  color: #68696f;
  padding: 12px;
  margin: 0;
  border-top: 1px solid #eee
}

@media(max-width:720px) {
  .product-photo-open {
    height: 310px
  }

  .photo-viewer-bar {
    padding: 10px;
    font-size: 12px
  }

  .photo-viewer-bar button {
    padding: 9px;
    font-size: 12px
  }

  .photo-viewer-bar>div {
    gap: 6px
  }

  .photo-viewer-hint {
    font-size: 10px;
    padding: 10px
  }

  .photo-viewer-stage>button {
    width: 38px;
    height: 38px;
    font-size: 26px
  }

  .photo-prev {
    left: 8px
  }

  .photo-next {
    right: 8px
  }

  .live-product .photo-hint {
    font-size: 10px
  }
}
