.tg-product-image-viewer {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 20px;
  background: #f4f4ef;
}
.tg-product-active-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.tg-product-image-placeholder { padding: 24px; text-align: center; }
.tg-variant-image { display: block; max-width: 160px; max-height: 160px; object-fit: contain; }
.tg-product-upload input { max-width: 100%; }
.tg-product-variant { min-width: 0; flex-wrap: wrap; }
.tg-product-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.tg-product-editor, .tg-live-preview { min-width: 0; }
.tg-product-upload { display: grid; gap: 12px; margin: 16px 0; }
.tg-product-upload label { display: grid; gap: 8px; }
.tg-product-variant { padding: 16px 0; border-bottom: 1px solid #dedbd3; }
.tg-product-actions, .tg-product-tabs, .tg-preview-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-preview-thumbnails { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tg-preview-thumb { padding: 4px; border: 1px solid #dedbd3; border-radius: 10px; background: #fff; cursor: pointer; }
.tg-preview-thumb[aria-pressed="true"] { border-color: #151515; box-shadow: 0 0 0 1px #151515; }
.tg-workspace-thumbnail img, .tg-preview-thumb img { width: 80px; height: 80px; object-fit: contain; }
.tg-product-image img, .tg-preview-main-image { max-width: 100%; max-height: 320px; object-fit: contain; }
.tg-product-upload button { min-height: 44px; }
@media (max-width: 700px) {
  .tg-product-workspace { grid-template-columns: minmax(0, 1fr); }
}

/* Public shop/product multi-image gallery; thumbnails fit inside the original
   square media box so the shop hero does not gain extra height. */
.tg-product-image-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: grid;
  place-items: center;
}
.tg-product-image-thumbnails {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 4px 10px 12px;
  overflow-x: auto;
}
.tg-product-image-thumb {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  padding: 4px;
  border: 1px solid #cac7bd;
  background: #fff;
  border-radius: 10px;
  cursor: pointer;
}
.tg-product-image-thumb[aria-pressed="true"] {
  border-color: #25272b;
  box-shadow: 0 0 0 1px #25272b;
}
.tg-product-image-thumb:focus-visible {
  outline: 3px solid #c74337;
  outline-offset: 2px;
}
.tg-product-image-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
@media (max-width: 700px) {
  .tg-product-image-thumbnails { gap: 6px; padding-bottom: 8px; }
  .tg-product-image-thumb { flex-basis: 48px; width: 48px; height: 48px; }
}
