.product-image-import { margin-bottom: 18px; padding: 22px 24px; background: #fffdf9; border-color: #e5cbb5; }
.product-image-import[hidden] { display: none !important; }
.product-image-import-row { display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.product-image-import-copy { min-width: 0; }
.product-image-import h2 { margin: 0 0 7px; color: #3b3027; font-size: 20px; font-weight: 600; line-height: 1.5; }
.product-image-import-copy p { margin: 0; color: #8e7a68; font-size: 13px; line-height: 1.8; }
.product-image-import-options { display: flex; flex: 0 0 auto; gap: 12px; }
.product-image-source { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 13px 19px; border: 1px solid #bb7141; border-radius: 10px; background: #fff; color: #a45328; font: inherit; text-align: left; cursor: pointer; }
.product-image-source svg { width: 24px; height: 24px; flex: 0 0 auto; }
.product-image-source strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.5; }
.product-image-source small { display: block; margin-top: 3px; color: inherit; font-size: 11px; font-weight: 400; line-height: 1.6; }
.product-image-source--gallery { color: #fff; background: #b54f1f; border-color: #b54f1f; }
.product-image-source:hover:not(:disabled) { filter: brightness(.96); }
.product-image-source:disabled { opacity: .5; cursor: default; }
.product-image-source:focus-visible { outline: 3px solid #b77545; outline-offset: 3px; }
.product-image-import-bottom { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-top: 14px; font-size: 12px; line-height: 1.8; color: #98806b; }
.product-image-import-bottom p { margin: 0; overflow-wrap: anywhere; }
.product-image-import-bottom span { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.product-image-import-bottom p[data-level="error"] { color: #a24027; }
.product-image-import .paint-source-picker { margin: 20px 0 0; padding: 15px 0 0; border: 0; border-top: 1px solid #eee0d3; border-radius: 0; background: transparent; }
.product-image-retry { padding: 10px 15px; margin: 10px 0; border: 1px solid #d6b596; border-radius: 8px; background: #fff; color: #945d32; font: inherit; font-size: 13px; cursor: pointer; }
.product-image-dialog { width: min(840px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #dfd0c1; border-radius: 17px; background: #fffdf9; color: #382e26; overflow: hidden; }
.product-image-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.product-image-dialog::backdrop { background: #28201688; }
.product-image-dialog header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 23px 26px 18px; border-bottom: 1px solid #eee1d4; }
.product-image-dialog h2 { margin: 0; font-size: 22px; font-weight: 600; line-height: 1.5; }
.product-image-dialog header p { margin: 7px 0 0; color: #897561; font-size: 13px; line-height: 1.8; }
.product-image-dialog button { font: inherit; cursor: pointer; }
.product-image-dialog .product-image-dialog-close { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: 1px solid #e1d3c5; border-radius: 9px; background: #fff; color: #977962; font-size: 25px; }
.product-image-dialog-body { min-height: 0; padding: 18px 26px 24px; overflow: auto; overscroll-behavior: contain; }
.product-image-dialog-body > p { margin: 0 0 16px; color: #85715c; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.product-image-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.product-image-gallery label { position: relative; min-width: 0; overflow: hidden; border: 1px solid #e2d4c5; border-radius: 11px; background: #fff; cursor: pointer; }
.product-image-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #f4efe8; }
.product-image-gallery input { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; accent-color: #b45b2c; }
.product-image-gallery span { display: block; padding: 9px 10px; color: #8b735c; font-size: 12px; line-height: 1.6; }
.product-image-gallery label:has(input:checked:not(:disabled)) { border-color: #af6b38; box-shadow: 0 0 0 1px #af6b38; }
.product-image-gallery label:has(input:disabled) { opacity: .6; cursor: default; }
.product-image-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 26px; border-top: 1px solid #eadacc; background: #fffaf4; }
.product-image-dialog footer > span { color: #88715a; font-size: 13px; }
.product-image-dialog footer > div { display: flex; gap: 10px; min-width: max-content; }
.product-image-dialog footer button { flex-shrink: 0; min-height: 44px; padding: 10px 17px; border: 1px solid #d9b593; border-radius: 8px; background: #fff; color: #955d32; font-size: 14px; white-space: nowrap; }
.product-image-dialog footer .product-image-confirm { background: #b54f1f; border-color: #b54f1f; color: #fff; font-weight: 600; }
.product-image-dialog button:disabled { opacity: .5; cursor: default; }
.product-image-dialog button:focus-visible, .product-image-gallery input:focus-visible { outline: 3px solid #ca955e; outline-offset: 3px; }
@media (max-width: 1000px) {
  .product-image-import-row { flex-direction: column; align-items: stretch; gap: 18px; }
  .product-image-import-options button { flex: 1; }
}
@media (max-width: 600px) {
  .product-image-import { padding: 18px 16px; }
  .product-image-import h2 { font-size: 19px; }
  .product-image-import-options { flex-direction: column; gap: 10px; }
  .product-image-source { padding: 13px 16px; }
  .product-image-import-bottom { flex-direction: column; align-items: flex-start; gap: 5px; }
  .product-image-dialog header { padding: 18px 16px 14px; }
  .product-image-dialog h2 { font-size: 20px; }
  .product-image-dialog-body { padding: 14px 16px 20px; }
  .product-image-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-image-dialog footer { flex-wrap: wrap; padding: 13px 16px; gap: 10px; }
  .product-image-dialog footer > div { flex: 1; justify-content: flex-end; }
  .product-image-dialog footer button { padding: 10px 12px; }
}
