/* =========================================================
   Jigsawfy Card System v0.4.0
   Converts normal WooCommerce product cards into Jigsawfy-style
   glass product tiles.
   ========================================================= */

:root{
  --jfy-accent:#67033a;
  --jfy-pink:255,195,235;
  --jfy-purple:195,175,255;
  --jfy-glass-a:.34;
  --jfy-glass-b:.26;
  --jfy-glass-border:.42;
  --jfy-glass-blur:16px;
  --jfy-glass-sat:135%;
  --jfy-radius:18px;
  --jfy-radius-sm:12px;
  --jfy-shadow:0 18px 54px rgba(255,195,235,.28), 0 10px 28px rgba(120,70,255,.10), inset 0 0 0 1px rgba(255,255,255,.18);
  --jfy-glow:0 24px 70px rgba(150,90,255,.46), 0 12px 34px rgba(255,110,210,.25), 0 10px 26px rgba(0,0,0,.16), inset 0 0 0 1px rgba(255,255,255,.24);
}

body.jfy-card-system-enabled ul.products li.product,
body.jfy-card-system-enabled .wc-block-grid__product,
body.jfy-card-system-enabled .elementor-widget-woocommerce-products ul.products li.product{
  position:relative !important;
  overflow:hidden !important;
  border-radius:var(--jfy-radius) !important;
  isolation:isolate;
  padding:0 !important;
  min-height:0 !important;
  aspect-ratio:1 / .98;
  background:#fff !important;
  box-shadow:none !important;
  transition:transform .24s cubic-bezier(.2,.9,.2,1), box-shadow .22s ease, background .22s ease;
  transform-origin:center center;
}

/* Keep the product image area compact, so cards sit close to square instead of growing vertically. */
body.jfy-card-system-enabled li.product.jfy-enhanced > a.woocommerce-LoopProduct-link,
body.jfy-card-system-enabled li.product.jfy-enhanced > a.woocommerce-loop-product__link,
body.jfy-card-system-enabled .wc-block-grid__product.jfy-enhanced > a.wc-block-grid__product-link{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  height:100% !important;
  width:100% !important;
  padding:12px 16px 64px !important;
  box-sizing:border-box !important;
}

body.jfy-card-system-enabled ul.products li.product img,
body.jfy-card-system-enabled .wc-block-grid__product img{
  border-radius:var(--jfy-radius) !important;
  display:block;
  width:100% !important;
  height:100% !important;
  max-height:100% !important;
  object-fit:contain !important;
  transition:transform .28s cubic-bezier(.2,.9,.2,1), filter .28s ease;
}

@media (hover:hover) and (pointer:fine){
  body.jfy-card-system-enabled ul.products li.product:hover,
  body.jfy-card-system-enabled .wc-block-grid__product:hover{
    transform:scale(1.035);
    z-index:30;
    background:radial-gradient(120% 95% at 50% 92%, rgba(255,195,235,.20), rgba(195,175,255,.10) 52%, rgba(255,255,255,0) 76%) !important;
    box-shadow:0 26px 70px rgba(150,90,255,.16), 0 16px 40px rgba(255,120,210,.13) !important;
  }

  body.jfy-card-system-enabled ul.products li.product:hover img,
  body.jfy-card-system-enabled .wc-block-grid__product:hover img{
    transform:scale(1.025);
    filter:saturate(1.04) contrast(1.02);
  }
}

.jfy-glass{
  background:linear-gradient(135deg, rgba(var(--jfy-pink),var(--jfy-glass-a)), rgba(var(--jfy-purple),var(--jfy-glass-b))) !important;
  backdrop-filter:blur(var(--jfy-glass-blur)) saturate(var(--jfy-glass-sat)) !important;
  -webkit-backdrop-filter:blur(var(--jfy-glass-blur)) saturate(var(--jfy-glass-sat)) !important;
  border:1px solid rgba(255,255,255,var(--jfy-glass-border)) !important;
  box-shadow:var(--jfy-shadow) !important;
}

.jfy-card-title{
  position:absolute;
  left:10px;
  right:10px;
  top:10px;
  z-index:6;
  border-radius:var(--jfy-radius-sm);
  padding:11px 12px 14px;
  pointer-events:none;
  color:#fff;
  text-shadow:1px 1px 8px rgba(0,0,0,.85);
  font-size:14px;
  line-height:1.34;
  font-weight:900;
  max-height:3.9em;
  overflow:hidden;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  opacity:0;
  transform:translateY(-7px);
  transition:opacity .18s ease, transform .22s cubic-bezier(.2,.9,.2,1);
}

@media (hover:hover) and (pointer:fine){
  li.product:hover .jfy-card-title,
  .wc-block-grid__product:hover .jfy-card-title{
    opacity:1;
    transform:translateY(0);
    box-shadow:var(--jfy-glow) !important;
  }
}

