/* The product page layout stays with Astra/the existing landing. Only the reader
   is styled here; PhotoSwipe's own CSS supplies its gesture/slide geometry. */
.kux-gallery.pswp {
 --kux-gallery-footer: 144px;
 --kux-gallery-top: 56px;
 --kux-gallery-toolbar-top: 8px;
 --kux-gallery-accent: #046bd2;
 position: fixed;
 inset: 0;
 z-index: 100000;
 height: 100%;
 background: #fff;
 color: #1e293b;
 font-family: inherit;
 overscroll-behavior: contain;
}
.kux-gallery .pswp__bg { background: #fff; }
/* WooCommerce reserves room for the admin bar. The immersive reader covers it. */
.admin-bar .kux-gallery.pswp { top: 0; height: 100%; }
.kux-gallery .pswp__img { object-fit: contain; cursor: zoom-in; }
.kux-gallery[data-zoomed="true"] .pswp__img { cursor: zoom-out; }
.kux-gallery .pswp__img--placeholder--blank { background: #fff; }
.kux-gallery__controls { position: absolute; inset: 0; pointer-events: none; }
.kux-gallery__controls::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: var(--kux-gallery-top); background: #fff; }
.kux-gallery .kux-gallery__button {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 flex: 0 0 44px;
 width: 44px;
 height: 44px;
 min-height: 44px;
 margin: 0;
 padding: 10px;
 border: 1px solid #8c9399;
 border-radius: 50%;
 background: #fff;
 color: #1e293b;
 box-shadow: none;
 cursor: pointer;
 pointer-events: auto;
 touch-action: manipulation;
}
.kux-gallery__button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; pointer-events: none; }
@media (hover: hover) { .kux-gallery .kux-gallery__button:hover { background: #f0f6fc; color: #045cb4; border-color: #045cb4; } }
.kux-gallery .kux-gallery__button:disabled { opacity: .35; cursor: default; }
.kux-gallery :is(button,[tabindex]):focus-visible { outline: 3px solid var(--kux-gallery-accent); outline-offset: 3px; }
.kux-gallery__close { position: absolute; top: max(12px,env(safe-area-inset-top)); right: max(16px,env(safe-area-inset-right)); }
.kux-gallery__counter { position: absolute; top: max(24px,env(safe-area-inset-top)); left: max(20px,env(safe-area-inset-left)); max-width: calc(100% - 92px); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #475569; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.kux-gallery__previous, .kux-gallery__next { position: absolute; z-index: 1; bottom: calc(var(--kux-gallery-footer) - var(--kux-gallery-toolbar-top) - 44px); }
.kux-gallery__previous { left: calc(50% - 112px); }
.kux-gallery__next { right: calc(50% - 112px); }
.kux-gallery__footer { position: absolute; bottom: 0; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: var(--kux-gallery-toolbar-top) 16px max(12px,env(safe-area-inset-bottom)); background: #fff; pointer-events: auto; }
.kux-gallery__zoom { display: flex; justify-content: center; gap: 16px; }
.kux-gallery__thumbs { display: flex; gap: 6px; max-width: 100%; padding: 4px; overflow-x: auto; overscroll-behavior-x: contain; touch-action: pan-x; scrollbar-width: thin; scrollbar-color: #8c9399 #fff; }
.kux-gallery__thumb {
 display: flex;
 flex: 0 0 64px;
 width: 64px;
 height: 64px;
 min-height: 44px;
 margin: 0;
 padding: 2px;
 border: 2px solid transparent;
 border-radius: 0;
 background: #fff;
 cursor: pointer;
 touch-action: manipulation;
}
.kux-gallery__thumb:hover { border-color: #8c9399; }
.kux-gallery__thumb[aria-current="true"] { border-color: var(--kux-gallery-accent); }
.kux-gallery__thumb img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: contain; }
.kux-gallery [hidden] { display: none; }
.kux-gallery__message { position: absolute; top: 45%; left: 16px; right: 16px; text-align: center; color: #475569; font-size: 16px; pointer-events: none; }
.kux-gallery-notice { position: fixed; z-index: 100001; bottom: max(24px,env(safe-area-inset-bottom)); left: 16px; right: 16px; width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 12px 16px; border: 1px solid #8c9399; border-radius: 6px; background: #fff; color: #1e293b; font-size: 14px; }
:is(.kcl-main-image,.kimo-main-image,.simba-main-image)[data-kux-gallery] { cursor: zoom-in; }
@media (min-width: 900px) {
 .kux-gallery.pswp { --kux-gallery-toolbar-top: 6px; }
 .kux-gallery__footer { gap: 6px; padding-bottom: max(8px,env(safe-area-inset-bottom)); }
 .kux-gallery__thumb { flex-basis: 56px; width: 56px; height: 56px; }
 .kux-gallery__previous, .kux-gallery__next { top: calc((100% + var(--kux-gallery-top) - var(--kux-gallery-footer)) / 2 - 22px); bottom: auto; }
 .kux-gallery__previous { left: 24px; }
 .kux-gallery__next { right: 24px; }
}
@media (max-height: 500px) {
 .kux-gallery.pswp { --kux-gallery-toolbar-top: 0px; }
 .kux-gallery__footer { gap: 4px; padding-top: 0; padding-bottom: max(4px,env(safe-area-inset-bottom)); }
 .kux-gallery__thumb { flex-basis: 48px; width: 48px; height: 48px; }
}
