/* Product gallery keeps uploaded clothing images in their original proportions. */
.product-thumb[data-product-cover] { position:relative; overflow:hidden; flex-shrink:0; }
.product-thumb[data-product-cover] img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; padding:2px; background:#f4f7f5; opacity:0; }
.product-thumb.has-product-image img { opacity:1; }
.product-thumb.has-product-image > svg { visibility:hidden; }
.product-image-card { margin:24px 0; }
.product-image-card .section-head { align-items:flex-start; gap:20px; }
.product-image-card .section-head p.muted { font-size:12px; line-height:1.8; margin-top:5px; }
.product-image-content { padding:0 24px 24px; }
.product-image-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; margin-bottom:16px; }
.product-image-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:14px; }
.product-image-tile { min-width:0; border:1px solid var(--line); border-radius:10px; background:#fff; overflow:hidden; }
.product-image-open { width:100%; height:185px; display:grid; place-items:center; border:0; padding:10px; background:#f5f7f6; position:relative; color:var(--muted); }
.product-image-open img { width:100%; height:100%; object-fit:contain; min-width:0; min-height:0; opacity:0; position:absolute; inset:0; padding:10px; }
.product-image-loaded img { opacity:1; }
.product-image-loaded .product-image-fallback { visibility:hidden; }
.product-image-fallback { font-size:12px; }
.product-image-tile-body { padding:12px; display:grid; gap:7px; }
.product-image-title { display:flex; gap:6px; align-items:flex-start; min-width:0; }
.product-image-tile-body strong { font-size:12px; font-weight:600; overflow-wrap:anywhere; }
.product-image-title strong { flex:1; min-width:0; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; }
.product-image-title .badge { flex-shrink:0; font-size:10px; padding:2px 6px; }
.product-image-tile-body small { font-size:11px; line-height:1.7; }
.product-image-actions { display:flex; gap:11px; flex-wrap:wrap; padding-top:4px; }
.product-image-actions .text-link { font-size:12px; min-height:28px; }
.product-image-remove { color:#956351; }
.product-image-history { background:#fafbf9; }
.product-image-history-section { padding:22px 0 0; margin-top:22px; border-top:1px solid var(--line); }
.product-image-history-section h3 { font-size:14px; }
.product-image-history-section > p { font-size:12px; margin:7px 0 14px; }
.product-image-empty { padding:30px 18px; border:1px dashed #d6e1da; border-radius:10px; background:#fafcfb; text-align:center; color:#6a8279; }
.product-image-empty strong { display:block; font-size:14px; color:#365950; }
.product-image-empty p { margin-top:7px; font-size:12px; }
.product-image-upload { margin-top:22px; background:#f6faf7; border:1px solid #dce7df; border-radius:10px; padding:20px; }
.product-image-upload h3 { font-size:15px; }
.product-image-upload p.muted { margin-top:6px; font-size:12px; line-height:1.8; }
.product-image-file-label { display:flex; flex-direction:column; gap:8px; margin-top:16px; font-size:13px; font-weight:550; }
.product-image-file-label input { width:100%; min-height:44px; font-size:13px; font-weight:400; background:white; }
.product-image-file-label input::file-selector-button { background:#edf4ef; border:1px solid #d5e2d9; border-radius:6px; padding:7px 10px; margin-right:12px; color:#366655; cursor:pointer; }
.product-image-pending { margin-top:15px; }
.product-image-pending > p:first-child { font-size:13px; margin-bottom:12px; }
.product-image-pending .row-actions { margin-top:14px; flex-wrap:wrap; }
.product-image-progress:empty { display:none; }
.product-lightbox-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:14px; }
.product-lightbox-heading strong { overflow-wrap:anywhere; font-size:14px; }
.product-lightbox-heading span { flex-shrink:0; font-variant-numeric:tabular-nums; font-size:12px; }
.product-lightbox-image { display:grid; place-items:center; background:#f5f7f6; border:1px solid var(--line); border-radius:9px; min-height:160px; overflow:hidden; }
.product-lightbox-image img { display:block; max-width:100%; max-height:62dvh; object-fit:contain; }
.product-lightbox-controls { display:flex; justify-content:center; gap:14px; margin-top:17px; }
.product-lightbox [data-product-lightbox-status] { margin-bottom:12px; font-size:13px; }
.product-cover-toolbar { display:flex; align-items:center; gap:15px; }
.product-cover-toolbar .text-link { font-size:12px; white-space:nowrap; }
@media (max-width:760px) {
  .product-image-card { margin:20px 0; }
  .product-image-card .section-head { padding:18px; gap:12px; flex-wrap:wrap; }
  .product-image-content { padding:0 18px 18px; }
  .product-image-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .product-image-open { height:155px; }
  .product-image-tile-body { padding:10px; }
  .product-image-title { flex-wrap:wrap; }
  .product-image-title strong { flex-basis:100%; }
  .product-image-actions { gap:10px; }
  .product-image-actions .text-link { font-size:12px; min-height:32px; }
  .product-image-upload { padding:16px; }
  .product-image-file-label input { font-size:14px; }
  .product-image-pending .row-actions > .btn { width:100%; }
  .product-lightbox-heading { flex-direction:column; gap:6px; }
  .product-lightbox-image img { max-height:58dvh; }
  .product-cover-toolbar { width:100%; justify-content:space-between; }
}
@media (max-width:390px) { .product-image-open { height:130px; } }