.jfy-card-price{
  position:absolute;
  left:10px;
  right:10px;
  bottom:12px;
  z-index:6;
  border-radius:var(--jfy-radius-sm);
  padding:10px 12px;
  pointer-events:auto;
  font-size:14px;
  font-weight:950;
  color:var(--jfy-accent);
  text-shadow:1px 1px 8px rgba(255,255,255,.75) !important;
  transition:transform .2s cubic-bezier(.2,.9,.2,1), color .18s ease;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.jfy-price-main{
  min-width:0;
  flex:1 1 auto;
  line-height:1.15;
  white-space:nowrap;
}

.jfy-price-main .woocommerce-Price-amount,
.jfy-price-main bdi{
  color:inherit !important;
  font-weight:950 !important;
}

.jfy-pay-icons{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  min-width:0;
  max-width:112px;
}

.jfy-pay-icon{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:auto;
  height:20px;
  cursor:help;
  flex:0 0 auto;
}

.jfy-pay-icon img{
  display:block !important;
  width:auto !important;
  max-width:46px !important;
  height:17px !important;
  object-fit:contain !important;
  border-radius:0 !important;
  transform:none !important;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.14));
}

.jfy-pay-tooltip{
  position:fixed;
  z-index:2147482200;
  max-width:min(300px, calc(100vw - 24px));
  padding:10px 12px;
  border-radius:13px;
  background:rgba(255,255,255,.96);
  color:var(--jfy-accent);
  border:1px solid rgba(103,3,58,.10);
  box-shadow:0 16px 38px rgba(80,20,90,.20);
  text-shadow:none !important;
  font-size:11px;
  font-weight:850;
  line-height:1.32;
  opacity:0;
  transform:translateY(5px) scale(.98);
  pointer-events:none;
  transition:opacity .15s ease, transform .18s cubic-bezier(.2,.9,.2,1);
}
.jfy-pay-tooltip.is-on{
  opacity:1;
  transform:translateY(0) scale(1);
}

.jfy-card-actions{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  display:flex;
  gap:10px;
  z-index:7;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .16s ease, transform .2s cubic-bezier(.2,.9,.2,1);
  pointer-events:none;
}

.jfy-card-actions a,
.jfy-card-actions button{
  flex:1;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none !important;
  padding:12px 14px;
  border-radius:14px !important;
  font-size:14px;
  font-weight:950;
  line-height:1;
  border:0;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(0,0,0,.12);
  user-select:none;
  -webkit-tap-highlight-color:transparent;
}

