.item[data-product-detail] { cursor: pointer; }
.product-detail-trigger { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; }
.product-detail-trigger:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.product-detail {
  width: min(1000px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  padding: 0 28px 28px;
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #111722;
  overscroll-behavior: contain;
}
.product-detail::backdrop { background: #10241bbf; }
.product-detail-header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: flex-end; padding: 12px 0; background: inherit; }
.product-detail-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: inherit; }
.product-detail-close:hover { background: #edf5f0; color: #164e3e; }
.product-detail-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 32px; align-items: center; }
.product-detail-visual { display: grid; place-items: center; min-width: 0; aspect-ratio: 1; background: #f2f4f3; border-radius: 12px; overflow: hidden; }
.product-detail-visual .photo, .product-detail-visual .no-photo { width: 100%; height: 100%; max-height: 640px; aspect-ratio: 1; border-radius: 0; }
.product-detail-visual img { display: block; object-fit: contain; background-image: none; }
.product-detail-visual .no-photo, .product-detail-unavailable { display: grid; place-items: center; color: #626b78; font-size: 15px; line-height: 1.7; text-align: center; padding: 24px; }
.product-gallery { min-width: 0; }
.product-thumbnails { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.product-thumbnails button {
  display: grid; place-items: center; width: 54px; height: 54px; padding: 2px;
  border: 2px solid var(--line); border-radius: 7px; background: var(--shop-field); color: inherit;
}
.product-thumbnails button[aria-pressed="true"] { border-color: var(--green); }
.product-thumbnails img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }
.product-image-position, .item-metadata { margin: 6px 0 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.product-detail-info { min-width: 0; }
.product-detail-info h2 { font-size: 28px; line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
.product-detail-info .item-price { font-size: 23px; margin-top: 20px; }
.product-detail-info .missing-price { font-size: 15px; }
body[data-theme="warm"] .product-detail { background: #fffcf6; color: #302820; }
body[data-theme="contrast"] .product-detail { background: #24362c; color: #f1f5f2; }
body[data-theme="contrast"] .product-detail-info .missing-price { color: #b8c8be; }
@media (max-width: 600px) {
  .product-detail { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 0 16px 24px; }
  .product-detail-header { padding: 8px 0; }
  .product-detail-body { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .product-detail-info h2 { font-size: 23px; }
  .product-detail-info .item-price { font-size: 21px; margin-top: 12px; }
}

.product-detail-cart { margin-top: 24px; }
.product-detail-cart-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; color: var(--green); font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
