.inspect-container {
  margin: 0 auto 70px;
  padding-top: 40px;
}

html:has(.product-detail),
body:has(.product-detail),
.main-content:has(.product-detail) {
  overflow-x: hidden;
  overflow-x: clip;
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  grid-template-areas:
    "title ."
    "media info";
  column-gap: clamp(28px, 5vw, 72px);
  row-gap: 0;
  align-items: start;
  width: min(1180px, calc(100% - 40px));
  animation: product-detail-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@media (min-width: 861px) {
  .js-fx .inspect-container.jimmy-product-detail {
    padding-top: 72px !important;
  }
}

.product-media {
  grid-area: media;
  min-width: 0;
  max-width: 100%;
}

.product-image-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
}

@keyframes product-detail-in {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: none; }
}

.product-image-open {
  display: inline-block;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 100%;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='10' cy='10' r='6.5' fill='white' stroke='%23111' stroke-width='1.5'/%3E%3Cpath d='M10 7v6M7 10h6' stroke='%23111' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%23111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 10 10, zoom-in;
  position: relative;
  overflow: hidden;
  line-height: 0 !important;
  font-size: 0 !important;
  vertical-align: top;
  appearance: none;
  -webkit-appearance: none;
}

.product-image-open.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(100deg, rgba(210,210,210,0.55) 20%, rgba(245,245,245,0.85) 40%, rgba(210,210,210,0.55) 60%);
  background-size: 220% 100%;
  animation: inspect-skeleton 1.15s ease-in-out infinite;
}

.product-image-open.is-loading img {
  opacity: 0;
}

.product-image-open.is-loaded img {
  opacity: 1;
  transition: opacity 0.22s ease;
}

@keyframes inspect-skeleton {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.product-image-frame img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0 !important;
  box-sizing: border-box;
  filter: var(--product-image-filter-shadow, none);
}

.product-image-open {
  box-shadow: var(--product-image-shadow, 10px 14px 36px rgba(0, 0, 0, 0.38));
}

.product-image-open:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.35);
  outline-offset: 6px;
}

.product-detail.landscape .product-image-frame img {
  max-height: 66vh;
}

.product-detail:not(.jimmy-product-detail) .product-image-open {
  border: 14px solid #111 !important;
  box-shadow: var(--ketty-product-frame-effect, 0 12px 34px rgba(0, 0, 0, 0.28)) !important;
}

.product-detail:not(.jimmy-product-detail) .product-caption {
  width: min(100%, 720px);
  margin: 22px auto 0;
  text-align: center;
}

.product-detail:not(.jimmy-product-detail) .product-caption .product-description {
  margin: 0 auto;
  color: var(--page-text, #111);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.55;
  text-align: center;
}

.product-info {
  grid-area: info;
  align-self: start;
  min-width: 0;
  max-width: 100%;
  padding-top: 0;
}

.product-info .customer-view {
  margin-top: 0;
}

.product-title {
  grid-area: title;
  margin: 0 0 32px;
  width: 100%;
  text-align: center;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.product-detail.jimmy-product-detail .product-title {
  font-size: clamp(2.35rem, 4.35vw, 4.15rem);
}

.inspect-image {
  padding: 32px;
  width: 50vw;
  margin: 0 auto 30px auto;
  border-radius: var(--site-radius, 8px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  background-color: #fff;
  text-align: center;
  font-size: 32px;
}

.inspect-info {
  width: 90%;
  max-width: 100vw;
  margin: 0 auto;
}

.inspect-info h2 {
  margin-top: 0;
  font-size: 2.5em;
}

.inspect-info label {
  font-size: 0.5em;
  text-align: left;
  margin-bottom: 0;
}

.admin-image-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  width: 100%;
  margin: 0 auto 18px;
  padding: 12px 16px;
  border: 1px solid rgba(190, 154, 40, 0.35);
  border-radius: var(--site-radius, 8px);
  background: #fff6c7;
  box-sizing: border-box;
  color: #4b3b00;
}

.admin-image-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 104px;
  justify-content: center;
  font-size: 0.98rem;
  line-height: 1.25;
}

.admin-image-stat-label {
  font-weight: 600;
}

.admin-image-stat-value {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.72);
  box-sizing: border-box;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='10' cy='10' r='6.5' fill='white' stroke='%23111' stroke-width='1.5'/%3E%3Cpath d='M7 10h6' stroke='%23111' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%23111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 10 10, zoom-out;
  overflow: hidden;
}

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

.image-lightbox:not([hidden]) {
  animation: lightbox-bg-in 0.32s ease both;
}

