.pd-gallery .woocommerce-product-gallery__image > a,
.pd-image-stage figure,
.pd-image-thumbs button {
 position: relative;
}
.pd-gallery .woocommerce-product-gallery__image > a::after,
.pd-image-stage figure::after,
.pd-image-thumbs button::after {
 content: "";
 position: absolute;
 right: 4%;
 bottom: 4%;
 width: clamp(24px, 14%, 80px);
 height: 16%;
 background: var(--pd-gallery-logo, none) right bottom / contain no-repeat;
 pointer-events: none;
}
.pd-image-thumbs button::after { width: 24%; height: 24%; }
.pd-gallery [hidden] { display: none !important; }
.pd-gallery-open {
 position: absolute;
 top: 12px;
 left: 12px;
 z-index: 6;
}
.pd-gallery-open, .pd-image-viewer button {
 cursor: pointer;
 color: #27277e;
 background: white;
 border: 1px solid #e7e3f0;
 border-radius: 8px;
}
.pd-gallery-open, .pd-image-close, .pd-image-prev, .pd-image-next {
 width: 42px;
 height: 42px;
 font-size: 24px;
 line-height: 1;
 padding: 0;
}
.pd-viewer-open, .pd-viewer-open body { overflow: hidden; overscroll-behavior: none; }
.pd-image-viewer {
 position: fixed;
 inset: 0 auto 0 0;
 margin: 0;
 width: 50vw;
 height: 100dvh;
 max-width: none;
 max-height: none;
 box-sizing: border-box;
 overflow: hidden;
 padding: 0;
 border: 0;
 color: #24233a;
 background: white;
 direction: rtl;
}
.pd-image-viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto; }
.pd-image-viewer::backdrop { background: rgb(0 0 0 / 30%); }
.pd-image-viewer header {
 display: flex;
 justify-content: space-between;
 align-items: center;
 padding: 20px 24px;
 border-bottom: 1px solid #eee;
}
.pd-image-name { margin: 16px 24px 0; font-size: 13px; font-weight: 600; }
.pd-image-stage {
 position: relative;
 display: grid;
 place-items: center;
 min-height: 0;
 padding: 14px 48px;
 touch-action: pan-y pinch-zoom;
}
.pd-image-stage figure {
 margin: 0;
 height: 100%;
 width: min(100%, 540px);
 min-height: 0;
}
.pd-image-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pd-image-prev, .pd-image-next { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; }
.pd-image-stage button svg { width: 20px; height: 20px; }
.pd-image-prev { right: 6px; }
.pd-image-next { left: 6px; }
.pd-image-viewer footer { min-width: 0; padding: 0 24px max(16px, env(safe-area-inset-bottom)); }
.pd-image-count { color: #27277e; font-size: 13px; margin: 0 0 10px; }
.pd-image-thumbs { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px; }
.pd-image-thumbs button { flex: 0 0 clamp(70px, 21%, 170px); aspect-ratio: 1.15; padding: 8px; }
.pd-image-thumbs img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pd-image-thumbs [aria-current=true] { border-color: #5544a2; background: #f3efff; }
@media (max-width: 782px) {
 .pd-image-viewer { inset: 0; width: 100%; max-width: 100vw; }
 .pd-image-viewer[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
 .pd-image-viewer header { padding: 8px 16px; }
 .pd-image-name { display: none; }
 .pd-image-stage { padding: 16px; align-items: start; overflow: hidden; }
 .pd-image-stage figure { height: auto; aspect-ratio: 1; max-height: 100%; }
 .pd-image-prev, .pd-image-next { top: min(45vw, 50%); }
 .pd-image-viewer footer { padding-inline: 12px; }
 .pd-image-thumbs button { flex-basis: 84px; }
}
