/* Add-to-cart popups, part 2 (with css/mms-atc.css). New file names are needed for changes: magic-truffles-shop.com and the
   .com EN store view load CSS unmerged and Cloudflare caches skin CSS for 31 days. Replaces mms-atc-options.css.
   1. confirmation popup: AjaxPro caps .ajaxpro-form at max-width 85% (phones: the sheet was not full width) */
#ajaxpro-notice-form:has(.mms-atc){max-width:none!important;min-width:0!important}
/* the old header's mini-cart has z-index 99999 (checkout/cart/mini.phtml): keep overlay + popups above it */
body #ajaxpro-overlay{z-index:1000000!important}
body #ajaxpro-notice-form:has(.mms-atc),body #ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view){z-index:1000001!important}

/* ════ 2. "Choose options" popup: AjaxPro's product view (#ajaxpro-addcustomproduct-view) that opens when a product with
   options is added from a category list. Same dialog as the confirmation (css/mms-atc.css); separate file so the change gets a new URL past Cloudflare; Ultimo's product markup restyled. ════ */
#ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view){--a-ink:var(--mb-ink,#14202b);--a-body:var(--mb-body,#35424e);--a-mute:var(--mb-mute,#55606b);--a-c:var(--mb-blue,#1c5f9e);
  --a-hover:var(--mb-hover,#174f85);--a-t1:var(--mb-t1,#f3f8fc);--a-line:var(--mb-line,#dde6ee);--a-input:#6f8799;--a-ok:var(--mb-green,#2e6b12);
  position:fixed!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%);
  width:min(600px,calc(100vw - 32px))!important;max-width:none!important;min-width:0!important;max-height:calc(100vh - 32px);overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;
  margin:0!important;padding:20px 24px 24px!important;background:#fff!important;border:0!important;border-radius:16px!important;box-shadow:0 30px 80px -20px rgba(16,36,26,.45)!important;
  opacity:1!important;z-index:10050!important;font:400 15px/1.5 var(--mb-font,Inter,system-ui,sans-serif);color:var(--a-ink);text-align:left;-webkit-font-smoothing:antialiased}
