/* הוספה מהירה לסל – כפתור בכרטיס המוצר + חלונית מלמטה. צבעי מיבבה. */
.mbqa-on {
	--mbqa-brand: #A38167;
	--mbqa-brand-dk: #8C6B53;
	--mbqa-brand-lt: #F6F0EA;
	--mbqa-line: #E6DBD1;
	--mbqa-ink: #242424;
}

/* ---------- הכפתור בכרטיס (מסגרת דקה) ---------- */
/* הכפתור בתחתית הכרטיס, וכל הכרטיסים בשורה באותו גובה – כך הכפתורים מיושרים גם כשהשם יורד לשורה שנייה */
.mbqa-on .wd-grid-g > .mbqa-has { align-self: stretch; display: flex; flex-direction: column; }
.mbqa-on .wd-grid-g > .mbqa-has > .product-wrapper { flex: 1 1 auto; }
.mbqa-btnwrap { margin: auto 0 0 !important; padding: 10px 0 0 !important; width: 100%; }
.mbqa-has .wd-add-btn,
.mbqa-has .add_to_cart_button:not(.mbqa-btn),
.mbqa-has .added_to_cart { display: none !important; }
.mbqa-has.wd-hover-alt .swap-elements,
.mbqa-has .wd-hover-alt .swap-elements { transform: none !important; } /* WoodMart: המחיר לא "מתחלף" בריחוף */

.mbqa-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	height: 40px;
	margin: 0 !important;
	padding: 0 10px !important;
	border: 1px solid var(--mbqa-brand) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--mbqa-brand-dk) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	box-shadow: none !important;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .15s ease;
	min-height: 0 !important;
}
.mbqa-btn:focus { outline: none !important; }
.mbqa-btn:hover { background: var(--mbqa-brand-lt) !important; }
.mbqa-btn:focus-visible { background: var(--mbqa-brand-lt) !important; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mbqa-brand) !important; }
.mbqa-btn:active { background: var(--mbqa-brand-lt) !important; }
.mbqa-btn svg { width: 18px; height: 18px; flex: none; }
.mbqa-btn.is-busy { opacity: .6; }
@media (min-width: 1025px) {
	.mbqa-phone-only .mbqa-btn, .mbqa-phone-only .mbqa-btnwrap { display: none !important; }
	.mbqa-phone-only .mbqa-has .wd-add-btn { display: block !important; }
	.mbqa-phone-only .mbqa-has .add_to_cart_button:not(.mbqa-btn) { display: inline-flex !important; }
}

