/* =====================================================================
   שדה פרחים – תנועה ותחושה (לפי העקרונות של Emil Kowalski)
   סניפט WPCode מסוג CSS · מיקום: Site Wide Header · עדיפות: 99 (שייטען אחרון)
   הסניפט רק דורס ערכים קיימים. אין צורך לשנות אף סניפט אחר.
   הקידומת html:root מעלה את הספציפיות כדי שהכללים כאן יגברו על הקיימים.
   ===================================================================== */

:root{
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* תזוזה, הגדלה, כניסה ויציאה */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* תזוזה על המסך */
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);   /* מגירות ובאנרים שעולים מלמטה */
}

/* 1. עקומה אחידה לכל המעברים הקיימים. המשכים נשארו כמו שהם. transform מקבל --ease-out, וצבעים נשארים ease. */
html:root body .cart_item a.remove{ transition: transform 120ms var(--ease-out), background-color 150ms ease; }
html:root body .cart_item.sf-row-removing{ transition: opacity 250ms var(--ease-out); }

html:root body button.single_add_to_cart_button.button.alt,
html:root body a.single_add_to_cart_button.button.alt,
html:root body .single_add_to_cart_button.button{
  transition: background-color 200ms ease, transform 160ms var(--ease-out) !important;
}
html:root body form.checkout.woocommerce-checkout button#place_order,
html:root body .elementor-element-63a2c244 a.elementor-button{
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out) !important;
}
html:root body #sf-atc-popup .sf-atc-btn.sf-atc-checkout{
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out), box-shadow 200ms ease;
}
html:root body .variations.custom .variation{
  transition: transform 160ms var(--ease-out), box-shadow 200ms ease, border-color 200ms ease;
}
html:root body .sf-trust.sf-trust--strip.sf-trust--links a.sf-trust-item{
  transition: background 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease;
}
html:root body .sf-trust:not(.sf-trust--strip) .sf-trust-item{
  transition: background 200ms ease, transform 200ms var(--ease-out);
}
html:root body .woocommerce-tabs ul.tabs.sf-tabs-2026 li{
  transition: background 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease;
}
html.sf-cartsim:root .elementor-element-7230714 .elementor-element-36905643 > .elementor-widget-wrap{
  transition: box-shadow 250ms ease, transform 250ms var(--ease-out);
}
html:root body .sade-surprise-trigger{ transition: background 200ms ease, transform 150ms var(--ease-out); }
html:root body .sf-readmore{ transition: max-height 300ms var(--ease-out); }

@media (min-width: 1025px){
  html:root body ul.products li.product{ transition: box-shadow 250ms ease, transform 250ms var(--ease-out); }
  html:root body ul.products li.product .product_image_wrapper img{ transition: transform 400ms var(--ease-out); }
  html:root #mega-menu-wrap-menu-1 #mega-menu-menu-1 > li.mega-menu-item > a.mega-menu-link .mega-menu-title{
    transition: background-size 250ms var(--ease-out) !important;
  }
}
@media (max-width: 767px){
  html:root body .sf-up-dots button,
  html:root body .sf-cross-dots button{ transition: background 200ms ease, width 200ms var(--ease-out); }
  html:root body #sf-toolbar .sf-tb-item{ transition: transform 150ms var(--ease-out); }
}
@media screen and (max-width: 768px){
  html:root #mega-menu-wrap-menu-1 #mega-menu-menu-1 li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator::after{
    transition: transform 200ms var(--ease-out), border-color 200ms ease !important;
  }
}

/* 2. מיני-עגלה: נפתחת מתוך אייקון העגלה, נסגרת מהר יותר ממה שנפתחת (ה-JS הקיים רק מוסיף ומוריד את is-open) */
html.sf-newcart:root .sf-mc-drop{
  display: block;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-4px) scale(.97);
  transform-origin: 35px 0;
  transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out), visibility 0s linear 120ms;
}
html.sf-newcart:root .sf-mc.is-open .sf-mc-drop{
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
}

