/* Saeed Product gallery v1.0.9 — full-width image stage, no crop, Bakala-safe. */
.saeedp-product-gallery{box-sizing:border-box;max-width:100%;touch-action:pan-y}
.saeedp-product-gallery *{box-sizing:border-box}
/* Bakala/WooCommerce may add padding/background to .woocommerce-product-gallery. Remove only
   those decorations on the Product Studio owned gallery; do not change the desktop column width. */
body.saeedp-owned-product-gallery .woocommerce-product-gallery.saeedp-product-gallery{
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.saeedp-stage{position:relative;width:100%;max-width:100%;overflow:hidden;border-radius:10px;background:transparent;aspect-ratio:1/1;transition:aspect-ratio .18s ease;margin:0!important;padding:0!important}
.saeedp-poster-button{position:absolute;inset:0;width:100%;height:100%;padding:0!important;margin:0!important;border:0!important;background:transparent!important;cursor:pointer;display:block;overflow:hidden;border-radius:inherit}
/* Never crop the product or its corner watermark/logo. The stage follows the real image ratio in JS. */
.saeedp-main-image{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important;object-position:center center!important;display:block;margin:0!important;padding:0!important;background:transparent!important;transform:none!important}
.saeedp-video{position:absolute;inset:0;width:100%!important;height:100%!important;max-width:100%!important;object-fit:contain;display:block;margin:0!important;background:transparent}
.saeedp-video[hidden],.saeedp-poster-button[hidden],.saeedp-zoom-modal[hidden]{display:none!important}
.saeedp-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:78px;height:78px;border-radius:50%;background:rgba(255,255,255,.90);display:flex;align-items:center;justify-content:center;box-shadow:0 4px 18px rgba(0,0,0,.18);pointer-events:none;z-index:3}
.saeedp-play[hidden]{display:none!important}
.saeedp-play-triangle{display:block;width:0;height:0;border-top:15px solid transparent;border-bottom:15px solid transparent;border-left:23px solid #111;margin-left:6px}
.saeedp-zoom-button{position:absolute;top:10px;right:10px;z-index:5;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#111;font-size:24px;display:grid;place-items:center;box-shadow:0 2px 10px rgba(0,0,0,.16);cursor:zoom-in}
.saeedp-swipe-arrow{position:absolute;z-index:4;top:50%;transform:translateY(-50%);width:38px;height:54px;border:0;border-radius:10px;background:rgba(255,255,255,.78);color:#111;font-size:34px;line-height:1;display:grid;place-items:center;opacity:.65}
.saeedp-prev{left:7px}.saeedp-next{right:7px}.saeedp-playing .saeedp-swipe-arrow,.saeedp-playing .saeedp-zoom-button{display:none!important}
.saeedp-thumbnails{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:8px 0 0!important;padding:0!important;background:transparent!important}
.saeedp-thumb{position:relative;aspect-ratio:1/1;padding:0!important;margin:0!important;border:2px solid transparent;border-radius:8px;background:transparent!important;overflow:hidden;cursor:pointer}
.saeedp-thumb.is-active{border-color:currentColor}
/* Thumbnail must also preserve the whole product and corner logo instead of center-cropping it. */
.saeedp-thumb img{width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important;object-position:center center!important;display:block;margin:0!important;padding:0!important;background:transparent!important}
.saeedp-thumb-video{position:absolute;right:4px;bottom:4px;width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.92);font-size:11px;color:#111}
.saeedp-product-gallery.saeedp-gallery-image-selected .saeedp-poster-button{cursor:zoom-in}
body.saeedp-zoom-open{overflow:hidden!important}
.saeedp-zoom-modal{position:fixed;inset:0;z-index:2147483000;background:rgba(0,0,0,.94);display:flex;align-items:center;justify-content:center;padding:18px}
.saeedp-zoom-canvas{width:min(94vw,1400px);height:92vh;overflow:auto;display:flex;align-items:center;justify-content:center;touch-action:pinch-zoom;overscroll-behavior:contain}
.saeedp-zoom-image{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;transform-origin:center;transition:transform .15s ease;cursor:zoom-in;user-select:none;-webkit-user-drag:none}
.saeedp-zoom-image.is-zoomed{cursor:zoom-out;max-width:none;max-height:none}
.saeedp-zoom-close,.saeedp-zoom-nav{position:fixed;z-index:2;border:0;background:rgba(255,255,255,.92);color:#111;display:grid;place-items:center;box-shadow:0 2px 12px rgba(0,0,0,.3)}
.saeedp-zoom-close{top:14px;right:14px;width:46px;height:46px;border-radius:50%;font-size:34px}
.saeedp-zoom-nav{top:50%;transform:translateY(-50%);width:46px;height:68px;border-radius:12px;font-size:42px}.saeedp-zoom-prev{left:10px}.saeedp-zoom-next{right:10px}
@media(max-width:600px){
  body.saeedp-owned-product-gallery .woocommerce-product-gallery.saeedp-product-gallery{padding-left:0!important;padding-right:0!important}
  .saeedp-stage{border-radius:0}
  .saeedp-play{width:68px;height:68px}
  .saeedp-thumbnails{gap:6px}
  .saeedp-thumb{border-radius:6px}
  .saeedp-swipe-arrow{width:32px;height:48px;font-size:30px;opacity:.5}
  .saeedp-zoom-button{width:38px;height:38px;top:8px;right:8px}
  .saeedp-zoom-modal{padding:8px}
  .saeedp-zoom-nav{width:38px;height:58px;font-size:34px}
}
@media(prefers-reduced-motion:reduce){.saeedp-product-gallery *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
