.product-detail-trigger {
  cursor: zoom-in;
}

.product-detail-trigger:focus-visible {
  outline: 3px solid #ff7f18;
  outline-offset: 3px;
}

.product-detail-dialog {
  width: min(1040px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #171717;
  background: #f8f7f2;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.product-detail-dialog::backdrop {
  background: rgba(12, 12, 12, 0.78);
  backdrop-filter: blur(4px);
}

.product-detail-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  min-height: 520px;
}

.product-detail-media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  place-items: center;
  min-height: 520px;
  padding: 24px;
  background: #eceae3;
}

.product-detail-thumbnails {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 14px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline mandatory;
  scrollbar-width: thin;
}

.product-detail-thumbnails[hidden] {
  display: none;
}

.product-detail-thumbnails button {
  flex: 0 0 auto;
  width: 72px;
  height: 58px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  scroll-snap-align: center;
}

.product-detail-thumbnails button.is-active {
  border-color: #ff7f18;
}

.product-detail-thumbnails img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
}

.product-detail-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 72dvh;
  object-fit: contain;
}

.product-detail-previous,
.product-detail-next {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(23, 23, 23, 0.78);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.product-detail-previous { left: 10px; }
.product-detail-next { right: 10px; }
.product-detail-previous:hover,
.product-detail-next:hover { background: #d8670d; }

.product-detail-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(23, 23, 23, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 48px 48px;
}

.product-detail-category {
  margin: 0 0 12px;
  color: #d8670d;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-detail-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

.product-detail-price {
  margin: 20px 0 0;
  color: #d8670d;
  font-size: 1.25rem;
  font-weight: 800;
}

.product-detail-description {
  margin: 24px 0 32px;
  color: #52514d;
  font-size: 1rem;
  line-height: 1.65;
}

.product-detail-action {
  align-self: flex-start;
  padding: 13px 20px;
  border-radius: 5px;
  color: #fff;
  background: #171717;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.product-detail-shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-detail-shop-actions[hidden] {
  display: none;
}

.product-detail-add {
  color: #171717;
  background: transparent;
  border: 1px solid #171717;
  box-shadow: none;
}

.product-detail-action:hover {
  background: #d8670d;
}

.product-detail-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(23, 23, 23, 0.88);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 760px) {
  .product-detail-shell {
    grid-template-columns: 1fr;
  }

  .product-detail-media {
    min-height: 300px;
    max-height: 48dvh;
    padding: 16px;
  }

  .product-detail-copy {
    padding: 32px 24px;
  }
}
