/* Keep the original art first. Gallery controls sit outside product links. */
.cf-gallery-card{position:relative;min-width:0;height:100%}.cf-gallery-card>.custom-order-card,.cf-gallery-card>.product-card,.cf-gallery-card>.market-category,.cf-gallery-card>.catalog-product{height:100%;box-sizing:border-box}
.cf-gallery-detail{position:relative}.cf-gallery-surface{display:block;position:relative;overflow:hidden;isolation:isolate;touch-action:pan-y;contain:layout paint}
.cf-gallery-surface>.cf-gallery-main,.cf-gallery-surface>.cf-gallery-context,.cf-gallery-surface>.cf-gallery-video{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;object-fit:cover;object-position:center;animation:none!important;transform:none!important;transition:none!important;border-radius:inherit;box-shadow:none!important}
.cf-gallery-surface>.cf-gallery-video{object-fit:contain;background:#b6b4aa;pointer-events:none}.cf-gallery-surface>[hidden]{display:none!important}.cf-gallery-surface>.cf-gallery-main{z-index:0}.cf-gallery-surface>.cf-gallery-context,.cf-gallery-surface>.cf-gallery-video{z-index:1}
.cf-gallery-controls{position:absolute;z-index:6;display:flex;align-items:center;justify-content:center;gap:6px;height:22px;pointer-events:none}
.cf-gallery-controls button{appearance:none!important;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:0!important;margin:0!important;min-width:0!important;min-height:0!important;flex:0 0 auto;border:1px solid #fff9!important;box-shadow:0 1px 5px #17242a38!important;cursor:pointer;pointer-events:auto;transform:none!important;transition:width .18s ease,background .18s ease!important}
.cf-gallery-controls .cf-gallery-dot{width:9px!important;height:9px!important;border-radius:99px!important;background:#ffffffcf!important}.cf-gallery-controls .cf-gallery-dot[aria-pressed=true]{width:23px!important;background:#ec0c2b!important;border-color:#fff!important}
.cf-gallery-controls .cf-gallery-pause{width:23px!important;height:23px!important;border-radius:50%!important;background:#fffdf7ed!important;color:#24333a!important;margin-left:3px!important}
.cf-gallery-controls svg{width:15px!important;height:15px!important;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.cf-gallery-controls button:focus-visible{outline:3px solid #ec0c2b;outline-offset:3px}
.cf-product-gallery-viewer{position:fixed;inset:0;box-sizing:border-box;width:min(1120px,94vw);height:min(850px,88dvh);max-width:none;max-height:none;padding:16px;margin:auto;overflow:visible;border:0;border-radius:18px;background:#faf7ef;box-shadow:0 24px 90px #0007}.cf-product-gallery-viewer::backdrop{background:#10191ed4;backdrop-filter:blur(5px)}
.cf-gallery-viewer-stage{height:100%;width:100%;aspect-ratio:auto!important;border-radius:10px}.cf-gallery-viewer-stage>.cf-gallery-main,.cf-gallery-viewer-stage>.cf-gallery-context{object-fit:contain;background:#faf7ef}
.cf-gallery-close{position:absolute;z-index:10;right:8px;top:8px;display:grid;place-items:center;width:36px;height:36px;border:1px solid #d9d9d4;border-radius:50%;background:#fff;color:#24333a;cursor:pointer;box-shadow:0 2px 10px #0002}.cf-gallery-close svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round}
@media(max-width:640px){.cf-gallery-controls{gap:7px}.cf-gallery-controls .cf-gallery-dot{width:10px!important;height:10px!important}.cf-product-gallery-viewer{width:96vw;height:78dvh;padding:8px;border-radius:12px}}
@media(prefers-reduced-motion:reduce){.cf-gallery-controls button{transition:none!important}}

/* Touch hit areas remain larger than the quiet dot marks. */
.cf-gallery-card>.motion-card{transform:none!important}
.cf-gallery-controls{gap:1px;height:32px}
.cf-gallery-controls .cf-gallery-dot,.cf-gallery-controls .cf-gallery-dot[aria-pressed=true]{width:24px!important;height:28px!important;background:transparent!important;border:0!important;box-shadow:none!important}
.cf-gallery-controls .cf-gallery-dot::after{content:"";width:8px;height:8px;display:block;border-radius:20px;border:1px solid #fff;background:#fffdf4dc;box-shadow:0 1px 5px #1e2c3544;transition:width .18s ease,background .18s ease}
.cf-gallery-controls .cf-gallery-dot[aria-pressed=true]::after{width:19px;background:#ec0c2b}
.cf-gallery-controls .cf-gallery-pause{width:28px!important;height:28px!important}
@media(prefers-reduced-motion:reduce){.cf-gallery-controls .cf-gallery-dot::after{transition:none}}

.cf-gallery-surface>.cf-gallery-main{object-fit:var(--cf-gallery-main-fit,cover)!important;object-position:var(--cf-gallery-main-position,center)}
.cf-gallery-surface>.cf-gallery-video{object-fit:contain!important}
.cf-gallery-card>.paper-card{display:block;height:100%}
