/* Product gallery skins. The media, swipe track and modal belong to WooCommerce. */
.ps-gallery--modern{
  --ps-gallery-default-ratio:4 / 3;
  --ps-gallery-radius:17px;
  --ps-gallery-inset:clamp(15px,4.5cqi,33px);
  --ps-gallery-rail-gap:9px;
  --ps-gallery-thumb-default:67px;
  --ps-gallery-ink:#243252;
  --ps-gallery-line:#e1e7f3;
  --ps-gallery-tint:#f1f4fc;
  --ps-gallery-deep:#455de1;
  --ps-gallery-base:#f1f5ff;
  --ps-gallery-overlay:radial-gradient(ellipse at 49% 42%,#ffffffed,transparent 82%);
  --ps-gallery-accent:var(--ps-gallery-custom-accent,var(--ps-gallery-deep));
  --ps-gallery-thumb:var(--ps-gallery-custom-thumb,#f8faff);
  --ps-gallery-size:var(--ps-gallery-thumb-size,var(--ps-gallery-thumb-default));
  --ps-gallery-thumb-width:var(--ps-gallery-size);
  --ps-gallery-ratio:var(--ps-gallery-user-ratio,var(--ps-gallery-default-ratio));
  min-width:0;
}
.ps-gallery--studio{
  --ps-gallery-overlay:radial-gradient(ellipse at 47% 46%,#ffffffee,transparent 78%),repeating-linear-gradient(0deg,transparent 0 27px,#98a9df1c 27px 28px),repeating-linear-gradient(90deg,transparent 0 27px,#98a9df1c 27px 28px);
}
.ps-gallery--rail{
  --ps-gallery-default-ratio:5 / 4;
  --ps-gallery-base:#e8f4f2;
  --ps-gallery-overlay:radial-gradient(ellipse at 52% 42%,#fafefff2,transparent 78%),linear-gradient(140deg,transparent 54%,#79c0b01f);
  --ps-gallery-deep:#16786b;
  --ps-gallery-ink:#234944;
  --ps-gallery-line:#dfecea;
  --ps-gallery-tint:#eff8f5;
  --ps-gallery-thumb:var(--ps-gallery-custom-thumb,#f0f7f5);
  --ps-gallery-thumb-default:73px;
  --ps-gallery-thumb-width:100%;
}
.ps-gallery--tiles{
  --ps-gallery-default-ratio:16 / 10;
  --ps-gallery-base:#f5eee4;
  --ps-gallery-overlay:radial-gradient(ellipse at 44% 43%,#fffdf8,transparent 76%),linear-gradient(135deg,#efe3d926,transparent 65%);
  --ps-gallery-ink:#593f2d;
  --ps-gallery-line:#ede3d7;
  --ps-gallery-tint:#fbf5ec;
  --ps-gallery-deep:#9d522d;
  --ps-gallery-thumb:var(--ps-gallery-custom-thumb,#faf6ef);
  --ps-gallery-thumb-width:100%;
}
.ps-gallery--cinema{
  --ps-gallery-default-ratio:16 / 10;
  --ps-gallery-base:#11192c;
  --ps-gallery-overlay:radial-gradient(ellipse at 48% 68%,#4b659a86,transparent 68%),linear-gradient(150deg,#000a1b80,transparent 73%);
  --ps-gallery-ink:#eff4ff;
  --ps-gallery-line:#ffffff26;
  --ps-gallery-tint:#ffffff18;
  --ps-gallery-deep:#a8c0ff;
  --ps-gallery-thumb:var(--ps-gallery-custom-thumb,#ffffff4f);
  --ps-gallery-thumb-width:40px;
  padding:10px;
  border-radius:calc(var(--ps-gallery-radius) + 5px);
  background:#10182b;
}
.ps-gallery--modern [hidden]{display:none}
.ps-gallery-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  min-height:35px;margin-block-end:8px;color:var(--ps-gallery-ink);
}
.ps-gallery-head:not(:has(.ps-gallery-caption)){justify-content:flex-end}
.ps-gallery-caption{
  display:inline-flex;align-items:center;gap:8px;min-width:0;
  font-size:12px;font-weight:750;line-height:1.45;overflow-wrap:anywhere;
}
.ps-gallery-caption i{
  display:grid;place-items:center;flex:none;width:30px;height:30px;
  border:1px solid var(--ps-gallery-line);border-radius:9px;
  background:var(--ps-gallery-tint);color:var(--ps-gallery-ink);
}
.ps-gallery-caption .ps-icon{width:16px;height:16px}
.ps-gallery-index{
  flex:none;min-width:57px;padding:3px 8px;text-align:center;
  border:1px solid var(--ps-gallery-line);border-radius:20px;background:var(--ps-gallery-tint);
  color:var(--ps-gallery-ink);font-size:11px;font-weight:720;line-height:1.5;font-variant-numeric:tabular-nums;
}
.ps-gallery--cinema .ps-gallery-head{padding-inline:3px;margin-block-end:6px}
.ps-gallery-body{position:relative;min-width:0;container:ps-product-media / inline-size}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery.images{
  position:relative;display:grid;grid-template-columns:minmax(0,1fr);align-items:start;
  width:100%;min-width:0;margin:0;float:none;
}
.ps-gallery--modern .woocommerce-product-gallery > :is(.flex-viewport,.woocommerce-product-gallery__wrapper,.flex-direction-nav,.woocommerce-product-gallery__trigger){grid-area:1 / 1 / 2 / 2;min-width:0}
.ps-gallery--modern .woocommerce-product-gallery > .flex-viewport{
  height:auto!important;aspect-ratio:var(--ps-gallery-ratio);
  border-radius:var(--ps-gallery-radius);outline:1px solid var(--ps-gallery-line);outline-offset:-1px;
  background:var(--ps-gallery-overlay) var(--ps-gallery-base);
  background:var(--ps-gallery-custom-canvas,var(--ps-gallery-overlay) var(--ps-gallery-base));
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__wrapper{margin:0;padding:0}
.ps-gallery--modern .woocommerce-product-gallery__wrapper > :is(.woocommerce-product-gallery__image,.woocommerce-product-gallery__image--placeholder){
  position:relative;min-width:0;aspect-ratio:var(--ps-gallery-ratio);overflow:hidden;
}
/* If the slider is disabled or hasn't loaded, the first photo and the remaining images are still visible. */
.ps-gallery--modern .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;
}
.ps-gallery--modern .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > :is(.woocommerce-product-gallery__image,.woocommerce-product-gallery__image--placeholder){
  border-radius:var(--ps-gallery-radius);outline:1px solid var(--ps-gallery-line);outline-offset:-1px;
  background:var(--ps-gallery-custom-canvas,var(--ps-gallery-overlay) var(--ps-gallery-base));
}
.ps-gallery--modern .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > :first-child{grid-column:1/-1}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__wrapper > :is(.woocommerce-product-gallery__image,.woocommerce-product-gallery__image--placeholder) > a{
  position:absolute;display:block;inset:min(var(--ps-gallery-inset),15cqi);width:auto;height:auto;
  border-radius:min(12px,var(--ps-gallery-radius));overflow:hidden;
  background:var(--ps-gallery-custom-canvas,#fdfdfd);
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__wrapper :is(img:not(.zoomImg),video){
  display:block;width:100%;height:100%;max-height:none;max-width:100%;aspect-ratio:auto;
  box-sizing:border-box;object-fit:contain;
}
.ps-theme .ps-gallery.ps-gallery--modern[data-ps-fit=cover] .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(.woocommerce-product-gallery__image--placeholder) img:not(.zoomImg){object-fit:cover}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__wrapper img.zoomImg{max-width:none;max-height:none;aspect-ratio:auto;pointer-events:none}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image--placeholder{
  border:0;
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image--placeholder img{
  object-fit:contain;padding:min(var(--ps-gallery-inset),15cqi);opacity:.8;
}

/* Native FlexSlider thumbnail navigation. Do not relocate or replace its img elements. */
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery > .flex-control-thumbs{
  grid-area:2 / 1;display:flex;justify-content:safe center;align-items:center;flex-wrap:nowrap;gap:7px;
  padding:3px 3px 4px;margin:7px 0 0;max-width:100%;
  overflow:auto;scrollbar-width:thin;scrollbar-color:var(--ps-gallery-line) transparent;
  overscroll-behavior-inline:contain;
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-control-thumbs > li{
  position:relative;display:block;flex:none;float:none;margin:0;padding:0;list-style:none;
  width:var(--ps-gallery-thumb-width);min-width:0;overflow:hidden;box-sizing:border-box;
  border:1px solid var(--ps-gallery-line);border-radius:min(11px,var(--ps-gallery-radius));background:var(--ps-gallery-thumb);
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-control-thumbs img{
  display:block;width:100%;height:auto;aspect-ratio:1 / 1;max-height:none;padding:4px;
  box-sizing:border-box;object-fit:contain;cursor:pointer;opacity:.84;
}
.ps-theme .ps-gallery.ps-gallery--modern:where(:not(.ps-gallery--cinema)) .woocommerce-product-gallery ol.flex-control-thumbs > li:has(.flex-active){
  border-color:var(--ps-gallery-accent);box-shadow:inset 0 0 0 1px var(--ps-gallery-accent);
}
.ps-theme .ps-gallery.ps-gallery--modern:where(:not(.ps-gallery--cinema)) .woocommerce-product-gallery ol.flex-control-thumbs img:is(.flex-active,:hover,:focus-visible){opacity:1}
.ps-theme .ps-gallery.ps-gallery--modern .flex-control-thumbs img:focus-visible{outline:2px solid var(--ps-gallery-accent);outline-offset:-4px}

/* Keep the native gallery root as wide as its viewport (FlexSlider measures it in Firefox). */
.ps-theme .ps-gallery.ps-gallery--rail:not([data-ps-hide-thumbs]) .woocommerce-product-gallery:has(> .flex-viewport):has(> .flex-control-thumbs){
  width:calc(100% - var(--ps-gallery-size) - var(--ps-gallery-rail-gap));
  margin-inline-start:calc(var(--ps-gallery-size) + var(--ps-gallery-rail-gap));
}
.ps-theme .ps-gallery.ps-gallery--rail[data-ps-rail=end]:not([data-ps-hide-thumbs]) .woocommerce-product-gallery:has(> .flex-viewport):has(> .flex-control-thumbs){
  margin-inline-start:0;margin-inline-end:calc(var(--ps-gallery-size) + var(--ps-gallery-rail-gap));
}
.ps-theme .ps-gallery.ps-gallery--rail:not([data-ps-hide-thumbs]) .woocommerce-product-gallery:has(> .flex-viewport) > .flex-control-thumbs{
  position:absolute;grid-area:auto;inset-block:0;inset-inline:auto calc(100% + var(--ps-gallery-rail-gap));
  width:var(--ps-gallery-size);max-width:none;box-sizing:border-box;
  margin:0;padding:2px;min-height:0;align-items:stretch;justify-content:flex-start;flex-direction:column;
}
.ps-theme .ps-gallery.ps-gallery--rail[data-ps-rail=end]:not([data-ps-hide-thumbs]) .woocommerce-product-gallery:has(> .flex-viewport) > .flex-control-thumbs{
  inset-inline:calc(100% + var(--ps-gallery-rail-gap)) auto;
}
.ps-gallery--rail[data-ps-rail=start]:not([data-ps-hide-thumbs]) .ps-gallery-body:has(.woocommerce-product-gallery > .flex-control-thumbs){--ps-gallery-sale-offset:calc(var(--ps-gallery-size) + var(--ps-gallery-rail-gap))}

.ps-theme .ps-gallery.ps-gallery--tiles .woocommerce-product-gallery > .flex-control-thumbs{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;
  padding:2px;margin-block-start:7px;
}
.ps-theme .ps-gallery.ps-gallery--tiles .woocommerce-product-gallery > .flex-control-thumbs:not(:has(> li:nth-child(3))){grid-template-columns:repeat(2,minmax(0,1fr))}
.ps-theme .ps-gallery.ps-gallery--tiles .woocommerce-product-gallery .flex-control-thumbs > li{border-radius:min(13px,var(--ps-gallery-radius))}
.ps-theme .ps-gallery.ps-gallery--tiles .woocommerce-product-gallery .flex-control-thumbs img{aspect-ratio:16 / 10;padding:6px}
.ps-gallery--tiles .flex-control-thumbs > li[data-ps-frame]::after{
  position:absolute;inset-block-end:5px;inset-inline-end:5px;pointer-events:none;content:attr(data-ps-frame);
  padding:1px 5px;border-radius:5px;background:#fffdf2ea;color:#60402a;font-size:9px;font-weight:750;
}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery > .flex-control-thumbs{gap:0;margin:3px 0 -2px;padding:0;scrollbar-color:#ffffff2b transparent}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery ol.flex-control-thumbs > li{
  height:40px;border:0;background:transparent;box-shadow:none;
}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery ol.flex-control-thumbs > li::before{
  content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;
  height:7px;width:7px;border-radius:10px;background:var(--ps-gallery-thumb);
  transition:width .18s,background-color .18s;
}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery ol.flex-control-thumbs > li:has(.flex-active)::before{width:20px;background:var(--ps-gallery-accent)}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery ol.flex-control-thumbs li > img{width:100%;height:100%;padding:0;opacity:0!important}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery ol.flex-control-thumbs li:has(img:focus-visible){outline:1px solid var(--ps-gallery-accent);outline-offset:-3px}
.ps-gallery--cinema .flex-control-thumbs li > :not(img){visibility:hidden}

/* The native trigger and arrows occupy the main image area, not the navigation row. */
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery > .flex-direction-nav{
  position:absolute;inset:0;z-index:2;pointer-events:none;list-style:none;padding:0;margin:0;
}
.ps-gallery--modern .flex-direction-nav li{list-style:none;padding:0;margin:0}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-direction-nav a{
  position:absolute;inset:50% auto auto;display:grid;place-items:center;
  width:36px;height:36px;border:1px solid #35487b24;border-radius:50%;
  background:#fffffff3;color:#1d2b4a;box-shadow:0 2px 10px #10213e16;
  font-size:0;text-decoration:none;transform:translateY(-50%);pointer-events:auto;
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-direction-nav .flex-prev{inset-inline-start:9px}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-direction-nav .flex-next{inset-inline-end:9px}
.ps-theme .ps-gallery.ps-gallery--modern .flex-direction-nav a::before{
  content:'';width:8px;height:8px;border:solid currentColor;border-width:2px 2px 0 0;
  transform:rotate(-135deg);margin:0 0 0 4px;
}
.ps-theme .ps-gallery.ps-gallery--modern .flex-direction-nav .flex-next::before{transform:rotate(45deg);margin:0 4px 0 0}
.ps-theme .ps-gallery.ps-gallery--modern:dir(rtl) .flex-direction-nav .flex-prev::before{transform:rotate(45deg);margin:0 4px 0 0}
.ps-theme .ps-gallery.ps-gallery--modern:dir(rtl) .flex-direction-nav .flex-next::before{transform:rotate(-135deg);margin:0 0 0 4px}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-direction-nav .flex-disabled{opacity:0;pointer-events:none;visibility:hidden}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery a.woocommerce-product-gallery__trigger{
  position:absolute;inset:9px auto auto;inset-inline-end:9px;z-index:4;
  display:grid;place-items:center;width:37px;height:37px;box-sizing:border-box;text-indent:0;
  border:1px solid #35487b24;border-radius:11px;background:#fffffff3;color:#1d2b4a;
  font-size:0;line-height:1;box-shadow:0 2px 10px #10213e14;
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery a.woocommerce-product-gallery__trigger::before{display:none}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery a.woocommerce-product-gallery__trigger::after{
  content:'';position:static;display:block;width:17px;height:17px;margin:0;border:0;border-radius:0;transform:none;
  background:currentColor;mask:center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5m6 0h5v5m0 6v5h-5m-6 0H4v-5'/%3E%3C/svg%3E");
}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery__trigger > span{display:none}
.ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery :is(.woocommerce-product-gallery__trigger,.flex-direction-nav a):is(:hover,:focus-visible){background:#fff;outline:1px solid var(--ps-gallery-accent);outline-offset:1px}
.ps-theme .ps-gallery.ps-gallery--cinema .woocommerce-product-gallery :is(.woocommerce-product-gallery__trigger,.flex-direction-nav a):not(:hover,:focus-visible){background:#1d2941ed;color:#f1f5ff;border-color:#ffffff32}
.ps-theme.woocommerce .ps-gallery.ps-gallery--modern .ps-gallery-body span.onsale{
  position:absolute;inset:10px auto auto;inset-inline-start:calc(10px + var(--ps-gallery-sale-offset,0px));z-index:3;
  min-width:0;min-height:0;margin:0;padding:4px 8px;line-height:1.5;
  border-radius:7px;background:#fff4f8;color:#9d2450;font-size:10px;
}
.ps-theme .ps-single-media:has(.ps-gallery--modern) .ps-single-image-tools{
  position:relative;inset:auto;margin-block-start:8px;flex-direction:row;justify-content:flex-end;flex-wrap:wrap;
}
.ps-theme .ps-single-media:has(.ps-gallery--modern) .ps-single-image-tools .ps-icon-btn{border-radius:10px}
.ps-theme .ps-gallery[data-ps-hide-thumbs] .flex-control-nav,
.ps-theme .ps-gallery[data-ps-hide-arrows] .flex-direction-nav,
.ps-theme .ps-gallery[data-ps-hide-expand] .woocommerce-product-gallery__trigger,
.ps-theme .ps-gallery[data-ps-hide-sale] span.onsale{display:none!important}

/* Adapt to the media column, including the narrow canvas inside the editor. */
@container ps-product-media (max-width:400px){
  .ps-theme .ps-gallery:is(.ps-gallery--studio,.ps-gallery--rail) .woocommerce-product-gallery.images{
    --ps-gallery-thumb-width:var(--ps-gallery-thumb-size,53px);
  }
  .ps-theme .ps-gallery.ps-gallery--rail:is([data-ps-rail=start],[data-ps-rail=end]):not([data-ps-hide-thumbs]) .woocommerce-product-gallery:has(> .flex-viewport):has(> .flex-control-thumbs){
    width:100%;margin:0;
  }
  .ps-theme .ps-gallery.ps-gallery--rail:not([data-ps-hide-thumbs]) .woocommerce-product-gallery:has(> .flex-viewport) > .flex-control-thumbs{
    position:static;grid-area:2 / 1;width:auto;min-width:0;max-width:100%;
    align-items:center;justify-content:safe center;flex-direction:row;margin-block-start:7px;
  }
  .ps-theme.woocommerce .ps-gallery.ps-gallery--rail .ps-gallery-body span.onsale{inset-inline-start:9px}
  .ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery .flex-direction-nav a{width:33px;height:33px}
  .ps-theme .ps-gallery.ps-gallery--modern .woocommerce-product-gallery a.woocommerce-product-gallery__trigger{width:34px;height:34px}
}
@media(prefers-reduced-motion:reduce){
  .ps-gallery--modern .flex-viewport .woocommerce-product-gallery__wrapper{transition-duration:.001s!important}
  .ps-theme .ps-gallery.ps-gallery--modern .flex-control-thumbs > li::before{transition:none}
}