/* 3. תפריט המגה: ease-out במקום ease-in */
@media (min-width: 769px){
  html:root #mega-menu-wrap-menu-1 #mega-menu-menu-1 li.mega-menu-item > ul.mega-sub-menu{
    transition-duration: 180ms !important;
    transition-timing-function: var(--ease-out) !important;
  }
}

/* 4. כפתורים ברשת המוצרים: בלי 1s ובלי הגדלה של 10% במעבר עכבר */
html:root body #quick-fix .products .additional-details,
html:root body .additional-details,
html:root body ul.products li.product a.button{
  transition: color 200ms ease, opacity 200ms ease, transform 160ms var(--ease-out) !important;
}
html:root body #quick-fix .products .additional-details:hover,
html:root body .additional-details:hover,
html:root body ul.products li .button:hover,
html:root body a.button.additional-details:hover{
  transform: none !important;
}

/* 5. הודעת "נוסף לסל": נכנסת מלמעלה ולא רק בדהייה */
html:root body .claude-cart-added-toast{
  transform: translate(-50%, -8px);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
}
html:root body .claude-cart-added-toast.show{ transform: translate(-50%, 0); }

/* 6. חלונית "הפתעה": צומחת מתוך הכפתור (היא נפתחת מעליו) */
@keyframes sfSurpriseIn{
  from{ opacity: 0; transform: translateY(4px) scale(.97); }
  to  { opacity: 1; transform: none; }
}
html:root body .sade-surprise-content{
  transform-origin: bottom right;
  animation: sfSurpriseIn 180ms var(--ease-out);
}

/* 7. חלון "המוצר נוסף לסל": נכנס בדהייה ובהגדלה קלה (דפדפנים ישנים: מופיע כמו היום) */
html:root body #sf-atc-popup .sf-atc-backdrop{ transition: opacity 200ms ease; }
html:root body #sf-atc-popup .sf-atc-box{ transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style{
  html:root body #sf-atc-popup .sf-atc-backdrop{ opacity: 0; }
  html:root body #sf-atc-popup .sf-atc-box{ opacity: 0; transform: scale(.96); }
}

/* 8. כפתור הבאנר הראשי: הוספת מעבר ל-transform (היום ההרמה קופצת) */
html:root body #sadeSlider .sf-hero-cta{
  transition: background 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}

/* 9. באנר העוגיות (CookieYes): 350ms בעקומת מגירה במקום שנייה שלמה */
html:root body .cky-modal,
html:root body .cky-modal.cky-modal-open{
  transition-duration: 350ms;
  transition-timing-function: var(--ease-drawer);
}

/* 10. מסכי מגע: בלי אפקט "הרמה" שנתקע אחרי נגיעה */
@media (hover: none), (pointer: coarse){
  html:root body ul.products li.product:hover,
  html:root body ul.products li.product:hover .product_image_wrapper img,
  html:root body .variations.custom .variation:hover,
  html:root body .woocommerce-tabs ul.tabs.sf-tabs-2026 li:hover,
  html:root body .sf-trust.sf-trust--strip.sf-trust--links a.sf-trust-item:hover,
  html:root body .sf-trust:not(.sf-trust--strip) .sf-trust-item:hover,
  html.sf-cartsim:root .elementor-element-7230714 .elementor-element-36905643 > .elementor-widget-wrap:hover,
  html:root body .single_add_to_cart_button:hover,
  html:root body form.checkout button#place_order:hover,
  html:root body .elementor-element-63a2c244 a.elementor-button:hover,
  html:root body #sf-atc-popup .sf-atc-btn:hover{
    transform: none !important;
  }
  html:root body #sadeSlider .sf-hero-cta:hover{ transform: translate(-50%, -50%); }
}

