body.product-zoom-open {
  overflow: hidden;
}

.product-zoom-image-trigger {
  cursor: zoom-in;
  display: block;
  height: 100%;
  width: 100%;
}

.product-zoom-modal[hidden],
.product-zoom-slide[hidden] {
  display: none !important;
}

.product-zoom-modal {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 5000;
}

.product-zoom-backdrop {
  background: rgba(0, 0, 0, 0.78);
  inset: 0;
  position: absolute;
}

.product-zoom-dialog {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  max-width: 1200px;
  overflow: hidden;
  position: relative;
  width: 100%;
  z-index: 1;
}

.product-zoom-header {
  align-items: center;
  border-bottom: 1px solid #dddddd;
  display: flex;
  flex: 0 0 auto;
  min-height: 52px;
  padding: 0 12px 0 18px;
}

.product-zoom-header strong {
  color: #333333;
  font-size: 16px;
  line-height: 1.3;
  overflow: hidden;
  padding-right: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-zoom-close {
  background: transparent;
  border: 0;
  color: #333333;
  cursor: pointer;
  flex: 0 0 42px;
  font-size: 34px;
  height: 42px;
  line-height: 38px;
  margin-left: auto;
  padding: 0;
  text-align: center;
}

.product-zoom-stage {
  align-items: center;
  background: #f7f7f7;
  display: flex;
  flex: 1 1 auto;
  min-height: 300px;
  overflow: hidden;
  position: relative;
}

.product-zoom-slide {
  align-items: center;
  display: flex;
  height: calc(100vh - 210px);
  justify-content: center;
  margin: 0;
  max-height: 760px;
  min-height: 300px;
  overflow: hidden;
  width: 100%;
}

.product-zoom-slide img {
  cursor: zoom-in;
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transform: scale(1);
  transform-origin: 50% 50%;
  transition: transform 0.12s ease;
  user-select: none;
}

.product-zoom-slide img.is-zoomed {
  cursor: zoom-out;
  transform: scale(2.5);
}

.product-zoom-navigation {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #cccccc;
  border-radius: 50%;
  color: #444444;
  cursor: pointer;
  font-size: 36px;
  height: 48px;
  line-height: 40px;
  margin-top: -24px;
  padding: 0;
  position: absolute;
  top: 50%;
  width: 48px;
  z-index: 2;
}

.product-zoom-previous {
  left: 12px;
}

.product-zoom-next {
  right: 12px;
}

.product-zoom-footer {
  align-items: center;
  border-top: 1px solid #dddddd;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  min-height: 74px;
  padding: 8px 12px;
}

.product-zoom-thumbnails {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
}

.product-zoom-thumbnail {
  background: #ffffff;
  border: 2px solid #dddddd;
  box-sizing: border-box;
  cursor: pointer;
  flex: 0 0 56px;
  height: 56px;
  padding: 3px;
  width: 56px;
}

.product-zoom-thumbnail.is-active {
  border-color: #bdcd00;
}

.product-zoom-thumbnail img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.product-zoom-hint {
  color: #666666;
  font-size: 12px;
  margin-left: auto;
  text-align: right;
}

.product-zoom-close:focus,
.product-zoom-navigation:focus,
.product-zoom-thumbnail:focus {
  outline: 2px solid #bdcd00;
  outline-offset: 2px;
}

@media screen and (max-width: 700px) {
  .product-zoom-modal {
    align-items: stretch;
    padding: 0;
  }

  .product-zoom-dialog {
    border-radius: 0;
    height: 100%;
    max-height: none;
  }

  .product-zoom-header {
    min-height: 48px;
    padding-left: 12px;
  }

  .product-zoom-header strong {
    font-size: 14px;
  }

  .product-zoom-stage {
    min-height: 0;
  }

  .product-zoom-slide {
    height: calc(100vh - 142px);
    min-height: 0;
  }

  .product-zoom-navigation {
    height: 42px;
    width: 42px;
  }

  .product-zoom-previous {
    left: 6px;
  }

  .product-zoom-next {
    right: 6px;
  }

  .product-zoom-footer {
    flex-wrap: wrap;
    gap: 4px;
    min-height: 70px;
    padding: 6px 8px;
  }

  .product-zoom-thumbnail {
    flex-basis: 48px;
    height: 48px;
    width: 48px;
  }

  .product-zoom-hint {
    flex: 1 0 100%;
    font-size: 11px;
    margin-left: 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-zoom-slide img {
    transition: none;
  }
}
