.mg-purchase-modal{position:fixed;inset:0;z-index:10050;display:none;overflow:auto;background:rgba(8,31,41,.68);backdrop-filter:blur(10px)}
.mg-purchase-modal.is-open{display:block}.mg-purchase-modal__dialog{width:min(1120px,calc(100% - 32px));margin:40px auto;padding:30px;border:1px solid rgba(255,255,255,.7);border-radius:30px;background:#f8fbfa;box-shadow:0 30px 90px rgba(7,35,46,.3)}
.mg-purchase-modal__head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}.mg-purchase-modal__eyebrow{color:#07985b;font-size:12px;font-weight:900;letter-spacing:.16em}.mg-purchase-modal h2{margin:5px 0 6px;color:#14394a;font-size:clamp(30px,4vw,48px);letter-spacing:-.04em}.mg-purchase-modal__head p{margin:0;color:#718a95}.mg-purchase-modal__close{width:52px;height:52px;display:grid;place-items:center;flex:0 0 auto;border:1px solid #d9e5e1;border-radius:16px;background:#fff;color:#14394a;font-size:22px}
.mg-purchase-modal__product{margin:24px 0;padding:18px;display:grid;grid-template-columns:74px minmax(0,1fr) auto;align-items:center;gap:16px;border:1px solid #dbe7e3;border-radius:22px;background:#fff}.mg-purchase-modal__product img{width:74px;height:74px;object-fit:contain;border-radius:14px;background:#f4f8f6}.mg-purchase-modal__product strong{display:block;color:#14394a;font-size:17px}.mg-purchase-modal__product span{color:#0a9d59;font-size:22px;font-weight:900;white-space:nowrap}
.mg-installment-layout{display:grid;grid-template-columns:.82fr 1.18fr;gap:18px}.mg-bank-list,.mg-plan-panel,.mg-trade-panel{padding:18px;border:1px solid #dbe7e3;border-radius:24px;background:#fff}.mg-bank-list{display:grid;gap:8px;align-content:start}.mg-bank-card{width:100%;padding:15px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #e1eae7;border-radius:16px;background:#fbfdfc;text-align:left}.mg-bank-card:hover,.mg-bank-card.is-active{border-color:#13b76e;background:#ecfaf3}.mg-bank-card b{color:#14394a}.mg-bank-card small{display:block;margin-top:3px;color:#82949b}.mg-bank-card i{color:#10a663}
.mg-plan-panel h3,.mg-trade-panel h3{margin:0 0 14px;color:#14394a;font-size:20px}.mg-months{display:flex;flex-wrap:wrap;gap:8px}.mg-months button{min-width:58px;height:48px;border:1px solid #dce6e2;border-radius:13px;background:#f6f9f8;color:#14394a;font-weight:900}.mg-months button.is-active{border-color:#0ea964;color:#fff;background:linear-gradient(135deg,#159bd3,#16bd70)}.mg-plan-summary{margin-top:18px;padding:20px;border-radius:18px;background:linear-gradient(135deg,#edf9f5,#edf5ff)}.mg-plan-summary div{display:flex;align-items:end;justify-content:space-between;gap:16px}.mg-plan-summary small{color:#718a95}.mg-plan-summary strong{color:#0a9d59;font-size:30px}.mg-plan-summary p{margin:8px 0 0;color:#718a95;font-size:12px}
.mg-modal-submit{width:100%;min-height:60px;margin-top:18px;padding:12px 20px;display:flex;align-items:center;justify-content:center;gap:10px;border:0;border-radius:17px;color:#fff;background:linear-gradient(135deg,#159bd3,#16bd70);box-shadow:0 14px 28px rgba(16,174,105,.2);font-size:16px;font-weight:900}.mg-modal-submit:disabled{opacity:.55}.mg-modal-error{display:none;margin-top:12px;padding:10px 12px;border-radius:12px;color:#a32d3b;background:#fff0f2}.mg-modal-error.is-visible{display:block}
.mg-trade-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.mg-trade-field label{display:block;margin-bottom:7px;color:#14394a;font-size:12px;font-weight:900}.mg-trade-field select{width:100%;height:54px;padding:0 14px;border:1px solid #dce6e2;border-radius:14px;background:#fff;color:#14394a}.mg-trade-result{margin-top:18px;padding:20px;display:grid;grid-template-columns:1fr 1fr;gap:14px;border-radius:20px;background:linear-gradient(135deg,#eaf9f3,#edf5ff)}.mg-trade-result small{display:block;color:#718a95}.mg-trade-result strong{display:block;margin-top:4px;color:#0a9d59;font-size:27px}.mg-trade-note{margin:12px 0 0;color:#718a95;font-size:12px}
.mg-checkout-purchase{margin-bottom:18px;padding:20px;display:flex;align-items:center;gap:15px;border:1px solid #cfe5dc;border-radius:22px;background:linear-gradient(135deg,#eaf9f3,#edf5ff)}.mg-checkout-purchase__icon{width:48px;height:48px;display:grid;place-items:center;flex:0 0 auto;border-radius:15px;color:#fff;background:linear-gradient(135deg,#159bd3,#16bd70)}.mg-checkout-purchase small{display:block;color:#0a9257;font-weight:900;letter-spacing:.12em}.mg-checkout-purchase strong{display:block;margin-top:3px;color:#14394a;font-size:17px}.mg-checkout-purchase span{display:block;margin-top:3px;color:#718a95;font-size:13px}
@media(max-width:767px){.mg-purchase-modal__dialog{width:calc(100% - 16px);margin:8px auto;padding:20px 14px;border-radius:24px}.mg-purchase-modal__close{width:44px;height:44px}.mg-purchase-modal__product{grid-template-columns:58px 1fr;padding:12px}.mg-purchase-modal__product img{width:58px;height:58px}.mg-purchase-modal__product span{grid-column:2;font-size:19px}.mg-installment-layout{grid-template-columns:1fr}.mg-bank-list{grid-template-columns:1fr 1fr}.mg-bank-card{padding:12px}.mg-trade-grid{grid-template-columns:1fr}.mg-trade-result{grid-template-columns:1fr 1fr;padding:15px}.mg-trade-result strong{font-size:21px}.mg-checkout-purchase{align-items:flex-start}.mg-product-summary--v2 .mg-product-actions--triple{grid-template-columns:1fr!important}}
@media(max-width:480px){}

/* Current OpenCart 4 purchase-dialog markup. Keep these rules explicit so the
   dialogs stay readable when the core theme is regenerated. */
.mg-purchase-modal__grid{display:grid;grid-template-columns:minmax(270px,.82fr) minmax(0,1.18fr);gap:18px}
.mg-purchase-modal__grid>section{min-width:0;padding:20px;border:1px solid #dbe7e3;border-radius:24px;background:#fff}
.mg-purchase-modal__grid h3{margin:0 0 14px;color:#14394a;font-size:20px;font-weight:900}
.mg-month-list{display:flex;flex-wrap:wrap;gap:9px}
.mg-month-list button{min-width:58px;height:48px;padding:0 14px;border:1px solid #dce6e2;border-radius:13px;background:#f6f9f8;color:#14394a;font-weight:900;transition:.18s ease}
.mg-month-list button:hover{border-color:#13b76e;transform:translateY(-1px)}
.mg-month-list button.is-active{border-color:#0ea964;color:#fff;background:linear-gradient(135deg,#159bd3,#16bd70);box-shadow:0 9px 20px rgba(16,174,105,.18)}
.mg-plan-result{margin-top:18px;padding:20px;display:grid;grid-template-columns:1fr auto;align-items:end;gap:3px 16px;border-radius:18px;background:linear-gradient(135deg,#edf9f5,#edf5ff)}
.mg-plan-result small{grid-column:1/-1;color:#0a9257;font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.mg-plan-result span{color:#718a95}
.mg-plan-result strong{color:#0a9d59;font-size:clamp(24px,3vw,32px);line-height:1;white-space:nowrap}
.mg-plan-panel>p{margin:13px 0 0;color:#718a95;font-size:12px;line-height:1.5}
.mg-trade-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:20px;border:1px solid #dbe7e3;border-radius:24px;background:#fff}
.mg-trade-fields label{display:flex;min-width:0;flex-direction:column;gap:8px;margin:0;color:#14394a;font-size:12px;font-weight:900}
.mg-trade-fields label>span{display:block;min-height:18px}
.mg-trade-fields select{width:100%;height:56px;margin:0;padding:0 42px 0 15px;border:1px solid #d4e1dd;border-radius:15px;outline:0;background-color:#f8fbfa;color:#14394a;font-size:15px;font-weight:700;appearance:auto;transition:.18s ease}
.mg-trade-fields select:hover,.mg-trade-fields select:focus{border-color:#13b76e;background-color:#fff;box-shadow:0 0 0 4px rgba(19,183,110,.1)}
.mg-trade-result{align-items:center}
.mg-trade-result>i{justify-self:center;color:#13ae68;font-size:24px}
.mg-trade-result span{display:block;color:#718a95;font-size:13px}
.mg-purchase-modal__foot{position:sticky;bottom:-1px;z-index:2;padding-top:1px;background:linear-gradient(180deg,rgba(248,251,250,0),#f8fbfa 25%)}

@media(max-width:767px){
  .mg-purchase-modal{padding:0;overscroll-behavior:contain}
  .mg-purchase-modal__dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);margin:8px auto;padding:18px 14px 14px;overflow:auto;border-radius:24px}
  .mg-purchase-modal h2{font-size:30px;line-height:1.05}
  .mg-purchase-modal__head p{font-size:13px;line-height:1.45}
  .mg-purchase-modal__product{margin:17px 0}
  .mg-purchase-modal__grid{grid-template-columns:1fr;gap:12px}
  .mg-purchase-modal__grid>section{padding:15px;border-radius:19px}
  .mg-bank-list{grid-template-columns:1fr 1fr;gap:7px}
  .mg-bank-card{min-width:0;padding:11px;border-radius:13px}
  .mg-bank-card b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mg-bank-card i{display:none}
  .mg-plan-result{padding:16px;grid-template-columns:1fr}
  .mg-plan-result strong{margin-top:5px;white-space:normal}
  .mg-trade-fields{grid-template-columns:1fr;padding:15px;gap:12px;border-radius:19px}
  .mg-trade-fields select{height:52px}
  .mg-trade-result{grid-template-columns:1fr auto 1fr;padding:15px;gap:8px}
  .mg-trade-result strong{font-size:19px;line-height:1.15}
  .mg-modal-submit{min-height:56px;margin-top:13px;border-radius:15px}
}
@media(max-width:480px){
  .mg-trade-result{grid-template-columns:1fr}
  .mg-trade-result>i{transform:rotate(90deg)}
}

/* Credit dialog spacing: keep the warranty notice visually separate from the columns. */
.mg-credit-modal .mg-credit-adjustment{position:relative;z-index:1;margin-bottom:16px}
.mg-credit-modal .mg-purchase-modal__grid{position:relative;z-index:0;clear:both}
@media(max-width:767px){.mg-credit-modal .mg-credit-adjustment{margin-bottom:12px}}

/* Credit modal: the action follows content on desktop and becomes a compact,
   non-overlapping sticky action on phones. Bank details expand in place. */
.mg-credit-modal .mg-bank-mobile-plan{display:none}
.mg-credit-modal .mg-purchase-modal__foot{position:static;bottom:auto;z-index:auto;margin:0;padding:16px 0 0;border:0;background:transparent;box-shadow:none}
.mg-credit-modal .mg-modal-submit{margin-top:0}

@media(max-width:767px){
  .mg-credit-modal .mg-purchase-modal__dialog{padding-bottom:0}
  .mg-credit-modal .mg-purchase-modal__grid{display:block}
  .mg-credit-modal .mg-credit-banks{padding:14px}
  .mg-credit-modal .mg-credit-banks>h3{margin-bottom:12px;font-size:18px}
  .mg-credit-modal .mg-purchase-modal__grid>.mg-plan-panel{display:none}
  .mg-credit-modal .mg-bank-list{display:flex;grid-template-columns:none;gap:9px;padding:0;border:0;background:transparent;overflow:visible}
  .mg-credit-modal .mg-bank-card{display:grid;grid-template-columns:64px minmax(0,1fr) 18px;width:100%;min-height:76px;padding:9px 12px 9px 9px;border-radius:16px}
  .mg-credit-modal .mg-bank-card img{width:56px;height:56px;object-fit:contain;border-radius:12px;background:#fff}
  .mg-credit-modal .mg-bank-card span{min-width:0}
  .mg-credit-modal .mg-bank-card span b{overflow:visible;font-size:15px;line-height:1.2;text-overflow:clip;white-space:normal}
  .mg-credit-modal .mg-bank-card small{font-size:12px;line-height:1.35}
  .mg-credit-modal .mg-bank-card i{display:block;justify-self:end;transition:transform .18s ease}
  .mg-credit-modal .mg-bank-card.is-active{border-radius:17px 17px 0 0}
  .mg-credit-modal .mg-bank-card.is-active i{transform:rotate(90deg)}
  .mg-credit-modal .mg-bank-mobile-plan{display:block;margin-top:-9px;padding:14px;border:1px solid #13b76e;border-top:0;border-radius:0 0 17px 17px;background:#f2fbf7}
  .mg-credit-modal .mg-bank-mobile-plan__head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px;color:#14394a}
  .mg-credit-modal .mg-bank-mobile-plan__head b{font-size:14px}
  .mg-credit-modal .mg-bank-mobile-plan__head small{color:#718a95;font-size:11px;text-align:right}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button{min-width:0;height:48px;padding:0 4px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result{margin-top:12px;padding:14px;grid-template-columns:1fr;gap:4px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result small{display:none}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result b{color:#14394a;font-size:16px;white-space:nowrap}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result strong{margin-top:0;font-size:20px;white-space:nowrap}
  .mg-credit-modal .mg-bank-mobile-plan>p{margin:10px 0 0;color:#718a95;font-size:11px;line-height:1.4}
  .mg-credit-modal .mg-purchase-modal__foot{position:sticky;bottom:0;z-index:6;margin:14px -14px 0;padding:11px 14px calc(11px + env(safe-area-inset-bottom));border-top:1px solid rgba(207,229,220,.9);background:rgba(248,251,250,.94);box-shadow:0 -12px 30px rgba(7,35,46,.08);backdrop-filter:blur(12px)}
  .mg-credit-modal .mg-modal-submit{min-height:54px;margin:0;border-radius:15px;font-size:15px}
}

/* Softer mobile credit accordion. */
@media(max-width:767px){
  .mg-credit-modal .mg-bank-list{gap:10px}
  .mg-credit-modal .mg-bank-card{min-height:78px;padding:10px;border:1px solid #e0ebe7;border-radius:18px;background:#fff;box-shadow:none}
  .mg-credit-modal .mg-bank-card:hover{border-color:#d3e4de;background:#fff;transform:none}
  .mg-credit-modal .mg-bank-card.is-active{position:relative;z-index:1;border-color:#d4e8e0;border-radius:18px 18px 0 0;background:#fff;box-shadow:0 9px 24px rgba(16,76,61,.08)}
  .mg-credit-modal .mg-bank-card.is-active i{color:#149760}
  .mg-credit-modal .mg-bank-mobile-plan{position:relative;margin-top:-10px;padding:17px 12px 14px;border:0;border-radius:0 0 18px 18px;background:linear-gradient(180deg,#f7fbf9 0%,#fff 100%);box-shadow:0 12px 28px rgba(16,76,61,.09)}
  .mg-credit-modal .mg-bank-mobile-plan:before{content:"";position:absolute;top:0;left:14px;right:14px;height:1px;background:#e4eeea}
  .mg-credit-modal .mg-bank-mobile-plan__head{margin:0 2px 12px}
  .mg-credit-modal .mg-bank-mobile-plan__head b{font-size:15px}
  .mg-credit-modal .mg-bank-mobile-plan__head small{color:#8a9ea5;font-size:10px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list{display:flex;flex-wrap:wrap;gap:8px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button{width:auto;min-width:64px;height:46px;padding:0 12px;border:1px solid #dce8e3;border-radius:14px;background:#fff;box-shadow:none}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button:hover{transform:none}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button.is-active{border-color:#b8dfcf;color:#087b4b;background:#eaf8f2;box-shadow:inset 0 0 0 1px rgba(20,151,96,.08)}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button b{font-size:17px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button small{display:none}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result{margin-top:13px;padding:15px;border:1px solid #e1ece8;border-radius:16px;background:#fff;box-shadow:0 7px 18px rgba(16,76,61,.05)}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result>div{min-width:0;padding:2px 0}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result>div+div{margin-top:7px;padding-top:10px;border-top:1px solid #edf3f1}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result span{font-size:12px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result b{color:#183b49;font-size:15px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result strong{color:#07985b;font-size:21px;letter-spacing:-.02em}
  .mg-credit-modal .mg-bank-mobile-plan>p{margin:10px 3px 0;color:#84979e;font-size:10px}
}

/* Dark mobile total: compact, high-contrast and aligned as two clear rows. */
@media(max-width:767px){
  .mg-credit-modal .mg-bank-mobile-plan{padding:16px 12px 14px}
  .mg-credit-modal .mg-bank-mobile-plan__head{align-items:center;margin-bottom:11px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-month-list button{flex:0 0 auto;min-height:50px;height:50px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result{margin-top:14px;padding:14px 15px;border:0;border-radius:17px;color:#fff;background:linear-gradient(135deg,#123d4a 0%,#086c58 100%);box-shadow:0 12px 25px rgba(8,75,67,.18)}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result>div{min-height:30px;padding:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px;text-align:left}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result>div+div{margin-top:9px;padding-top:11px;border-top:1px solid rgba(255,255,255,.15)}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result span{flex:1 1 auto;color:#c7deda;font-size:11px;line-height:1.25}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result b{flex:0 0 auto;margin:0;color:#fff;font-size:15px;line-height:1.1;white-space:nowrap}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result strong{flex:0 0 auto;margin:0;color:#fff;font-size:20px;line-height:1.1;letter-spacing:-.025em;white-space:nowrap}
  .mg-credit-modal .mg-bank-mobile-plan>p{display:flex;align-items:flex-start;gap:5px;margin:10px 3px 0;color:#7e949b;font-size:10px;line-height:1.4}
  .mg-credit-modal .mg-bank-mobile-plan>p i{margin-top:2px;color:#12a765}
}
@media(max-width:374px){
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result{padding:13px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result span{font-size:10px}
  .mg-credit-modal .mg-bank-mobile-plan .mg-plan-result strong{font-size:18px}
}

/* Trade-in chooser */
.mg-purchase-modal__dialog--trade-v2{width:min(1160px,calc(100% - 32px))}.mg-trade-target{grid-template-columns:74px minmax(0,1fr) auto auto}.mg-trade-target__badge{padding:10px 13px;display:flex;align-items:center;gap:7px;border-radius:13px;color:#08775c;background:#e8f8f0;font-size:11px;font-weight:850}.mg-trade-target__badge i{font-size:12px}.mg-trade-categories{margin-bottom:15px;padding:6px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;border:1px solid #dbe7e3;border-radius:19px;background:#fff}.mg-trade-category{min-height:54px;padding:8px 10px;display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:8px;border:0;border-radius:13px;color:#536f79;background:#f5f9f7;text-align:left}.mg-trade-category>i{width:30px;height:30px;display:grid;place-items:center;border-radius:10px;color:#08775c;background:#e4f7ee}.mg-trade-category span{overflow:hidden;font-size:12px;font-weight:850;text-overflow:ellipsis;white-space:nowrap}.mg-trade-category small{padding:4px 6px;border-radius:99px;color:#7c9299;background:#fff;font-size:8px}.mg-trade-category.is-active{color:#fff;background:linear-gradient(135deg,#153f4c,#08775c);box-shadow:0 10px 22px rgba(14,92,77,.16)}.mg-trade-category.is-active>i{color:#fff;background:rgba(255,255,255,.14)}.mg-trade-category.is-active small{color:#08775c}.mg-trade-category.is-disabled{opacity:.48;cursor:not-allowed}.mg-trade-step{display:none}.mg-trade-step.is-active{display:block}.mg-trade-step__head{margin-bottom:13px;display:flex;align-items:flex-end;justify-content:space-between;gap:20px}.mg-trade-step__head>div>span{color:#08775c;font-size:9px;font-weight:900;letter-spacing:.15em}.mg-trade-step__head h3{margin:4px 0 0;color:#14394a;font-size:22px;letter-spacing:-.025em}.mg-trade-step__head>small{color:#81949b;font-size:11px}.mg-trade-device-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.mg-trade-device-card{position:relative;min-width:0;min-height:198px;padding:13px;display:flex;align-items:center;flex-direction:column;border:1px solid #dce8e4;border-radius:19px;color:#14394a;background:#fff;text-align:center;transition:.18s}.mg-trade-device-card:hover{transform:translateY(-2px);border-color:#9fd8c2;box-shadow:0 13px 26px rgba(14,79,70,.09)}.mg-trade-device-card.is-hidden{display:none}.mg-trade-device-card__image{width:100%;height:128px;display:grid;place-items:center}.mg-trade-device-card img{width:100%;height:100%;object-fit:contain}.mg-trade-device-card b{margin-top:7px;font-size:13px;line-height:1.25}.mg-trade-device-card>i{position:absolute;right:11px;bottom:11px;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;color:#08775c;background:#e9f8f1;font-size:9px}.mg-trade-more{width:100%;height:50px;margin-top:11px;border:1px dashed #abd7c6;border-radius:15px;color:#08775c;background:#f3fbf7;font-size:12px;font-weight:850}.mg-trade-more i{margin-left:7px;transition:transform .18s}.mg-trade-more.is-expanded i{transform:rotate(180deg)}
.mg-trade-back{margin:0 0 12px;padding:0;border:0;color:#56727d;background:transparent;font-size:11px;font-weight:800}.mg-trade-back i{margin-right:6px;color:#0a9a5e}.mg-trade-selected{min-height:92px;margin-bottom:13px;padding:12px;display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:13px;border:1px solid #d8e8e2;border-radius:19px;background:linear-gradient(135deg,#f0faf5,#f8fbff)}.mg-trade-selected img{width:72px;height:68px;object-fit:contain;border-radius:12px;background:#fff}.mg-trade-selected small{display:block;color:#789098;font-size:9px;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.mg-trade-selected strong{display:block;margin-top:3px;color:#14394a;font-size:17px}.mg-trade-selected button{margin:5px 0 0;padding:0;border:0;border-bottom:1px solid #0b8d59;color:#0b8d59;background:transparent;font-size:10px;font-weight:800}.mg-trade-config{display:grid;grid-template-columns:.78fr 1.22fr;gap:12px}.mg-trade-config>section{padding:18px;border:1px solid #dce8e4;border-radius:20px;background:#fff}.mg-trade-config__head{margin-bottom:13px;display:flex;align-items:center;gap:10px}.mg-trade-config__head>span{width:30px;height:30px;display:grid;place-items:center;flex:0 0 auto;border-radius:10px;color:#08775c;background:#e2f7ec;font-size:11px;font-weight:900}.mg-trade-config__head h3{margin:0;color:#14394a;font-size:15px}.mg-trade-config__head p{margin:2px 0 0;color:#82969d;font-size:9px}.mg-trade-choice-list{display:flex;flex-wrap:wrap;gap:8px}.mg-trade-choice-list button{min-width:74px;height:50px;padding:0 13px;border:1px solid #d9e6e2;border-radius:13px;color:#14394a;background:#f8fbfa;font-weight:850}.mg-trade-choice-list button.is-active{border-color:#aadbc7;color:#08775c;background:#e9f8f1;box-shadow:inset 0 0 0 1px rgba(9,151,88,.1)}.mg-trade-condition-list{display:grid;gap:8px}.mg-trade-condition-list button{min-height:62px;padding:11px 13px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #dce8e4;border-radius:14px;color:#14394a;background:#f9fbfa;text-align:left}.mg-trade-condition-list button span{display:flex;min-width:0;flex-direction:column}.mg-trade-condition-list button b{font-size:12px}.mg-trade-condition-list button small{margin-top:3px;color:#81949b;font-size:9px;line-height:1.35}.mg-trade-condition-list button>i{width:26px;height:26px;display:grid;place-items:center;flex:0 0 auto;border-radius:50%;color:transparent;background:#e8eeec;font-size:10px}.mg-trade-condition-list button.is-active{border-color:#a9dac6;background:#edf9f3}.mg-trade-condition-list button.is-active>i{color:#fff;background:#0ca260}.mg-trade-result-v2{margin-top:13px;padding:19px 22px;display:grid;grid-template-columns:1fr 34px 1fr;align-items:center;gap:18px;border-radius:21px;color:#fff;background:linear-gradient(135deg,#123d4a,#08775c);box-shadow:0 14px 30px rgba(8,91,75,.16)}.mg-trade-result-v2>div{display:flex;flex-direction:column}.mg-trade-result-v2>div:last-child{text-align:right}.mg-trade-result-v2 small{color:#b9d9d3;font-size:10px;text-transform:uppercase;letter-spacing:.08em}.mg-trade-result-v2 strong{margin-top:5px;color:#fff;font-size:26px;line-height:1}.mg-trade-result-v2 span{margin-top:5px;color:#a9cbc5;font-size:9px}.mg-trade-result-v2>i{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;color:#81edbc;background:rgba(255,255,255,.1)}.mg-trade-modal .mg-purchase-modal__foot{position:static;margin:0;padding:14px 0 0;background:transparent}.mg-trade-modal .mg-modal-submit{margin:0}
@media(max-width:900px){.mg-trade-device-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mg-trade-config{grid-template-columns:1fr}}
@media(max-width:767px){.mg-purchase-modal__dialog--trade-v2{width:100%;max-height:100dvh;margin:0;padding:16px 14px 0;border-radius:24px 24px 0 0}.mg-trade-modal .mg-purchase-modal__head{padding:2px 2px 0}.mg-trade-modal .mg-purchase-modal__head h2{font-size:27px}.mg-trade-target{grid-template-columns:56px minmax(0,1fr);margin:15px 0 11px}.mg-trade-target img{width:56px;height:56px}.mg-trade-target>div:nth-child(2) span{grid-column:auto;font-size:17px}.mg-trade-target__badge{display:none}.mg-trade-categories{display:flex;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:none}.mg-trade-categories::-webkit-scrollbar{display:none}.mg-trade-category{min-width:130px}.mg-trade-step__head{align-items:flex-start}.mg-trade-step__head h3{font-size:19px}.mg-trade-step__head>small{display:none}.mg-trade-device-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mg-trade-device-card{min-height:174px;padding:10px;border-radius:16px}.mg-trade-device-card__image{height:108px}.mg-trade-device-card b{padding:0 8px;font-size:12px}.mg-trade-selected{grid-template-columns:62px minmax(0,1fr)}.mg-trade-selected img{width:62px;height:60px}.mg-trade-selected strong{font-size:15px}.mg-trade-config{gap:10px}.mg-trade-config>section{padding:15px;border-radius:18px}.mg-trade-result-v2{padding:16px;grid-template-columns:1fr;gap:10px}.mg-trade-result-v2>div:last-child{text-align:left}.mg-trade-result-v2>i{display:none}.mg-trade-result-v2>div+div{padding-top:11px;border-top:1px solid rgba(255,255,255,.15)}.mg-trade-result-v2 strong{font-size:22px}.mg-trade-modal .mg-purchase-modal__foot{position:sticky;bottom:0;z-index:6;margin:14px -14px 0;padding:11px 14px calc(11px + env(safe-area-inset-bottom));border-top:1px solid rgba(207,229,220,.9);background:rgba(248,251,250,.94);box-shadow:0 -12px 30px rgba(7,35,46,.08);backdrop-filter:blur(12px)}}
@media(max-width:380px){.mg-trade-device-card{min-height:160px}.mg-trade-device-card__image{height:96px}.mg-trade-category{min-width:118px}.mg-trade-choice-list button{min-width:68px}}

/* Product gallery lightbox navigation */
.mfp-gallery .mfp-arrow{width:54px;height:54px;margin-top:-27px;display:grid;place-items:center;border-radius:50%;opacity:1;background:rgba(10,44,54,.82);box-shadow:0 8px 28px rgba(0,0,0,.28);backdrop-filter:blur(8px)}
.mfp-gallery .mfp-arrow:before{width:12px;height:12px;margin:0;border:solid #fff;border-width:0 3px 3px 0;opacity:1;transform:rotate(135deg)}
.mfp-gallery .mfp-arrow:after{display:none}
.mfp-gallery .mfp-arrow-left{left:18px}.mfp-gallery .mfp-arrow-right{right:18px}
.mfp-gallery .mfp-arrow-right:before{transform:rotate(-45deg)}
.mfp-gallery .mfp-counter{right:50%;bottom:-34px;top:auto;padding:6px 11px;border-radius:99px;color:#fff;background:rgba(10,44,54,.74);font-size:12px;transform:translateX(50%)}
@media(max-width:767px){.mfp-gallery .mfp-content,.mfp-gallery .mfp-figure{width:auto;height:auto;display:block}.mfp-gallery img.mfp-img{display:block;width:auto!important;height:auto!important;max-width:calc(100vw - 24px)!important;max-height:calc(100vh - 110px)!important;margin:0 auto;padding:40px 0!important;object-fit:contain}.mfp-gallery .mfp-arrow{display:none!important}.mfp-gallery .mfp-counter{bottom:-30px}.mfp-gallery .mfp-bottom-bar{margin-top:10px}.mfp-gallery .mfp-title{padding-right:0;font-size:12px;line-height:1.3}}

/* On phones the gallery follows the image proportions instead of cropping it
   into a fixed-height square. */
@media(max-width:767px){.mg-product-gallery--v2 .mg-product-gallery__main{height:auto!important;max-height:none!important;aspect-ratio:auto!important}.mg-product-gallery--v2 .mg-product-gallery__main img{display:block!important;width:100%!important;height:auto!important;max-width:100%!important;max-height:none!important;padding:8px!important;object-fit:contain!important}}

/* The legacy theme reserves 400–730px under #content for an old absolute
   footer. NEXT uses a normal-flow footer, so the product page needs no spacer. */
#content.mg-product-content{padding-bottom:0}

/* Keep catalog photos inside compact Trade-in cards regardless of source dimensions. */
.mg-trade-device-card__image{height:128px;min-height:128px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.mg-trade-device-card__image img{display:block!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:118px!important;object-fit:contain!important}
.mg-trade-device-card>b{position:relative;z-index:1}
@media(max-width:767px){.mg-trade-device-card__image{height:108px;min-height:108px}.mg-trade-device-card__image img{max-height:100px!important}}
@media(max-width:380px){.mg-trade-device-card__image{height:96px;min-height:96px}.mg-trade-device-card__image img{max-height:90px!important}}
