/* Product photos stay fully visible and share one magnifier affordance. */
.product-image-zoom-frame {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 0;
}
.product-image-zoomable { cursor: zoom-in; }
.product-image-zoomable:focus-visible { outline: 3px solid rgba(36, 107, 253, .42); outline-offset: 2px; }
.product-image-zoom-button {
  position: absolute;
  z-index: 4;
  right: 4px;
  bottom: 4px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 5px;
  place-items: center;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  color: #246bfd;
  box-shadow: 0 2px 8px rgba(25, 43, 72, .18);
  cursor: zoom-in;
  line-height: 1;
}
.product-image-zoom-button:hover,
.product-image-zoom-button:focus-visible { background: #edf4ff; border-color: #8eafff; outline: 0; }
.product-image-zoom-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.product-image-upload-frame { overflow: visible; }
.product-image-upload-frame > .item-photo { flex: none; }
.item-photo { width: 88px !important; height: 72px !important; background: #fff !important; }
.item-photo img { width: 100%; height: 100%; padding: 4px; object-fit: contain !important; background: #fff; }
.item-photo:hover:after { pointer-events: none; }
.sales-detail-image { width: 76px !important; height: 64px !important; padding: 3px; object-fit: contain !important; cursor: zoom-in; }
.production-list-image { width: 72px !important; height: 62px !important; padding: 3px; object-fit: contain !important; cursor: zoom-in; background: #fff !important; border: 1px solid #e3e9f2; }
.production-entry-table-v4 .line-photo { width: min(84px, 100%) !important; height: 76px !important; padding: 3px; object-fit: contain !important; background: #fff !important; border: 1px solid #e3e9f2; }
.history-product-photo { width: 88px !important; height: 72px !important; }
.history-product-thumb { position: relative; }
.history-product-photo img,
.history-product-thumb img { object-fit: contain !important; background: #fff; cursor: zoom-in; }

/* V4.200: direct thumbnail activation, without magnifier overlays. */
.product-image-zoom-button,.draft-photo-wrap .draft-preview-image{display:none!important}

/* Keep sales-entry product photos compact and square; contain wide images without cropping. */
.full-order-surface.bluecloud-entry .draft-sheet-head,
.full-order-surface.bluecloud-entry .draft-sheet-row {
  grid-template-columns: 42px 88px 118px minmax(180px, 1.25fr) 124px 124px 84px 80px 92px 106px minmax(190px, 1fr) 72px !important;
}
.full-order-surface.bluecloud-entry .draft-sheet-row { min-height: 88px !important; }
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo-wrap {
  width: 72px !important;
  height: 72px !important;
  flex-basis: 72px !important;
  margin: 0 auto !important;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo {
  width: 72px !important;
  height: 72px !important;
  flex: 0 0 72px !important;
  border-radius: 7px;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  padding: 4px;
}
.full-order-surface.bluecloud-entry .draft-sheet-row .draft-preview-image {
  width: 24px;
  height: 24px;
  font-size: 18px;
}
.sales-image-lightbox section { width: min(1120px, calc(100vw - 32px)); }
.sales-image-lightbox img { max-width: min(100%, 1040px); max-height: calc(94vh - 116px); object-fit: contain !important; }
.image-preview-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.image-preview-tools button { border: 1px solid #dbe3ee; border-radius: 6px; padding: 6px 10px; background: #fff; color: #334155; cursor: pointer; }
.image-preview-tools output { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.image-preview-dimensions { color: #64748b; font-size: 12px; margin-left: auto; }
.image-preview-scroll { height: min(70vh, 720px); width: 100%; overflow: auto; background: #f3f5f8; border-radius: 8px; padding: 10px; box-sizing: border-box; }
.sales-image-lightbox .image-preview-scroll img { max-width: none !important; max-height: none !important; height: auto !important; margin: 0 auto; display: block; }

@media (max-width: 760px) {
  .full-order-surface.bluecloud-entry .draft-sheet-row { min-height: 0 !important; }
  .full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo-wrap,
  .full-order-surface.bluecloud-entry .draft-sheet-row .draft-photo {
    width: 52px !important;
    height: 52px !important;
    flex-basis: 52px !important;
  }
  .full-order-surface.bluecloud-entry .draft-sheet-row .draft-preview-image { width: 22px; height: 22px; }
  .item-photo { width: 76px !important; height: 64px !important; }
  .product-image-zoom-button { width: 26px; height: 26px; }
}
