/* ===== Parfois Add Charm — Stable placement (no flex break) ===== */

/* העוגן: ה-wrapper הראשי של הגלריה */
.single-slider-wrapper {
  position: relative; /* העוגן של ה-absolute */
}

/* הכפתור: לא ילד של ה-new-pdp-single-slider-wrap! */
.parfois-add-charm-btn-wrap-container {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10010;
  pointer-events: auto;
  display: block;
  /* אין flex / order כאן, כי האלמנט לא בתוך ה-wrap של slick */
}

.parfois-add-charm-btn {
  background:#fff!important; color:#000!important; border:0;
  padding:10px 18px; border-radius:4px;
  font-weight:600; font-size:14px; cursor:pointer;
  transition:background .2s;
}
.parfois-add-charm-btn:hover {  background:#000!important; color:#fff!important; }

/* אל תיגעו ב-new-pdp-single-slider-wrap ובילדים שלו יותר.
   מחקנו כללים כמו:
   .new-pdp-single-slider-wrap > *:not(.parfois-add-charm-btn-wrap-container) { ... }
   כדי לא להתערב ל-slick. */

/* ==============================
   PARFOIS — CHARM DRAWER DESIGN
   ============================== */

/* מבנה כללי של הפופאפ */
/* מבנה כללי של הפופאפ */
/* ===== תיקון גלילה ורוחב מלא של הפופאפ ===== */

/* ===== תיקון גלילה ורוחב מלא של הפופאפ ===== */

/* וידוא שהפופאפ באמת מתלבש על כל המסך */
/* ===== בסיס ===== */
/* ===== עיצוב פופאפ צ'ארם מתוקן ===== */

/* ===== Parfois Add Charm - דמוי הגלובלי ===== */

/* ===== Parfois Add Charm — גרסה בול לגלובלי ===== */

/*html, body {*/
/*  height: 100%;*/
/*  overflow-x: hidden !important;*/
/*  margin: 0;*/
/*  padding: 0;*/
/*}*/

#charmPopup {
  position: fixed;
  top: 0;
  right: 0;
  width: 560px; /* יותר רחב — כמו באתר Parfois */
  max-width: 94vw;
  height: 100vh;
  background: #fff!important; 
  box-shadow: -6px 0 20px rgba(0,0,0,0.25);
  z-index: 999999;
  transform: translateX(100%);
  transition: transform 0.35s ease-in-out;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: visible;
}

#charmPopup.active { transform: translateX(0); }

#charmOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99990;
}
#charmOverlay.active { display: block; }

body.charm-overlay-open { overflow: hidden !important; }

/* ===== תוכן ===== */
.charm-popup-content {
  flex: 1;
  /* padding: 36px 8px 40px; /* כמעט בלי padding בצדדים */ */
  overflow-y: auto;
  box-sizing: border-box;
  direction: rtl;
  padding-top: 50px;
  position: relative;
   overflow-y: auto !important;
  -webkit-overflow-scrolling: touch; /* גלילה חלקה במובייל */
}

body.charm-overlay-open #charmPopup {
  overflow: visible !important; /* שחרור חסימה של הפופאפ בזמן פתיחה */
}

.charm-popup-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px;
  text-align: right;
}

/* ===== גריד ===== */
.charm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px; /* כמעט בלי רווח */
  width: 100%;
  align-items: start;
  justify-items: center;
}

/* ===== פריט ===== */
.charm-item {
  text-align: right;
  background: #fff;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  width: 100%;
}

.charm-item:hover {
  transform: translateY(-2px);
}

/* ===== תמונה ===== */
.charm-image {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #fff;
}

.charm-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* כדי שהתמונה תתפוס את כל הכרטיס כמו בגלובלי */
  display: block;
}

/* ===== כפתור הפלוס ===== */
.quick-add-charm {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 0px solid #fff;
  background: #fff;
  color: #000;
  font-size: 22px;
  line-height: 23px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  z-index: 3;
}

.quick-add-charm:hover {
  background: #000;
  color: #fff;
}

/* ===== טקסט ===== */
.charm-title {
  font-size: 15px;
  font-weight: 500;
  color: #000;
  margin: 10px 0 2px;
  line-height: 1.3;
  text-align: right;
  white-space: normal;
}

.charm-price {
  font-size: 14px;
  color: #333;
  text-align: right;
  margin: 0;
}

/* ===== רספונסיביות ===== */
@media (max-width: 768px) {
  #charmPopup {
    width: 100%;
  }

  .charm-popup-content {
    padding: 24px 8px 32px;
  }

  .charm-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .charm-title, .charm-price {
    text-align: center;
  }
}

.charm-header {
  position: absolute;
  top: 5px;
  right: 10px;
  left: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 12px;
  z-index: 5;
}

.charm-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  text-align: right;
}

.charm-close {
  font-size: 28px;
  color: #000;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.2s ease;
}

.charm-close:hover {
  transform: scale(1.2);
}
/* === Spinner עבור מצב טעינה (שחור במקום ה-+) === */
/* ספינר שחור אמיתי */
.quick-add-charm .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #000;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.quick-add-charm.loading {
  pointer-events: none;
  
}

.quick-add-charm.loading,
.quick-add-charm.loading:hover,
.quick-add-charm:active {
  background: #fff !important;
  color: #000 !important;
  border: none !important;
  box-shadow: none !important;
}


/* תיקון ספציפי לאייפון — כפתור פלוס נשאר עגול ולא אליפסה */
@supports (-webkit-touch-callout: none) {
  .quick-add-charm {
    width: 26px !important;
    height: 26px !important;
    aspect-ratio: auto !important; /* ננטרל את ה-auto-rect שנכפה על iOS */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    -webkit-transform: translateX(-50%) translateY(0) scale(1) !important;
    transform: translateX(-50%) translateY(0) scale(1) !important;
    -webkit-font-smoothing: antialiased;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
}

/* סדר שכבות דפנסיבי */
#charmPopup { 
  background:#fff !important;
  z-index: 999999 !important;
}
#charmOverlay {
  z-index: 99990 !important;
  pointer-events: auto; /* שתוכל לסגור בלחיצה מחוץ לדרואר */
}
/* ===== התאמות מובייל ===== */
@media (max-width: 768px) {
  /* הפופאפ ימלא את כל המסך */
  #charmPopup {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    right: 0;
    left: 0;
    box-shadow: none; /* בלי צל */
  }

  /* הכותרת העליונה */
  .charm-header {
    padding: 10px 14px;
  }

  .charm-header h3 {
    font-size: 17px;
  }

  .charm-close {
    font-size: 26px;
    line-height: 1;
  }
  


  /* גריד — שתי עמודות, כמעט בלי רווח */
  .charm-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
	padding-top:20px!important;
  }

  /* כל כרטיס יתפוס יותר גובה ורוחב */
  .charm-item {
    width: 100%;
  }

  .charm-image {
    aspect-ratio: 2/3;
    height: auto;
  }

  .charm-title {
    font-size: 13px;
    margin-top: 6px;
    text-align: right;
  }

  .charm-price {
    font-size: 13px;
    text-align: right;
  }

  /* כפתור הפלוס — ננמיך קצת ונוודא שמרוכז */
  .quick-add-charm {
    bottom: 10px;
    width: 26px;
    height: 26px;
    font-size: 20px;
    line-height: 24px;
  }
}
