/* A quiet, borderless product stage with controls that stay in place as photos change. */
.crp-product-gallery{position:relative;min-width:0;background:#fff}
.crp-gallery-stage{position:relative;min-width:0;isolation:isolate}
.crp-product-page .crp-gallery-viewport{display:flex;justify-content:flex-start;align-items:stretch;height:clamp(400px,40vw,560px);margin:0;border:0;border-radius:0;aspect-ratio:auto;box-shadow:none;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;cursor:grab;background:#fff;touch-action:pan-x pan-y pinch-zoom}
.crp-gallery-viewport::after{display:none}
.crp-gallery-viewport::-webkit-scrollbar{display:none}
.crp-gallery-slide{display:flex;flex:0 0 100%;width:100%;min-width:0;height:100%;align-items:center;justify-content:center;scroll-snap-align:center;scroll-snap-stop:always;overflow:hidden;user-select:none;-webkit-user-select:none;-webkit-user-drag:none}
.crp-product-page .crp-gallery-slide img{display:block;flex:none;max-width:none;background:transparent}
.crp-gallery-slide .crp-product-cutout{transform:scale(var(--crp-product-zoom,1.2));transform-origin:center}
.crp-gallery-viewport.is-dragging{scroll-snap-type:none;cursor:grabbing}
.crp-gallery-viewport:focus-visible,.crp-gallery-slide:focus-visible{outline:2px solid var(--ds-primary);outline-offset:-3px}
.crp-gallery-arrow{position:absolute;top:50%;z-index:1;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid rgba(41,53,63,.045);border-radius:50%;background:rgba(241,243,245,.92);color:#5b6570;box-shadow:0 2px 8px rgba(32,45,54,.025);transform:translateY(-50%);cursor:pointer;transition:background .18s ease,color .18s ease,box-shadow .18s ease}
.crp-gallery-arrow[data-crp-gallery-prev]{left:8px}.crp-gallery-arrow[data-crp-gallery-next]{right:8px}
.crp-gallery-arrow svg,.crp-image-viewer-close svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.crp-gallery-arrow[hidden],.crp-gallery-pagination[hidden]{display:none}
.crp-gallery-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0;min-height:36px;margin-top:8px;padding:0 8px}
.crp-gallery-dot{display:grid;place-items:center;flex:0 0 26px;width:26px;height:36px;padding:0;border:0;border-radius:8px;background:transparent;cursor:pointer}
.crp-gallery-dot span{width:6px;height:6px;border-radius:8px;background:#d4d9dd;transition:width .22s ease,background .22s ease}
.crp-gallery-dot[aria-current="true"] span{width:18px;background:#283640}
.crp-gallery-arrow:focus-visible,.crp-gallery-dot:focus-visible,.crp-image-viewer-close:focus-visible{outline:2px solid var(--ds-primary);outline-offset:3px}
.crp-gallery-position{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.crp-image-viewer{position:fixed;inset:0;width:min(880px,calc(100vw - 40px));max-width:none;max-height:calc(100dvh - 40px);height:min(900px,calc(100dvh - 40px));margin:auto;padding:56px 20px 16px;border:0;border-radius:16px;background:#fff;box-shadow:0 24px 100px rgba(12,26,36,.16);overflow:hidden;color:#283640}
.crp-image-viewer:not([open]){display:none}
.crp-image-viewer::backdrop{background:rgba(15,23,30,.58)}
.crp-image-viewer-close{position:absolute;right:12px;top:10px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;cursor:pointer;color:#4d5861;z-index:2;transition:background .18s ease}
.crp-image-viewer-body,.crp-image-viewer .crp-product-gallery{height:100%;min-height:0}
.crp-image-viewer .crp-product-gallery{display:flex;flex-direction:column}
.crp-image-viewer .crp-gallery-stage{flex:1;min-height:0}
.crp-product-page .crp-image-viewer .crp-mainimage{height:100%;margin:0;border:0;border-radius:0;aspect-ratio:auto;contain:layout paint}
.crp-image-viewer .crp-gallery-pagination{flex:none;margin-top:12px}
.crp-image-viewer .crp-gallery-arrow[data-crp-gallery-prev]{left:0}.crp-image-viewer .crp-gallery-arrow[data-crp-gallery-next]{right:0}
.crp-image-viewer .crp-gallery-slide img{width:100%;height:100%;object-fit:contain;padding:12px}
.crp-product-page .crp-image-viewer .crp-gallery-slide img.crp-viewer-fitted{width:var(--crp-viewer-width);height:var(--crp-viewer-height);padding:0;transform:translate(var(--crp-viewer-x),var(--crp-viewer-y))}
@media(hover:hover){.crp-gallery-arrow:hover{background:#fff;color:#172b38;box-shadow:0 3px 18px rgba(32,45,54,.1)}.crp-gallery-dot:hover span{background:#81929e}.crp-gallery-dot[aria-current="true"]:hover span{background:#283640}.crp-image-viewer-close:hover{background:#f2f4f5}}
@media(max-width:768px){.crp-product-page .crp-gallery-viewport{height:clamp(300px,calc(100vw - 40px),400px)}.crp-gallery-arrow[data-crp-gallery-prev]{left:0}.crp-gallery-arrow[data-crp-gallery-next]{right:0}.crp-gallery-arrow{width:40px;height:40px}.crp-gallery-pagination{margin-top:4px;min-height:32px}.crp-gallery-dot{height:32px}.crp-image-viewer{width:calc(100vw - 20px);height:min(780px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:52px 12px 12px;border-radius:12px}.crp-image-viewer .crp-gallery-pagination{margin-top:8px}.crp-image-viewer .crp-gallery-slide img{padding:8px}}
@media(prefers-reduced-motion:reduce){.crp-gallery-dot span,.crp-gallery-arrow,.crp-image-viewer-close{transition:none}}

/* Let the photo column share the summary's height without changing the enlarged viewer. */
@media(min-width:769px){
 .crp-product-media{position:relative;min-width:0;min-height:520px}
 .crp-product-media>.crp-product-gallery{position:absolute;inset:0;display:flex;flex-direction:column}
 .crp-product-media>.crp-product-gallery>.crp-gallery-stage{flex:1;min-height:0}
 .crp-product-page .crp-product-media>.crp-product-gallery .crp-gallery-viewport{height:100%}
 .crp-product-page .crp-product-media>.crp-product-gallery .crp-gallery-slide img{padding:12px}
 .crp-product-media>.crp-product-gallery>.crp-gallery-pagination{flex:none}
}

/* Only the inline gallery is compact; the enlarged photo dialog keeps its own sizing. */
@media(max-width:768px){
 .crp-product-page .crp-product-media>.crp-product-gallery{padding:12px 0 4px}
 .crp-product-page .crp-product-grid>div>.crp-product-gallery .crp-gallery-viewport{height:clamp(248px,72vw,304px)}
 .crp-product-page .crp-product-grid>div>.crp-product-gallery .crp-gallery-slide img{padding:0}
 .crp-product-grid>div>.crp-product-gallery .crp-gallery-pagination{min-height:28px;margin-top:6px}
 .crp-product-grid>div>.crp-product-gallery .crp-gallery-dot{height:28px}
}