.image-lightbox:not([hidden]) img {
  animation: lightbox-img-in 0.5s cubic-bezier(0.34, 1.1, 0.64, 1) 0.06s both;
}

@keyframes lightbox-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lightbox-img-in {
  from { opacity: 0; clip-path: inset(6% 6% 6% 6%); }
  to   { opacity: 1; clip-path: none; }
}

.image-lightbox img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  touch-action: none;
  box-shadow: 0 0 60px rgb(255, 255, 255, .4);
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='10' cy='10' r='6.5' fill='white' stroke='%23111' stroke-width='1.5'/%3E%3Cpath d='M10 7v6M7 10h6' stroke='%23111' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M15.5 15.5L21 21' stroke='%23111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 10 10, zoom-in;
  transform-origin: center center;
  transition: transform 0.18s ease;
}

.image-lightbox.is-zoomed img {
  cursor: url('/shared-img/pan.svg') 12 12, grab;
}

.image-lightbox.is-dragging img {
  cursor: url('/shared-img/pan_grab.svg') 12 12, grabbing !important;
}


@media (max-width: 860px) {
  .inspect-container {
    margin: 0 auto 48px;
    padding-top: 28px;
  }

  .product-detail {
    animation: product-detail-in-mobile 1.05s cubic-bezier(0.22, 1, 0.36, 1) both !important;
  }

  .product-detail {
    grid-template-columns: 1fr;
    grid-template-areas:
      "back"
      "title"
      "media"
      "info";
    width: 100%;
    max-width: 680px;
    padding: 0 12px;
    box-sizing: border-box;
  }

  .product-media,
  .product-info {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .product-info .customer-view {
    margin-top: 22px;
  }

  .product-image-frame {
    min-height: auto;
  }

  .product-image-frame img {
    max-height: 64vh;
  }

  .product-title {
    font-size: 2rem;
    margin-bottom: 22px;
  }

  .product-detail.jimmy-product-detail .product-title {
    font-size: 2.15rem;
  }

  .inspect-container.jimmy-product-detail {
    padding-top: 28px;
  }

  .inspect-image {
    width: 70%;
  }

  .image-lightbox {
    padding: 14px;
  }

}

@keyframes product-detail-in-mobile {
  from { opacity: 0; transform: translateY(220px); }
  to   { opacity: 1; transform: translateY(42px); }
}

@media (hover: none) and (pointer: coarse) {
  .product-image-frame,
  .product-title {
    animation: none;
  }

  .image-lightbox {
    padding: 0;
  }

  .image-lightbox img {
    max-width: 100vw;
    max-height: 100vh;
  }
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  .inspect-container {
    margin: 0 auto 12px;
    padding-top: 10px;
  }

  .inspect-container,
  .inspect-container * {
    animation: none !important;
  }

  .product-detail {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "title info"
      "media info";
    row-gap: 0;
    width: calc(100% - 24px);
    padding: 0;
    max-width: 100%;
    align-items: start;
  }

  .product-title {
    font-size: 1.2rem;
    margin: 0;
    text-align: center;
  }

  .product-media {
    margin-top: 0;
    padding-top: 0;
  }

  .product-image-frame {
    margin-top: 0;
    padding-top: 0;
  }

  .product-image-frame img {
    max-height: 80vh;
  }

  .product-info .customer-view {
    margin-top: 0;
  }
}

html.is-landscape-mobile .inspect-container {
  margin: 0 auto 12px;
  padding-top: 28px;
}

html.is-landscape-mobile .product-detail {
  grid-template-rows: auto 1fr;
}

html.is-landscape-mobile .product-info {
  padding-top: 18px;
  align-self: start;
}

html.is-landscape-mobile .product-title {
  line-height: 1.1;
  padding-bottom: 4px;
  padding-top: 18px;
}

html.is-landscape-mobile .inspect-container,
html.is-landscape-mobile .inspect-container * {
  animation: none !important;
  transition: none !important;
}

html.is-landscape-mobile .product-detail {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "title info"
    "media info";
  row-gap: 0;
  width: calc(100% - 24px);
  padding: 0;
  max-width: 100%;
  align-items: start;
}

html.is-landscape-mobile .product-title {
  font-size: 1.2rem;
  margin: 0;
  text-align: center;
}

html.is-landscape-mobile .product-media {
  margin-top: 0;
  padding-top: 18px;
}

html.is-landscape-mobile .product-image-frame {
  margin-top: 0;
  padding-top: 0;
}

html.is-landscape-mobile .product-image-frame img {
  max-height: 80vh;
}

html.is-landscape-mobile .product-info .customer-view {
  margin-top: 0;
}
