/* Same-page gallery viewer, scoped away from WooCommerce's product layout. */
.hafu-product-lightbox{position:fixed;inset:0;width:min(1120px,calc(100% - 48px));height:min(900px,calc(100dvh - 48px));max-width:none;max-height:none;margin:auto;padding:0;border:0;border-radius:8px;background:#18181b;color:#fff;box-shadow:0 24px 90px #0009;overflow:hidden;font:14px/1.5 Arial,Helvetica,sans-serif;overscroll-behavior:contain}
.hafu-product-lightbox[open]{display:flex;flex-direction:column}
.hafu-product-lightbox::backdrop{background:#111111d9}
.hafu-lightbox-toolbar{display:flex;align-items:center;gap:16px;flex-shrink:0;min-height:64px;padding:10px 16px;border-bottom:1px solid #ffffff26}
.hafu-product-lightbox .hafu-lightbox-toolbar h2{font:600 16px/1.4 Arial,Helvetica,sans-serif;color:#fff;margin:0;flex:1}
.hafu-lightbox-counter{font-variant-numeric:tabular-nums;color:#e5e5e5;white-space:nowrap}
.hafu-product-lightbox button{box-sizing:border-box;appearance:none;border:0;font-family:inherit;cursor:pointer;color:#fff;background:#ffffff1a;display:grid;place-items:center;line-height:1;padding:0;flex-shrink:0;box-shadow:none}
.hafu-product-lightbox button:hover{background:#ffffff38;color:#fff}
.hafu-product-lightbox button:focus-visible{outline:3px solid #ff9cc6;outline-offset:3px}
.hafu-product-lightbox .hafu-lightbox-close{width:44px;height:44px;border-radius:50%;font-size:32px;font-weight:400}
.hafu-lightbox-stage{position:relative;display:flex;align-items:center;justify-content:center;flex:1;min-height:0;padding:12px 64px;overflow:hidden;touch-action:pan-y pinch-zoom}
.hafu-product-lightbox .hafu-lightbox-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;flex-shrink:1;min-height:0;border-radius:0;margin:0;user-select:none;-webkit-user-drag:none}
.hafu-product-lightbox .hafu-lightbox-arrow{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:56px;border-radius:5px;font:400 48px/1 Arial,Helvetica,sans-serif;z-index:2;background:#0009;border:1px solid #ffffff40}
.hafu-lightbox-previous{left:10px}.hafu-lightbox-next{right:10px}
.hafu-lightbox-status{display:none;position:absolute;left:64px;right:64px;top:50%;transform:translateY(-50%);padding:14px;text-align:center;margin:0;color:#fff;background:#18181be8;pointer-events:none}
.hafu-product-lightbox.is-loading .hafu-lightbox-status,.hafu-product-lightbox.has-error .hafu-lightbox-status{display:block}
.hafu-product-lightbox.has-error .hafu-lightbox-image{visibility:hidden}
.hafu-lightbox-thumbnails{display:flex;gap:10px;flex-shrink:0;overflow-x:auto;overflow-y:hidden;max-height:100px;padding:12px 16px;border-top:1px solid #ffffff26;scrollbar-width:thin;overscroll-behavior:contain}
.hafu-product-lightbox .hafu-lightbox-thumb{display:block;width:68px;height:68px;padding:3px;border:2px solid transparent;border-radius:4px;background:#fff;overflow:hidden}
.hafu-product-lightbox .hafu-lightbox-thumb[aria-pressed=true]{border-color:#f52b81;box-shadow:0 0 0 1px #fff}
.hafu-product-lightbox .hafu-lightbox-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.hafu-product-lightbox [hidden]{display:none!important}
.single-product .hafu-external-main>a,.single-product .woocommerce-product-gallery__image>a{cursor:zoom-in}
@media(max-width:600px){.hafu-product-lightbox{width:100%;height:100dvh;border-radius:0}.hafu-lightbox-toolbar{min-height:60px;padding:8px 12px}.hafu-product-lightbox .hafu-lightbox-toolbar h2{font-size:15px}.hafu-lightbox-stage{padding:8px 42px}.hafu-product-lightbox .hafu-lightbox-arrow{width:36px;height:48px;font-size:40px}.hafu-lightbox-previous{left:3px}.hafu-lightbox-next{right:3px}.hafu-lightbox-status{left:44px;right:44px}.hafu-lightbox-thumbnails{padding:10px 12px max(10px,env(safe-area-inset-bottom));gap:8px;max-height:96px}.hafu-product-lightbox .hafu-lightbox-thumb{width:58px;height:58px}}
@media(prefers-reduced-motion:no-preference){.hafu-product-lightbox[open]{animation:hafu-lightbox-in .15s ease-out}@keyframes hafu-lightbox-in{from{opacity:0}to{opacity:1}}}