body.mms-theme-green #ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view){--a-input:#7d9686}
body:has(#ajaxpro-addcustomproduct-view) #ajaxpro-overlay{background:rgba(16,36,26,.55)!important}
body:has(#ajaxpro-addcustomproduct-view) #fc_frame{display:none!important}
#ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view) *{box-sizing:border-box}
#ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view)>.btn-close{position:absolute!important;top:12px!important;right:12px!important;left:auto!important;width:44px!important;height:44px!important;margin:0!important;padding:0!important;
  background:none!important;border:0!important;border-radius:10px;font-size:0!important;line-height:0;text-indent:0!important;overflow:hidden;display:flex!important;align-items:center;justify-content:center;z-index:2}
#ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view)>.btn-close:before{content:"\00d7";font:400 28px/1 var(--mb-font,Inter,sans-serif);color:var(--a-body)}
#ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view)>.btn-close:hover{background:var(--a-t1)!important}
#ajaxpro-addcustomproduct-view .product-view,#ajaxpro-addcustomproduct-view .product-essential{margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}
#ajaxpro-addcustomproduct-view #product_addtocart_form{display:grid;grid-template-columns:132px minmax(0,1fr);gap:20px;align-items:start;margin:0}
#ajaxpro-addcustomproduct-view .product-img-box,#ajaxpro-addcustomproduct-view .product-shop{float:none!important;width:auto!important;margin:0!important;padding:0!important}
#ajaxpro-addcustomproduct-view .product-image{margin:0!important;border:0!important;background:var(--a-t1);border-radius:12px;overflow:hidden}
#ajaxpro-addcustomproduct-view .product-image img{width:100%!important;height:auto!important;aspect-ratio:1;object-fit:contain;display:block}
#ajaxpro-addcustomproduct-view .product-name{margin:0 0 6px!important;padding-right:44px}
#ajaxpro-addcustomproduct-view .product-name h1{margin:0!important;font:700 20px/1.25 var(--mb-head,var(--mb-font,Inter,sans-serif))!important;letter-spacing:-.015em;color:var(--a-ink)!important;text-transform:none!important}
#ajaxpro-addcustomproduct-view .availability{float:none!important;margin:0 0 4px!important;font-size:14px!important;color:var(--a-body)!important}
#ajaxpro-addcustomproduct-view .availability.in-stock span{color:var(--a-ok)!important;font-weight:600}
#ajaxpro-addcustomproduct-view .availability.out-of-stock span{color:#b42318!important;font-weight:600}
#ajaxpro-addcustomproduct-view .price-box{margin:0 0 14px!important;padding:0!important}
#ajaxpro-addcustomproduct-view .price-box .price{font-size:22px!important;font-weight:700!important;color:var(--a-ink)}
#ajaxpro-addcustomproduct-view .price-box .special-price .price{color:#c8102e}
#ajaxpro-addcustomproduct-view .price-box .old-price .price{font-size:15px!important;font-weight:400!important;color:var(--a-mute)}
#ajaxpro-addcustomproduct-view .product-options,#ajaxpro-addcustomproduct-view .product-options-bottom{margin:0!important;padding:0!important;border:0!important;background:none!important}
#ajaxpro-addcustomproduct-view .product-options dl{margin:0 0 14px!important}
#ajaxpro-addcustomproduct-view .product-options dt{margin:0 0 6px!important;padding:0!important}
#ajaxpro-addcustomproduct-view .product-options dt label{font-weight:600!important;font-size:15px!important;color:var(--a-ink)!important}
#ajaxpro-addcustomproduct-view .product-options dt label:after,#ajaxpro-addcustomproduct-view .product-options dt label:before{content:none!important;display:none!important}
#ajaxpro-addcustomproduct-view .product-options dt label em,#ajaxpro-addcustomproduct-view .product-options p.required{display:none!important}
#ajaxpro-addcustomproduct-view .product-options dd{margin:0 0 12px!important;padding:0!important;border:0!important}
#ajaxpro-addcustomproduct-view .product-options dd.last{margin-bottom:0!important}
#ajaxpro-addcustomproduct-view .product-options select,#ajaxpro-addcustomproduct-view .product-options input.input-text{width:100%!important;min-height:48px;padding:0 12px!important;border:1.5px solid var(--a-input)!important;
  border-radius:10px!important;background-color:#fff;font:500 16px/1.2 var(--mb-font,Inter,sans-serif)!important;color:var(--a-ink)!important;box-shadow:none!important}
#ajaxpro-addcustomproduct-view .product-options select:focus,#ajaxpro-addcustomproduct-view .product-options input.input-text:focus{outline:2px solid var(--a-c);outline-offset:1px;border-color:var(--a-c)!important}
#ajaxpro-addcustomproduct-view .validation-advice{margin-top:4px;font-size:14px;color:#b42318}
#ajaxpro-addcustomproduct-view .product-options-bottom>*:not(.add-to-cart){margin:0!important}
#ajaxpro-addcustomproduct-view .add-to-cart{float:none!important;width:auto!important;margin:0!important;padding:0!important;height:auto!important;display:grid;grid-template-columns:76px minmax(0,1fr);gap:10px;align-items:stretch}
#ajaxpro-addcustomproduct-view .qty-wrapper{float:none!important;margin:0!important;padding:0!important;display:block!important;height:auto!important;min-height:0!important}
#ajaxpro-addcustomproduct-view .qty-wrapper label,#ajaxpro-addcustomproduct-view .qty-buttons-wrapper{display:none!important}
#ajaxpro-addcustomproduct-view .qty-wrapper input.qty{width:100%!important;height:48px!important;margin:0!important;border:1.5px solid var(--a-input)!important;border-radius:10px!important;text-align:center;
  font:600 17px/1 var(--mb-font,Inter,sans-serif)!important;color:var(--a-ink)!important;background:#fff!important;box-shadow:none!important}
#ajaxpro-addcustomproduct-view button.btn-cart{float:none!important;margin:0!important;width:100%!important;min-height:48px;padding:0 16px!important;border:0!important;border-radius:10px!important;
  background:var(--a-c)!important;color:#fff!important;font:700 16px/1.2 var(--mb-font,Inter,sans-serif)!important;text-transform:none!important;letter-spacing:0!important;box-shadow:none!important;cursor:pointer}
#ajaxpro-addcustomproduct-view button.btn-cart span{all:unset;font:inherit;color:inherit}
#ajaxpro-addcustomproduct-view button.btn-cart:hover{background:var(--a-hover)!important}
#ajaxpro-addcustomproduct-view button.btn-cart:focus-visible{outline:2px solid var(--a-ink);outline-offset:2px}
#ajaxpro-addcustomproduct-view .paypal-wrapper,#ajaxpro-addcustomproduct-view .payment-product-page,#ajaxpro-addcustomproduct-view .add-to-links{display:none!important}
@media (max-width:767px){
  #ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view){left:0!important;right:0!important;top:auto!important;bottom:0!important;transform:none;width:100%!important;
    max-height:92vh;border-radius:16px 16px 0 0!important;padding:16px 16px 20px!important;padding-bottom:max(20px,env(safe-area-inset-bottom))!important}
  #ajaxpro-notice-form:has(#ajaxpro-addcustomproduct-view)>.btn-close{top:8px!important;right:6px!important}
  #ajaxpro-addcustomproduct-view #product_addtocart_form{grid-template-columns:72px minmax(0,1fr);gap:2px 14px}
  #ajaxpro-addcustomproduct-view .price-box{margin:2px 0 0!important}
  #ajaxpro-addcustomproduct-view .product-shop>.product-options{margin-top:14px!important}
  #ajaxpro-addcustomproduct-view .product-shop>.product-options-bottom{margin-top:12px!important}
  #ajaxpro-addcustomproduct-view .product-name h1{font-size:18px!important}
  #ajaxpro-addcustomproduct-view .price-box .price{font-size:20px!important}
  /* options + button span the full sheet width under image/title */
  #ajaxpro-addcustomproduct-view .product-shop{display:contents}
  #ajaxpro-addcustomproduct-view .product-shop>*{grid-column:2}
  #ajaxpro-addcustomproduct-view .product-shop>.product-options,#ajaxpro-addcustomproduct-view .product-shop>.product-options-bottom{grid-column:1 / -1}
  #ajaxpro-addcustomproduct-view .product-img-box{grid-row:1 / span 3}
  #ajaxpro-addcustomproduct-view .add-to-cart{grid-template-columns:72px minmax(0,1fr)}
  #ajaxpro-addcustomproduct-view button.btn-cart{min-height:50px}
}
