/* Product photo thumbnails + lightbox (All Drawings, Production Review) */
#drawings-table .col-photo,
table.drawings-table .col-photo {
  width: 72px;
  min-width: 72px;
  max-width: 72px;
  text-align: center;
  padding: 4px 3px;
  vertical-align: middle;
}
.product-photo-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #D9CFB8;
  background: #fff;
  vertical-align: middle;
  cursor: zoom-in;
}
.product-photo-detail {
  cursor: zoom-in;
}
.product-photo-ph {
  font-size: 0.65rem;
  color: #8A7E72;
  line-height: 1.15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 6px;
  border: 1px dashed #C97B5C;
  background: #F2EBDD;
  text-align: center;
}
.qc-signoff-table .col-photo,
.qc-shop-compact .col-photo {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  padding: 3px 2px;
}
.qc-signoff-table .product-photo-thumb,
.qc-shop-compact .product-photo-thumb {
  width: 44px;
  height: 44px;
  border-radius: 5px;
}
.qc-signoff-table .product-photo-ph,
.qc-shop-compact .product-photo-ph {
  width: 44px;
  height: 44px;
  font-size: 0.58rem;
}
.product-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-photo-lightbox.hidden { display: none !important; }
.product-photo-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.82);
}
.product-photo-lightbox__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.product-photo-lightbox__img {
  max-width: min(96vw, 1200px);
  max-height: calc(92vh - 48px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: #fff;
}
.product-photo-lightbox__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: #3d342c;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.product-photo-lightbox__hint {
  margin: 0;
  color: #f5efe6;
  font-size: 0.85rem;
  opacity: 0.9;
}
body.product-photo-lightbox-open { overflow: hidden; }

/* Paste / file upload modal */
.product-photo-upload {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.product-photo-upload.hidden { display: none !important; }
.product-photo-upload__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.78);
}
.product-photo-upload__panel {
  position: relative;
  z-index: 1;
  width: min(96vw, 440px);
  max-height: 92vh;
  overflow-y: auto;
  background: #F5EFE6;
  border: 1px solid #D9CFB8;
  border-radius: 12px;
  padding: 18px 16px 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.product-photo-upload__title {
  margin: 0 0 4px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #2E2A24;
}
.product-photo-upload__code {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #A85E40;
}
.product-photo-upload__zone {
  border: 2px dashed #C97B5C;
  border-radius: 10px;
  background: #fff;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  outline: none;
}
.product-photo-upload__zone:focus,
.product-photo-upload__zone.drag-over {
  border-color: #A85E40;
  background: #FDF9F3;
}
.product-photo-upload__hint {
  margin: 0 0 4px;
  font-size: 0.88rem;
  color: #2E2A24;
}
.product-photo-upload__hint-sub {
  margin: 0;
  font-size: 0.78rem;
  color: #8A7E72;
}
.product-photo-upload__preview {
  margin-top: 12px;
}
.product-photo-upload__preview img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #D9CFB8;
}
.product-photo-upload__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}
.product-photo-upload__file-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #EAE0CC;
  color: #2E2A24;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}
.product-photo-upload__file-btn:hover { background: #ddd2bc; }
.product-photo-upload__status {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: #5A5048;
}
.product-photo-upload__status.is-error { color: #b91c1c; }
.product-photo-upload__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #EAE0CC;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: #2E2A24;
}
.product-photo-upload-cell {
  cursor: pointer;
  vertical-align: middle;
}
.product-photo-upload-cell:hover {
  background: rgba(201, 123, 92, 0.12);
}
.product-photo-upload-cell .product-photo-ph {
  cursor: pointer;
}
body.product-photo-upload-open { overflow: hidden; }
