/* Mobile purchase path: buy bar, checkout steps and summary, cart badge, sign-in, lists.
   Loaded after mobile-refinement.css on the shop layout and on the sign-in layout. */

/* ---- Checkout steps ---- */
.mahsun-modern .ms-steps{display:flex;align-items:center;gap:6px;list-style:none;margin:0 0 16px;padding:12px 14px;background:#fff;border:1px solid #e0e7ef;border-radius:14px;font-size:13px;color:#69788d}
.mahsun-modern .ms-steps li{display:flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}
.mahsun-modern .ms-steps li+li::before{content:"";flex:0 0 14px;height:1px;background:#ccd7e4}
.mahsun-modern .ms-steps li+li{flex:1 1 auto}
.mahsun-modern .ms-steps li+li::before{flex:1 1 14px}
.mahsun-modern .ms-steps-dot{display:inline-flex;align-items:center;justify-content:center;flex:0 0 24px;width:24px;height:24px;border-radius:50%;background:#eef2f7;color:#526477;font-size:12px;font-weight:700;line-height:1}
.mahsun-modern .ms-steps .is-current{color:#033593;font-weight:700}
.mahsun-modern .ms-steps .is-current .ms-steps-dot{background:#033593;color:#fff}
.mahsun-modern .ms-steps .is-done .ms-steps-dot{background:#e3f4ea;color:#17703f}
.mahsun-modern .ms-steps a{color:inherit;text-decoration:underline;text-underline-offset:3px}
@media(max-width:380px){.mahsun-modern .ms-steps{font-size:12px;padding:10px}.mahsun-modern .ms-steps li:not(.is-current)>span:not(.ms-steps-dot),.mahsun-modern .ms-steps li:not(.is-current)>a{overflow:hidden;text-overflow:ellipsis}}

/* ---- Notes ---- */
.mahsun-modern .ms-inline-note{display:flex;align-items:flex-start;gap:8px;margin:0 0 16px;padding:12px 14px;background:#fff4dc;border:1px solid #f1dfae;border-radius:12px;color:#4a3b0b;font-size:13px;line-height:1.9}
.mahsun-modern .ms-inline-note i{font-size:20px;line-height:1.3}

/* ---- Checkout: order summary ---- */
.mahsun-modern .ms-order-summary{margin:0 0 16px;background:#fff;border:1px solid #e0e7ef;border-radius:14px;overflow:hidden}
.mahsun-modern .ms-order-summary summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:10px 16px;cursor:pointer;list-style:none;font-weight:700;font-size:14px;color:#1d2b3f}
.mahsun-modern .ms-order-summary summary::-webkit-details-marker{display:none}
.mahsun-modern .ms-order-summary summary span{display:flex;align-items:center;gap:8px}
.mahsun-modern .ms-order-summary summary small{font-weight:400;color:#69788d;font-size:12px}
.mahsun-modern .ms-order-summary summary i{font-size:20px;color:#033593}
.mahsun-modern .ms-order-summary[open] .ms-order-summary-arrow{transform:rotate(180deg)}
.mahsun-modern .ms-order-summary ul{list-style:none;margin:0;padding:0 16px;border-top:1px solid #eef2f7}
.mahsun-modern .ms-order-summary li{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #eef2f7}
.mahsun-modern .ms-order-summary li img{flex:0 0 48px;width:48px;height:48px;object-fit:contain;border-radius:8px;background:#f6f8fb}
.mahsun-modern .ms-order-summary li div{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px}
.mahsun-modern .ms-order-summary li strong{font-size:13px;font-weight:600;color:#1d2b3f;line-height:1.8}
.mahsun-modern .ms-order-summary li small{font-size:12px;color:#69788d}
.mahsun-modern .ms-order-summary-price{flex:0 0 auto;font-size:13px;font-weight:700;color:#1d2b3f;white-space:nowrap}
.mahsun-modern .ms-order-summary>a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;color:#033593;font-size:13px;font-weight:600}

/* ---- Checkout: delivery and payment choices are whole-card targets ---- */
.mahsun-modern .ms-checkout-page .checkout-time-table .radio-box.custom-control{position:relative;padding:0!important;margin:0 0 10px!important;min-height:0}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;z-index:2;cursor:pointer}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-label{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:64px;margin:0;padding:12px 14px;padding-inline-start:46px;border:1px solid #ccd7e4;border-radius:12px;background:#fff;cursor:pointer}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-label::before{content:"";position:absolute;top:50%;right:14px;left:auto;width:20px;height:20px;margin-top:-10px;border:2px solid #8a9ab0;border-radius:50%;background:#fff!important;box-shadow:none}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-label::after{content:"";position:absolute;top:50%;right:19px;left:auto;width:10px;height:10px;margin-top:-5px;border-radius:50%;background:#033593!important;background-image:none!important;opacity:0}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-input:checked~.custom-control-label{border-color:#033593;background:#f4f8ff}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-input:checked~.custom-control-label::before{border-color:#033593}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-input:checked~.custom-control-label::after{opacity:1}
.mahsun-modern .ms-checkout-page .radio-box .custom-control-input:focus-visible~.custom-control-label{outline:3px solid #9db8ee;outline-offset:2px}
.mahsun-modern .ms-checkout-page .radio-box .checkout-additional-options-checkbox-image{position:static;flex:0 0 auto;width:auto;max-width:44px;max-height:36px;margin:0;font-size:26px;line-height:1;color:#033593}
.mahsun-modern .ms-checkout-page .radio-box .content-box{flex:1 1 auto;min-width:0;padding:0;margin:0}
.mahsun-modern .ms-checkout-page .radio-box .checkout-time-table-title-bar{font-size:14px;font-weight:700;color:#1d2b3f;line-height:1.8}
.mahsun-modern .ms-checkout-page .radio-box .checkout-time-table-subtitle-bar{list-style:none;margin:0;padding:0;font-size:12px;color:#69788d;line-height:1.8}
.mahsun-modern .ms-checkout-page .checkout-time-table{width:100%}

/* ---- Checkout: discount code before the totals ---- */
.mahsun-modern .ms-discount-box{margin:0 0 16px;padding:16px}
.mahsun-modern .ms-discount-box h2{margin:0 0 10px;font-size:15px;font-weight:700;color:#1d2b3f}
.mahsun-modern .ms-discount-row{display:flex;align-items:center;gap:10px}
.mahsun-modern .ms-discount-row .input-ui{flex:1 1 auto;min-width:0;height:46px}
.mahsun-modern .ms-discount-row .btn{flex:0 0 auto;min-height:46px;padding:8px 16px;border-radius:9px;font-size:13px;font-weight:600;white-space:nowrap}
.mahsun-modern .ms-discount-row .btn-outline-primary{border:1.5px solid #033593!important;color:#033593!important;background:#fff!important}
.mahsun-modern .ms-discount-row .btn-outline-primary:hover{background:#edf3ff!important}
.mahsun-modern .ms-discount-code{flex:1 1 auto;font-size:15px;letter-spacing:.5px;direction:ltr;text-align:start}

/* ---- Cart: quantity saves itself ---- */
.ms-cart-autosave .ms-cart-update{display:none}
.mahsun-modern .ms-cart-status{margin:8px 0;font-size:13px;color:#526477}

/* ---- One primary colour for the purchase buttons ---- */
.mahsun-modern .ms-button-checkout,.mahsun-modern .btn-primary-cm.ms-button-checkout,.mahsun-modern .btn-success.ms-button-checkout,.mahsun-modern #checkout-link,.mahsun-modern #payment-btn{background:#033593!important;border-color:#033593!important;color:#fff!important}
.mahsun-modern .ms-button-checkout:hover,.mahsun-modern #checkout-link:hover,.mahsun-modern #payment-btn:hover{background:#022a75!important}
.mahsun-modern .ms-button-checkout[disabled],.mahsun-modern #checkout-link[disabled]{background:#8a94a3!important;border-color:#8a94a3!important}

/* ---- Bottom navigation: cart count ---- */
.mobile-bottom-nav .ms-nav-cart-icon{position:relative;display:inline-flex}
.mobile-bottom-nav .ms-nav-count{position:absolute;top:-4px;inset-inline-end:-10px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#d92d20;color:#fff;font:700 11px/18px iranyekan,Tahoma,sans-serif;text-align:center}
.mobile-bottom-nav .ms-nav-count[hidden]{display:none}

/* ---- Product page: fixed buy bar (phones only) ---- */
.ms-buybar{display:none}
@media(max-width:767px){
 .mahsun-modern .ms-buybar{position:fixed;z-index:1040;inset-inline:0;bottom:calc(74px + env(safe-area-inset-bottom));display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;background:#fff;border-top:1px solid #dce5ef;box-shadow:0 -6px 18px rgba(16,36,71,.08);transform:translateY(120%);visibility:hidden;transition:transform .2s ease,visibility .2s}
 .mahsun-modern .ms-buybar.is-shown{transform:none;visibility:visible}
 .mahsun-modern .ms-buybar-price{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px;min-width:0;color:#1d2b3f;font-size:12px}
 .mahsun-modern .ms-buybar-price strong{font-size:18px;font-weight:800}
 .mahsun-modern .ms-buybar-price del{flex:0 0 100%;font-size:12px;color:#8a94a3}
 .mahsun-modern .ms-buybar-btn{flex:0 0 auto;min-height:46px;padding:10px 20px;border:0;border-radius:9px;background:#033593;color:#fff;font:700 14px/1.6 iranyekan,Tahoma,sans-serif}
 .mahsun-modern .ms-buybar-btn:active{background:#022a75}
 body.ms-has-buybar .mahsun-modern .main-content.ms-product-detail{padding-bottom:76px}
 @media(prefers-reduced-motion:reduce){.mahsun-modern .ms-buybar{transition:none}}
}

/* ---- Product page: less height before the photo, clearer colour choice, readable text ---- */
@media(max-width:767px){
 .mahsun-modern .ms-product-detail .title-breadcrumb-special{margin-bottom:8px!important}
 .mahsun-modern .ms-product-detail .breadcrumb nav{display:flex;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .mahsun-modern .ms-product-detail .breadcrumb nav::-webkit-scrollbar{display:none}
 .mahsun-modern .ms-product-detail .breadcrumb nav>*{flex:0 0 auto;white-space:nowrap}
 .mahsun-modern .ms-product-detail .ms-mobile-product-heading{margin-bottom:10px;font-size:19px;line-height:1.7}
 .mahsun-modern .ms-product-detail .tab-content :is(p,li,div){text-align:start!important}
}
.mahsun-modern .product-variant-color .ui-variant--color .ui-variant-shape[checked]{outline:2px solid #033593;outline-offset:3px}

/* ---- Lists: count + sort, sold-out cards, two columns for search ---- */
.mahsun-modern .ms-list-bar{clear:both;width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 14px}
.mahsun-modern .ms-list-bar .magazine-count{margin:0}
.mahsun-modern .ms-list-sort{display:flex;align-items:center;gap:8px;margin:0}
.mahsun-modern .ms-list-sort label{display:flex;align-items:center;gap:4px;margin:0;font-size:13px;color:#526477;white-space:nowrap}
.mahsun-modern .ms-list-sort label i{font-size:18px}
.mahsun-modern .ms-list-sort select{min-height:44px;padding:6px 12px;border:1px solid #ccd7e4;border-radius:9px;background:#fff;color:#1d2b3f;font:500 14px/1.6 iranyekan,Tahoma,sans-serif}
.mahsun-modern .product-card.is-sold-out .product-image-main{opacity:.55}
.mahsun-modern .product-card.is-sold-out .product-price{color:#8a94a3}
.mahsun-modern .product-card .ms-card-soldout,.mahsun-modern .product-card .ms-card-soldout a{background:#eef2f7!important;color:#3b4d65!important;border-color:#dce5ef!important}
.mahsun-modern .ms-search-results{clear:both;width:100%}
.mahsun-modern .ms-search-results .ms-all-products-grid{margin-top:0}

/* ---- Forms on phones: 16px text stops iOS zooming into the field ---- */
@media(max-width:767px){
 .mahsun-modern :is(input.input-ui,textarea.input-ui,.custom-select-ui select,.ms-list-sort select,.smart-search input){font-size:16px!important}
}

/* ---- Sign-in and registration ---- */
.mahsun-modern .ms-auth-hint{display:flex;align-items:flex-start;gap:8px;margin:4px 0 14px;padding:10px 12px;background:#edf3ff;border-radius:10px;color:#1d3a78;font-size:13px;line-height:1.9}
.mahsun-modern .ms-auth-hint i{font-size:20px;line-height:1.3}
.mahsun-modern .ms-auth-alt{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;padding:10px 16px;border:1.5px solid #033593;border-radius:9px;background:#fff;color:#033593;font-weight:700;font-size:14px;text-decoration:none}
.mahsun-modern .ms-auth-alt:hover{background:#edf3ff;color:#033593;text-decoration:none}
.mahsun-modern .ms-auth-alt i{font-size:20px}
.mahsun-modern.ms-auth .ms-auth-links a{display:inline-flex!important;align-items:center;min-height:44px;margin:0!important;padding:0;border:0!important;color:#033593;font-weight:600;text-decoration:underline;text-underline-offset:4px}
.mahsun-modern.ms-auth .ms-auth-links a::after,.mahsun-modern.ms-auth .ms-auth-links a::before{display:none!important}
.mahsun-modern .ms-auth-terms{margin:14px 0 0;font-size:12px;color:#69788d;line-height:1.9}
.mahsun-modern .ms-auth-terms a{color:#033593;text-decoration:underline}
.mahsun-modern .ms-cart-feedback .ms-button-cart,.mahsun-modern .dropdown-menu.cart .ms-button-cart{background:#fff!important;border:1.5px solid #033593!important;color:#033593!important}
[dir=ltr] .mahsun-modern .ms-checkout-page .radio-box .custom-control-label::before{left:14px;right:auto}
[dir=ltr] .mahsun-modern .ms-checkout-page .radio-box .custom-control-label::after{left:19px;right:auto}

/* ---- Header on phones: a little less height above the content ---- */
@media(max-width:767px){
 .mahsun-modern .main-header .topbar{padding-top:8px;padding-bottom:8px}
 .mahsun-modern .main-header .mahsun-brand img{max-height:40px;width:auto}
}