/* 11. משוב לחיצה: הכפתור "שוקע" פנימה ברגע הלחיצה (בא אחרי סעיף 10 כדי לגבור עליו) */
html:root body .single_add_to_cart_button.button:active{ transform: scale(.98) !important; }
html:root body form.checkout.woocommerce-checkout button#place_order:active{ transform: scale(.98) !important; }
html:root body .elementor-element-63a2c244 a.elementor-button:active{ transform: scale(.98) !important; }
html:root body #sf-atc-popup .sf-atc-btn.sf-atc-checkout:active{ transform: scale(.98) !important; }
html:root body #quick-fix .products .additional-details:active,
html:root body .additional-details:active,
html:root body ul.products li .button:active{ transform: scale(.97) !important; }
html:root body .cart_item a.remove:active{ transform: scale(.9); }

html:root body #sadeSlider .sf-hero-cta:active{ transform: translate(-50%, -50%) scale(.97); }
@media (min-width: 1025px){
  html.sf-bigban:root body #sadeSlider .sf-hero-cta:active{ transform: translateX(-50%) scale(.97) !important; }
}
@media (max-width: 767px){
  html.sf-mobban:root body #sadeSlider .sf-hero-cta:active{ transform: translateX(-50%) scale(.97) !important; }
  html:root body #sf-toolbar .sf-tb-item:active{ transform: scale(.95); }
}

/* 12. הפחתת תנועה: משאירים דהייה וצבע, מבטלים תזוזה והגדלה */
@keyframes sfFadeIn{ from{ opacity: 0; } to{ opacity: 1; } }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto !important; }
  html:root body ul.products li.product:hover,
  html:root body ul.products li.product:hover .product_image_wrapper img,
  html:root body .variations.custom .variation:hover,
  html:root body .woocommerce-tabs ul.tabs.sf-tabs-2026 li:hover,
  html:root body .sf-trust.sf-trust--strip.sf-trust--links a.sf-trust-item:hover,
  html:root body .sf-trust:not(.sf-trust--strip) .sf-trust-item:hover,
  html.sf-cartsim:root .elementor-element-7230714 .elementor-element-36905643 > .elementor-widget-wrap:hover,
  html:root body .single_add_to_cart_button:hover,
  html:root body form.checkout button#place_order:hover,
  html:root body .elementor-element-63a2c244 a.elementor-button:hover,
  html:root body #sf-atc-popup .sf-atc-btn:hover,
  html.sf-newcart:root .sf-mc-drop{
    transform: none !important;
  }
  html:root body .claude-cart-added-toast,
  html:root body .claude-cart-added-toast.show{ transform: translateX(-50%) !important; }
  html:root body .sade-surprise-content{ animation-name: sfFadeIn !important; }
  html:root body #sf-atc-popup .sf-atc-box{ transition: opacity 200ms ease !important; }
}

/* 13. מסכי מגע: גם כפתור המועדון ואייקון הפרח לא נשארים "מורמים" אחרי נגיעה */
@media (hover: none), (pointer: coarse){
  html:root body #sfcb2 .cta:hover,
  html:root body #sfpf:hover{ transform: none; }
}

/* 14. אייקון הפרח של המועדון: מתנדנד 3 פעמים ונעצר, במקום בלי הפסקה (המצמוץ נשאר) */
html:root body #sfpf .hg{ animation-iteration-count: 3; }

/* 15. טאבים בדף מוצר: התוכן החדש נכנס בדהייה קצרה במקום להופיע בבת אחת */
@keyframes sfTabIn{
  from{ opacity: 0; transform: translateY(4px); }
  to  { opacity: 1; transform: none; }
}
html:root body .woocommerce-tabs .woocommerce-Tabs-panel{
  animation: sfTabIn 180ms var(--ease-out);
}
@media (prefers-reduced-motion: reduce){
  html:root body .woocommerce-tabs .woocommerce-Tabs-panel{ animation-name: sfFadeIn; }
}

/* 16. כפתור "קנה עכשיו" בכרטיסי דף הבית: כלל ישן (#quick-fix ... top:-100px) הרים אותו על התיאור והמחיר.
   מחזירים אותו למקומו – מתחת למחיר ול"הפתעה הכנסו". במובייל המיקום לא משתנה. */
html body #quick-fix ul.products li.product a.button.additional-details{ top: 0 !important; }
