/* Native OPC uses Bootstrap 5 utilities; Warehouse supplies Bootstrap 4.
   Compatibility is intentionally restricted to the checkout page. */
body.mgc-checkout {
  --bs-border-color: #e3e8e9;
  --bs-secondary-color: #69777a;
}
body.mgc-checkout #main { max-width: 1200px; margin: 0 auto; padding: 24px 0 40px; }
body.mgc-checkout #main > .row { align-items: flex-start; }
body.mgc-checkout #main .page-title { margin-bottom: 24px; font-size: 24px; }
#opc-form { min-width: 0; padding: 0; text-align: start; font-size: 14px; line-height: 1.8; }
#opc-form * { box-sizing: border-box; }
#opc-form .one-page-checkout__section {
  padding: 20px; margin: 0 0 18px; border: 1px solid #e3e8e9;
  border-radius: 14px; background: #fff;
}
#opc-form .one-page-checkout__section + .one-page-checkout__section,
#opc-form .js-opc-addresses-section + .one-page-checkout__section { padding-top: 20px; }
#opc-form .one-page-checkout__title { margin: 0 0 16px; color: #00232e; font-size: 18px; font-weight: 700; line-height: 1.6; }
#opc-form .flex-grow-1 { flex-grow: 1 !important; min-width: 0; }
#opc-form .flex-shrink-0 { flex-shrink: 0 !important; }
#opc-form .fw-semibold { font-weight: 600 !important; }
#opc-form .visually-hidden {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}
#opc-form .opc-address-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px !important;
  border: 1px solid #e3e8e9 !important; border-radius: 10px !important;
  margin-bottom: 10px; background: #fff;
}
#opc-form .opc-address-item.selected { border-color: #00232e !important; background: #f4f8f8; }
#opc-form .opc-address-item .form-check { flex: 0 0 20px; padding: 0; margin: 3px 0 0 !important; min-height: 20px; }
#opc-form .form-check-input { position: static; float: none; margin: 0 0 0 8px; width: 17px; height: 17px; accent-color: #00232e; vertical-align: middle; }
#opc-form .opc-address-item .form-check-input { margin: 0; }
#opc-form .form-check-label { display: inline; margin: 0; line-height: 1.8; }
#opc-form .opc-address-item p { margin: 6px 0 0; color: #657478; font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
#opc-form .opc-address-card__actions { margin-inline-start: auto; }
#opc-form .opc-address-card__actions .btn { min-width: 36px; min-height: 36px; border-radius: 8px; color: #00232e; background: #edf2f2; }
#opc-form .opc-address-card__actions .material-icons { font-size: 0; font-style: normal; }
#opc-form .opc-address-card__actions .material-icons::after { content: '\22ee'; display: inline-block; font: 24px/1 sans-serif; vertical-align: middle; }
#opc-form .dropdown-menu-end { right: 0; left: auto; text-align: start; }
#opc-form .delivery-option,
#opc-form .payment-option { padding: 12px; margin-bottom: 10px; border: 1px solid #e3e8e9; border-radius: 10px; }
#opc-form .payment-option label { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
#opc-form .payment-option img { max-width: 90px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
#opc-form textarea { width: 100%; min-height: 95px; padding: 12px; border: 1px solid #d9e1e2; border-radius: 10px; background: #fafbfb; font: inherit; resize: vertical; }
#opc-form .one-page-checkout__footer { padding: 16px 0 0; }
#opc-form .one-page-checkout__submit { min-height: 50px; padding: 12px 20px; border-radius: 10px; font-size: 15px; line-height: 1.8; white-space: normal; }
body.mgc-checkout .cart-grid-right { min-width: 0; }
body.mgc-checkout .cart-grid-right .card { border: 1px solid #e3e8e9; border-radius: 14px; overflow: hidden; box-shadow: none; }
body.mgc-checkout .cart-grid-right .cart-summary-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
body.mgc-checkout .cart-grid-right .cart-summary-line .value { margin-inline-start: auto; text-align: end; }
@media (max-width: 767px) {
  body.mgc-checkout #main { padding: 16px 0 24px; }
  #opc-form .one-page-checkout__section { padding: 16px; border-radius: 12px; }
  #opc-form .one-page-checkout__title { font-size: 17px; }
  #opc-form .opc-address-item { padding: 12px !important; gap: 8px; }
  body.mgc-checkout .cart-grid-right { margin-top: 20px; }
}

#opc-form input[type=radio],#opc-form input[type=checkbox]{appearance:auto!important;-webkit-appearance:auto!important;position:static!important;opacity:1!important;display:inline-block!important;flex:0 0 18px;width:18px!important;height:18px!important;margin:0!important;accent-color:#00232e;cursor:pointer}
#opc-form .payment-option__form-check{display:flex;align-items:center;gap:12px;padding:0;min-height:42px}
#opc-form .payment-option__label{flex:1;min-width:0}
#opc-form .one-page-checkout__footer .form-check{display:flex;align-items:flex-start;gap:10px;padding:0;margin:14px 0}
#opc-form .one-page-checkout__footer .form-check input{margin-top:5px!important}
#opc-form .material-icons.mgc-icon{font-family:inherit;font-style:normal;font-size:24px!important;line-height:1}
#opc-pay-button #opc-pay-amount{display:none!important}
#opc-form .payment-option__label img{width:auto!important;height:32px!important;max-width:80px!important;object-fit:contain;vertical-align:middle}
#opc-form .mgc-single-carrier{display:none!important}
.mgc-calendar{position:absolute;z-index:20000;background:#fff;color:#00232e;border:1px solid #ccd7da;border-radius:10px;padding:12px;box-shadow:0 8px 30px #0002;width:290px;direction:rtl}
.mgc-calendar header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.mgc-calendar .mgc-days{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.mgc-calendar button{border:0;background:#f0f4f4;color:#00232e;border-radius:5px;padding:6px;cursor:pointer;font:inherit}
.mgc-calendar button:hover{background:#dce9e9}.mgc-calendar label{font-weight:bold}.mgc-jdate{direction:ltr;text-align:center}
#opc-form .material-icons.mgc-icon::after{content:none!important}
/* The AJAX-rendered payment markup is normalized to this stable row structure. */
.mgc-payment-row{border:0!important;border-bottom:1px solid #e4e8ec!important;border-radius:0!important;padding:20px 0!important;margin:0!important;text-align:start}
.mgc-payment-heading{display:grid!important;grid-template-columns:24px 36px minmax(0,1fr);align-items:center;gap:12px;width:100%;min-height:44px;direction:rtl}
.mgc-payment-heading input[type=radio]{appearance:none!important;-webkit-appearance:none!important;display:block!important;width:22px!important;height:22px!important;border:2px solid #64717a!important;border-radius:50%!important;background:#fff!important;box-shadow:none!important;margin:0!important;cursor:pointer}
.mgc-payment-heading input[type=radio]:checked{border:6px solid #1671d9!important}
.mgc-payment-heading input:focus-visible{outline:2px solid #00232e;outline-offset:4px}
.mgc-payment-heading>.mgc-payment-name{display:block!important;margin:0!important;padding:0!important;text-align:right!important;font-size:16px;font-weight:700;line-height:1.8;color:#263d4d;cursor:pointer}
.mgc-payment-heading>img{display:block!important;margin:0!important;width:32px!important;height:32px!important;max-width:32px!important;object-fit:contain}
.mgc-payment-row .js-additional-information{margin:8px 72px 0 0!important;padding:0!important;color:#77818b;font-size:13px;line-height:1.9;text-align:right}
.mgc-payment-row .js-additional-information p{margin:4px 0!important;font:inherit!important;color:inherit!important}
.mgc-payment-card{display:block;width:28px;height:21px;border:2px solid #64717a;border-radius:5px;position:relative}
.mgc-payment-card:before{content:'';position:absolute;left:0;right:0;top:4px;border-top:2px solid currentColor}
.mgc-payment-card:after{content:'';position:absolute;right:4px;bottom:3px;width:6px;border-top:2px solid currentColor}
.mgc-payment-row:has(input:checked) .mgc-payment-card{color:#1671d9;border-color:#1671d9}
@media(max-width:480px){.mgc-payment-heading{gap:9px;grid-template-columns:22px 32px minmax(0,1fr)}.mgc-payment-heading>.mgc-payment-name{font-size:14px}.mgc-payment-row .js-additional-information{margin-right:63px!important;font-size:12px}}
.mgc-payment-row{display:block!important;width:100%!important;min-width:0!important}
.mgc-payment-row>.payment-option__form-check{display:block!important;width:100%!important;max-width:none!important;padding:0!important;margin:0!important}
.mgc-payment-heading{box-sizing:border-box;min-width:0!important;max-width:none!important;float:none!important}
.mgc-payment-heading>input[type=radio]{position:static!important;float:none!important;opacity:1!important;grid-column:1;grid-row:1}
.mgc-payment-heading>img,.mgc-payment-heading>.mgc-payment-card{position:relative!important;grid-column:2;grid-row:1}
.mgc-payment-heading>.mgc-payment-name{grid-column:3;grid-row:1;width:auto!important;max-width:none!important;min-width:0!important;white-space:normal!important}
.mgc-payment-heading,.mgc-payment-heading>*{box-sizing:border-box!important}

/* Override the theme's more-specific price font rule; change digit glyphs only. */
html[lang^="fa"] body.lang-rtl span.elementor-counter-number,
html[lang^="fa"] body.lang-rtl .product-price,
html[lang^="fa"] body.lang-rtl .product-price span,
html[lang^="fa"] body.lang-rtl .current-price-value,
html[lang^="fa"] body.lang-rtl .regular-price,
html[lang^="fa"] body.lang-rtl .product-discount span,
html[lang^="fa"] body.lang-rtl #blockcart-content .cart-products .text-right > span,
html[lang^="fa"] body.lang-rtl #blockcart-modal .col-info .text-muted + span,
html[lang^="fa"] body.lang-rtl .cart-summary-line .value span,
html[lang^="fa"] body.lang-rtl .cart-total .value span,
html[lang^="fa"] body.lang-rtl .value,
html[lang^="fa"] body.lang-rtl .cart-summary-products.js-cart-summary-products,
html[lang^="fa"] body.lang-rtl li.media.cart-summary-product .pull-right,
html[lang^="fa"] body.lang-rtl .iqitreviews-nb,
html[lang^="fa"] body.lang-rtl span.carrier-price,
html[lang^="fa"] body.lang-rtl .product-discount,
html[lang^="fa"] body.lang-rtl .discount-percentage,
html[lang^="fa"] body.lang-rtl .product-flags .product-flag,
html[lang^="fa"] body.lang-rtl .products-grid .product-miniature-layout-2 .regular-price,
html[lang^="fa"] body.lang-rtl .ps-shoppingcart .cart-products-count-btn,
html[lang^="fa"] body.lang-rtl .cart-products-count-btn,
html[lang^="fa"] body.lang-rtl #opc-form .mgc-payment-row,
html[lang^="fa"] body.lang-rtl #opc-form .mgc-payment-row * {
  font-family: 'Mogham Vazirmatn Digits', 'Vazirmatn', sans-serif !important;
  font-variant-numeric: lining-nums;
}

.mgc-address-hidden { display:none!important; }
.mgc-address-combined-group { margin-block:0 20px; }
.mgc-address-combined-group label { display:block; margin:0 0 8px; }
.mgc-address-combined { display:block; width:100%; min-height:64px; resize:vertical; white-space:pre-wrap; overflow-wrap:anywhere; }
.mgc-address-combined:invalid { border-color:#c0392b!important; }

#modal-delivery .modal-dialog,
#modal-invoice .modal-dialog,
#opc-address-modal .modal-dialog {
  width:calc(100% - 32px); max-width:620px; margin:16px auto!important;
}
#modal-delivery .modal-content,
#modal-invoice .modal-content,
#opc-address-modal .modal-content {
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); overflow:hidden;
}
#modal-delivery .modal-body,
#modal-invoice .modal-body,
#opc-address-modal .modal-body { overflow-y:auto; padding:20px 24px; }
#modal-delivery .modal-header,
#modal-invoice .modal-header,
#opc-address-modal .modal-header { position:relative; min-height:64px; padding:14px 56px 14px 16px!important; align-items:center; }
#modal-delivery .modal-header .btn-close,
#modal-invoice .modal-header .btn-close,
#opc-address-modal .modal-header .btn-close,
#modal-delivery .modal-header button.close,
#modal-invoice .modal-header button.close,
#opc-address-modal .modal-header button.close {
  position:absolute; inset-inline-start:12px; inset-inline-end:auto; top:10px; z-index:2;
  display:grid; place-items:center; width:44px; height:44px; min-width:44px; min-height:44px;
  margin:0!important; padding:0!important; border:1px solid #dce3e5!important; border-radius:50%;
  background:#f4f7f7!important; background-image:none!important; color:#00232e!important; opacity:1!important;
  left:12px; right:auto;
  font-size:28px!important; line-height:1!important; text-shadow:none!important; cursor:pointer;
}
#modal-delivery .modal-header .btn-close::before,
#modal-invoice .modal-header .btn-close::before,
#opc-address-modal .modal-header .btn-close::before,
#modal-delivery .modal-header button.close::before,
#modal-invoice .modal-header button.close::before,
#opc-address-modal .modal-header button.close::before { content:'×'; font:32px/1 Arial,sans-serif; }
#modal-delivery .modal-header .btn-close::after,
#modal-invoice .modal-header .btn-close::after,
#opc-address-modal .modal-header .btn-close::after { display:none!important; }
@media(max-width:767px){
  #modal-delivery .modal-dialog,#modal-invoice .modal-dialog,#opc-address-modal .modal-dialog { width:calc(100% - 24px); max-width:none; margin:12px auto!important; }
  #modal-delivery .modal-content,#modal-invoice .modal-content,#opc-address-modal .modal-content { max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); border-radius:14px; }
  #modal-delivery .modal-body,#modal-invoice .modal-body,#opc-address-modal .modal-body { padding:18px 20px; }
}

/* Compact, animated add-to-cart confirmation shared by product and listing pages. */
.mgc-cart-success {
  position:fixed; z-index:1000020; inset-block-start:24px; inset-inline-end:24px;
  display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px 20px; align-items:center;
  width:min(390px,calc(100vw - 32px)); padding:20px 22px; direction:rtl;
  color:#17343a; background:#fff; border:1px solid #e5eceb; border-radius:16px;
  box-shadow:0 14px 44px #001f2933; opacity:0; visibility:hidden; transform:translateY(-12px) scale(.98);
  transition:opacity .22s ease,transform .22s ease,visibility .22s;
}
.mgc-cart-success.is-visible { opacity:1; visibility:visible; transform:translateY(0) scale(1); }
.mgc-cart-success__top { grid-column:1/-1; padding-inline-end:20px; display:flex; align-items:center; gap:13px; min-width:0; }
.mgc-cart-success__message { display:grid; gap:3px; min-width:0; }
.mgc-cart-success__heading { color:#168254; font-size:16px; font-weight:700; }
.mgc-cart-success__detail { overflow:hidden; color:#55666a; font-size:13px; line-height:1.7; text-overflow:ellipsis; }
.mgc-cart-success__link { grid-column:1/-1; justify-self:start; padding:9px 17px; color:#fff!important; background:#002b35; border-radius:999px; font-size:13px; font-weight:700; text-decoration:none!important; }
.mgc-cart-success__link:hover,.mgc-cart-success__link:focus { color:#fff!important; background:#10424b; }
.mgc-cart-success__close { position:absolute; inset-block-start:7px; inset-inline-start:8px; display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; border-radius:50%; color:#68787b; background:transparent; font:26px/1 Arial,sans-serif; cursor:pointer; }
.mgc-cart-success__close:hover { color:#17343a; background:#f1f5f4; }
@media(max-width:767px) {
  .mgc-cart-success { inset-block-start:auto; inset-block-end:calc(78px + env(safe-area-inset-bottom)); inset-inline:12px; width:auto; padding:16px 18px; }
  .mgc-cart-success__heading { font-size:15px; }
  .mgc-cart-success__detail,.mgc-cart-success__link { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) {
  .mgc-cart-success,.mgc-cart-success__check,.mgc-cart-success__check::after { animation:none!important; transition:none!important; }
  .mgc-cart-success.is-visible { transform:none; }
  .mgc-cart-success.is-visible .mgc-cart-success__check::after { transform:rotate(45deg); opacity:1; }
}

/* Draw the ring and check in sequence; replay after the notification is painted. */
.mgc-cart-success__check { position:relative; display:block; flex:0 0 60px; width:60px; height:60px; overflow:visible; background:none; }
.mgc-cart-success__check::before,.mgc-cart-success__check::after { content:none!important; }
.mgc-cart-success__check svg { display:block; width:60px; height:60px; overflow:visible; }
.mgc-success-disc { fill:#19a36a; transform-origin:32px 32px; transform:scale(0); }
.mgc-success-ring { fill:none; stroke:#19a36a; stroke-width:3; stroke-linecap:round; stroke-dasharray:170; stroke-dashoffset:170; transform:rotate(-90deg); transform-origin:32px 32px; }
.mgc-success-tick { fill:none; stroke:#fff; stroke-width:5; stroke-linecap:round; stroke-linejoin:round; stroke-dasharray:42; stroke-dashoffset:42; }
.mgc-success-particle { position:absolute; left:27px; top:27px; width:6px; height:6px; border-radius:2px; background:#d9a342; opacity:0; pointer-events:none; }
.mgc-success-particle:nth-child(even) { background:#20ac77; border-radius:50%; }
.is-replaying .mgc-success-ring { animation:mgc-ring-draw .65s .18s ease-out both; }
.is-replaying .mgc-success-disc { animation:mgc-disc-bloom .7s .65s cubic-bezier(.2,.8,.2,1) both; }
.is-replaying .mgc-success-tick { animation:mgc-tick-draw .5s .95s ease-out both; }
.is-replaying .mgc-cart-success__check svg { animation:mgc-success-bounce .65s 1.25s ease-in-out both; }
.is-replaying .mgc-success-particle { animation:mgc-particle-burst .85s var(--delay) ease-out both; }
@keyframes mgc-ring-draw { to { stroke-dashoffset:0; } }
@keyframes mgc-disc-bloom { 0% { transform:scale(0); } 65% { transform:scale(1.1); } 82% { transform:scale(.96); } 100% { transform:scale(1); } }
@keyframes mgc-tick-draw { to { stroke-dashoffset:0; } }
@keyframes mgc-success-bounce { 0%,100% { transform:translateY(0) scale(1); } 35% { transform:translateY(-7px) scale(1.08,.94); } 70% { transform:translateY(2px) scale(.97,1.04); } }
@keyframes mgc-particle-burst { 0% { opacity:0; transform:rotate(var(--angle)) translateY(-21px) scale(.3); } 20% { opacity:1; } 100% { opacity:0; transform:rotate(var(--angle)) translateY(-49px) scale(.15); } }
/* The explicitly requested success motion is driven by Web Animations, independently of theme animation rules. */
