.product-modal-trigger {
  cursor: zoom-in;
  transition: opacity .2s ease, transform .2s ease;
}

.product-modal-trigger:hover {
  opacity: .86;
  transform: scale(1.02);
}

.product-modal-trigger:focus-visible {
  outline: 3px solid #2878c8;
  outline-offset: 3px;
}

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 36, .78);
}

.image-modal-panel {
  position: relative;
  z-index: 1;
  width: min(900px, 94vw);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 65px rgba(0, 0, 0, .35);
  text-align: center;
}

.image-modal-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  object-fit: contain;
}

.image-modal-title {
  margin: 16px 38px 0;
  color: #173454;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.6;
}

.image-modal-close {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 52, 84, .92);
  color: #fff;
  cursor: pointer;
  font: 700 30px/40px "Meiryo UI", Meiryo, sans-serif;
}

.image-modal-close:hover,
.image-modal-close:focus-visible {
  background: #0d2239;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .image-modal {
    padding: 12px;
  }

  .image-modal-panel {
    width: 100%;
    padding: 18px 12px;
  }

  .image-modal-title {
    margin: 14px 34px 0;
    font-size: 15px;
  }
}
