/* ==========================================================
   Trigger Product Discount — Frontend
   Variables come from inline style: --tpd-accent, --tpd-accent-text,
   --tpd-tint, --tpd-bar-bg, --tpd-bar-text, --tpd-brand-bg,
   --tpd-brand-text, --tpd-urgent, --tpd-success, --tpd-radius
   ========================================================== */

/* ---------- Countdown primitives ---------- */
.tpd-cd{font-variant-numeric:tabular-nums;font-weight:700}
.tpd-cd--inline{direction:ltr;unicode-bidi:isolate;letter-spacing:.3px}
.tpd-cdwrap{display:inline-flex;align-items:center;gap:6px;font-size:12px;line-height:1;white-space:nowrap}
.tpd-cdwrap svg{flex:0 0 auto;opacity:.8}
.tpd-cd--boxes{display:inline-flex;align-items:center;gap:8px}
.tpd-cd__cell{display:inline-flex;flex-direction:column;align-items:center;min-width:48px;padding:4px 6px;border-radius:6px;line-height:1}
.tpd-cd__cell b{font-size:18px;font-weight:800}
.tpd-cd__cell small{font-size:9px;font-weight:500;margin-top:3px;opacity:.8}
.tpd-cd__sep{font-size:18px;font-weight:800;line-height:1}
.tpd-cd--boxes.tpd-cd--nodays .tpd-cd__cell--d,
.tpd-cd--boxes.tpd-cd--nodays .tpd-cd__cell--d + .tpd-cd__sep{display:none}

