/* Product photography: native thumbnail rail, pointer magnifier, accessible viewer. */
.mg-ui-v2 .mg-store-pdp-gallery--enhanced { gap: 10px; min-width: 0; }
.mg-ui-v2 .mg-store-pdp-gallery__viewer { position: relative; min-width: 0; }
.mg-ui-v2 .mg-store-pdp-gallery--enhanced .mg-store-pdp-gallery__stage { display: block; width: 100%; aspect-ratio: 1; touch-action: pan-y; }
.mg-ui-v2 .mg-store-pdp-gallery--enhanced .mg-store-pdp-gallery__main { width: 100%; height: 100%; }
.mg-ui-v2 .mg-store-pdp-gallery--enhanced .mg-store-pdp-gallery__main-img { object-fit: contain; animation: mg-gallery-image-in 160ms ease-out; }
.mg-ui-v2 .mg-store-pdp-gallery__stage--playing iframe { width: 100%; height: 100%; border: 0; }
.mg-ui-v2 .mg-store-pdp-gallery__step { position: absolute; top: calc(50% - 22px); z-index: 4; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--store-border); border-radius: 50%; background: rgb(255 255 255 / 94%); color: var(--store-text); cursor: pointer; box-shadow: 0 2px 8px #10162f0a; }
.mg-ui-v2 .mg-store-pdp-gallery__step--prev { left: 8px; }
.mg-ui-v2 .mg-store-pdp-gallery__step--next { right: 8px; }
.mg-ui-v2 .mg-store-pdp-gallery__position { position: absolute; left: 12px; bottom: 12px; z-index: 4; padding: 4px 10px; border-radius: 6px; background: #f4f4f4e8; color: var(--store-text-muted); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none; }
.mg-ui-v2 .mg-store-pdp-gallery__hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--store-text-muted); font-size: 12px; line-height: 18px; }
.mg-ui-v2 .mg-store-pdp-gallery__hint-touch { display: none; }
.mg-ui-v2 .mg-store-pdp-gallery__strip { position: relative; display: flex; gap: 8px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 2px 0 6px; }
.mg-ui-v2 .mg-store-pdp-gallery__strip .mg-store-pdp-gallery__thumb { position: relative; flex: 0 0 68px; width: 68px; height: 68px; scroll-snap-align: center; }
.mg-ui-v2 .mg-store-pdp-gallery__strip .mg-store-pdp-gallery__thumb img { height: 100%; width: 100%; object-fit: contain; }
.mg-ui-v2 .mg-store-pdp-gallery--enhanced button:focus-visible { outline: 2px solid var(--store-brand); outline-offset: -2px; }
.mg-ui-v2 .mg-store-pdp-gallery__strip .mg-store-pdp-gallery__thumb:hover { border-color: var(--store-brand); }
.mg-product-magnifier__lens { position: absolute; z-index: 3; display: block; pointer-events: none; border: 1px solid #d02915; background: #d0291514; }
.mg-product-magnifier { position: fixed; z-index: 10002; pointer-events: none; overflow: hidden; background: white; border: 1px solid #e1e3e6; border-radius: 8px; box-shadow: 0 8px 32px #11182726; }
.mg-product-magnifier__image { position: absolute; top: 0; left: 0; will-change: transform; }
.mg-product-magnifier__image img { object-fit: fill; }
.mg-product-magnifier[hidden], .mg-product-magnifier__lens[hidden] { display: none; }

.mg-gallery-lightbox__overlay { position: fixed; inset: 0; z-index: 10005; background: #101318c9; animation: mg-gallery-image-in 150ms ease; }
.mg-gallery-lightbox { position: fixed; z-index: 10006; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(1400px, calc(100vw - 32px)); height: calc(100dvh - 32px); margin: 0; overflow: hidden; border-radius: 14px; outline: none; background: #fff; color: #171b24; box-shadow: 0 16px 80px #080b1840; font-family: inherit; }
.mg-gallery-lightbox button { font: inherit; cursor: pointer; }
.mg-gallery-lightbox button:disabled { opacity: .35; cursor: default; }
.mg-gallery-lightbox button:focus-visible { outline: 2px solid #d02915; outline-offset: -3px; }
.mg-gallery-lightbox__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #eceef0; }
.mg-gallery-lightbox__head > div { min-width: 0; }
.mg-gallery-lightbox__head h2 { margin: 0 0 3px; font-size: 15px; font-weight: 600; line-height: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-gallery-lightbox__head p { margin: 0; font-size: 12px; color: #737780; font-variant-numeric: tabular-nums; }
.mg-gallery-lightbox__close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f3f4f5; color: #171b24; }
.mg-gallery-canvas { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.mg-gallery-canvas__viewport { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; cursor: zoom-in; }
.mg-gallery-canvas__viewport.is-zoomed { cursor: grab; }
.mg-gallery-canvas__viewport.is-dragging { cursor: grabbing; }
.mg-gallery-canvas__image { position: relative; flex-shrink: 0; transform-origin: center; will-change: transform; }
.mg-gallery-canvas__image img { object-fit: contain; pointer-events: none; }
.mg-gallery-canvas__nav { position: absolute; top: calc(50% - 24px); z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #e7e9ec; border-radius: 50%; background: #ffffffed; color: #212832; }
.mg-gallery-canvas__nav--prev { left: 16px; }
.mg-gallery-canvas__nav--next { right: 16px; }
.mg-gallery-canvas__tools { position: absolute; z-index: 2; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid #e7e9ec; border-radius: 30px; background: #fffffff0; box-shadow: 0 3px 16px #1118270c; }
.mg-gallery-canvas__tools button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: #212832; }
.mg-gallery-canvas__tools button:hover:not(:disabled) { background: #f0f1f3; }
.mg-gallery-canvas__tools span { min-width: 48px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.mg-gallery-lightbox__foot { padding: 8px 20px 12px; border-top: 1px solid #eceef0; }
.mg-gallery-lightbox__foot > p { margin: 0 0 8px; text-align: center; font-size: 11px; line-height: 16px; color: #737780; }
.mg-gallery-lightbox__thumbs { display: flex; justify-content: safe center; gap: 8px; max-width: 100%; overflow-x: auto; scrollbar-width: thin; padding-block: 2px; }
.mg-gallery-lightbox__thumb { flex: 0 0 64px; width: 64px; height: 64px; padding: 4px; border: 2px solid transparent; border-radius: 8px; background: #fff; }
.mg-gallery-lightbox__thumb.is-active { border-color: #d02915; }
.mg-gallery-lightbox__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
@keyframes mg-gallery-image-in { from { opacity: .45; } to { opacity: 1; } }
@media (max-width: 991px), (hover: none) {
  .mg-ui-v2 .mg-store-pdp-gallery__hint-desktop { display: none; }
  .mg-ui-v2 .mg-store-pdp-gallery__hint-touch { display: inline; }
}
@media (max-width: 767px) {
  .mg-ui-v2 .mg-store-pdp-gallery__strip .mg-store-pdp-gallery__thumb { flex-basis: 60px; width: 60px; height: 60px; }
  .mg-gallery-lightbox { inset: 0; width: 100vw; height: 100dvh; transform: none; border-radius: 0; }
  .mg-gallery-lightbox__head { padding: 10px 12px; gap: 8px; }
  .mg-gallery-lightbox__head h2 { font-size: 13px; }
  .mg-gallery-lightbox__foot { padding: 8px 12px max(10px, env(safe-area-inset-bottom)); }
  .mg-gallery-lightbox__thumb { flex-basis: 54px; width: 54px; height: 54px; }
  .mg-gallery-canvas__nav { width: 44px; height: 44px; }
  .mg-gallery-canvas__nav--prev { left: 6px; }
  .mg-gallery-canvas__nav--next { right: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-ui-v2 .mg-store-pdp-gallery--enhanced .mg-store-pdp-gallery__main-img,
  .mg-gallery-lightbox__overlay { animation: none; }
}