.jfy-btn-primary,
.jfy-btn-secondary{
  position:relative;
  isolation:isolate;
  overflow:visible;
  transition:transform .18s cubic-bezier(.2,.9,.2,1), box-shadow .18s ease, background .18s ease, color .18s ease;
}
.jfy-btn-primary{background:#ffebf6 !important;color:var(--jfy-accent) !important;}
.jfy-btn-secondary{background:#fff !important;color:var(--jfy-accent) !important;border:1px solid rgba(0,0,0,.10) !important;}
.jfy-btn-primary::before,
.jfy-btn-secondary::before{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius:inherit;
  background:linear-gradient(135deg, #ff5bd6, #7c3cff, #57d5ff);
  filter:blur(12px);
  opacity:.45;
  z-index:-2;
  transition:opacity .18s ease, filter .18s ease;
}
.jfy-btn-primary::after,
.jfy-btn-secondary::after{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:inherit;
  background:inherit;
  z-index:-1;
}
@media (hover:hover) and (pointer:fine){
  .jfy-btn-primary:hover,
  .jfy-btn-secondary:hover{
    transform:translateY(-2px);
    color:#fff !important;
    background:linear-gradient(135deg, rgba(255,91,214,.92), rgba(124,60,255,.88)) !important;
    box-shadow:0 18px 38px rgba(150,90,255,.34), 0 8px 20px rgba(255,91,214,.24) !important;
  }
  .jfy-btn-primary:hover::before,
  .jfy-btn-secondary:hover::before{
    opacity:.86;
    filter:blur(15px);
  }
}

@media (hover:hover) and (pointer:fine){
  li.product:hover .jfy-card-price,
  .wc-block-grid__product:hover .jfy-card-price{
    transform:translateY(-58px);
    color:#fff !important;
    text-shadow:1px 1px 8px rgba(0,0,0,.85) !important;
    box-shadow:var(--jfy-glow) !important;
  }
  li.product:hover .jfy-card-actions,
  .wc-block-grid__product:hover .jfy-card-actions{
    opacity:1;
    transform:translateY(0);
    pointer-events:auto;
  }
}

.jfy-preview-dot{
  position:absolute;
  left:70%;
  top:40%;
  transform:translate(-50%,-50%);
  z-index:8;
  width:50px;
  height:50px;
  border-radius:999px;
  background:rgba(255,255,255,0);
  border:2px solid rgba(255,255,255,.55);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity .16s ease, transform .2s cubic-bezier(.2,.9,.2,1);
  pointer-events:none;
}
.jfy-preview-dot span{color:#fff;font-weight:950;font-size:10px;text-shadow:0 6px 18px rgba(0,0,0,.28);}
@media (hover:hover) and (pointer:fine){
  li.product:hover .jfy-preview-dot,
  .wc-block-grid__product:hover .jfy-preview-dot{
    opacity:1;
    pointer-events:auto;
    cursor:crosshair;
    transform:translate(-50%,-50%) scale(1.04);
  }
}
@media (hover:none) and (pointer:coarse){.jfy-preview-dot{display:none !important;}}

.jfy-oos{opacity:.66;}
.jfy-oos .jfy-preview-dot{display:none !important;}
.jfy-oos-badge{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  z-index:9;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(17,17,17,.55);
  color:#fff;
  font-weight:950;
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  box-shadow:0 14px 34px rgba(0,0,0,.22);
  pointer-events:none;
  white-space:nowrap;
}

/* Hide default Woo bits inside enhanced card, but keep accessibility via our overlays */
li.product.jfy-enhanced .woocommerce-loop-product__title,
li.product.jfy-enhanced .price,
li.product.jfy-enhanced .button,
.wc-block-grid__product.jfy-enhanced .wc-block-grid__product-title,
.wc-block-grid__product.jfy-enhanced .wc-block-grid__product-price,
.wc-block-grid__product.jfy-enhanced .wp-block-button,
li.product.jfy-enhanced .astra-shop-summary-wrap,
li.product.jfy-enhanced .ast-woo-product-category,
li.product.jfy-enhanced .star-rating,
li.product.jfy-enhanced .ast-quick-view-button,
li.product.jfy-enhanced .ast-loop-product__link{
  display:none !important;
}

.jfy-hover-preview{
  position:fixed;
  z-index:2147482000;
  pointer-events:none;
  opacity:0;
  transform:translate3d(0,0,0) scale(.96);
  transition:opacity .14s ease, transform .18s cubic-bezier(.2,.9,.2,1);
  left:0;
  top:0;
}
.jfy-hover-preview.is-on{opacity:1;transform:translate3d(0,0,0) scale(1);}
.jfy-hover-preview-inner{border-radius:16px;padding:10px;box-shadow:0 18px 54px rgba(120,70,255,.28),0 14px 40px rgba(0,0,0,.22),inset 0 0 0 1px rgba(255,255,255,.14);}
.jfy-hover-preview img{display:block;width:clamp(280px,28vw,460px);max-height:42vh;height:auto;object-fit:contain;border-radius:14px;}

.jfy-lightbox{position:fixed;inset:0;z-index:2147482100;background:rgba(0,0,0,.62);display:none;align-items:center;justify-content:center;padding:18px;}
.jfy-lightbox.is-on{display:flex;}
.jfy-lightbox-inner{width:min(92vw,980px);max-height:88vh;border-radius:18px;padding:12px;position:relative;box-shadow:0 24px 70px rgba(120,70,255,.22),0 22px 60px rgba(0,0,0,.30);}
.jfy-lightbox-inner img{width:100%;height:auto;max-height:82vh;object-fit:contain;border-radius:14px;display:block;}
.jfy-lightbox-close{position:absolute;right:10px;top:10px;width:40px;height:40px;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.22);color:#fff;font-size:18px;line-height:40px;text-align:center;cursor:pointer;}


/* Mobile: one product per row, compact square cards, horizontal controls */
@media (max-width: 767px){
  body.jfy-card-system-enabled ul.products{
    display:grid !important;
    grid-template-columns:1fr !important;
    row-gap:18px !important;
    column-gap:0 !important;
  }

  body.jfy-card-system-enabled ul.products li.product,
  body.jfy-card-system-enabled ul.products[class*="columns-"] li.product,
  body.jfy-card-system-enabled .wc-block-grid__product{
    width:100% !important;
    max-width:420px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    padding:0 !important;
    min-height:0 !important;
    height:auto !important;
    aspect-ratio:1 / .96;
    overflow:hidden !important;
    background:#fff !important;
  }

  body.jfy-card-system-enabled li.product.jfy-enhanced > a.woocommerce-LoopProduct-link,
  body.jfy-card-system-enabled li.product.jfy-enhanced > a.woocommerce-loop-product__link,
  body.jfy-card-system-enabled .wc-block-grid__product.jfy-enhanced > a.wc-block-grid__product-link{
    height:100% !important;
    padding:44px 14px 92px !important;
  }

  body.jfy-card-system-enabled ul.products li.product img,
  body.jfy-card-system-enabled .wc-block-grid__product img{
    width:100% !important;
    height:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
  }

  .jfy-card-title{
    display:-webkit-box !important;
    opacity:1 !important;
    transform:none !important;
    font-size:13px;
    padding:9px 10px 11px;
    left:9px;
    right:9px;
    top:9px;
    max-height:3.7em;
  }

  .jfy-card-price{
    min-height:36px;
    padding:8px 10px;
    font-size:13px;
    bottom:53px;
    gap:8px;
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:space-between !important;
  }

  .jfy-price-main{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    flex:1 1 auto;
  }

  .jfy-pay-icons{
    gap:6px;
    max-width:100px;
    flex:0 0 auto;
  }

  .jfy-pay-icon img{
    max-width:42px !important;
    height:16px !important;
  }

  .jfy-card-actions{
    opacity:1 !important;
    transform:none !important;
    pointer-events:auto !important;
    bottom:10px;
    gap:10px;
    display:flex !important;
    flex-direction:row !important;
  }

  .jfy-card-actions a,
  .jfy-card-actions button{
    min-height:39px;
    padding:10px 8px;
    font-size:12px;
    border-radius:13px !important;
    flex:1 1 0;
  }
}

@media (prefers-reduced-motion:reduce){
  .jfy-card-title,.jfy-card-price,.jfy-card-actions,.jfy-preview-dot,.jfy-hover-preview{transition:none !important;animation:none !important;}
}

/* =========================================================
   Notify Availability modal
   ========================================================= */
body.jfy-notify-open{overflow:hidden;}
.jfy-notify-modal{
  position:fixed;
  inset:0;
  z-index:2147482300;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.jfy-notify-modal.is-on{display:flex;}
.jfy-notify-backdrop{
  position:absolute;
  inset:0;
  background:rgba(20,5,30,.46);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}
.jfy-notify-box{
  position:relative;
  width:min(420px, calc(100vw - 28px));
  border-radius:22px;
  padding:22px;
  color:var(--jfy-accent);
  box-shadow:0 28px 90px rgba(120,70,255,.32), 0 18px 50px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.20) !important;
}
.jfy-notify-close{
  position:absolute;
  right:12px;
  top:12px;
  width:36px;
  height:36px;
  border:0;
  border-radius:999px;
  background:rgba(255,255,255,.45);
  color:var(--jfy-accent);
  font-size:24px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 8px 24px rgba(0,0,0,.10);
}
.jfy-notify-box h3{
  margin:0 42px 6px 0;
  color:var(--jfy-accent);
  font-size:20px;
  font-weight:950;
  line-height:1.15;
}
.jfy-notify-product{
  margin:0 0 16px;
  color:rgba(103,3,58,.72);
  font-size:13px;
  font-weight:850;
  line-height:1.35;
}
.jfy-notify-form{
  display:grid;
  gap:12px;
}
.jfy-notify-form label{
  display:grid;
  gap:6px;
  color:rgba(103,3,58,.86);
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
}
.jfy-notify-form label span{
  font-weight:700;
  opacity:.65;
  margin-left:4px;
}
.jfy-notify-form input{
  width:100%;
  min-height:46px;
  border:1px solid rgba(103,3,58,.10);
  border-radius:14px;
  padding:12px 14px;
  background:rgba(255,255,255,.70);
  color:var(--jfy-accent);
  box-shadow:inset 3px 3px 9px rgba(0,0,0,.05), inset -3px -3px 9px rgba(255,255,255,.75);
  outline:none;
  font-size:14px;
  font-weight:750;
}
.jfy-notify-form input:focus{
  border-color:rgba(185,20,140,.38);
  box-shadow:0 0 0 4px rgba(255,91,214,.14), inset 2px 2px 7px rgba(0,0,0,.04);
}
.jfy-notify-submit{
  width:100%;
  min-height:48px;
  margin-top:4px;
  border:0;
  border-radius:16px !important;
  font-weight:950;
  cursor:pointer;
}
.jfy-notify-submit:disabled{opacity:.68;cursor:wait;}
.jfy-notify-message{
  min-height:18px;
  font-size:12px;
  font-weight:850;
  line-height:1.35;
}
.jfy-notify-message.is-success{color:#067a46;}
.jfy-notify-message.is-error{color:#b00020;}

@media (max-width: 480px){
  .jfy-notify-box{padding:20px 16px;border-radius:20px;}
  .jfy-notify-box h3{font-size:18px;}
}


/* v0.2.1 module safety */
body:not(.jfy-card-system-enabled) .jfy-card-title,
body:not(.jfy-card-system-enabled) .jfy-card-price,
body:not(.jfy-card-system-enabled) .jfy-card-actions,
body:not(.jfy-card-system-enabled) .jfy-preview-dot,
body:not(.jfy-card-system-enabled) .jfy-oos-badge{display:none!important;}

@media (max-width: 767px){
  body.jfy-card-mobile-one.woocommerce ul.products,
  body.jfy-card-mobile-one .woocommerce ul.products{
    grid-template-columns: 1fr !important;
  }
  body.jfy-card-mobile-one.woocommerce ul.products li.product,
  body.jfy-card-mobile-one .woocommerce ul.products li.product{
    width: 100% !important;
    max-width: 390px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* =========================================================
   Jigsawfy Piece Filters v0.4.0
   Normal WooCommerce shop filtering with the current neomorphic
   puzzle-piece feeling from the UAE gallery filter.
   ========================================================= */
.jfy-piece-filter-scope{
  --jfy-piece-scale:.55;
  --jfy-piece-size:210px;
  --jfy-piece-svg:190px;
  --jfy-piece-num:64px;
  --jfy-piece-label:16px;
  --jfy-piece-gap:10px;
  position:relative;
  z-index:200;
  margin:4px 0 14px;
}
.jfy-piece-filter-scope *{box-sizing:border-box;}
.jfy-piece-filter-shell{position:relative;width:100%;}
.jfy-piece-filter-spacer{height:0;}
.jfy-piece-filter-bar{
  position:sticky;
  top:0;
  z-index:200;
  width:100%;
  isolation:isolate;
  border-radius:0 0 22px 22px;
}
.jfy-piece-filter-bar::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  opacity:.72;
  border-bottom:1px solid rgba(255,255,255,.20);
  box-shadow:0 14px 36px rgba(0,0,0,.12);
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255,160,220,.22), rgba(255,160,220,0) 55%),
    radial-gradient(120% 140% at 80% 0%, rgba(180,120,255,.20), rgba(180,120,255,0) 60%),
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.07));
  backdrop-filter:blur(14px) saturate(140%);
  -webkit-backdrop-filter:blur(14px) saturate(140%);
}
.jfy-piece-filter-track{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:var(--jfy-piece-gap);
  padding:6px 12px 8px;
  margin:0 auto;
  max-width:100%;
}
.jfy-piece-badge{
  flex:0 0 auto;
  width:calc(var(--jfy-piece-size) * var(--jfy-piece-scale));
  height:calc(var(--jfy-piece-size) * var(--jfy-piece-scale));
  position:relative;
  display:grid;
  place-items:center;
  text-decoration:none !important;
  color:inherit;
  -webkit-tap-highlight-color:transparent;
  transition:filter .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1);
}
.jfy-piece-shape,
.jfy-piece-shape svg{
  display:block;
  width:calc(var(--jfy-piece-svg) * var(--jfy-piece-scale));
  height:auto;
}
.jfy-piece-shape svg{
  filter:drop-shadow(9px 9px 10px rgba(0,0,0,.10)) drop-shadow(-9px -9px 10px rgba(255,255,255,.98));
  transition:filter .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1), opacity .25s ease;
}
.jfy-piece-shape path{
  fill:#fff;
  stroke:rgba(255,255,255,.08);
  stroke-width:.4;
}
.jfy-piece-text{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
  pointer-events:none;
}
.jfy-piece-text strong{
  color:#fff;
  font-weight:850;
  font-size:calc(var(--jfy-piece-num) * var(--jfy-piece-scale));
  letter-spacing:.01em;
  text-shadow:
    2px 2px 15px rgba(50,50,130,.20),
    -1px -1px 4px rgba(205,100,255,.55),
    2px 2px 12px rgba(50,100,50,.15),
    -1px -1px 12px rgba(255,255,255,.55);
}
.jfy-piece-text small{
  margin-top:calc(10px * var(--jfy-piece-scale));
  color:rgba(200,200,230,.9);
  font-weight:800;
  font-size:calc(var(--jfy-piece-label) * var(--jfy-piece-scale));
  letter-spacing:.22em;
  text-transform:uppercase;
}
.jfy-piece-badge:hover,
.jfy-piece-badge.is-active{
  filter:drop-shadow(0 2px 2px rgba(255,255,255,.16)) drop-shadow(0 -8px 10px rgba(0,0,0,.1));
}
.jfy-piece-badge:hover .jfy-piece-shape svg,
.jfy-piece-badge.is-active .jfy-piece-shape svg{
  transform:translateY(2px) scale(.99);
  filter:drop-shadow(0 8px 16px var(--jfy-piece-glow, rgba(180,100,255,.45))) drop-shadow(0 -5px 10px rgba(255,255,255,.82));
}
.jfy-piece-badge:hover .jfy-piece-text strong,
.jfy-piece-badge:hover .jfy-piece-text small,
.jfy-piece-badge.is-active .jfy-piece-text strong,
.jfy-piece-badge.is-active .jfy-piece-text small{
  color:#fff;
  text-shadow:2px 2px 4px var(--jfy-piece-glow, rgba(255,255,255,.6)), -1px -1px 6px rgba(50,0,0,.1);
}
.jfy-piece-reset{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 22px;
  border-radius:16px;
  background:#fefefe;
  color:rgba(185,20,140,.44) !important;
  text-decoration:none !important;
  font-size:13px;
  font-weight:850;
  letter-spacing:.04em;
  box-shadow:8px 8px 20px rgba(0,0,0,.10), -8px -8px 20px rgba(255,255,255,.95), inset 8px 8px 20px rgba(0,0,0,.06), inset -8px -8px 20px rgba(255,255,255,.85);
  transition:color .2s ease, box-shadow .24s ease, transform .2s ease;
}
.jfy-piece-reset:hover,
.jfy-piece-reset.is-active{
  color:rgba(185,20,140,.86) !important;
  transform:translateY(-1px);
  box-shadow:12px 12px 30px rgba(0,0,0,.12), -12px -12px 30px rgba(255,255,255,1), inset 1px 1px 4px rgba(0,0,0,.05), inset -1px -1px 4px rgba(255,255,255,.9);
}
@media (max-width:1024px){
  .jfy-piece-filter-scope{--jfy-piece-scale:.44;--jfy-piece-gap:8px;}
  .jfy-piece-filter-shell{
    position:relative;
    left:50%;
    right:50%;
    margin-left:-50vw;
    margin-right:-50vw;
    width:100vw;
  }
  .jfy-piece-filter-track{
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    padding:6px 12px 8px;
  }
  .jfy-piece-filter-track::-webkit-scrollbar{display:none;}
  .jfy-piece-badge,.jfy-piece-reset{scroll-snap-align:center;}
  .jfy-piece-reset{min-height:40px;padding:10px 16px;font-size:12px;}
}
@media (prefers-reduced-motion:reduce){
  .jfy-piece-badge,.jfy-piece-shape svg,.jfy-piece-reset,.jfy-piece-filter-bar::before{transition:none !important;}
}

/* =========================================================
   Jigsawfy Piece Filters v0.4.0 refinements
   - All Puzzles appears only when a filter is active (PHP)
   - All Puzzles uses the earlier neumorphic button language
   - AJAX shop refresh gets a soft gallery-like transition
   ========================================================= */
.jfy-piece-filter-track .jfy-piece-reset{
  order:99;
  flex:0 0 auto;
  margin:2px auto 0;
  padding:14px 34px !important;
  border-radius:16px !important;
  background:#fefefe !important;
  color:rgba(185,20,140,.25) !important;
  font-size:14px;
  font-weight:500;
  letter-spacing:.4px;
  text-transform:uppercase;
  box-shadow:
    8px 8px 20px rgba(0,0,0,.10),
   -8px -8px 20px rgba(255,255,255,.95),
    inset 8px 8px 20px rgba(0,0,0,.06),
    inset -8px -8px 20px rgba(255,255,255,.85) !important;
  transition:box-shadow .25s ease, transform .2s ease, color .2s ease, opacity .18s ease;
}
.jfy-piece-filter-track .jfy-piece-reset:hover{
  color:rgba(185,20,140,.85) !important;
  transform:translateY(-1px);
  box-shadow:
    12px 12px 30px rgba(0,0,0,.12),
   -12px -12px 30px rgba(255,255,255,1),
    inset 1px 1px 4px rgba(0,0,0,.05),
    inset -1px -1px 4px rgba(255,255,255,.9) !important;
}
.jfy-piece-filter-scope.is-loading .jfy-piece-badge,
.jfy-piece-filter-scope.is-loading .jfy-piece-reset{
  pointer-events:none;
  opacity:.72;
}
.woocommerce ul.products.jfy-filter-transition-out{
  opacity:0;
  transform:translateY(10px) scale(.985);
  filter:blur(4px);
}
.woocommerce ul.products.jfy-filter-transition-in{
  animation:jfyProductsIn .34s cubic-bezier(.16,1,.3,1) both;
}
@keyframes jfyProductsIn{
  from{opacity:0; transform:translateY(14px) scale(.985); filter:blur(5px);}
  to{opacity:1; transform:translateY(0) scale(1); filter:blur(0);}
}
.woocommerce ul.products{
  transition:opacity .2s ease, transform .24s cubic-bezier(.16,1,.3,1), filter .2s ease;
}
@media (max-width:1024px){
  .jfy-piece-filter-track .jfy-piece-reset{
    order:99;
    min-height:42px;
    padding:11px 22px !important;
    font-size:12px;
  }
}
@media (prefers-reduced-motion:reduce){
  .woocommerce ul.products,
  .woocommerce ul.products.jfy-filter-transition-in,
  .woocommerce ul.products.jfy-filter-transition-out{
    transition:none !important;
    animation:none !important;
    transform:none !important;
    filter:none !important;
  }
}

/* =========================================================
   Jigsawfy Piece Filters v0.4.0 refinements
   - All Puzzles lives in its own smooth center row
   - Filter badges never reflow when reset appears
   - Product filtering uses individual card FLIP transitions
   ========================================================= */
.jfy-piece-filter-track .jfy-piece-reset{
  display:none !important;
}
.jfy-piece-reset-row{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  overflow:hidden;
  max-height:0;
  opacity:0;
  transform:translateY(-8px);
  pointer-events:none;
  padding:0 12px;
  transition:max-height .34s cubic-bezier(.16,1,.3,1), opacity .22s ease, transform .28s cubic-bezier(.16,1,.3,1), padding .28s ease;
}
.jfy-piece-reset-row.is-active{
  max-height:76px;
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
  padding:6px 12px 12px;
}
.jfy-piece-reset-row .jfy-piece-reset{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:14px 34px !important;
  border-radius:16px !important;
  background:#fefefe !important;
  color:rgba(185,20,140,.25) !important;
  text-decoration:none !important;
  font-size:14px;
  font-weight:500;
  letter-spacing:.4px;
  text-transform:uppercase;
  box-shadow:
    8px 8px 20px rgba(0,0,0,.10),
   -8px -8px 20px rgba(255,255,255,.95),
    inset 8px 8px 20px rgba(0,0,0,.06),
    inset -8px -8px 20px rgba(255,255,255,.85) !important;
  transition:box-shadow .25s ease, transform .2s ease, color .2s ease, opacity .18s ease;
}
.jfy-piece-reset-row .jfy-piece-reset:hover{
  color:rgba(185,20,140,.85) !important;
  transform:translateY(-1px);
  box-shadow:
    12px 12px 30px rgba(0,0,0,.12),
   -12px -12px 30px rgba(255,255,255,1),
    inset 1px 1px 4px rgba(0,0,0,.05),
    inset -1px -1px 4px rgba(255,255,255,.9) !important;
}
.jfy-piece-filter-scope.is-loading .jfy-piece-reset-row .jfy-piece-reset{
  pointer-events:none;
  opacity:.72;
}

.woocommerce ul.products.jfy-filter-transition-out{
  opacity:1 !important;
  transform:none !important;
  filter:none !important;
}
.woocommerce ul.products.jfy-filter-transition-in{
  animation:none !important;
}
.woocommerce ul.products.jfy-flip-running{
  position:relative;
}
.woocommerce ul.products li.product.jfy-flip-new,
.woocommerce ul.products .wc-block-grid__product.jfy-flip-new{
  animation:jfyCardFilterIn .48s cubic-bezier(.16,1,.3,1) both;
  animation-delay:var(--jfy-flip-delay,0ms);
}
@keyframes jfyCardFilterIn{
  from{opacity:0; transform:translateY(22px) scale(.965); filter:blur(3px);}
  to{opacity:1; transform:translateY(0) scale(1); filter:blur(0);}
}
.jfy-filter-ghost-layer{
  position:fixed;
  inset:0;
  z-index:999998;
  pointer-events:none;
  contain:layout style paint;
}
.jfy-filter-ghost{
  position:fixed !important;
  margin:0 !important;
  list-style:none !important;
  pointer-events:none !important;
  transform-origin:center center;
  animation:jfyCardGhostOut .34s cubic-bezier(.16,1,.3,1) both;
  animation-delay:var(--jfy-ghost-delay,0ms);
}
@keyframes jfyCardGhostOut{
  from{opacity:1; transform:translateY(0) scale(1); filter:blur(0);}
  to{opacity:0; transform:translateY(-10px) scale(.94); filter:blur(4px);}
}
@media (max-width:1024px){
  .jfy-piece-reset-row.is-active{max-height:68px;padding:4px 12px 10px;}
  .jfy-piece-reset-row .jfy-piece-reset{min-height:42px;padding:11px 22px !important;font-size:12px;}
}
@media (prefers-reduced-motion:reduce){
  .jfy-piece-reset-row,
  .woocommerce ul.products li.product.jfy-flip-new,
  .woocommerce ul.products .wc-block-grid__product.jfy-flip-new,
  .jfy-filter-ghost{transition:none !important;animation:none !important;transform:none !important;filter:none !important;}
}


/* =========================================================
   Jigsawfy Piece Filters v0.4.0 performance/sticky corrections
   - normal state stays clean white
   - fixed state uses old transparent glass strip behavior
   - supports instant visible-card rearrange before AJAX completes
   ========================================================= */
.jfy-piece-filter-scope{
  margin:4px 0 14px !important;
  background:#fff !important;
}
.jfy-piece-filter-bar{
  position:relative !important;
  top:auto !important;
  border-radius:0 !important;
  min-height:0;
}
.jfy-piece-filter-bar::before{
  opacity:0 !important;
  transition:opacity .22s ease !important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"]{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  top:var(--jfy-piece-top-offset, 0px) !important;
  width:100vw !important;
  z-index:999999 !important;
  border-radius:0 !important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"]::before{
  opacity:1 !important;
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255,160,220,.26), rgba(255,160,220,0) 55%),
    radial-gradient(120% 140% at 80% 0%, rgba(180,120,255,.24), rgba(180,120,255,0) 60%),
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06)) !important;
  border-bottom:1px solid rgba(255,255,255,.18) !important;
  box-shadow:0 14px 36px rgba(0,0,0,.18) !important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-shape path{
  fill:rgba(255,255,255,.20) !important;
  stroke:rgba(255,255,255,.28) !important;
  stroke-width:.8 !important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-shape svg{
  opacity:.98;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.14)) drop-shadow(0 -6px 14px rgba(255,255,255,.10)) !important;
}
.jfy-piece-filter-track{
  background:#fff !important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-filter-track{
  background:transparent !important;
}
.woocommerce ul.products li.product.jfy-piece-hidden,
.woocommerce ul.products .wc-block-grid__product.jfy-piece-hidden{
  display:none !important;
}
.woocommerce ul.products li.product.jfy-filter-local-out,
.woocommerce ul.products .wc-block-grid__product.jfy-filter-local-out{
  animation:jfyCardLocalOut .22s cubic-bezier(.16,1,.3,1) both;
}
@keyframes jfyCardLocalOut{
  from{opacity:1; transform:translateY(0) scale(1); filter:blur(0);}
  to{opacity:0; transform:translateY(-8px) scale(.96); filter:blur(3px);}
}