/* ---------- Top / bottom bar ---------- */
.tpd-bar{position:relative;z-index:1001;width:100%;box-sizing:border-box;font-family:inherit}
.tpd-bar__inner{max-width:1400px;margin:0 auto;min-height:56px;box-sizing:border-box;padding:8px 20px;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.tpd-bar__text{display:flex;align-items:center;gap:10px;min-width:0;font-size:16px;font-weight:700;line-height:1.3}
.tpd-bar__icon{display:inline-flex}
.tpd-bar__icon svg{width:24px;height:24px}
.tpd-bar__dot,.tpd-bar__urgent-prefix{display:none}
.tpd-bar__cd{display:flex;align-items:center;gap:12px}
.tpd-bar__ends{font-size:14px;opacity:.85;white-space:nowrap}
.tpd-bar__actions{display:flex;align-items:center;gap:12px}
.tpd-bar__cta{display:inline-flex;align-items:center;height:38px;padding:0 18px;border-radius:var(--tpd-radius);font-size:14px;font-weight:700;text-decoration:none!important;white-space:nowrap;transition:opacity .15s}
.tpd-bar__cta:hover{opacity:.88}
/* reset: الثيم (WoodMart) بيعطي كل <button> خلفية/padding/min-height — منلغيها هون */
.tpd-bar .tpd-bar__close,.tpd-bar .tpd-bar__close:hover,.tpd-bar .tpd-bar__close:focus{width:36px!important;height:36px!important;min-width:0!important;min-height:0!important;display:inline-flex!important;align-items:center;justify-content:center;background:transparent!important;border:0!important;box-shadow:none!important;cursor:pointer;padding:0!important;margin:0!important;color:inherit!important;opacity:.75;border-radius:50%!important;line-height:1!important;font-size:0!important;text-transform:none!important;outline:0}
.tpd-bar .tpd-bar__close:hover{opacity:1;background:rgba(127,127,127,.18)!important}
.tpd-bar .tpd-bar__close svg{display:block!important;width:18px!important;height:18px!important;stroke:currentColor;fill:none;pointer-events:none}
.tpd-bar--bottom{position:fixed;left:0;right:0;bottom:0;box-shadow:0 -4px 18px rgba(0,0,0,.12)}
body.tpd-has-bar.tpd-bar-pos-bottom{padding-bottom:64px}

/* style: dark */
.tpd-bar--dark{background:var(--tpd-bar-bg);color:var(--tpd-bar-text)}
.tpd-bar--dark .tpd-bar__icon{color:var(--tpd-accent)}
.tpd-bar--dark .tpd-cd__cell{background:rgba(255,255,255,.1)}
.tpd-bar--dark .tpd-cd__sep{color:var(--tpd-accent)}
.tpd-bar--dark .tpd-bar__cta{background:var(--tpd-accent);color:var(--tpd-accent-text)}

/* style: brand */
.tpd-bar--brand{background:var(--tpd-brand-bg);color:var(--tpd-brand-text)}
.tpd-bar--brand .tpd-bar__inner{justify-content:center}
.tpd-bar--brand .tpd-bar__icon{display:none}
.tpd-bar--brand .tpd-cd__cell{min-width:auto;padding:0 2px;background:transparent}
.tpd-bar--brand .tpd-cd__cell b{font-size:22px}
.tpd-bar--brand .tpd-cd__cell small{font-size:10px}
.tpd-bar--brand .tpd-cd__sep{display:none}
.tpd-bar--brand .tpd-cd--boxes{gap:10px}
.tpd-bar--brand .tpd-bar__cta{background:var(--tpd-brand-text);color:var(--tpd-brand-bg);border-radius:999px}
.tpd-bar--brand .tpd-bar__close{position:absolute;inset-inline-end:14px;top:50%;transform:translateY(-50%)}

/* style: light */
.tpd-bar--light{background:#fff;color:#1F1B16;border-bottom:1px solid #E6E1DA}
.tpd-bar--light.tpd-bar--bottom{border-bottom:0;border-top:1px solid #E6E1DA}
.tpd-bar--light .tpd-bar__icon{display:none}
.tpd-bar--light .tpd-bar__text::before{content:"";display:none}
.tpd-bar--light .tpd-bar__title{font-size:15px}
.tpd-bar--light .tpd-bar__ends{color:#5B544B}
.tpd-bar--light .tpd-cd__cell{border:1.5px solid #E6E1DA;background:#fff;min-width:44px}
.tpd-bar--light .tpd-cd__cell small{color:#5B544B}
.tpd-bar--light .tpd-cd__cell--s{border-color:var(--tpd-accent);color:var(--tpd-accent)}
.tpd-bar--light .tpd-cd__sep{display:none}
.tpd-bar--light .tpd-bar__cta{background:transparent;color:var(--tpd-accent);padding:0 6px;text-decoration:underline!important;text-underline-offset:4px}

/* urgent (auto) */
.tpd-bar--urgent{background:var(--tpd-urgent)!important;color:#fff!important;border-color:transparent!important}
.tpd-bar--urgent .tpd-bar__icon{display:none}
.tpd-bar--urgent .tpd-bar__dot{display:inline-block;width:11px;height:11px;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.25);animation:tpdPulse 1.2s ease-in-out infinite}
.tpd-bar--urgent .tpd-bar__urgent-prefix{display:inline;font-weight:800}
.tpd-bar--urgent .tpd-bar__ends{color:#fff;opacity:.9}
.tpd-bar--urgent .tpd-cd__cell{background:#fff!important;color:var(--tpd-urgent)!important;border:0!important;min-width:54px}
.tpd-bar--urgent .tpd-cd__cell b{font-size:22px}
.tpd-bar--urgent .tpd-cd__cell small{display:none}
.tpd-bar--urgent .tpd-cd__sep{display:inline;color:#fff}
.tpd-bar--urgent .tpd-bar__cta{background:#fff!important;color:var(--tpd-urgent)!important;text-decoration:none!important;padding:0 18px;border-radius:var(--tpd-radius)}
.tpd-bar--urgent .tpd-bar__close{color:#fff}
@keyframes tpdPulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.45;transform:scale(.8)}}

/* tap-area + chevron: مخفيين بالديسكتوب */
.tpd-bar__taparea{display:none}
.tpd-bar__chev{display:none}

/* ---------- mobile — سطرين: (1) النص بالنص  (2) العدّاد بالنص ----------
   container query على عرض الشريط نفسه: بيشتغل بالموبايل وكمان بالمعاينة بالأدمن (390px) */
.tpd-bar{container-type:inline-size;container-name:tpdbar}
@media (max-width:640px){
  .tpd-bar--hide-mobile{display:none!important}
  body.tpd-has-bar.tpd-bar-pos-bottom{padding-bottom:96px}
}
@container tpdbar (max-width:640px){
  .tpd-bar__inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 10px;padding:10px 38px 10px 14px;min-height:0}
  .tpd-bar[dir=ltr] .tpd-bar__inner{padding:10px 14px 10px 38px}
  .tpd-bar__text{flex:1 1 100%;font-size:14px;line-height:1.3;justify-content:center;text-align:center;gap:6px;min-width:0}
  .tpd-bar__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
  .tpd-bar__icon{display:none!important}
  .tpd-bar__cd{flex:0 0 auto;gap:6px}
  .tpd-bar__ends{display:none}
  .tpd-cd--boxes{gap:5px}
  .tpd-cd__cell{min-width:40px;padding:4px 4px;border-radius:6px}
  .tpd-cd__cell b{font-size:16px}
  .tpd-cd__cell small{display:block;font-size:9px}
  .tpd-cd__sep{font-size:16px}
  .tpd-bar--brand .tpd-cd__cell{background:rgba(0,0,0,.08);padding:4px 6px}
  .tpd-bar--brand .tpd-cd__cell b{font-size:16px}
  .tpd-bar--light .tpd-cd__cell{min-width:40px}
  .tpd-bar__actions{flex:0 0 auto;gap:0}
  .tpd-bar__cta{height:34px;padding:0 14px;font-size:13px}
  /* زر الإغلاق — بزاوية الشريط بكل الستايلات */
  .tpd-bar .tpd-bar__close{position:absolute!important;top:6px;inset-inline-end:6px;transform:none;width:28px!important;height:28px!important;z-index:3}
  .tpd-bar .tpd-bar__close svg{width:14px!important;height:14px!important}
  .tpd-bar--urgent .tpd-cd__cell{min-width:42px}
  .tpd-bar--urgent .tpd-cd__cell b{font-size:17px}

  /* === پريسة A: العدّاد + زر "למוצר" كبلوك واحد بالنص === */
  .tpd-bar--m-button .tpd-bar__cd{margin-inline-end:2px}

  /* === پريسة C: كل الشريط بينكبس، بدون زر === */
  .tpd-bar--m-tap .tpd-bar__taparea{display:block;position:absolute;inset:0;z-index:1}
  .tpd-bar--m-tap .tpd-bar__inner{position:relative;z-index:0;pointer-events:none}
  .tpd-bar--m-tap .tpd-bar__cta{display:none!important}
  .tpd-bar--m-tap .tpd-bar__chev{display:inline-flex;align-items:center;flex:0 0 auto;opacity:.85}
  .tpd-bar--m-tap .tpd-cd__cell{min-width:44px}
  .tpd-bar--m-tap .tpd-cd__cell b{font-size:17px}
  .tpd-bar--m-tap .tpd-bar__actions{gap:0;margin:0;padding:0}
  .tpd-bar--m-tap .tpd-bar__close{pointer-events:auto;top:50%;transform:translateY(-50%);background:rgba(127,127,127,.18)!important}
}

/* ---------- Cart / mini-cart cards ---------- */
.tpd-card{box-sizing:border-box;margin:12px 0;padding:14px;border-radius:var(--tpd-radius);font-size:13px;line-height:1.4;color:#1F1B16;text-align:start}
.tpd-card__row{display:flex;gap:12px;align-items:flex-start}
.tpd-card__row--center{align-items:center}
.tpd-card__thumb{flex:0 0 56px;width:56px;height:56px;border-radius:8px;overflow:hidden;background:#F3EFE9}
.tpd-card__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.tpd-card__icon{flex:0 0 44px;width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--tpd-accent);color:var(--tpd-accent-text)}
.tpd-card__body{min-width:0;flex:1}
.tpd-card__title{font-size:15px;font-weight:800;line-height:1.3}
.tpd-card__sub{font-size:12px;color:#5B544B;margin-top:3px}
.tpd-card__actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;flex-wrap:wrap}
.tpd-card__cd{font-size:12px;color:#5B544B}
.tpd-card__cd .tpd-cd{color:#1F1B16}
.tpd-btn{display:inline-flex;align-items:center;justify-content:center;height:40px;padding:0 18px;border-radius:calc(var(--tpd-radius) - 2px);background:var(--tpd-accent);color:var(--tpd-accent-text)!important;font-size:14px;font-weight:700;text-decoration:none!important;border:0;cursor:pointer;white-space:nowrap;transition:opacity .15s;line-height:1}
.tpd-btn:hover{opacity:.9}
.tpd-btn.loading{opacity:.6;pointer-events:none}
.tpd-card__check{flex:0 0 26px;width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--tpd-success);color:#fff}
.tpd-card__check--unlock{background:var(--tpd-accent);color:var(--tpd-accent-text);width:32px;height:32px;flex-basis:32px}
.tpd-card--unlocked .tpd-card__title{color:#1F1B16}
.tpd-btn--ghost{background:transparent;color:var(--tpd-accent)!important;border:1.5px solid var(--tpd-accent)}
.tpd-card--filled.tpd-card--unlocked{background:var(--tpd-tint)}
.tpd-card--outline.tpd-card--unlocked{border-color:var(--tpd-accent)}
.tpd-card--active .tpd-card__title{flex:1;color:var(--tpd-success);filter:brightness(.8)}
.tpd-card__amount{font-weight:800;font-size:16px;color:var(--tpd-success);white-space:nowrap}
.tpd-card__line{display:flex;justify-content:space-between;font-size:12px;color:#5B544B;margin-top:10px;padding-top:8px;border-top:1px dashed rgba(0,0,0,.12)}
.tpd-card--active .tpd-card__cd{margin-top:8px}

/* variant: outline */
.tpd-card--outline{background:#fff;border:1.5px solid #E6E1DA}
.tpd-card--outline.tpd-card--active{border-color:var(--tpd-success)}

/* variant: filled */
.tpd-card--filled{border:0;background:var(--tpd-tint);padding:16px}
.tpd-card--filled .tpd-card__title{font-size:16px}
.tpd-card--filled .tpd-card__actions{flex-direction:column;align-items:stretch}
.tpd-card--filled .tpd-btn{width:100%;height:44px;font-size:15px;font-weight:800}
.tpd-card--filled .tpd-card__cd{text-align:center;color:#4A433A}
.tpd-card--filled.tpd-card--active{background:#E6F3EC}
.tpd-card--filled.tpd-card--active .tpd-card__line{border-top-color:rgba(47,125,91,.25)}

/* cart page / checkout contexts: a bit wider */
.tpd-ctx-cart,.tpd-ctx-checkout{margin:0 0 16px}
.tpd-ctx-cart .tpd-card__actions,.tpd-ctx-checkout .tpd-card__actions{flex-direction:row}
.tpd-ctx-cart.tpd-card--filled .tpd-btn,.tpd-ctx-checkout.tpd-card--filled .tpd-btn{width:auto}

/* ---------- Product page banner ---------- */
.tpd-pbanner{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 4px;font-size:13px;line-height:1.4;color:#1F1B16;clear:both;width:100%;box-sizing:border-box}
.tpd-pbanner__badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:4px;background:var(--tpd-accent);color:var(--tpd-accent-text);font-size:11px;font-weight:800;white-space:nowrap}
.tpd-pbanner__text{flex:1 1 auto;min-width:0}
.tpd-pbanner__text strong{font-weight:800}
.tpd-pbanner .tpd-btn{height:30px;padding:0 12px;font-size:12px;background:transparent;color:var(--tpd-accent)!important;border:1.5px solid var(--tpd-accent)}
.tpd-pbanner__cd{font-size:12px;color:#5B544B}
.tpd-pbanner__cd .tpd-cd{color:#1F1B16}
.tpd-pbanner--inline{padding:8px 12px;background:#FAF8F5;border-radius:4px;border-inline-start:3px solid var(--tpd-accent)}
.tpd-pbanner--inline .tpd-pbanner__badge{display:none}
.tpd-pbanner--boxed{padding:8px 12px;border:1.5px dashed var(--tpd-accent);border-radius:var(--tpd-radius);background:var(--tpd-tint)}
.tpd-pbanner--trigger{border-style:solid}
.tpd-pbanner--trigger .tpd-pbanner__text{font-weight:700}

/* ---------- 🆕 v1.1.0: "סכום בסל" — פס דק מתחת לסכום (עיצוב C) ---------- */
.tpd-strip{box-sizing:border-box;margin:10px 0;padding:10px 12px;border-radius:calc(var(--tpd-radius) - 2px);background:#FAF8F5;color:#1F1B16;font-size:13px;line-height:1.35;text-align:start;display:flex;flex-direction:column;gap:7px}
.tpd-strip__row{display:flex;align-items:center;gap:8px}
.tpd-strip__icon{display:inline-flex;flex:0 0 auto;color:var(--tpd-accent)}
.tpd-strip__icon svg{width:18px;height:18px}
.tpd-strip__text{flex:1;min-width:0}
.tpd-strip__text strong{font-weight:800}
.tpd-strip__meta{font-size:11px;color:#5B544B;white-space:nowrap;font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.tpd-strip__bar{height:4px;border-radius:999px;background:#E9E2D8;overflow:hidden}
.tpd-strip__bar>span{display:block;height:100%;border-radius:999px;background:var(--tpd-accent);transition:width .3s ease}
.tpd-strip__cd{font-size:11px;color:#5B544B}
.tpd-strip__cd .tpd-cdwrap{font-size:11px}
.tpd-strip__cd .tpd-cd{color:#1F1B16}
.tpd-strip--active{background:#E6F3EC;color:#1F5A41}
.tpd-strip__check{flex:0 0 20px;width:20px;height:20px;border-radius:50%;background:var(--tpd-success);color:#fff;display:inline-flex;align-items:center;justify-content:center}
.tpd-strip__check svg{width:12px;height:12px}
.tpd-strip__next{color:#2F5F49}
.tpd-strip__amount{font-size:14px;font-weight:800;white-space:nowrap;direction:ltr;unicode-bidi:isolate}
/* v1.1.0: "-₪84.00" بالكروت كان يطلع "₪84.00-" بصفحة RTL */
.tpd-card__amount{direction:ltr;unicode-bidi:isolate}
.tpd-strip--active .tpd-strip__bar{background:#CFE3D7}
.tpd-strip--active .tpd-strip__bar>span{background:var(--tpd-success)}
.tpd-strip--active .tpd-strip__cd,.tpd-strip--active .tpd-strip__cd .tpd-cd{color:#2F5F49}
.tpd-strip.tpd-ctx-cart,.tpd-strip.tpd-ctx-checkout{margin:0 0 16px;padding:12px 14px;font-size:14px}
/* עמוד מוצר: הטקסט החי ("בסל שלכם עכשיו...") מתמלא ב-fragments */
.tpd-live{font-weight:400}
.tpd-live:empty{display:none}

/* ---------- 🆕 v1.1.1: סל הצד של FunnelKit ---------- */
/* FunnelKit נותנת לכל אזור padding של 16px מהצדדים — אותו דבר כאן */
.tpd-fkcart{padding:0 16px 12px;box-sizing:border-box}
.tpd-fkcart .tpd-card,.tpd-fkcart .tpd-strip{margin:0 0 8px}
.tpd-fkcart .tpd-card:last-child,.tpd-fkcart .tpd-strip:last-child{margin-bottom:0}
.tpd-fkcart .tpd-strip{font-size:13px;line-height:1.35}
.tpd-fkcart svg{display:inline-block}

/* ---------- 🆕 v1.1.2: מיקום בסל הצד + צבעי "סכום בסל" + סכום אחרי הנחה ---------- */
.tpd-fkcart--top{padding:12px 16px 4px}
.tpd-minitop{margin:0 0 12px}
.tpd-minitop .tpd-card,.tpd-minitop .tpd-strip{margin:0 0 8px}
/* מתחת לסף: צבעים מהגדרות "עיצוב" (ריק = המראה המקורי) */
.tpd-strip--progress{background:var(--tpd-spend-bg,#FAF8F5);color:var(--tpd-spend-text,#1F1B16)}
.tpd-strip--progress .tpd-strip__icon{color:var(--tpd-spend-color,var(--tpd-accent))}
.tpd-strip--progress .tpd-strip__bar{background:#E9E2D8;background:color-mix(in srgb,var(--tpd-spend-color,var(--tpd-accent)) 22%,transparent)}
.tpd-strip--progress .tpd-strip__bar>span{background:var(--tpd-spend-color,var(--tpd-accent))}
.tpd-strip--progress .tpd-strip__meta,.tpd-strip--progress .tpd-strip__cd{color:inherit;opacity:.78}
.tpd-strip--progress .tpd-strip__cd .tpd-cd{color:inherit}
/* "סכום ביניים" / סה"כ אחרי הנחה */
.tpd-total__was{opacity:.55;font-weight:400;margin-inline-end:6px}
.tpd-total__was strong{font-weight:400}