/* ---------- החלונית ---------- */
html.mbqa-lock, html.mbqa-lock body { overflow: hidden !important; }
.mbqa { position: fixed; inset: 0; z-index: 100000; direction: rtl; font-family: inherit; color: var(--mbqa-ink); }
.mbqa[hidden] { display: none; }
.mbqa *, .mbqa *::before, .mbqa *::after { box-sizing: border-box; }
.mbqa button:focus, .mbqa a:focus { outline: none; }
.mbqa button:focus-visible, .mbqa a:focus-visible { outline: 2px solid var(--mbqa-brand); outline-offset: 2px; }
.mbqa-scrim { position: absolute; inset: 0; background: rgba(38, 26, 18, .5); opacity: 0; transition: opacity .25s ease; }
.mbqa.is-open .mbqa-scrim { opacity: 1; }
.mbqa-sheet {
	position: absolute; left: 0; right: 0; bottom: 0;
	max-height: 90vh; max-height: 90dvh;
	display: flex; flex-direction: column;
	background: #fff; border-radius: 22px 22px 0 0;
	box-shadow: 0 -10px 30px rgba(0, 0, 0, .15);
	transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
	padding-bottom: env(safe-area-inset-bottom);
}
.mbqa.is-open .mbqa-sheet { transform: translateY(0); }
.mbqa.is-drag .mbqa-sheet { transition: none; }
@media (min-width: 600px) {
	.mbqa-sheet { left: 50%; right: auto; width: 460px; margin-left: -230px; }
}
.mbqa-top { position: relative; flex: none; padding: 10px 18px 0; touch-action: none; }
.mbqa-handle { width: 42px; height: 5px; border-radius: 3px; background: #ddd; margin: 0 auto 6px; }
.mbqa-x {
	position: absolute; top: 12px; left: 14px; width: 36px; height: 36px; border-radius: 50%;
	border: 0 !important; background: #f4f1ee !important; color: #555 !important; padding: 0 !important;
	display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; min-height: 0 !important;
}
.mbqa-x svg { width: 16px; height: 16px; }
.mbqa-test { display: inline-block; font-size: 11px; background: #fff3cd; color: #7a5b00; border: 1px solid #f0d58a; border-radius: 999px; padding: 2px 10px; margin: 2px 0 4px; }
.mbqa-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 6px 18px 4px; }
.mbqa-foot { flex: none; padding: 10px 18px 16px; background: #fff; }
.mbqa-foot:empty { display: none; }

/* תמונות בהחלקה */
.mbqa-gal { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 30px -18px 0; padding: 0 18px; scrollbar-width: none; }
.mbqa-gal::-webkit-scrollbar { display: none; }
.mbqa-gal img { flex: none; width: 44%; max-width: 200px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: #f3eeea; scroll-snap-align: start; display: block; }
.mbqa-gal.is-one img { width: 46%; }
.mbqa-dots { display: flex; gap: 5px; justify-content: center; margin: 9px 0 6px; min-height: 6px; }
.mbqa-dots i { width: 6px; height: 6px; border-radius: 3px; background: #ddd; transition: width .2s, background-color .2s; }
.mbqa-dots i.on { background: var(--mbqa-brand); width: 16px; }
.mbqa-name { font-size: 16px; font-weight: 500; line-height: 1.35; margin-top: 4px; unicode-bidi: plaintext; text-align: right; }
.mbqa-price { font-size: 18px; color: var(--mbqa-brand); font-weight: 600; margin-top: 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.mbqa-price del, .mbqa-price s { color: #aaa; font-weight: 400; font-size: 14px; }
.mbqa-price ins { text-decoration: none; }
.mbqa-price .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mbqa-more { display: inline-block; font-size: 13px; color: var(--mbqa-brand-dk) !important; margin-top: 6px; text-decoration: underline !important; text-underline-offset: 3px; }
.mbqa-hr { height: 1px; background: #eee; margin: 14px 0 12px; }

/* צבע / מידה */
.mbqa-lrow { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 9px; font-size: 14.5px; }
.mbqa-lrow b { font-weight: 600; unicode-bidi: plaintext; }
.mbqa-opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.mbqa-opts.is-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mbqa-opt {
	position: relative; min-height: 50px; padding: 6px 4px !important; margin: 0 !important;
	border: 1px solid var(--mbqa-line) !important; border-radius: 12px !important; background: #fff !important; color: #333 !important;
	font-family: inherit !important; font-size: 14.5px !important; font-weight: 400 !important; line-height: 1.2 !important; text-transform: none !important; letter-spacing: 0 !important;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
	box-shadow: none !important; -webkit-tap-highlight-color: transparent; unicode-bidi: plaintext; white-space: nowrap;
}
.mbqa-opt small { font-size: 11px; color: #999; font-weight: 400; }
.mbqa-opt.is-on { border: 2px solid var(--mbqa-brand) !important; background: var(--mbqa-brand-lt) !important; color: var(--mbqa-brand-dk) !important; font-weight: 700 !important; }
.mbqa-opt.is-off { color: #bbb !important; background: #fafafa !important; cursor: default; }
.mbqa-opt.is-off span { text-decoration: line-through; }
.mbqa-opts.is-shake { animation: mbqa-shake .35s; }
@keyframes mbqa-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.mbqa-msg { font-size: 13.5px; color: #b3261e; margin: 0 2px 8px; min-height: 0; line-height: 1.45; }
.mbqa-msg:empty { display: none; }

/* צבעים אחרים של הדגם (מ"מעבר צבעים") */
.mbqa-colors { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px 14px; padding: 2px 18px 4px; scrollbar-width: none; }
.mbqa-colors::-webkit-scrollbar { display: none; }
.mbqa-color {
	flex: none; width: 64px; padding: 0 !important; margin: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
	display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; color: #555 !important; min-height: 0 !important;
	font-family: inherit !important; font-size: 12px !important; font-weight: 400 !important; line-height: 1.2 !important; text-transform: none !important; letter-spacing: 0 !important;
	-webkit-tap-highlight-color: transparent;
}
.mbqa-color img { width: 64px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid #eee; background: #f3eeea; display: block; box-sizing: border-box; transition: border-color .15s, opacity .15s; }
.mbqa-color span { max-width: 64px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.mbqa-color.is-cur img { border: 2px solid var(--mbqa-brand); }
.mbqa-color.is-cur span { color: var(--mbqa-brand-dk); font-weight: 600; }
.mbqa-color.is-oos img, .mbqa-color.is-nosize img { opacity: .45; }
.mbqa-color { position: relative; }
.mbqa-color i { position: absolute; top: 56px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10.5px; line-height: 1; background: rgba(255, 255, 255, .92); color: #777; border-radius: 999px; padding: 3px 7px; }
.mbqa-color.is-oos span { color: #aaa; }
.mbqa-body.is-loading .mbqa-gal, .mbqa-body.is-loading .mbqa-opts, .mbqa-body.is-loading .mbqa-price { opacity: .5; transition: opacity .15s; }
.mbqa-body.is-loading { pointer-events: none; }

/* כמות + הוספה */
.mbqa-qrow { display: flex; gap: 10px; align-items: center; }
.mbqa-add, .mbqa-big {
	flex: 1; height: 54px; border-radius: 999px !important; border: 0 !important; background: var(--mbqa-brand) !important; color: #fff !important;
	font-family: inherit !important; font-size: 16.5px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important;
	display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; padding: 0 14px !important; margin: 0 !important;
	text-decoration: none !important; box-shadow: none !important; line-height: 1 !important; min-height: 0 !important; width: auto;
}
.mbqa-add svg { width: 20px; height: 20px; flex: none; }
.mbqa-add span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 389px) {
	.mbqa-add { font-size: 15px !important; padding: 0 10px !important; gap: 6px; }
	.mbqa-add svg { display: none; }
	.mbqa-qty { width: 98px !important; }
}
.mbqa-add.is-wait { background: #c9b4a4 !important; }
.mbqa-add.is-busy { opacity: .75; pointer-events: none; }
.mbqa-qty { flex: none; width: 112px; height: 54px; border: 1px solid #ddd; border-radius: 999px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px; font-size: 17px; font-weight: 600; }
.mbqa-qty button { width: 34px; height: 34px; border: 0 !important; background: none !important; color: #666 !important; font-size: 22px !important; line-height: 1 !important; padding: 0 !important; margin: 0 !important; cursor: pointer; min-height: 0 !important; box-shadow: none !important; }
.mbqa-qty button:disabled, .mbqa-qty button.is-max { color: #ccc !important; cursor: default; }

/* טעינה */
.mbqa-skel { background: linear-gradient(90deg, #f2eee9 25%, #f8f5f2 50%, #f2eee9 75%); background-size: 200% 100%; animation: mbqa-skel 1.2s infinite linear; border-radius: 12px; }
@keyframes mbqa-skel { to { background-position: -200% 0; } }

/* אחרי ההוספה */
.mbqa-succ { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600; margin: 4px 0 14px; padding-left: 44px; }
.mbqa-ck { width: 32px; height: 32px; border-radius: 50%; background: var(--mbqa-brand); display: inline-flex; align-items: center; justify-content: center; flex: none; animation: mbqa-pop .35s ease; }
.mbqa-ck svg { width: 18px; height: 18px; }
@keyframes mbqa-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.12); } 100% { transform: none; } }
.mbqa-mini { display: flex; gap: 12px; align-items: center; background: #faf7f4; border-radius: 14px; padding: 10px; }
.mbqa-mini img { width: 54px; height: 70px; object-fit: cover; border-radius: 8px; flex: none; }
.mbqa-mini .nm { font-size: 14px; font-weight: 500; unicode-bidi: plaintext; text-align: right; }
.mbqa-mini .sub { font-size: 13px; color: #777; margin-top: 3px; }
.mbqa-big { display: flex; width: 100%; margin-top: 14px !important; }
.mbqa-big.out { background: #fff !important; color: var(--mbqa-brand-dk) !important; border: 1.5px solid var(--mbqa-brand) !important; height: 50px; margin-top: 10px !important; font-size: 16px !important; }
.mbqa-look-h { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 10px; }
.mbqa-look-h b { font-size: 16px; font-weight: 600; }
.mbqa-look-h small { font-size: 12.5px; color: var(--mbqa-brand-dk); }
.mbqa-accs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mbqa-ac { border: 1px solid #eee; border-radius: 14px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.mbqa-ac img { width: 100%; height: 112px; object-fit: cover; border-radius: 10px; display: block; background: #f3eeea; }
.mbqa-ac .nm { font-size: 12.5px; font-weight: 500; margin-top: 7px; line-height: 1.3; unicode-bidi: plaintext; }
.mbqa-ac .pr { font-size: 13px; color: var(--mbqa-brand); font-weight: 600; margin-top: 3px; display: flex; gap: 5px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.mbqa-ac .pr del { color: #aaa; font-weight: 400; font-size: 11.5px; }
.mbqa-ac .ch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.mbqa-ac .ch[hidden] { display: none; }
.mbqa-ac .ch .mbqa-opt { min-height: 32px; font-size: 12px !important; border-radius: 8px !important; }
.mbqa-ac .ad {
	margin: auto 0 0 !important; height: 36px; border-radius: 999px !important; border: 1.5px solid var(--mbqa-brand) !important; background: #fff !important; color: var(--mbqa-brand-dk) !important;
	font-family: inherit !important; font-size: 13.5px !important; font-weight: 600 !important; display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0 8px !important;
	text-transform: none !important; letter-spacing: 0 !important; line-height: 1 !important; min-height: 0 !important; box-shadow: none !important; width: 100%;
}
.mbqa-ac .ch + .ad, .mbqa-ac .pr + .ad { margin-top: 8px !important; }
.mbqa-ac .ad.ok { background: var(--mbqa-brand) !important; color: #fff !important; cursor: default; }
.mbqa-ac .ad.is-busy { opacity: .6; pointer-events: none; }
.mbqa-ac .err { font-size: 11.5px; color: #b3261e; margin-top: 5px; }
.mbqa-ac .err:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
	.mbqa-sheet, .mbqa-scrim { transition: none; }
	.mbqa-skel, .mbqa-ck { animation: none; }
}

/* חלון האאוטלט שקופץ בעמודי קטגוריה מחכה עד שהחלונית נסגרת, ולא נפתח מעליה */
html.mbqa-lock .mbo-pop:not(.is-static) { display: none !important; }

/* ניסיון נוסף / דרך דף המוצר – אחרי שההוספה נכשלה */
.mbqa-fallback { display: flex; gap: 8px; margin-top: 10px; }
.mbqa-fallback .mbqa-big { flex: 1; margin-top: 0 !important; height: 46px; font-size: 14.5px !important; }
.mbqa-foot .mbqa-big.out + .mbqa-big.out { margin-top: 8px !important; }
