/* OPIF Popup Checkout Pro v2.5 */
:root{--opif-orange:#ff7043;--opif-accent:#ff7043;--opif-green:#269b62;--opif-button:#22a447;--opif-border:#e2e5e8;--opif-text:#202936;--opif-modal-width:620px;--opif-desktop-height:88vh;--opif-mobile-height:92vh;--opif-radius:16px}
body.opif-lock{overflow:hidden!important}
.opif-overlay{position:fixed;inset:0;background:rgba(0,0,0,.58);z-index:999999;display:none;align-items:center;justify-content:center;padding:18px;overflow:auto}
.opif-overlay.is-open{display:flex}
.opif-modal{width:min(var(--opif-modal-width),100%);height:min(var(--opif-desktop-height),900px);max-height:var(--opif-desktop-height);display:flex;flex-direction:column;background:#fff;border-radius:var(--opif-radius);box-shadow:0 18px 70px rgba(0,0,0,.3);overflow:hidden;position:relative}
.opif-header{height:66px;padding:0 24px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f2}
.opif-header h2{font-size:20px;line-height:1.2;margin:0;font-weight:700;color:#111827}
.opif-close{border:0;background:none;font-size:31px;line-height:1;color:#111;cursor:pointer;padding:0}
.opif-body{flex:1;min-height:0;overflow:auto}
.opif-product-card{padding:18px 24px;display:flex;gap:18px;align-items:center;background:#fbfcfd;border-bottom:1px solid #edf0f2}
.opif-product-card img{width:82px;height:82px;object-fit:cover;border:1px solid #dfe3e7;border-radius:11px;background:#fff}
.opif-product-info{flex:1;min-width:0;position:relative}
.opif-product-info h3{font-family:Georgia,"Times New Roman",serif;font-size:20px;margin:0 0 9px;color:#283241;line-height:1.25;padding-right:120px}
.opif-price{position:absolute;right:0;top:35px;font-family:Georgia,"Times New Roman",serif;font-size:20px;font-weight:700;color:var(--opif-green);white-space:nowrap}
.opif-qty{display:inline-flex;border:1px solid #d9dfe5;border-radius:8px;overflow:hidden;background:#fff}
.opif-qty button,.opif-qty span{width:39px;height:38px;border:0;border-right:1px solid #d9dfe5;background:#fff;display:flex;align-items:center;justify-content:center;font-size:19px;color:#46515e}
.opif-qty span{font-size:16px}.opif-qty button:last-child{border-right:0}
.opif-fieldset,.opif-section{padding:15px 24px;border-top:1px solid #edf0f2}
.opif-fieldset h3,.opif-section h3{font-family:Georgia,"Times New Roman",serif;color:#273241;font-size:19px;margin:0 0 13px;font-weight:700}
.opif-fieldset h3 span,.opif-section h3 span{margin-right:8px}
.opif-fieldset label{display:block;font-size:14px;color:#4d5662;margin:0 0 6px}.opif-fieldset label b{color:#e45445}
.opif-input{height:54px;border:1.5px solid #dfe3e6;border-radius:14px;display:flex;align-items:center;overflow:hidden;background:#fff;margin-bottom:14px}
.opif-input:focus-within{border-color:var(--opif-accent);box-shadow:0 0 0 3px rgba(255,112,67,.1)}
.opif-input>span{width:60px;height:100%;display:flex;align-items:center;justify-content:center;background:#f1f2f4;font-size:22px;flex:none}
.opif-input input,.opif-input select{border:0!important;outline:0!important;background:#fff!important;height:100%!important;flex:1;min-width:0;padding:0 14px!important;font-family:Georgia,"Times New Roman",serif;font-size:15px;color:#303944;box-shadow:none!important}
.opif-choice{min-height:54px;border:1.5px solid var(--opif-border);border-radius:14px;margin:0 0 9px;padding:0 16px;display:flex;align-items:center;gap:12px;cursor:pointer;position:relative;background:#fff;transition:.15s}
.opif-choice.selected{border-color:var(--opif-accent);background:#fffaf7;box-shadow:0 0 0 3px color-mix(in srgb, var(--opif-accent) 8%, transparent)}
.opif-choice input{position:absolute;opacity:0;pointer-events:none}
.opif-radio{width:27px;height:27px;border:2px solid #7b8085;border-radius:50%;display:block;flex:none;position:relative}
.opif-choice.selected .opif-radio{border-color:#1682df}.opif-choice.selected .opif-radio:after{content:"";position:absolute;inset:5px;border-radius:50%;background:#1682df}
.opif-choice>span:not(.opif-radio):not(.opif-check):not(.opif-gw-logo){font-family:Georgia,"Times New Roman",serif;font-size:15px;color:#273241}
.opif-choice strong{margin-left:auto;color:#2d9b66;font-family:Georgia,"Times New Roman",serif;font-size:16px;white-space:nowrap}
.opif-payment.selected .opif-radio{border-color:var(--opif-accent)}.opif-payment.selected .opif-radio:after{background:var(--opif-orange)}
.opif-check{margin-left:auto;width:38px;height:38px;border-radius:50%;display:none;align-items:center;justify-content:center;background:#fff0e9;color:var(--opif-orange);font-size:22px;font-weight:700}
.opif-payment.selected .opif-check{display:flex}
.opif-gw-logo{margin-left:auto;min-width:70px;text-align:center;font-weight:700;font-size:13px;color:#555;border:1px solid #ddd;border-radius:7px;padding:6px 8px}
.opif-summary{padding-bottom:105px}
.opif-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0;border-bottom:1px solid #eceff1;font-family:Georgia,"Times New Roman",serif;font-size:15px;color:#69717c}
.opif-row strong{font-size:16px;color:#2c9b67}.opif-row.opif-total{font-weight:700;color:#273241;font-size:21px;border-bottom:3px double #dfe3e7}.opif-row.opif-total strong{font-size:22px}
.opif-coupon{display:flex;gap:10px;margin-top:13px}.opif-coupon input{height:48px;border:1px solid #dfe3e7;flex:1;padding:0 14px;font-family:Georgia,"Times New Roman",serif;font-size:15px;outline:none}.opif-coupon button{width:105px;border:0;background:#2ba446;color:#fff;font-family:Georgia,"Times New Roman",serif;font-weight:700;cursor:pointer}
.opif-message{display:none;margin-top:12px;padding:10px 12px;border-radius:9px;background:#f4f7f5;color:#246b46;font-size:14px}.opif-header + .opif-message{margin:8px 18px 0}.opif-message.error{background:#fff0ef;color:#a1271e}.opif-message.is-warning{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(390px,calc(100% - 42px));box-sizing:border-box;margin:0;padding:18px 44px 18px 18px;display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #f0c5bf;border-radius:16px;box-shadow:0 20px 55px rgba(35,20,20,.22),0 0 0 9999px rgba(18,25,32,.28);color:#8f241b;z-index:100;animation:opifWarningIn .18s ease-out}.opif-warning-icon{width:36px;height:36px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff0ed;color:#d13a2d;border:1px solid #f4c5bf;font-size:22px;font-weight:800}.opif-warning-content{min-width:0;display:flex;flex-direction:column;gap:3px}.opif-warning-content strong{font-size:14px;color:#7d2119}.opif-warning-text{font-size:14px;line-height:1.5;color:#8f4a43}.opif-warning-close{position:absolute;right:10px;top:9px;width:30px;height:30px;border:0;border-radius:50%;background:#f7f1f0;color:#6f625f;font-size:22px;line-height:1;cursor:pointer}.opif-warning-close:hover{background:#eee5e3;color:#3d3634}@keyframes opifWarningIn{from{opacity:0;transform:translate(-50%,-47%) scale(.97)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}
.opif-footer{position:relative;flex:none;background:rgba(255,255,255,.98);padding:10px 24px;border-top:1px solid #e6e9eb;box-shadow:0 -5px 16px rgba(0,0,0,.08);z-index:5}
#opif-submit{width:100%;height:50px;border:0;border-radius:8px;background:var(--opif-button);color:#fff;font-family:Georgia,"Times New Roman",serif;font-size:20px;cursor:pointer}
#opif-submit:disabled{opacity:.7;cursor:wait}
#opif-submit.loading:after{content:"";display:inline-block;width:15px;height:15px;margin-left:8px;border:2px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;vertical-align:-2px;animation:opifspin .7s linear infinite}
@keyframes opifspin{to{transform:rotate(360deg)}}
.opif-shortcode-btn{cursor:pointer}
@media(max-width:700px){
 .opif-overlay{padding:0;align-items:flex-end;overflow:hidden}
 .opif-modal{width:100%;height:min(var(--opif-mobile-height),calc(100dvh - 70px));max-height:calc(100dvh - 70px);border-radius:var(--opif-radius) var(--opif-radius) 0 0}
 .opif-body{max-height:none;padding-bottom:0}
 .opif-header{height:52px;padding:0 14px}.opif-header h2{font-size:17px}.opif-close{font-size:28px}
 .opif-product-card{padding:14px 15px;gap:12px}.opif-product-card img{width:70px;height:70px}
 .opif-product-info h3{font-size:17px;padding-right:90px;margin-bottom:7px}.opif-price{font-size:17px;top:27px}
 .opif-qty button,.opif-qty span{width:34px;height:34px;font-size:17px}
 .opif-fieldset,.opif-section{padding:10px 13px}.opif-fieldset h3,.opif-section h3{font-size:17px;margin-bottom:10px}
 .opif-input{height:42px;margin-bottom:7px}.opif-input>span{width:48px;font-size:18px}.opif-input input,.opif-input select{font-size:14px}
 .opif-choice{min-height:46px;border-radius:12px;padding:0 13px;margin-bottom:9px}.opif-choice>span:not(.opif-radio):not(.opif-check):not(.opif-gw-logo){font-size:14px}.opif-choice strong{font-size:14px}.opif-radio{width:25px;height:25px}
 .opif-gw-logo{min-width:56px;font-size:11px;padding:5px}.opif-check{width:33px;height:33px;font-size:20px}
 .opif-row{font-size:14px;padding:8px 0}.opif-row strong{font-size:15px}.opif-row.opif-total{font-size:18px}.opif-row.opif-total strong{font-size:19px}
 .opif-coupon input{height:45px;font-size:14px}.opif-coupon button{width:92px;font-size:14px}.opif-summary{padding-bottom:12px}.opif-footer{width:100%;padding:8px 13px;position:relative;z-index:100;flex:none}#opif-submit{display:block!important;visibility:visible!important;opacity:1!important;height:46px;font-size:17px;line-height:46px;padding:0}
}

.opif-hidden{display:none!important}
.opif-choice.selected{border-color:var(--opif-accent)}
.opif-payment.selected .opif-radio{border-color:var(--opif-accent)}
.opif-payment.selected .opif-radio:after{background:var(--opif-accent)}
.opif-payment.selected .opif-check{color:var(--opif-accent)}

@media(max-width:700px){body.opif-lock .opif-overlay{z-index:2147483000}.opif-footer{background:#fff!important}.opif-body{overflow-y:auto;-webkit-overflow-scrolling:touch}}

/* v2.6 cart checkout + admin preview refinements */
.opif-cart-product-card{display:block!important;padding:14px 18px!important}
.opif-cart-item{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid #edf0f2}
.opif-cart-item:last-child{border-bottom:0}
.opif-cart-item img{width:58px!important;height:58px!important;flex:none!important;border-radius:9px!important}
.opif-cart-item-info{flex:1;min-width:0}
.opif-cart-item-info h3{font-size:16px!important;padding:0!important;margin:0 0 5px!important}
.opif-cart-meta{display:flex;justify-content:space-between;align-items:center;color:#6b7480;font-size:13px}
.opif-cart-meta strong{color:#299361;font-family:Georgia,"Times New Roman",serif}
.opif-body.opif-cart-loading:after{content:"কার্টের তথ্য লোড হচ্ছে…";display:flex;align-items:center;justify-content:center;position:absolute;inset:66px 0 0;background:rgba(255,255,255,.84);z-index:10;font-weight:600;color:#59636e}
.opif-footer{position:sticky!important;bottom:0!important;flex:none!important;z-index:20!important}
@media(max-width:700px){
 .opif-modal{z-index:1000001}
 .opif-footer{position:sticky!important;bottom:0!important;padding:8px 10px!important;background:#fff!important}
 #opif-submit{height:46px!important;font-size:17px!important;display:block!important;visibility:visible!important;opacity:1!important}
 .opif-cart-product-card{padding:8px 13px!important}
 .opif-cart-item img{width:48px!important;height:48px!important}
 .opif-cart-item-info h3{font-size:14px!important}
 .opif-cart-meta{font-size:12px}
}
/* Admin text editor: popup-like serial groups and responsive live preview */
.opif-admin .opif-text-group-title{display:flex;align-items:center;gap:8px;margin:16px 0 7px;padding:7px 10px;border-radius:9px;background:#f4f6f8;color:#394553;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.opif-admin .opif-text-group-title:first-child{margin-top:0}
.opif-admin .opif-text-group-title span{width:7px;height:7px;border-radius:50%;background:#ff7043}
.opif-admin .opif-preview-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.opif-admin .opif-preview-toolbar strong{display:block;font-size:13px;color:#26313e}
.opif-admin .opif-preview-toolbar small{display:block;color:#89929d;font-size:10px;margin-top:2px}
.opif-admin .opif-device-toggle{display:flex;border:1px solid #dfe4e9;background:#fff;border-radius:9px;padding:3px;gap:3px}
.opif-admin .opif-device-toggle button{border:0;background:transparent;border-radius:6px;padding:6px 9px;font-size:11px;color:#697480;cursor:pointer}
.opif-admin .opif-device-toggle button.active{background:#1f2937;color:#fff}
.opif-admin .opif-live-preview.is-mobile-preview{max-width:390px;margin:0 auto}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-modal{max-width:360px;margin:auto;border-radius:18px}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-head{padding:12px 13px}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-head strong{font-size:14px}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-body{padding:9px}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-section{margin-top:8px;padding:9px}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-section h4{font-size:11px}
.opif-admin .opif-live-preview.is-mobile-preview .opif-preview-option{font-size:10px;padding:7px}
@media(max-width:900px){
 .opif-admin .opif-live-preview{max-width:100%}
 .opif-admin .opif-text-editor{grid-template-columns:1fr}
}

/* Variable product selection: added only for OPIF popup product-loop ordering. */
.opif-variation-wrap{background:#fff}
.opif-variation-label{display:block;font-size:14px;color:#4d5662;margin:0 0 6px}
.opif-variation-label b{color:#e45445}
.opif-variation-input{margin-bottom:10px}
.opif-variation-input>span{width:48px;font-size:18px}
.opif-variation-select{border:0!important;outline:0!important;background:#fff!important;height:100%!important;flex:1;min-width:0;padding:0 14px!important;font-family:Georgia,"Times New Roman",serif;font-size:15px;color:#303944;box-shadow:none!important}
@media(max-width:700px){
 .opif-variation-label{font-size:13px;margin-bottom:5px}
 .opif-variation-input{height:42px}
 .opif-variation-select{font-size:14px}
}

/* OPIF requested logo/title alignment only */
.opif-logo-bar{flex:none;display:flex;align-items:center;justify-content:center;padding:8px 24px 6px;background:#fff;border-bottom:1px solid #edf0f2}
.opif-logo-bar img{display:block;max-width:min(220px,70%);max-height:52px;width:auto;height:auto;object-fit:contain}
.opif-header{position:relative;justify-content:center}
.opif-header h2{text-align:center;width:100%;padding:0 42px}
.opif-close{position:absolute;right:24px;top:50%;transform:translateY(-50%)}
@media(max-width:700px){
 .opif-logo-bar{padding:6px 14px 4px}
 .opif-logo-bar img{max-width:180px;max-height:42px}
 .opif-header h2{padding:0 38px}
 .opif-close{right:14px}
}

/* OPIF customization: uploaded icons and admin preview parity */
.opif-heading-icon{width:1.15em;height:1.15em;object-fit:contain;display:inline-block;vertical-align:-.16em;margin-right:7px;border:0;background:transparent}
.opif-button-icon{width:1.05em;height:1.05em;object-fit:contain;display:inline-block;vertical-align:-.14em;margin-right:7px;border:0;background:transparent}
#opif-title{display:flex;align-items:center;justify-content:center;gap:0}
#opif-title .opif-heading-text{display:inline-block}
#opif-apply-coupon{display:flex;align-items:center;justify-content:center;gap:0}
#opif-submit{display:flex;align-items:center;justify-content:center;gap:0}
.opif-admin .opif-color-field{display:flex;align-items:center;gap:8px}
.opif-admin .opif-color-picker{width:58px!important;height:40px!important;padding:3px!important;flex:none}
.opif-admin .opif-hex-input{max-width:140px!important;font-family:monospace!important;text-transform:uppercase}
.opif-admin .opif-icon-preview{width:54px;height:54px;border:1px solid #dfe5ea;border-radius:10px;background:#fff;display:flex;align-items:center;justify-content:center;margin-bottom:7px;overflow:hidden}
.opif-admin .opif-icon-preview img{max-width:42px;max-height:42px;object-fit:contain}
.opif-admin .opif-preview-logo{display:flex;align-items:center;justify-content:center;padding:9px 14px;background:#fff;border-bottom:1px solid #edf0f2;min-height:10px}
.opif-admin .opif-preview-logo img{max-width:180px;max-height:52px;object-fit:contain}
.opif-admin .opif-preview-head strong{display:flex;align-items:center;justify-content:center;width:100%;gap:5px;text-align:center}
.opif-admin .opif-preview-icon{width:16px;height:16px;object-fit:contain;vertical-align:-3px;margin-right:4px}
.opif-admin .opif-preview-coupon{display:flex;gap:7px;margin-top:9px;align-items:center}
.opif-admin .opif-preview-coupon>span{height:32px;flex:1;border:1px solid #dfe4e8;border-radius:7px;padding:8px;color:#a0a8b1;font-size:10px}
.opif-admin .opif-preview-coupon button{height:32px;border:0;border-radius:7px;background:var(--preview-button,#22a447);color:#fff;padding:0 10px;font-weight:700}
.opif-admin .opif-preview-button{background:var(--preview-button,#22a447)!important;display:flex;align-items:center;justify-content:center}
.opif-admin .opif-preview-footer{padding:9px 12px;border-top:1px solid #edf0f2;background:#fff}
@media(max-width:700px){.opif-heading-icon{width:1em;height:1em;margin-right:5px}.opif-button-icon{width:1em;height:1em;margin-right:5px}}


/* OPIF premium popup finish — visual sizing/spacing only. */
.opif-overlay{background:rgba(15,23,42,.62);backdrop-filter:blur(3px);padding:20px}
.opif-modal{width:min(var(--opif-modal-width),680px);height:min(var(--opif-desktop-height),860px);max-height:calc(100dvh - 40px);border:1px solid rgba(255,255,255,.85);border-radius:18px;box-shadow:0 28px 90px rgba(15,23,42,.28)}
.opif-logo-bar{padding:10px 22px 8px;border-bottom:1px solid #eef1f4}
.opif-header{min-height:58px;height:58px;background:linear-gradient(180deg,#fff,#fbfcfd);border-bottom:1px solid #edf0f2}
.opif-header h2{font-size:18px;font-weight:800;letter-spacing:-.01em;color:#18212d}
.opif-body{background:#fff;scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent}
.opif-product-card{margin:0;padding:15px 18px;border-bottom:1px solid #edf0f2;background:#fcfdfe}
.opif-product-card img{width:72px;height:72px;border-radius:11px}
.opif-fieldset,.opif-section{border-color:#edf0f2}
.opif-fieldset h3,.opif-section h3{font-size:16px;font-weight:800;letter-spacing:-.01em;color:#253141}
.opif-input{border-color:#e1e7ec;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.02);transition:border-color .15s ease,box-shadow .15s ease}
.opif-input:focus-within{border-color:var(--opif-accent);box-shadow:0 0 0 3px rgba(255,112,67,.10)}
.opif-choice{border-color:#e2e7eb;background:#fff;box-shadow:0 1px 2px rgba(15,23,42,.02);transition:.15s ease}
.opif-choice.selected{background:#fff8f5;box-shadow:0 4px 14px rgba(15,23,42,.05)}
.opif-coupon{border-top:1px solid #edf0f2}
.opif-footer{padding:10px 14px;background:rgba(255,255,255,.97)!important;border-top:1px solid #e9edf1;box-shadow:0 -8px 22px rgba(15,23,42,.05)}
#opif-submit{height:48px;border-radius:11px;font-size:16px;font-weight:800;box-shadow:0 8px 18px rgba(34,164,71,.20)}
.opif-heading-icon,.opif-button-icon{filter:drop-shadow(0 1px 1px rgba(15,23,42,.05))}
@media(max-width:700px){
 .opif-overlay{padding:10px;align-items:center;overflow:auto}
 .opif-modal{width:min(100%,430px);height:min(var(--opif-mobile-height),calc(100dvh - 20px));max-height:calc(100dvh - 20px);border-radius:18px}
 .opif-header{height:54px;min-height:54px}
 .opif-header h2{font-size:17px}
 .opif-logo-bar{padding:7px 14px 5px}
 .opif-logo-bar img{max-width:170px;max-height:40px}
 .opif-product-card{padding:12px 13px}
 .opif-product-card img{width:64px;height:64px}
 .opif-footer{padding:8px 10px!important}
 #opif-submit{height:46px!important;border-radius:10px!important;font-size:16px!important}
}
@media(max-width:380px){
 .opif-overlay{padding:6px}
 .opif-modal{width:100%;max-height:calc(100dvh - 12px);height:min(var(--opif-mobile-height),calc(100dvh - 12px));border-radius:15px}
}
