:root { --msb-brown:#8c5e4b; --msb-text:#423a36; --msb-line:#bcaea6; --msb-soft:#f5eee9; }

.msb-bundle { margin:1.5em 0; padding:1.25em; border:1px solid #ece7e3; border-radius:12px; background:#fff; }
.msb-heading { margin:0 0 20px; color:var(--msb-brown); font-size:28px; font-weight:400; }
.msb-group { margin-bottom:26px; }
.msb-group-title { margin:0; padding:0 0 14px; border:0; color:var(--msb-text); font-size:18px; font-weight:400; }
.msb-component-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.msb-component { border:0; border-bottom:1px solid var(--msb-line); border-radius:0; background:transparent; }
.msb-component label { display:grid; grid-template-columns:52px minmax(0,1fr) auto 84px; grid-template-areas:"thumb name price step"; align-items:center; gap:12px; min-height:88px; margin:0; padding:16px 0; cursor:default; }
.msb-component-checkbox { position:absolute; opacity:0; pointer-events:none; }
.msb-thumb { grid-area:thumb; width:48px; height:48px; display:inline-flex; overflow:hidden; }
.msb-thumb img { width:100%; height:100%; object-fit:contain; display:block; }
.msb-component-name { grid-area:name; color:var(--msb-text); font-size:16px; font-weight:400; }
.msb-required-tag { display:none; }
.msb-component-price { grid-area:price; align-self:center; margin:0; color:var(--msb-text); font-size:14px; font-weight:400; white-space:nowrap; }
.msb-stepper { grid-area:step; direction:ltr; display:inline-flex; align-items:center; justify-content:space-between; width:76px; }
.msb-stepper-btn { display:inline-flex!important; flex:0 0 25px!important; align-items:center!important; justify-content:center!important; box-sizing:border-box!important; width:25px!important; min-width:25px!important; max-width:25px!important; height:25px!important; min-height:25px!important; max-height:25px!important; aspect-ratio:1/1!important; margin:0!important; padding:0!important; border:0!important; border-radius:999px!important; background:var(--msb-soft)!important; color:#615751!important; font:400 17px/1 Arial!important; box-shadow:none!important; cursor:pointer; }
.msb-stepper-value { min-width:18px; color:#4f4742; text-align:center; font-size:14px; }
.msb-component.is-required .msb-stepper-btn { opacity:.45; cursor:not-allowed; }
.msb-summary { display:flex; align-items:center; justify-content:space-between; margin-top:18px; padding-top:16px; border-top:1px solid #e9e1dc; }
.msb-total-price { color:var(--msb-text); font-size:28px; font-weight:400; }
.msb-generate-btn { border-radius:24px!important; background:var(--msb-brown)!important; color:#fff!important; }
.msb-preview-status { min-height:22px; margin-top:8px; color:var(--msb-brown); font-size:13px; }
.msb-preview-status.is-error { color:#b42318; }

/* Elementor parts are deliberately independent: place each one in any container/column. */
.msb-elementor-part { direction:rtl; box-sizing:border-box; width:100%; margin:0; padding:0; }
.msb-elementor-cart { width:100%; margin:0!important; padding:0!important; }
.msb-elementor-cart,.msb-elementor-cart .single_add_to_cart_button { display:flex; align-items:center; justify-content:center; }
.msb-cart-quantity { direction:ltr; display:grid!important; grid-template-columns:auto minmax(32px,auto) auto; flex:0 0 auto; align-items:center; justify-content:center; box-sizing:border-box; min-width:116px; gap:8px; padding:6px 12px; border-radius:999px; background:var(--msb-soft); }
.msb-cart-quantity .quantity { position:static!important; float:none!important; display:block!important; box-sizing:border-box; width:32px!important; min-width:32px!important; max-width:32px!important; height:auto!important; margin:0!important; padding:0!important; background:transparent!important; border:0!important; transform:none!important; }
.msb-cart-quantity .qty { position:static!important; display:block!important; box-sizing:border-box!important; width:32px!important; min-width:32px!important; max-width:32px!important; height:30px!important; margin:0!important; padding:0!important; border:0!important; background:transparent!important; text-align:center!important; line-height:30px!important; transform:none!important; -moz-appearance:textfield; }
.msb-cart-quantity .qty::-webkit-inner-spin-button,.msb-cart-quantity .qty::-webkit-outer-spin-button { margin:0; -webkit-appearance:none; }
.msb-elementor-cart .msb-cart-quantity > .msb-cart-qty { position:static!important; float:none!important; display:inline-flex!important; flex:none!important; align-items:center!important; justify-content:center!important; box-sizing:border-box!important; width:30px; min-width:30px; max-width:none; height:30px; min-height:30px; margin:0!important; padding:0!important; border:0; border-radius:50%; background:transparent; color:#615751; font-family:Arial,sans-serif; font-size:22px; font-weight:400; line-height:1!important; box-shadow:none; transform:none!important; }
.msb-elementor-cart .single_add_to_cart_button { flex:1 1 auto; min-width:0; max-width:100%; min-height:60px; gap:12px; margin:0!important; padding:12px 28px; border-radius:30px; }
.msb-cart-button-icon { display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; line-height:1; }
.msb-elementor-cart .single_add_to_cart_button > span:not(.msb-cart-button-icon) { display:inline-flex; align-items:center; line-height:1; }
.msb-cart-button-icon svg { width:18px; height:18px; fill:currentColor; }
.msb-elementor-items { min-height:0; }
.msb-list-scroll { position:relative; direction:rtl; padding-inline-end:calc(var(--msb-scrollbar-width,6px) + 8px); }
.msb-elementor-items .msb-component-list { direction:rtl; gap:var(--msb-items-gap,0px); max-height:calc((var(--msb-item-row-height,88px) + var(--msb-items-gap,0px)) * var(--msb-visible-rows,2) - var(--msb-items-gap,0px)); overflow-y:scroll; overflow-x:hidden; padding:0; overscroll-behavior:contain; scrollbar-width:none; }
.msb-elementor-items .msb-component { flex:0 0 var(--msb-item-row-height,88px); box-sizing:border-box; }
.msb-elementor-items .msb-component label { box-sizing:border-box; height:100%; min-height:100%; }
.msb-elementor-items .msb-component-list::-webkit-scrollbar { width:0; height:0; }
.msb-scroll-indicator { position:absolute; z-index:2; inset-block:0; inset-inline-end:0; display:block; width:var(--msb-scrollbar-width,6px); border-radius:var(--msb-scrollbar-radius,10px); background:var(--msb-scrollbar-track,#f4ece7); pointer-events:none; }
.msb-scroll-thumb { position:absolute; inset-inline:0; top:0; display:block; min-height:24px; border-radius:inherit; background:var(--msb-scrollbar-thumb,#a97961); transform:translateY(var(--msb-scroll-thumb-y,0)); }
.msb-elementor-title { margin:0; color:var(--msb-brown); font-size:36px; font-weight:400; line-height:1.2; }
.msb-brand { direction:ltr; unicode-bidi:isolate; display:inline-block; font-family:Arial,sans-serif; }
.msb-elementor-preview { position:relative; overflow:hidden; aspect-ratio:var(--msb-preview-ratio,1/1); background:#f7eee8; }
.msb-elementor-preview > img { position:absolute; inset:0; display:block; width:100%!important; height:100%!important; max-width:none!important; object-fit:contain; }
.msb-ai-badge { position:absolute; inset:auto 0 0; display:none; padding:30px 24px; background:linear-gradient(0deg,rgba(244,229,220,.96),rgba(255,255,255,.35)); color:#66554d; text-align:center; }
.msb-ai-action { display:flex; align-items:center; justify-content:center; gap:12px; width:100%; }
.msb-ai-action.msb-icon-left { flex-direction:row; }
.msb-ai-action.msb-icon-right { flex-direction:row-reverse; }
.msb-ai-icon { display:inline-flex; flex:0 0 48px; align-items:center; justify-content:center; box-sizing:border-box; width:48px; height:48px; margin:0; border-radius:50%; background:#fff; color:#66554d; transition:.2s ease; }
.msb-ai-icon svg, .msb-icon-inside svg { width:18px; height:18px; fill:currentColor; }
@keyframes msb-icon-spin { to { transform:rotate(360deg); } }
body.msb-loading .msb-ai-icon i,
body.msb-loading .msb-ai-icon svg,
.msb-popup-widget.is-generating .msb-popup-generate-icon i,
.msb-popup-widget.is-generating .msb-popup-generate-icon svg { animation:msb-icon-spin var(--msb-spin-duration,1s) linear infinite; animation-direction:var(--msb-spin-direction,normal); transform-origin:center; }
.msb-ai-badge small { display:block; margin-top:16px; line-height:1.5; }
body.msb-preview-dirty .msb-elementor-preview .msb-ai-badge,
body.msb-loading .msb-elementor-preview .msb-ai-badge,
.msb-elementor-preview.msb-editor-preview .msb-ai-badge { display:block; }
body.msb-preview-dirty .msb-elementor-preview > img,
body.msb-loading .msb-elementor-preview > img,
.msb-elementor-preview.msb-editor-preview > img { opacity:.35; }
.msb-ai-badge .msb-generate-btn { display:inline-flex!important; align-items:center; justify-content:center; gap:8px; width:auto; min-height:48px; padding:8px 28px!important; border:0!important; border-radius:999px!important; background:#fff!important; color:#5f514a!important; box-shadow:none!important; }
.msb-ai-badge .msb-preview-status { min-height:0; margin:8px 0 0; }
.msb-elementor-total { display:flex; align-items:center; }
.msb-elementor-generate .msb-generate-btn { min-width:190px; min-height:46px; }
.msb-elementor-cart { display:flex; align-items:center; gap:14px; }
.msb-elementor-cart .quantity { margin:0!important; padding:5px 12px; border-radius:24px; background:var(--msb-soft); }
.msb-elementor-cart .quantity input { border:0; background:transparent; }
.msb-elementor-cart .single_add_to_cart_button { min-width:190px; min-height:48px; border-radius:25px!important; background:var(--msb-brown)!important; }
.msb-editor-notice { padding:14px; border:1px dashed #b7a9a1; color:#6c5f58; background:#faf7f5; }

/* When Elementor bundle widgets are present, hide only the old all-in-one selector. */
body:has(.msb-elementor-part) .summary form.cart:not(.msb-elementor-cart) .msb-bundle { display:none!important; }
body:has(.msb-elementor-part) .summary form.cart:not(.msb-elementor-cart) > .quantity,
body:has(.msb-elementor-part) .summary form.cart:not(.msb-elementor-cart) > .single_add_to_cart_button { display:none!important; }

@media (max-width:767px) {
	.msb-component label { grid-template-columns:44px minmax(0,1fr) 76px; grid-template-areas:"thumb name step" "thumb price step"; gap:8px; }
	.msb-elementor-title { font-size:28px; }
	.msb-elementor-cart { flex-wrap:wrap; }
	.msb-elementor-cart .single_add_to_cart_button { flex:1; }
}

/* Dynamic Elementor popup widget — works inside product templates and loop items. */
body.msb-popup-opened { overflow:hidden; }
.msb-popup-trigger-wrap { display:flex; width:100%; }
.msb-popup-open { display:inline-flex!important; align-items:center; justify-content:center; gap:10px; min-height:48px; padding:10px 24px!important; border:0!important; border-radius:24px!important; background:var(--msb-brown)!important; color:#fff!important; cursor:pointer; }
.msb-popup-open svg { fill:currentColor; }
.msb-popup-overlay { position:fixed; z-index:999999; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; background:rgba(58,43,37,.62); opacity:0; visibility:hidden; pointer-events:none; transition:opacity .22s ease,visibility .22s ease; }
.msb-popup-overlay.is-open { opacity:1; visibility:visible; pointer-events:auto; }
.msb-popup-dialog { position:relative; width:min(1120px,calc(100vw - 48px)); max-height:calc(100vh - 48px); padding:54px; overflow:hidden; border-radius:16px; background:#fff; box-shadow:0 28px 90px rgba(40,25,20,.25); direction:rtl; }
.msb-popup-template-dialog { overflow:auto; }
.msb-popup-template-content { width:100%; min-height:80px; }
.msb-popup-nested-content { width:100%; min-height:120px; }
.msb-popup-nested-content > .e-con { width:100%; }
.msb-popup-close { position:absolute!important; z-index:3; top:16px; left:18px; display:flex!important; align-items:center; justify-content:center; width:38px!important; min-width:38px!important; height:38px!important; padding:0!important; border:0!important; border-radius:50%!important; background:transparent!important; color:#776b65!important; font:300 30px/1 Arial!important; cursor:pointer; }
.msb-popup-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.15fr); gap:54px; align-items:start; direction:ltr; }
.msb-popup-media,.msb-popup-content { min-width:0; direction:rtl; }
.msb-popup-preview { position:relative; width:100%; overflow:hidden; aspect-ratio:var(--msb-preview-ratio,1/1); border-radius:12px; background:#f3dfd3; }
.msb-popup-preview > img { position:absolute; inset:0; width:100%!important; height:100%!important; max-width:none!important; object-fit:contain; }
.msb-popup-preview-prompt { position:absolute; inset:0; display:none; flex-direction:column; align-items:center; justify-content:flex-end; padding:32px; background:rgba(244,229,220,.73); color:#66554d; text-align:center; }
.msb-popup-widget.is-preview-dirty .msb-popup-preview-prompt,.msb-popup-widget.is-generating .msb-popup-preview-prompt { display:flex; }
.msb-popup-widget.is-preview-dirty .msb-popup-preview > img,.msb-popup-widget.is-generating .msb-popup-preview > img { opacity:.35; }
.msb-popup-generate { display:inline-flex!important; align-items:center; justify-content:center; gap:9px; min-height:44px; padding:8px 24px; border:0; border-radius:24px; background:#fff; color:#5f514a; }
.msb-popup-generate-icon { display:inline-flex; align-items:center; justify-content:center; }
.msb-popup-generate-icon svg { width:18px; height:18px; fill:currentColor; }

.msb-popup-preview-prompt small { display:block; margin-top:14px; line-height:1.5; }
.msb-popup-status { min-height:18px; margin-top:8px; font-size:13px; }
.msb-popup-title { margin:0 0 28px; color:var(--msb-brown); font-size:34px; font-weight:400; line-height:1.2; }
.msb-popup-items { margin-bottom:28px; }
.msb-popup-items .msb-component-list { max-height:280px; overflow-y:auto; overflow-x:hidden; padding-left:10px; overscroll-behavior:contain; scrollbar-color:var(--msb-scrollbar-thumb,#a97961) var(--msb-scrollbar-track,#f4ece7); scrollbar-gutter:stable; }
.msb-popup-items .msb-component-list::-webkit-scrollbar { width:var(--msb-scrollbar-width,6px); }
.msb-popup-items .msb-component-list::-webkit-scrollbar-track { background:var(--msb-scrollbar-track,#f4ece7); border-radius:var(--msb-scrollbar-radius,10px); }
.msb-popup-items .msb-component-list::-webkit-scrollbar-thumb { background:var(--msb-scrollbar-thumb,#a97961); border-radius:var(--msb-scrollbar-radius,10px); }
.msb-popup-addons { padding-left:0; }
.msb-popup-total { display:flex; justify-content:flex-start; margin:22px 0 14px; }
.msb-popup-total-price { color:var(--msb-text); font-size:28px; }
.msb-popup-cart { display:flex; align-items:center; gap:14px; }
.msb-popup-cart .quantity { margin:0!important; padding:6px 10px; border-radius:24px; background:var(--msb-soft); }
.msb-popup-cart .quantity input { border:0; background:transparent; }
.msb-popup-cart .single_add_to_cart_button { flex:1; min-height:48px; border-radius:25px!important; background:var(--msb-brown)!important; }
@media(max-width:767px){.msb-popup-overlay{padding:10px}.msb-popup-dialog{width:100%;max-height:calc(100vh - 20px);padding:48px 20px 24px}.msb-popup-grid{grid-template-columns:1fr;gap:26px}.msb-popup-title{font-size:27px}.msb-popup-addons{max-height:none}.msb-popup-cart{flex-wrap:wrap}}
