body.rscr-popup-open{overflow:hidden!important;touch-action:none!important}
body.rscr-popup-open .mfp-bg,body.rscr-popup-open .mfp-wrap.wd-popup-added-cart-wrap,body.rscr-popup-open .wd-close-side{display:none!important}
body.rscr-popup-open #rsp-toast,body.rscr-popup-open .rssp-toast{display:none!important}
#rscr-popup,#rscr-popup *{box-sizing:border-box}
#rscr-popup{position:fixed;inset:0;z-index:999999;display:none;direction:rtl;font-family:inherit;-webkit-tap-highlight-color:transparent}
#rscr-popup.is-open{display:block}
.rscr-backdrop{position:fixed;inset:0;background:rgba(17,24,39,.56);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;transition:opacity .2s ease}
#rscr-popup.is-open .rscr-backdrop{opacity:1}
.rscr-dialog{position:fixed;left:0;right:0;bottom:0;width:100%;max-height:91vh;display:flex;flex-direction:column;background:#fff;border-radius:22px 22px 0 0;box-shadow:0 -14px 45px rgba(15,23,42,.22);transform:translateY(105%);opacity:0;transition:transform .26s cubic-bezier(.22,.8,.3,1),opacity .2s ease;overflow:hidden}
#rscr-popup.is-open .rscr-dialog{transform:translateY(0);opacity:1}
.rscr-dialog::before{content:"";display:block;width:48px;height:5px;flex:0 0 auto;border-radius:99px;background:#d6dae0;margin:9px auto 1px}
.rscr-close{position:absolute;top:14px;left:14px;z-index:5;width:39px;height:39px;display:grid;place-items:center;border:0;border-radius:50%;background:#f4f5f7;color:#222b3a;cursor:pointer;padding:0;font-family:inherit;transition:background .15s ease,transform .15s ease}
.rscr-close:hover{background:#e9ebef;transform:rotate(4deg)}
.rscr-close svg{width:19px;height:19px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.rscr-body{overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:9px 14px 0}
.rscr-success{display:flex;align-items:center;gap:11px;margin:1px 45px 9px 0;padding:0 1px}
.rscr-success-icon{width:45px;height:45px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:linear-gradient(135deg,#11b981,#05a66f);color:#fff;box-shadow:0 8px 20px rgba(17,185,129,.26)}
.rscr-success-icon svg{width:25px;height:25px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.rscr-success-text{min-width:0;text-align:right}
.rscr-success-text b{display:block;margin:0 0 2px;color:#111827;font-size:15px;line-height:1.7;font-weight:900}
.rscr-success-text span{display:block;color:#6b7280;font-size:11.5px;line-height:1.7}
.rscr-cart-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px;padding:9px 11px;border-radius:11px;background:#f7f8fa;border:1px solid #eef0f3;color:#4b5563;font-size:11.5px}
.rscr-cart-line strong{display:inline-flex;align-items:center;gap:4px;color:#111827;font-size:12px}
.rscr-cart-line i{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;border-radius:10px;background:#ff3d2e;color:#fff;font-style:normal;font-size:10px;font-weight:800}
.rscr-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:0 0 10px}
.rscr-heading h3{margin:0;padding:0;color:#111827;font-size:14.5px;line-height:1.7;font-weight:900;letter-spacing:-.1px}
.rscr-heading span{flex:0 0 auto;padding:4px 8px;border-radius:7px;background:#fff1ef;color:#e83224;font-size:10px;font-weight:800;white-space:nowrap}
.rscr-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding:0 0 4px}
.rscr-item{position:relative;display:flex;flex-direction:column;min-width:0;overflow:hidden;border:1px solid #e9ecf0;border-radius:13px;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.04)}
.rscr-item-image{position:relative;display:block;height:116px;padding:8px 9px;background:#fff;overflow:hidden}
.rscr-item-image img{display:block;width:100%;height:100%;object-fit:contain;margin:auto;transition:transform .2s ease}
.rscr-item:hover .rscr-item-image img{transform:scale(1.025)}
.rscr-item-badge,.rscr-item-discount{position:absolute;top:7px;z-index:2;display:inline-flex;align-items:center;justify-content:center;min-height:21px;padding:2px 6px;border-radius:6px;font-size:9px;line-height:1.3;font-weight:800;white-space:nowrap}
.rscr-item-badge{right:7px;max-width:72%;overflow:hidden;text-overflow:ellipsis;background:#fff3e8;color:#b45309;border:1px solid #ffe1c2}
.rscr-item-discount{left:7px;background:#ff3d2e;color:#fff;box-shadow:0 4px 10px rgba(255,61,46,.2)}
.rscr-item-content{display:flex;flex-direction:column;flex:1 1 auto;padding:0 8px 8px}
.rscr-item-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:35px;max-height:35px;margin:0 0 5px;color:#182132;font-size:11.5px;line-height:1.55;font-weight:700;text-align:right}
.rscr-item-title a{color:inherit;text-decoration:none;font:inherit}
.rscr-item-meta{display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:16px;margin:0 0 5px;color:#6b7280;font-size:9.5px;line-height:1.5}
.rscr-item-rating{display:inline-flex;align-items:center;gap:3px;color:#4b5563;direction:ltr}
.rscr-item-rating svg{width:11px;height:11px;fill:#fbbf24;stroke:#fbbf24}
.rscr-item-stock{display:inline-flex;align-items:center;gap:3px;color:#059669;white-space:nowrap}
.rscr-item-stock svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.rscr-item-price{display:flex;align-items:flex-end;justify-content:flex-start;min-height:30px;margin:auto 0 7px;color:#111827;font-size:12.5px;line-height:1.6;font-weight:900;text-align:right}
.rscr-item-price .price{display:flex;flex-direction:column;align-items:flex-start;gap:0;margin:0;color:inherit;font-size:inherit;line-height:1.55;font-weight:inherit}
.rscr-item-price .price del{color:#aeb5c0;font-size:9px;line-height:1.4;font-weight:500;text-decoration:line-through}
.rscr-item-price .price ins{display:inline-flex;align-items:center;gap:2px;color:#111827;font-size:12.5px;font-weight:900;text-decoration:none;background:none}
.rscr-item-price .price ins svg,.rscr-item-price .price .toman-icon{width:12px;height:12px}
.rscr-add{display:flex;align-items:center;justify-content:center;width:100%;min-height:36px;padding:0 7px;border:0;border-radius:9px;background:#ff3d2e;color:#fff!important;font-family:inherit;font-size:11.5px;line-height:1.4;font-weight:800;text-decoration:none!important;cursor:pointer;transition:background .15s ease,transform .15s ease;box-shadow:0 6px 14px rgba(255,61,46,.17)}
.rscr-add:hover,.rscr-add:focus{background:#e83224;color:#fff!important}
.rscr-add:active{transform:scale(.985)}
.rscr-add.is-loading{pointer-events:none;opacity:.68}
.rscr-add.is-added{pointer-events:none;background:#e9f8f0!important;color:#07824f!important;box-shadow:none}
.rscr-empty{padding:34px 16px;text-align:center;border:1px dashed #dfe3e8;border-radius:13px;background:#fafbfc;color:#6b7280;font-size:12px;line-height:1.9}
.rscr-empty b{display:block;margin-bottom:5px;color:#182132;font-size:14px}
.rscr-loading{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding-bottom:4px}
.rscr-skeleton{height:226px;border:1px solid #edf0f3;border-radius:13px;background:linear-gradient(100deg,#f5f6f8 20%,#eceff3 38%,#f5f6f8 56%);background-size:200% 100%;animation:rscrSkeleton 1.2s linear infinite}
.rscr-footer{flex:0 0 auto;display:flex;align-items:center;gap:8px;padding:11px 14px calc(12px + env(safe-area-inset-bottom));border-top:1px solid #eef0f2;background:#fff}
.rscr-cart-btn{display:flex;align-items:center;justify-content:center;gap:7px;flex:1 1 auto;min-height:44px;padding:0 12px;border-radius:11px;background:#182132;color:#fff!important;font-size:12.5px;font-weight:800;text-decoration:none!important;transition:background .15s ease}
.rscr-cart-btn:hover{background:#0f172a}
.rscr-cart-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.rscr-continue{flex:0 0 auto;min-height:44px;padding:0 17px;border:1px solid #dfe3e8;border-radius:11px;background:#fff;color:#374151;font-family:inherit;font-size:12.5px;font-weight:700;cursor:pointer}
.rscr-continue:hover{background:#f7f8fa}
.rscr-error{padding:25px 15px;text-align:center;border-radius:12px;background:#fff7f6;color:#b42318;font-size:12px;line-height:1.9}
.rscr-error button{margin-top:10px;border:0;border-radius:8px;background:#ff3d2e;color:#fff;padding:8px 14px;font-family:inherit;cursor:pointer}
@keyframes rscrSkeleton{to{background-position:-200% 0}}
@media(min-width:783px){
 .rscr-dialog{left:50%;right:auto;bottom:auto;top:50%;width:min(680px,92vw);max-height:86vh;border-radius:20px;transform:translate(-50%,calc(-50% + 24px)) scale(.985);opacity:0}
 #rscr-popup.is-open .rscr-dialog{transform:translate(-50%,-50%) scale(1);opacity:1}
 .rscr-dialog::before{display:none}
 .rscr-body{padding:18px 20px 0}
 .rscr-success{margin:0 42px 7px 0}
 .rscr-grid,.rscr-loading{grid-template-columns:repeat(4,minmax(0,1fr))}
 .rscr-footer{padding:13px 20px 16px}
 .rscr-item-image{height:122px}
 .rscr-close{top:15px;left:16px}
}
@media(max-width:359px){.rscr-grid,.rscr-loading{grid-template-columns:1fr}.rscr-item-image{height:150px}}
@media(prefers-reduced-motion:reduce){#rscr-popup *,.rscr-dialog{animation:none!important;transition:none!important}}
