/* ==========================================================================
   Boof Discounts - חזית האתר.
   משתמש בצבעים של תבנית Boof (--pink, --ink...) כשהיא פעילה, ובערכי ברירת מחדל
   זהים בכל תבנית אחרת.
   ========================================================================== */

.bd-wrap { display: grid; gap: 10px; }
.bd-wrap[hidden] { display: none; }
.bd-wrap[data-bd-product] { margin: 14px 0 6px; }
.bd-cartwrap { margin-bottom: 12px; }

.bd {
	--bd-pink: var(--pink, #E31D6C);
	--bd-pink-ink: var(--pink-ink, #B0164F);
	--bd-pink-50: var(--pink-50, #FDF0F5);
	--bd-pink-100: var(--pink-100, #FADAE7);
	--bd-ink: var(--ink, #161115);
	--bd-ink-2: var(--ink-2, #4A4448);
	--bd-ink-3: var(--ink-3, #858084);
	--bd-line: var(--line, #ECE6E9);
	--bd-ok: var(--ok, #157A43);
	--bd-ok-50: var(--ok-50, #EAF7EF);
	--bd-r: var(--r-m, 16px);
	display: grid;
	gap: 10px;
	padding: 14px 16px;
	border-radius: var(--bd-r);
	background: var(--bd-pink-50);
	color: var(--bd-ink);
	font-size: 14px;
	line-height: 1.45;
	min-width: 0;
}
.bd p { margin: 0; }
.bd-product { background: #fff; box-shadow: inset 0 0 0 1.5px var(--bd-pink-100); }
.bd.done { background: var(--bd-ok-50); box-shadow: none; }
.bd-drawer, .bd-cart { padding: 12px 14px; gap: 8px; }

.bd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bd-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; color: var(--bd-ink); }
.bd-ok { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--bd-ok); color: #fff; flex: none; }
.bd-ok svg, .bd-ok .ico { width: 16px; height: 16px; }
.bd-desc { color: var(--bd-ink-2); font-size: 13px; }
.bd-deal { justify-self: start; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; color: var(--bd-pink-ink); }

.bd-msg { font-size: 14px; color: var(--bd-ink); }
.bd.has:not(.done) .bd-msg { font-weight: 600; }
.bd.done .bd-msg { color: var(--bd-ok); font-weight: 600; }
.bd-meter-row { display: flex; align-items: center; gap: 10px; }
.bd-meter-row .bd-meter { flex: 1; min-width: 0; }
.bd-count { flex: none; font-size: 12.5px; font-weight: 700; color: var(--bd-ink-2); font-variant-numeric: tabular-nums; direction: ltr; }

/* מדרגות: 6 · 10 · 15 · 50 */
.bd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.bd-steps.is-vertical { grid-auto-flow: row; }
.bd-step {
	display: grid; justify-items: center; align-content: center; gap: 1px;
	padding: 8px 4px; border-radius: 12px; background: #fff; text-align: center;
	box-shadow: inset 0 0 0 1px var(--bd-line);
	transition: background-color 200ms ease, box-shadow 200ms ease, color 200ms ease;
}
.bd-steps.is-vertical .bd-step { grid-template-columns: auto 1fr auto; justify-items: start; gap: 10px; padding: 8px 12px; text-align: start; }
.bd-q { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.bd-p { font-size: 12.5px; font-weight: 600; color: var(--bd-ink-2); }
.bd-u { font-size: 11px; color: var(--bd-ink-3); }
.bd-step.is-reached { background: var(--bd-pink); color: #fff; box-shadow: none; }
.bd-step.is-reached .bd-p, .bd-step.is-reached .bd-u { color: rgba(255,255,255,.88); }
.bd-step.is-next { box-shadow: inset 0 0 0 2px var(--bd-pink); }
.bd-step.is-next .bd-q { color: var(--bd-pink-ink); }
.bd-drawer .bd-step, .bd-cart .bd-step { padding: 6px 2px; }
.bd-drawer .bd-q, .bd-cart .bd-q { font-size: 15px; }

/* מד התקדמות (בתבנית Boof - אותו מד כמו "משלוח חינם") */
.bd-meter { height: 8px; border-radius: 4px; background: rgba(22,17,21,.08); overflow: hidden; }
.bd-meter i { display: block; height: 100%; width: 100%; background: var(--bd-pink); border-radius: 4px; transform-origin: right center; transform: scaleX(var(--p, 0)); will-change: transform; }
[dir="ltr"] .bd-meter i { transform-origin: left center; }
.bd-product .bd-meter i { transition: transform 600ms cubic-bezier(.2, .8, .2, 1); }

/* הצעות להשלמת המבצע */
.bd-sugg { display: grid; gap: 8px; min-width: 0; }
.bd-sugg-h { font-size: 13px; font-weight: 700; color: var(--bd-ink-2); }
.bd .scroller { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
.bd .mini-rail > .mini { width: 118px; }
.bd .mini .well { background: #fff; }
.bd .mini .add { top: 80px; }
.bd-product .mini .well { background: var(--shelf, #F7F5F6); }
.bd .mini-n { font-size: 12.5px; color: var(--bd-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* בלי תבנית Boof */
.bd-rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-block: 2px; }
.bd-rail::-webkit-scrollbar { display: none; }
.bd-tile { position: relative; flex: none; width: 118px; display: grid; gap: 4px; scroll-snap-align: start; font-size: 12.5px; }
.bd-tile-img { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; }
.bd-tile-img img { width: 100%; height: 100%; object-fit: contain; margin: 0 !important; }
.bd-tile-n { color: var(--bd-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.bd-tile-p { font-weight: 700; font-size: 13.5px; }
.bd-tile-p del { font-weight: 400; color: var(--bd-ink-3); font-size: 12px; }
.bd-add {
	position: absolute; top: 80px; inset-inline-start: 6px; width: 32px; height: 32px; border-radius: 999px;
	display: grid; place-items: center; background: var(--btn, var(--sun, #FBBC34)); color: var(--btn-ink, var(--sun-ink, #1B1400));
	font-size: 20px; font-weight: 700; line-height: 1; text-decoration: none; box-shadow: var(--btn-shadow, 0 2px 8px rgba(160,110,0,.22));
	transition: transform 100ms ease-out;
}
.bd-add:active { transform: scale(.92); }
.bd-add.loading { opacity: .6; }
.bd-add.added::after { display: none; }
.bd-tile .added_to_cart { display: none; }

.bd-all { justify-self: start; font-size: 13px; font-weight: 600; color: var(--bd-pink-ink); display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.bd-all .ico { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
	.bd-product .bd-meter i, .bd-step { transition: none; }
}

/* --- Sale Badge --- */
.wd-discount-badge {
	display: inline-block;
	background: var(--pink, #E31D6C);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 999px;
	margin: 6px 0;
	text-decoration: none;
	line-height: 1.3;
}
a.wd-discount-badge { cursor: pointer; transition: opacity .15s ease; }
a.wd-discount-badge:hover { opacity: .88; color: #fff; }

/* --- טיימר לסיום מבצע --- */
.wd-discount-timer {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin: 10px 0;
	direction: ltr;
	justify-content: flex-end;
	font-variant-numeric: tabular-nums;
}
.wd-discount-timer span {
	display: inline-block;
	background: var(--ink, #161115);
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	padding: 6px 8px;
	border-radius: 10px;
	min-width: 34px;
	text-align: center;
}
.wd-discount-timer small { font-size: 11px; color: var(--ink-3, #858084); margin-inline-end: 6px; }

/* --- טבלת מדרגות (שורטקוד) --- */
.wd-bundle-table-wrap { margin: 16px 0; overflow-x: auto; }
.wd-bundle-table-title { font-weight: 700; font-size: 16px; margin-bottom: 10px; }
.wd-bundle-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--r-m, 16px); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line, #ECE6E9); }
.wd-bundle-table th, .wd-bundle-table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--line, #ECE6E9); }
.wd-bundle-table tr:last-child td { border-bottom: 0; }
.wd-bundle-table th { background: var(--pink-50, #FDF0F5); font-weight: 700; }
.wd-bundle-table-price { color: var(--pink-ink, #B0164F); font-weight: 700; }

/* --- עמוד תגית מבצע --- */
.wd-campaign-archive-wrap { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.wd-campaign-archive-title { margin-bottom: 6px; }
.wd-campaign-archive-desc { color: #666; margin-bottom: 20px; }

/* ==========================================================================
   חבילות: מוצר ראשי + פריטים לבחירה
   ========================================================================== */
.bd-combos { display: grid; gap: 10px; margin: 14px 0 6px; }
.bd-combo { gap: 12px; }
.bdc-opts { display: grid; gap: 8px; }
.bdc-opt {
	position: relative; display: flex; align-items: center; gap: 12px;
	padding: 12px 14px; border-radius: calc(var(--bd-r) - 4px);
	background: #fff; box-shadow: inset 0 0 0 1.5px var(--bd-line);
	cursor: pointer; transition: box-shadow .18s ease, background-color .18s ease;
	-webkit-tap-highlight-color: transparent;
}
.bdc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bdc-opt::before {
	content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
	box-shadow: inset 0 0 0 2px var(--bd-ink-3); background: #fff;
	transition: box-shadow .18s ease;
}
.bdc-opt.on, .bdc-opt:has(input:checked) { background: var(--bd-pink-50); box-shadow: inset 0 0 0 2px var(--bd-pink); }
.bdc-opt.on::before, .bdc-opt:has(input:checked)::before { box-shadow: inset 0 0 0 6px var(--bd-pink); }
.bdc-opt:has(input:focus-visible) { outline: 2px solid var(--bd-pink); outline-offset: 2px; }
.bdc-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.bdc-t b { font-size: 14.5px; font-weight: 600; }
.bdc-t small { font-size: 12.5px; font-weight: 600; color: var(--bd-ok); }
.bdc-p { font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.bdc-go, .bdc-pick {
	justify-self: stretch; min-height: 44px; padding: 10px 16px; border: 0; border-radius: var(--r-pill, 999px);
	background: var(--bd-ink); color: #fff; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer;
	transition: transform .12s ease;
}
.bdc-pick { justify-self: start; min-height: 40px; background: var(--bd-pink); }
.bdc-go:active, .bdc-pick:active { transform: scale(.97); }

/* חלון בחירת הפריטים - מגירה מלמטה בנייד, חלון במרכז במחשב */
html.bdc-lock, html.bdc-lock body { overflow: hidden; }
.bdc-modal { position: fixed; inset: 0; z-index: 100000; display: grid; align-items: end; justify-items: center; font-family: var(--f, inherit); color: var(--ink, #161115); }
.bdc-modal[hidden] { display: none; }
.bdc-scrim { position: absolute; inset: 0; background: var(--scrim, rgba(22,17,21,.42)); opacity: 0; transition: opacity .26s ease; }
.bdc-sheet {
	position: relative; width: 100%; max-width: 560px; max-height: min(88vh, 760px);
	display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto;
	background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(22,17,21,.18);
	transform: translateY(100%); transition: transform .34s cubic-bezier(.32,.72,0,1);
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bdc-modal.is-open .bdc-scrim { opacity: 1; }
.bdc-modal.is-open .bdc-sheet { transform: none; }
@media (min-width: 768px) {
	.bdc-modal { align-items: center; padding: 24px; }
	.bdc-sheet { border-radius: 24px; transform: translateY(16px) scale(.98); opacity: 0; transition: transform .28s cubic-bezier(.32,.72,0,1), opacity .2s ease; }
	.bdc-modal.is-open .bdc-sheet { opacity: 1; }
}
.bdc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.bdc-h { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.bdc-sub { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2, #4A4448); font-variant-numeric: tabular-nums; }
.bdc-modal.is-full .bdc-sub { color: var(--ok, #157A43); font-weight: 600; }
.bdc-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--shelf, #F7F5F6); color: inherit; cursor: pointer; }
.bdc-meter { height: 6px; margin: 0 20px 10px; border-radius: 99px; background: var(--line, #ECE6E9); overflow: hidden; }
.bdc-meter i { display: block; height: 100%; background: var(--pink, #E31D6C); transform: scaleX(0); transform-origin: right; transition: transform .3s cubic-bezier(.32,.72,0,1), background-color .2s; }
.bdc-modal.is-full .bdc-meter i { background: var(--ok, #157A43); }
.bdc-search { margin: 0 20px 8px; height: 42px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--shelf, #F7F5F6); font-size: 16px; outline: none; }
.bdc-search:focus { box-shadow: inset 0 0 0 2px var(--pink, #E31D6C); }
.bdc-list { list-style: none; margin: 0; padding: 0 12px 8px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bdc-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; transition: background-color .15s; }
.bdc-list li.on { background: var(--pink-50, #FDF0F5); }
.bdc-list li[hidden] { display: none; }
.bdc-list img, .bdc-noimg { flex: none; width: 56px; height: 56px; border-radius: 10px; object-fit: contain; background: var(--shelf, #F7F5F6); }
.bdc-n { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: 13.5px; line-height: 1.35; }
.bdc-n b { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bdc-n small { color: var(--ink-3, #858084); font-size: 12px; }
.bdc-n .bdc-pr { font-variant-numeric: tabular-nums; }
.bdc-step { flex: none; display: flex; align-items: center; gap: 2px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line, #ECE6E9); }
.bdc-step button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; line-height: 1; color: inherit; cursor: pointer; }
.bdc-step button:disabled { opacity: .3; cursor: default; }
.bdc-step button:not(:disabled):active { background: var(--pink-100, #FADAE7); }
.bdc-step output { min-width: 18px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.bdc-load { display: grid !important; gap: 10px; }
.bdc-load span { display: block; height: 64px; border-radius: 14px; background: var(--shelf, #F7F5F6); animation: bdc-pulse 1.2s ease-in-out infinite; }
@keyframes bdc-pulse { 50% { opacity: .5; } }
.bdc-foot { padding: 10px 20px 16px; border-top: 1px solid var(--line, #ECE6E9); display: grid; gap: 8px; }
.bdc-err { margin: 0; color: var(--err, #B42323); font-size: 13.5px; }
.bdc-add {
	min-height: 52px; border: 0; border-radius: var(--r-pill, 999px);
	background: var(--btn, var(--sun, #FBBC34)); color: var(--btn-ink, var(--sun-ink, #1B1400));
	font: inherit; font-size: 16.5px; font-weight: 700; cursor: pointer; transition: background-color .18s, transform .12s;
}
.bdc-add:disabled { background: var(--shelf, #F1EEF0); color: var(--ink-3, #858084); cursor: default; }
.bdc-add:not(:disabled):active { transform: scale(.98); }
.bdc-add.loading { opacity: .7; pointer-events: none; }
.bdc-sheet.shake { animation: bdc-shake .32s ease; }
@keyframes bdc-shake { 25% { translate: -6px 0; } 50% { translate: 5px 0; } 75% { translate: -3px 0; } }
@media (prefers-reduced-motion: reduce) {
	.bdc-sheet, .bdc-scrim, .bdc-meter i { transition: none; }
	.bdc-sheet.shake, .bdc-load span { animation: none; }
}

/* קנה X קבל Y - הודעת מתנה */
.wd-gift-toast {
	position: fixed; z-index: 100001; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%;
	display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
	padding: 12px 18px; border-radius: 999px; background: var(--ok, #157A43); color: #fff;
	font: 600 15px/1.35 var(--f, inherit); box-shadow: 0 12px 32px rgba(22,17,21,.22);
	transform: translate(-50%, -140%); opacity: 0; pointer-events: none;
	transition: transform 320ms cubic-bezier(.2,.8,.2,1), opacity 200ms;
}
.wd-gift-toast.is-lost { background: var(--ink, #161115); }
.wd-gift-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.wd-gift-toast svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { .wd-gift-toast { transition: opacity 200ms; transform: translate(-50%, 0); } }
