.product-image-editor { min-width: 0; }
.product-image-editor [hidden] { display: none !important; }
.product-image-upload-main { display: grid; grid-template-columns: 170px minmax(0,1fr); gap: 16px; margin-bottom: 18px; }
.product-image-main-preview { display: grid; place-items: center; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #101113; }
.product-image-main-preview img { width: 100%; height: 100%; object-fit: contain; }
.product-image-main-preview > span { padding: 15px; font-size: 12px; text-align: center; color: var(--muted); }
.product-image-drop { padding: 18px; border: 1px dashed #66505a; border-radius: 12px; background: #ffffff02; transition: background .15s, border-color .15s; }
.product-image-drop.is-dragover { border-color: #ed858f; background: #b83e451a; }
.product-image-drop strong { font-size: 14px; }
.product-image-drop p { margin: 6px 0 12px; font-size: 12px; color: var(--muted); }
.admin-product-form .image-file-label { display: inline-flex; width: fit-content; position: relative; margin: 0; padding: 8px 13px; cursor: pointer; font-size: 12px; }
.image-file-label input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; overflow: hidden; }
.image-file-label:focus-within { outline: 2px solid #e57c81; outline-offset: 3px; }
.image-text-button { display: block; background: none; border: none; color: #d28e9c; font-size: 11px; cursor: pointer; margin-top: 9px; padding: 0; }
.product-image-drop-gallery { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-image-drop-gallery p { margin-bottom: 0; }
.product-image-upload-hint { display: block; color: var(--muted); font-size: 11px; margin: 12px 0; }
.product-image-feedback { font-size: 12px; color: #b8cfbb; min-height: 18px; margin: 10px 0; overflow-wrap: anywhere; }
.product-image-feedback.is-error { color: #ef9ba7; }
.product-image-admin-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(115px,1fr)); gap: 12px; }
.product-image-admin-thumb { position: relative; min-width: 0; aspect-ratio: 4/3; background: #101113; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.product-image-admin-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-image-admin-thumb > span { position: absolute; left: 6px; bottom: 6px; font-size: 10px; padding: 1px 6px; border-radius: 4px; color: #eee; background: #101113d9; }
.product-image-admin-thumb > button { position: absolute; right: 6px; top: 6px; width: 28px; height: 28px; display: grid; place-items: center; font-size: 20px; color: #f4ced5; border: 1px solid #8d4a58; border-radius: 7px; background: #23171de6; cursor: pointer; }
.product-image-links { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.product-image-links summary { width: fit-content; font-size: 12px; color: #c3acb6; cursor: pointer; }
.product-main-media[data-product-gallery] { position: relative; }
.product-main-media[data-product-gallery] > .product-picture { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.product-main-media[data-product-gallery] > .product-picture > img { display: block; width: 100%; height: 100%; object-position: 50% 50%; }
.product-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: grid; place-items: center; width: 40px; height: 44px; border-radius: 10px; border: 1px solid #c995a544; color: #fff; background: #111014c9; backdrop-filter: blur(5px); cursor: pointer; }
.product-gallery-arrow:hover { background: #a93240e6; }
.product-gallery-arrow svg { width: 20px; height: 20px; }
.product-gallery-arrow.is-previous { left: 12px; }
.product-gallery-arrow.is-next { right: 12px; }
.product-main-media .product-gallery-count { position: absolute; bottom: 12px; right: 12px; border: 1px solid #ffffff1c; border-radius: 7px; padding: 3px 9px; font-size: 11px; line-height: 1.5; letter-spacing: 0; color: #f5e8ee; background: #111014c9; }
.product-thumb-strip { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; overscroll-behavior-x: contain; }
.product-thumb { flex: 0 0 82px; }
.product-gallery-arrow:focus-visible, .product-thumb:focus-visible { outline: 2px solid #ed858f; outline-offset: 3px; }
.product-main-media .product-gallery-zoom { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; cursor: zoom-in; }
.product-gallery-zoom > span { position: absolute; bottom: 12px; left: 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ffffff26; border-radius: 7px; padding: 6px 9px; background: #111014c9; color: #efe8ec; font-size: 11px; }
.product-gallery-zoom svg { width: 15px; height: 15px; }
.product-gallery-zoom:focus-visible { outline: 2px solid #ed858f; outline-offset: -4px; }
html.product-image-viewer-open { overflow: hidden; }
dialog.product-image-viewer { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #08080bed; color: #f5eff2; overflow: hidden; }
dialog.product-image-viewer[open] { display: grid; place-items: center; }
.product-image-viewer::backdrop { background: #08080bc9; backdrop-filter: blur(5px); }
.product-image-viewer .product-viewer-image { display: block; width: calc(100% - 144px); max-width: 1280px; height: calc(100% - 112px); min-width: 0; min-height: 0; object-fit: contain; object-position: center; animation: product-viewer-enter .18s ease-out; }
.product-image-viewer button { position: absolute; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff30; border-radius: 50%; background: #17151bda; color: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.product-image-viewer button:hover { background: #9c303fe6; border-color: #e57c81; }
.product-image-viewer button:focus-visible { outline: 2px solid #ed858f; outline-offset: 3px; }
.product-image-viewer button svg { width: 22px; height: 22px; }
.product-viewer-close { top: max(16px,env(safe-area-inset-top)); right: max(18px,env(safe-area-inset-right)); }
.product-viewer-arrow { top: 50%; transform: translateY(-50%); }
.product-viewer-arrow.is-previous { left: 18px; }
.product-viewer-arrow.is-next { right: 18px; }
.product-viewer-count { position: absolute; bottom: max(18px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); font-size: 12px; color: #cec0c8; letter-spacing: .04em; }
@keyframes product-viewer-enter { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
@media(max-width:600px) {
  .product-image-upload-main { grid-template-columns: 1fr; }
  .product-image-main-preview { max-height: 190px; aspect-ratio: auto; min-height: 130px; }
  .product-image-main-preview img { max-height: 190px; }
  .product-image-drop-gallery { align-items: flex-start; flex-direction: column; }
  .product-gallery-arrow { width: 34px; height: 40px; }
  .product-gallery-arrow.is-previous { left: 8px; }
  .product-gallery-arrow.is-next { right: 8px; }
  .product-image-viewer .product-viewer-image { width: calc(100% - 24px); height: calc(100% - 156px); }
  .product-viewer-arrow.is-previous { left: 12px; }
  .product-viewer-arrow.is-next { right: 12px; }
  .product-viewer-arrow { top: auto; bottom: max(16px,env(safe-area-inset-bottom)); transform: none; }
}
@media(prefers-reduced-motion:reduce) { .product-image-drop, .product-image-viewer button { transition: none; } .product-image-viewer .product-viewer-image { animation: none; } }
