.product-identity { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.product-identity-text { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.product-thumbnail { width: 64px; height: 64px; flex: 0 0 64px; }
.product-thumbnail-button,.product-thumbnail-placeholder { width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.product-thumbnail-button { padding: 4px; cursor: zoom-in; overflow: hidden; display: block; }
.product-thumbnail-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.product-thumbnail-button:disabled { cursor: default; padding: 0; opacity: 1; }
.product-thumbnail-button img { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-thumbnail-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; background: var(--soft); color: var(--muted); font-size: 10px; line-height: 1.3; text-align: center; }
.product-thumbnail-placeholder .icon { width: 20px; height: 20px; }
.product-thumbnail-button .product-thumbnail-placeholder { border: 0; }
.product-thumbnail [hidden] { display: none !important; }
.product-thumbnail-large { width: 80px; height: 80px; flex-basis: 80px; }
.page-head-with-image { display: flex; align-items: flex-start; gap: 16px; }
.page-head-with-image > .page-head { flex: 1; min-width: 0; }
.product-image-caption { font-size: 11px; color: var(--muted); margin-top: 8px; }
.product-price-seller .product-identity { text-align: left; }
.product-price-seller .product-thumbnail,.review-list .product-thumbnail { width: 48px; height: 48px; flex-basis: 48px; }
.product-price-seller .product-thumbnail-placeholder,.review-list .product-thumbnail-placeholder { font-size: 9px; }
.product-image-review { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; padding: 18px 0; border-block: 1px solid var(--line); margin-bottom: 24px; }
.product-image-review h2 { font-size: 14px; margin-bottom: 12px; }
.product-image-review p { font-size: 13px; margin: 0; }
.product-image-dialog { width: fit-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.product-image-dialog::backdrop { background: rgb(15 23 42 / 55%); }
.product-image-dialog [hidden],.product-image-preview [hidden],.product-image-preview[hidden] { display: none !important; }
.product-image-preview { position: fixed; inset: auto; margin: 0; width: min(260px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); box-shadow: 0 8px 28px rgb(15 23 42 / 16%); text-align: left; white-space: normal; overflow-wrap: anywhere; z-index: 1000; }
.product-image-preview[data-fallback-open] { display: block; }
.product-image-preview > img { display: block; width: 100%; height: min(210px,38dvh); object-fit: contain; background: #fff; margin-bottom: 10px; }
.product-image-preview > strong { display: block; font-size: 12px; line-height: 1.5; font-weight: 650; }
.product-image-preview > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.product-image-preview > .product-image-preview-unavailable { padding: 28px 12px; margin-bottom: 10px; background: var(--soft); border-radius: 6px; text-align: center; }
.product-image-viewer { padding: 20px; max-width: 720px; }
.product-image-viewer-heading { display: flex; align-items: flex-start; gap: 24px; justify-content: space-between; margin-bottom: 18px; }
.product-image-viewer-heading strong { max-width: 540px; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.product-image-viewer-heading button { flex-shrink: 0; }
.product-image-viewer > img { display: block; max-width: 100%; max-height: 60dvh; width: auto; height: auto; margin: auto; object-fit: contain; }
.product-image-viewer > p { font-size: 12px; line-height: 1.7; margin-top: 16px; color: var(--muted); }
@media(max-width:760px) {
  .product-identity { gap: 10px; }
  .page-head-with-image { gap: 12px; }
  .product-thumbnail-large { width: 64px; height: 64px; flex-basis: 64px; }
  .product-image-review { grid-template-columns: 1fr; gap: 20px; }
  .product-image-viewer { padding: 16px; }
}

.product-thumbnail.product-thumbnail-compact { width: 32px; height: 32px; flex-basis: 32px; }
.product-thumbnail-compact .product-thumbnail-button { padding: 2px; }
.product-thumbnail-compact .product-thumbnail-placeholder { gap: 0; }
.product-thumbnail-compact .product-thumbnail-placeholder .icon { width: 16px; height: 16px; }
.product-thumbnail-compact .product-thumbnail-placeholder > span { display: none; }
@media (pointer: coarse) {
  .product-thumbnail.product-thumbnail-compact { width: 44px; height: 44px; flex-basis: 44px; }
}