/* =========================================================
   Jigsawfy Piece Filters v0.4.0 solid checkpoint
   - All Puzzles never appears in fixed/sticky bar
   - normal filter strip stays clean white
   - filtering is more immediate and less layout-heavy
   ========================================================= */
.jfy-piece-filter-scope{
  background:#fff !important;
  contain:layout style;
}
.jfy-piece-filter-bar:not([data-jfy-fixed="true"])::before{
  opacity:0 !important;
  box-shadow:none !important;
  border-bottom:0 !important;
}
.jfy-piece-filter-bar:not([data-jfy-fixed="true"]) .jfy-piece-filter-track{
  background:#fff !important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-reset-row,
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-reset-row.is-active{
  display:none !important;
  max-height:0 !important;
  opacity:0 !important;
  padding:0 !important;
  margin:0 !important;
  pointer-events:none !important;
  transform:translateY(-8px) !important;
}
.woocommerce ul.products{
  contain:layout style;
}
.woocommerce ul.products li.product,
.woocommerce ul.products .wc-block-grid__product{
  will-change:transform, opacity;
}
.woocommerce ul.products.jfy-flip-running li.product,
.woocommerce ul.products.jfy-flip-running .wc-block-grid__product{
  backface-visibility:hidden;
  transform-origin:center center;
}
.jfy-filter-ghost .jfy-tile-actions,
.jfy-filter-ghost .jfy-preview-dot{
  display:none !important;
}

/* v1.0.14 performance pass: keep shadows/aesthetic, reduce large-area blur costs. */
.jfy-notify-backdrop{
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.jfy-piece-filter-bar::before{
  backdrop-filter:blur(8px) saturate(125%)!important;
  -webkit-backdrop-filter:blur(8px) saturate(125%)!important;
}

/* =========================================================
   Jigsawfy Piece Filters v1.0.14
   UAE/Isotope-like correction: fixed sticky, clean normal state,
   position-only rearrange. No blur/zoom grid effects.
   ========================================================= */
.jfy-piece-filter-scope{
  position:relative;
  z-index:9998;
  margin:0 0 18px;
}
.jfy-piece-filter-shell{position:relative;width:100%;}
.jfy-piece-filter-spacer{height:0;}
.jfy-piece-filter-bar{
  position:relative!important;
  width:100%;
  z-index:9998;
  isolation:isolate;
  border-radius:0!important;
  background:#fff!important;
}
.jfy-piece-filter-bar::before{
  opacity:0!important;
  box-shadow:none!important;
  border:0!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"]{
  position:fixed!important;
  left:0!important;
  right:0!important;
  top:var(--jfy-piece-top-offset, 0px)!important;
  z-index:999999!important;
  background:rgba(255,255,255,.12)!important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"]::before{
  opacity:1!important;
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:-1;
  border-bottom:1px solid rgba(255,255,255,.18)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.16)!important;
  background:
    radial-gradient(120% 140% at 20% 10%, rgba(255,160,220,.25), rgba(255,160,220,0) 55%),
    radial-gradient(120% 140% at 80% 0%, rgba(180,120,255,.22), rgba(180,120,255,0) 60%),
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.06))!important;
  backdrop-filter:blur(14px) saturate(140%)!important;
  -webkit-backdrop-filter:blur(14px) saturate(140%)!important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-shape path{
  fill:rgba(255,255,255,.20)!important;
  stroke:rgba(255,255,255,.28)!important;
  stroke-width:.8!important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-shape svg{
  opacity:.98;
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.14)) drop-shadow(0 -6px 14px rgba(255,255,255,.10))!important;
}
.jfy-piece-filter-bar[data-jfy-fixed="true"] + .jfy-piece-reset-row,
.jfy-piece-filter-bar[data-jfy-fixed="true"] .jfy-piece-reset{
  display:none!important;
}
.jfy-piece-filter-track{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:var(--jfy-piece-gap,10px);
  padding:4px 12px 6px;
  margin:0 auto;
  max-width:100%;
  list-style:none;
}
.woocommerce ul.products.jfy-filter-transition-out,
.woocommerce ul.products.jfy-filter-transition-in,
.woocommerce ul.products{
  opacity:1!important;
  transform:none!important;
  filter:none!important;
  transition:none!important;
  animation:none!important;
}
.woocommerce ul.products li.product.jfy-piece-hidden,
ul.products li.product.jfy-piece-hidden,
.wc-block-grid__product.jfy-piece-hidden{
  display:none!important;
}
.woocommerce ul.products li.product,
ul.products li.product,
.wc-block-grid__product{
  will-change:transform;
}
.jfy-filter-ghost-layer,
.jfy-filter-ghost{
  display:none!important;
}
.jfy-piece-filter-scope.is-loading .jfy-piece-badge,
.jfy-piece-filter-scope.is-loading .jfy-piece-reset{
  opacity:1!important;
  pointer-events:auto!important;
}
@media (max-width:1024px){
  .jfy-piece-filter-shell{
    position:relative;
    left:50%;
    right:50%;
    margin-left:-50vw;
    margin-right:-50vw;
    width:100vw;
  }
  .jfy-piece-filter-bar[data-jfy-fixed="true"]{width:100vw!important;}
  .jfy-piece-filter-track{
    flex-wrap:nowrap;
    justify-content:flex-start;
    overflow-x:auto;
    overflow-y:hidden;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-x;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
  }
  .jfy-piece-filter-track::-webkit-scrollbar{display:none;}
  .jfy-piece-badge{scroll-snap-align:center;}
}
