/* ChaiBD checkout, Pinduoduo style (public/js/chai-checkout.js). Uses each website design's colours; light/dark. */
@keyframes co-in { from { opacity: 0; transform: translateY(18px); } }
@keyframes co-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes co-stripe { to { background-position: 64px 0; } }
@keyframes co-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
@keyframes co-shine { 0%, 60% { transform: translateX(-130%) skewX(-20deg); } 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes co-spin { to { transform: rotate(360deg); } }
@keyframes co-sheet { from { transform: translateY(100%); } }
@keyframes co-fade { from { opacity: 0; } }

.checkout-layout.co-on { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.co-main { display: grid; gap: 12px; min-width: 0; }
.co-card { position: relative; border-radius: 20px; background: var(--card); border: 1px solid var(--card-b); padding: 16px; animation: co-in .55s cubic-bezier(.2,.8,.2,1) both; }
.co-main > .co-card:nth-child(2) { animation-delay: .07s; } .co-main > .co-card:nth-child(3) { animation-delay: .14s; } .co-main > .co-card:nth-child(4) { animation-delay: .21s; }
.co-card h3 { margin: 0 0 10px; font-size: 16px; }

/* address card with the airmail stripes */
.co-addr { display: flex; align-items: center; gap: 12px; padding: 18px 16px 22px; cursor: pointer; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.co-addr::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: repeating-linear-gradient(-45deg, var(--red) 0 12px, transparent 12px 16px, #2563eb 16px 28px, transparent 28px 32px); background-size: 64px 5px; animation: co-stripe 6s linear infinite; }
.co-addr:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -22px rgba(0,0,0,.4); }
.co-addr.need { animation: co-shake .5s ease; border-color: var(--red); }
.co-addr.saved .co-pin { animation: co-pop .5s cubic-bezier(.34,1.56,.64,1); }
.co-pin { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--on-accent, #fff); background: linear-gradient(135deg, color-mix(in srgb, var(--red) 70%, #ffb347), var(--red)); }
.co-pin svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.co-pin.add { background: color-mix(in srgb, var(--red) 10%, var(--card)); color: var(--red); border: 1.5px dashed var(--red); }
.co-addr-t { flex: 1; min-width: 0; }
.co-addr-who { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; } .co-addr-who b { font-size: 16px; } .co-addr-who span { color: var(--ink-soft); font-size: 14px; }
.co-addr-t p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-addr.empty .co-addr-t b { color: var(--red); font-size: 15.5px; }
.co-addr > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--ink-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* shop block */
.co-shop-h { display: flex; align-items: center; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid color-mix(in srgb, var(--card-b) 80%, transparent); }
.co-shop-h svg { width: 20px; height: 20px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linejoin: round; } .co-shop-h b { font-size: 14.5px; }
.co-ok { font-size: 11px; font-weight: 700; color: #16a34a; background: color-mix(in srgb, #22c55e 13%, transparent); padding: 2px 8px; border-radius: 99px; }
.co-items { display: grid; gap: 12px; padding: 12px 0; }
.co-item { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; animation: co-in .5s both; animation-delay: calc(.2s + var(--i) * 60ms); }
.co-img { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--red) 6%, var(--card)); }
.co-img img { width: 100%; height: 100%; object-fit: cover; }
.co-item-t { display: grid; gap: 4px; align-content: start; min-width: 0; }
.co-item-t > b { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.co-opt { justify-self: start; font-size: 12px; padding: 2px 8px; border-radius: 7px; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.co-item-p { display: flex; justify-content: space-between; align-items: baseline; }
.co-item-p span b { font: 800 16px Poppins, sans-serif; color: var(--red); } .co-item-p s { margin-left: 6px; font-size: 12px; color: var(--ink-soft); }
.co-item-p em { font-style: normal; color: var(--ink-soft); font-size: 13px; }
.co-line { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-top: 1px solid color-mix(in srgb, var(--card-b) 80%, transparent); background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; }
.co-line > span:first-child { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--ink-soft); }
.co-line > span:first-child svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.co-cp-line { cursor: pointer; } .co-cp-line em { flex: 1; font-style: normal; text-align: right; color: var(--ink-soft); font-size: 13px; } .co-cp-line em b { color: #16a34a; } .co-cp-line em .bad { color: #e11d48; } .co-cp-line em .hint { color: var(--red); font-weight: 700; }
.co-cp-line > svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-soft); stroke-width: 2.2; stroke-linecap: round; }
.co-note { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13.5px; text-align: right; outline: none; }
.co-ship-line { align-items: flex-start; flex-wrap: wrap; } .co-ship-line > span { padding-top: 10px; }
.co-ship { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; min-width: 240px; }
.co-ship button { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; border: 1.5px solid var(--card-b); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .25s cubic-bezier(.34,1.56,.64,1); }
.co-ship button svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.co-ship button span { display: grid; min-width: 0; } .co-ship button b { font-size: 13.5px; } .co-ship button small { font-size: 11.5px; color: var(--ink-soft); }
.co-ship button.on { border-color: var(--red); background: color-mix(in srgb, var(--red) 7%, var(--card)); color: var(--red); transform: scale(1.02); }

/* payment */
.co-pay-i { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin: 0 -6px; border-radius: 14px; cursor: pointer; transition: background .2s; animation: co-in .45s both; animation-delay: calc(.3s + var(--i) * 50ms); }
.co-pay-i + .co-pay-i { margin-top: 2px; }
.co-pay-i input { position: absolute; opacity: 0; pointer-events: none; }
.co-pay-i.on { background: color-mix(in srgb, var(--c) 8%, transparent); }
.co-pay-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--c); }
.co-pay-ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.pay-logo { font: 900 19px Poppins, sans-serif; }
.co-pay-t { flex: 1; display: grid; min-width: 0; } .co-pay-t b { font-size: 14.5px; } .co-pay-t em { font-style: normal; font-size: 10.5px; font-weight: 700; color: #fff; background: #16a34a; padding: 2px 7px; border-radius: 99px; margin-left: 4px; vertical-align: 2px; }
.co-pay-t small { font-size: 12px; color: var(--ink-soft); }
.co-radio { width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 2px solid color-mix(in srgb, var(--ink) 25%, transparent); transition: background .2s, border-color .2s; }
.co-radio svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; transform: scale(0); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.co-pay-i.on .co-radio { background: var(--c); border-color: var(--c); } .co-pay-i.on .co-radio svg { transform: scale(1); }

/* bill */
.co-bill-rows { display: grid; gap: 8px; }
.co-br { display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft); } .co-br b { color: var(--ink); font-family: Poppins, sans-serif; } .co-br.g b { color: #16a34a; }
.co-safe { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 2px 0 0; font-size: 12.5px; color: var(--ink-soft); }
.co-safe svg { width: 17px; height: 17px; fill: none; stroke: #16a34a; stroke-width: 1.9; stroke-linejoin: round; }

/* side summary (computers) */
.co-side { position: sticky; top: 96px; display: grid; gap: 10px; animation-delay: .1s; }
.co-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px dashed var(--card-b); font-weight: 700; }
.co-total b { font: 800 26px Poppins, sans-serif; color: var(--red); }
.pop { display: inline-block; animation: co-pop .4s cubic-bezier(.34,1.56,.64,1); }
.co-go { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 15px; border: 0; border-radius: 16px; cursor: pointer; font: inherit; font-weight: 800; font-size: 16px; color: var(--on-accent, #fff); background: linear-gradient(110deg, color-mix(in srgb, var(--red) 78%, #ff9a3d), var(--red) 55%, color-mix(in srgb, var(--red) 80%, #000)); box-shadow: 0 14px 26px -14px var(--red); transition: transform .25s cubic-bezier(.34,1.56,.64,1), filter .2s; }
.co-go::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; z-index: -1; background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent); animation: co-shine 3.2s 1s ease-in-out infinite; }
.co-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.co-go:hover { transform: translateY(-2px); } .co-go:active { transform: scale(.97); }
.co-go.busy { pointer-events: none; filter: saturate(.7); }
.co-go.busy > * { opacity: 0; } .co-go.busy::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: co-spin .7s linear infinite; }
.co-terms { margin: 0; font-size: 11.5px; color: var(--ink-soft); text-align: center; }

/* sheets */
.co-sheet { position: fixed; inset: 0; z-index: 1260; display: flex; align-items: flex-end; justify-content: center; background: rgba(10,8,8,.45); animation: co-fade .25s ease; }
.co-sheet.out { opacity: 0; transition: opacity .26s; }
.co-sheet-box { width: 100%; max-width: 620px; max-height: 90dvh; overflow: auto; overscroll-behavior: contain; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--card); color: var(--ink); animation: co-sheet .42s cubic-bezier(.2,1,.3,1); }
@media (min-width: 721px) { .co-sheet { align-items: center; } .co-sheet-box { border-radius: 24px; } }
.co-lock, .co-lock body { overflow: hidden !important; }
.co-grip { display: block; width: 44px; height: 5px; margin: 0 auto 10px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.co-sh-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .co-sh-top b { font-size: 17px; }
.co-x { width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); cursor: pointer; }
.co-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.co-fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.co-f { display: grid; gap: 5px; margin-bottom: 10px; font-size: 13px; font-weight: 600; } .co-f i { color: #e11d48; font-style: normal; }
.co-f input, .co-f textarea, .co-cp-in input { width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 13px; border: 1.5px solid var(--card-b); background: var(--bg); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 400; outline: none; transition: border-color .2s, box-shadow .2s; }
.co-f input:focus, .co-f textarea:focus, .co-cp-in input:focus { border-color: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 13%, transparent); }
.co-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.co-chips button { padding: 7px 13px; border-radius: 99px; border: 1.5px solid var(--card-b); background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; }
.co-chips button.on { background: var(--red); border-color: var(--red); color: var(--on-accent, #fff); }
.co-saved { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.co-saved button { flex: none; max-width: 220px; display: grid; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1.5px dashed var(--card-b); background: none; color: var(--ink); font: inherit; cursor: pointer; } .co-saved small { color: var(--ink-soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.co-err { color: #e11d48; font-size: 13px; font-weight: 600; margin: 2px 0 6px; } .co-err:empty { display: none; }
.co-save { width: 100%; padding: 14px; border: 0; border-radius: 15px; background: var(--red); color: var(--on-accent, #fff); font: inherit; font-weight: 800; font-size: 15px; cursor: pointer; }
.co-promo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; margin-bottom: 12px; border-radius: 16px; border: 0; cursor: pointer; text-align: left; font: inherit; color: var(--ink); background: linear-gradient(110deg, color-mix(in srgb, var(--red) 12%, var(--card)), var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 35%, transparent); }
.co-promo-l { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--red); color: var(--on-accent, #fff); } .co-promo-l svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.co-promo > span:nth-child(2) { flex: 1; display: grid; } .co-promo small { color: var(--ink-soft); } .co-promo em { font-style: normal; font-weight: 700; color: var(--red); }
.co-cp-in { display: flex; gap: 8px; } .co-cp-in input { text-transform: uppercase; } .co-cp-in button { flex: none; padding: 0 16px; border: 0; border-radius: 13px; background: var(--ink); color: var(--bg); font: inherit; font-weight: 700; cursor: pointer; }
.co-cp-rm { margin-top: 10px; border: 0; background: none; color: #e11d48; font: inherit; font-weight: 600; cursor: pointer; }

/* success */
.co-done { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; background: rgba(10,8,8,.55); animation: co-fade .3s; }
.co-done-box { position: relative; display: grid; justify-items: center; gap: 6px; width: min(340px, calc(100% - 40px)); padding: 34px 20px 26px; border-radius: 26px; background: var(--card); text-align: center; animation: co-in .45s cubic-bezier(.2,1.3,.3,1); }
.co-done-ok { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: #16a34a; box-shadow: 0 16px 30px -12px #16a34a; animation: co-pop .6s .1s cubic-bezier(.34,1.56,.64,1) both; }
.co-done-ok svg { width: 40px; height: 40px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: co-draw .5s .35s forwards; }
@keyframes co-draw { to { stroke-dashoffset: 0; } }
.co-done-box h3 { margin: 8px 0 0; font-size: 20px; } .co-done-box p { margin: 0; color: var(--ink-soft); } .co-done-box b { color: var(--ink); } .co-done-box small { color: var(--ink-soft); }
.co-burst { position: absolute; left: 50%; top: 71px; width: 0; height: 0; }
.co-burst i { position: absolute; width: 8px; height: 12px; border-radius: 3px; background: hsl(var(--h), 85%, 58%); opacity: 0; animation: co-confetti 1.2s .15s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes co-confetti { 0% { opacity: 1; transform: rotate(var(--a)) translateY(0) scale(.6); } 100% { opacity: 0; transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) rotate(220deg) scale(1); } }

/* phones and tablets: bottom bar */
.co-bar { display: none; }
@media (max-width: 1100px) {
  .checkout-layout.co-on { grid-template-columns: minmax(0, 1fr); }
  .co-side { display: none; }
  .co-bar { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 880; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 16px; background: var(--card); border-top: 1px solid var(--card-b); box-shadow: 0 -12px 28px -20px rgba(0,0,0,.4); animation: co-sheet .45s cubic-bezier(.2,1,.3,1); }
  .co-bar-t { flex: 1; min-width: 0; display: grid; line-height: 1.2; font-size: 13.5px; }
  .co-bar-t b { font: 800 22px Poppins, sans-serif; color: var(--red); }
  .co-bar-s { font-size: 11.5px; color: #16a34a; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .co-bar .co-go { width: auto; flex: none; padding: 14px 26px; border-radius: 999px; }
  html.co-page .mnav, html.co-page .cw-fab { display: none !important; }
  html.co-page body { padding-bottom: 90px !important; }
  html.co-page body > footer { margin-bottom: 0 !important; }
}
@media (max-width: 620px) {
  .co-card { padding: 14px; border-radius: 18px; }
  .co-fgrid { grid-template-columns: 1fr; gap: 0; }
  .co-ship { grid-template-columns: 1fr; min-width: 0; }
  .co-ship-line { display: grid; }
  .co-ship-line > span { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .co-addr::after, .co-go::before { animation: none; } .co-card, .co-item, .co-pay-i { animation: none !important; } }
/* phones: no search bar or category row on this page — just the logo row */
@media (max-width: 720px) {
  header.main form.search, header.main .sx, nav.catnav { display: none !important; }
  header.main .wrap { row-gap: 0 !important; grid-template-rows: auto !important; padding-bottom: 8px; }
}

/* payment methods in one row: real logos on white tiles, a tick on the chosen one, its note underneath */
.co-pay-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.co-pay .co-pay-i { position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; margin: 0; padding: 12px 6px 10px; border-radius: 16px; border: 1.5px solid var(--card-b); background: var(--card); text-align: center; transition: border-color .2s, background .2s, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .25s; }
.co-pay .co-pay-i + .co-pay-i { margin-top: 0; }
.co-pay .co-pay-i:hover { transform: translateY(-2px); }
.co-pay .co-pay-i.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 7%, var(--card)); box-shadow: 0 10px 22px -16px var(--c); }
.co-pay .co-pay-ic { width: 100%; height: 40px; border-radius: 10px; background: #fff; display: grid; place-items: center; padding: 4px 6px; box-sizing: border-box; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.co-pay .co-pay-ic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.co-pay .co-pay-ic svg { color: var(--c); width: 24px; height: 24px; } /* drawn icons (wallet, bank) on the white tile take the method's colour */
.co-pay .co-pay-i > b { font-size: 12.5px; line-height: 1.25; }
.co-pay .co-radio { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-width: 0; background: var(--card); box-shadow: 0 0 0 1.5px var(--card-b); opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s cubic-bezier(.34,1.56,.64,1), background .2s; }
.co-pay .co-pay-i.on .co-radio { opacity: 1; transform: none; background: var(--c); box-shadow: 0 0 0 2px var(--card); }
.co-pay-tag { position: absolute; top: -8px; left: 8px; font-style: normal; font-size: 9.5px; font-weight: 800; color: #fff; background: #16a34a; padding: 2px 6px; border-radius: 99px; }
.co-pay-note { margin: 10px 2px 0; font-size: 12.5px; color: var(--ink-soft); padding-left: 10px; border-left: 3px solid var(--c, #16a34a); }
.co-pay-note.in { animation: co-in .3s ease; }
@media (max-width: 380px) { .co-pay-row { gap: 6px; } .co-pay .co-pay-i > b { font-size: 11px; } .co-pay .co-pay-ic { height: 34px; } }

/* the address card's bottom edge: a soft line in the design's colours with a light gliding along it
   (replaces the airmail stripes) */
.co-addr::after { height: 3px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--red) 55%, transparent) 15%, var(--red) 50%, color-mix(in srgb, var(--amber, #f2b705) 80%, var(--red)) 85%, transparent); background-size: 100% 3px; animation: none; border-radius: 3px; left: 16px; right: 16px; bottom: 0; }
.co-addr::before { content: ""; position: absolute; bottom: -2px; left: 16px; width: 40px; height: 7px; border-radius: 99px; background: radial-gradient(closest-side, #fff, color-mix(in srgb, var(--red) 70%, #fff) 45%, transparent); filter: blur(.5px); animation: co-glide 3.6s ease-in-out infinite; pointer-events: none; }
@keyframes co-glide { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(calc(var(--aw, 600px) - 72px)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .co-addr::before { display: none; } }
.co-pay .co-pay-ic { overflow: hidden; } .co-pay .co-pay-ic img { display: block; width: auto !important; height: 30px !important; max-width: 100% !important; object-fit: contain; }
@media (max-width: 380px) { .co-pay .co-pay-ic img { height: 26px !important; } }
/* tighter page: less space above the breadcrumb and above the footer */
body > section:first-of-type { padding-top: 10px !important; }
body > section:last-of-type { padding-bottom: 14px !important; }
html body > footer { margin-top: 8px !important; }
html body > footer > .wrap { padding-top: 18px !important; }
@media (min-width: 1101px) { body > section:first-of-type { padding-top: 18px !important; } html body > footer > .wrap { padding-top: 36px !important; } }
@media (max-width: 1100px) { html body > footer > .wrap { padding-top: 4px !important; } }
/* order placed: track and invoice buttons */
.co-done-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 12px; }
.co-done-acts a, .co-done-acts button { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 12px 8px; border-radius: 14px; font: inherit; font-weight: 700; font-size: 13.5px; text-decoration: none; cursor: pointer; border: 0; transition: transform .25s cubic-bezier(.34,1.56,.64,1); animation: co-in .45s both; }
.co-done-acts a { color: var(--on-accent, #fff); background: var(--red); box-shadow: 0 10px 22px -12px var(--red); animation-delay: .5s; }
.co-done-acts button { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); animation-delay: .58s; }
.co-done-acts a:active, .co-done-acts button:active { transform: scale(.95); }
.co-done-acts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.co-done-more { margin-top: 8px; font-size: 13px; color: var(--ink-soft); text-decoration: none; } .co-done-more:hover { color: var(--red); }
@media (max-width: 360px) { .co-done-acts { grid-template-columns: 1fr; } }
/* going to the gateway, and the warning when it could not start */
.co-going .co-done-box { gap: 10px; }
.co-going-logo { width: 120px; height: 56px; display: grid; place-items: center; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 10px 24px -14px rgba(0,0,0,.4); animation: co-pop .6s cubic-bezier(.34,1.56,.64,1); }
.co-going-logo img { max-width: 100%; max-height: 100%; }
.co-going-bar { width: 80%; height: 5px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; position: relative; }
.co-going-bar::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: inherit; background: var(--red); animation: co-load 1s ease-in-out infinite; }
@keyframes co-load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.co-done-warn { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; color: #b45309; background: #fef3c7; }
/* manual bKash / Nagad: TrxID and the number paid from */
.co-trx { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; animation: co-in .3s both; }
.co-trx[hidden] { display: none; }
.co-trx input { width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--card-b); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; outline: none; }
.co-trx input:focus { border-color: var(--red); }
.co-pay-note .bad { color: #e11d48; font-weight: 600; }
@media (max-width: 420px) { .co-trx { grid-template-columns: 1fr; } }

/* bank transfer sheet */
.bk-amount { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; border-radius: 14px; margin-bottom: 14px; background: color-mix(in srgb, var(--red) 8%, var(--card)); }
.bk-amount span { color: var(--ink-soft); font-size: 13.5px; } .bk-amount b { font: 800 22px Poppins, sans-serif; color: var(--red); }
.bk-h { margin: 4px 0 10px; font-weight: 700; font-size: 14px; }
.bk-banks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.bk-b { display: grid; justify-items: center; gap: 7px; padding: 12px 8px; border-radius: 16px; border: 1.5px solid var(--card-b); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .25s; animation: co-in .4s both; animation-delay: calc(var(--i) * 50ms); }
.bk-b:hover { transform: translateY(-2px); }
.bk-b.on { border-color: var(--red); box-shadow: 0 10px 22px -14px var(--red); background: color-mix(in srgb, var(--red) 5%, var(--card)); }
.bk-b img, .bk-card-h img { height: 34px; max-width: 100%; object-fit: contain; }
.bk-b b { font-size: 12.5px; text-align: center; line-height: 1.25; }
.bk-mono { width: 40px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 800 14px Poppins, sans-serif; color: var(--on-accent, #fff); background: linear-gradient(135deg, #4f8cff, #1d4ed8); }
.bk-detail.in { animation: co-in .35s ease both; }
.bk-card { border-radius: 18px; border: 1px solid var(--card-b); overflow: hidden; margin-bottom: 16px; }
.bk-card-h { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.bk-card-h b { font-size: 15px; }
.bk-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid color-mix(in srgb, var(--card-b) 80%, transparent); font-size: 13.5px; }
.bk-row span { color: var(--ink-soft); } .bk-row b { font-family: Poppins, 'Hind Siliguri', sans-serif; word-break: break-all; }
.bk-copy { border: 0; border-radius: 9px; padding: 6px 11px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); transition: background .2s, color .2s; white-space: nowrap; }
.bk-copy.ok { background: #16a34a; color: #fff; }
.bk-up { display: block; cursor: pointer; margin-bottom: 10px; }
.bk-up-in { display: grid; justify-items: center; gap: 4px; padding: 18px 12px; border-radius: 16px; border: 2px dashed color-mix(in srgb, var(--red) 40%, var(--card-b)); text-align: center; font-size: 14px; transition: border-color .2s, background .2s; }
.bk-up-in small { color: var(--ink-soft); font-size: 12px; }
.bk-up-in img { max-height: 150px; max-width: 100%; border-radius: 10px; }
.bk-up.done .bk-up-in { border-style: solid; border-color: #16a34a; background: color-mix(in srgb, #22c55e 6%, transparent); }
.bk-up.need { animation: co-shake .5s ease; }
.bk-ref { width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 13px; border: 1.5px solid var(--card-b); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; outline: none; margin-bottom: 6px; }
.bk-ref:focus { border-color: var(--red); }
.co-wait { font-size: 52px; animation: co-pop .6s cubic-bezier(.34,1.56,.64,1), co-tilt 2.4s 1s ease-in-out infinite; display: inline-block; }
@keyframes co-tilt { 0%, 40%, 100% { transform: rotate(0); } 50%, 90% { transform: rotate(180deg); } }
@media (max-width: 420px) { .bk-row { grid-template-columns: 90px minmax(0, 1fr) auto; font-size: 13px; } }

/* =========================================================================== computers and tablets
   - computers and tablets held sideways (900px+): two columns, the order summary with "Place order" sticks beside
     the form; the price details are not repeated in the main column; no bottom bar
   - portrait tablets keep one column with the bottom bar, with roomier cards
   - payment tiles keep a natural size instead of stretching across wide screens */
@media (min-width: 900px) {
  .co-main > .co-bill { display: none; }
  .co-pay-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .co-side { gap: 12px; }
  .co-side .co-bill-rows { gap: 10px; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .checkout-layout.co-on { grid-template-columns: minmax(0, 1fr) 320px !important; gap: 16px; }
  .co-side { display: grid !important; position: sticky; top: 84px; }
  .co-bar { display: none !important; }
  html.co-page body { padding-bottom: 0 !important; }
  .co-ship { grid-template-columns: 1fr; min-width: 0; }
  .co-ship-line { display: grid; } .co-ship-line > span { padding-top: 0; }
}
@media (min-width: 721px) and (max-width: 899px) {
  .co-card { padding: 18px; }
  .co-pay-row { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .co-bar { left: 50%; right: auto; bottom: 14px; transform: translateX(-50%); width: min(680px, calc(100% - 28px)); border-radius: 20px; border: 1px solid var(--card-b); }
  html.co-page body { padding-bottom: 100px !important; }
}
/* the bank sheet on wide screens: a little wider, the bank details beside the receipt */
@media (min-width: 900px) {
  .co-sheet-box { max-width: 720px; }
  .bk-detail.in, .bk-detail:has(.bk-card) { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 0 18px; align-items: start; }
  .bk-detail .bk-card { grid-row: 1 / span 5; margin-bottom: 0; }
  .bk-detail > :not(.bk-card) { grid-column: 2; }
  .bk-detail .bk-h { margin-top: 0; }
}
/* hand-added payment methods */
.cx-mono { width: 44px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 800 14px Poppins, sans-serif; color: #fff; background: var(--c, #2563eb); }
.co-pay .co-pay-ic .cx-mono { height: 30px; }
.cx-qr { display: grid; justify-items: center; gap: 6px; padding: 14px; border-top: 1px solid color-mix(in srgb, var(--card-b) 80%, transparent); background: #fff; }
.cx-qr img { width: min(200px, 60vw); aspect-ratio: 1; object-fit: contain; border-radius: 12px; border: 1px solid #eee; }
.cx-qr small { color: #555; font-size: 12px; }
.cx-note { margin: 0; padding: 11px 14px; border-top: 1px solid color-mix(in srgb, var(--card-b) 80%, transparent); font-size: 13px; line-height: 1.55; color: var(--ink-soft); white-space: pre-wrap; }
@media (min-width: 900px) { .cx-detail .bk-card { grid-row: 1 / span 6; } }
/* quantity and remove on each item (the same stepper as the cart) */
.co-item-p { align-items: center; gap: 8px; flex-wrap: wrap; }
.co-qty { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.co-qty button { width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--card); color: var(--ink); cursor: pointer; box-shadow: 0 2px 6px -3px rgba(0, 0, 0, .3); transition: background .2s, color .2s, transform .15s; }
.co-qty button:hover:not(:disabled) { background: var(--red); color: var(--on-accent, #fff); }
.co-qty button:active:not(:disabled) { transform: scale(.85); }
.co-qty button:disabled { opacity: .35; cursor: default; box-shadow: none; }
.co-qty svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.co-qty b { min-width: 24px; text-align: center; font: 700 14px Poppins, sans-serif; }
.co-qty .co-del { margin-left: 4px; color: #e11d48; }
.co-qty .co-del svg { stroke-width: 2; }
.co-qty .co-del:hover:not(:disabled) { background: #e11d48; color: #fff; }
.co-items.co-still .co-item { animation: none; }
.co-item { transition: opacity .25s, transform .25s; } .co-item.gone { opacity: 0; transform: translateX(-30px); }
.co-qty .co-src { min-width: 0; padding: 0 8px; font-size: 12px; color: #7c3aed; }

/* wholesale: how to pay (all now, advance, pay later, wallet) and China cargo (chai-checkout.js) */
.co-plan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.co-plan-row button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--card-b); background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.co-plan-row button svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.co-plan-row button span { display: grid; min-width: 0; } .co-plan-row b { font-size: 14px; } .co-plan-row small { font-size: 11.5px; color: var(--ink-soft); }
.co-plan-row button.on { border-color: var(--red); background: color-mix(in srgb, var(--red) 7%, var(--card)); color: var(--red); }
.co-plan-row button:disabled { opacity: .5; cursor: not-allowed; }
.co-pay-i.off { opacity: .4; pointer-events: none; }
.co-br.adv { font-weight: 800; color: var(--red); }
.co-cargo button svg { stroke-linecap: round; }
@media (max-width: 520px) { .co-plan-row { grid-template-columns: 1fr 1fr; } .co-plan-row button { padding: 10px; gap: 7px; } }

.co-kg { flex-basis: 100%; margin: 4px 0 0; font-size: 12.5px; color: var(--ink-soft); } .co-kg .bad { color: #dc2626; }
.co-br.est { color: var(--ink-soft); font-style: italic; }

.co-kgl { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; } .co-kgl em { font-style: normal; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink-soft) 10%, transparent); }
.co-kgl em.k-battery, .co-kgl em.k-liquid, .co-kgl em.k-branded { color: #9a3412; background: color-mix(in srgb, #f97316 13%, transparent); }

/* wholesale order: the three steps at the top of the checkout */
.co-wsflow h3 { margin: 0 0 10px; }
.co-wsf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.co-wsf li { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--ink-soft) 7%, var(--card)); }
.co-wsf li.on { background: color-mix(in srgb, var(--red) 8%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 45%, transparent); }
.co-wsf i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 12.5px; color: #fff; background: #94a3b8; } .co-wsf li.on i { background: var(--red); }
.co-wsf span { display: grid; min-width: 0; } .co-wsf b { font-size: 13px; line-height: 1.3; } .co-wsf small { font-size: 11.5px; color: var(--ink-soft); }
@media (max-width: 640px) { .co-wsf { grid-template-columns: 1fr; } }

/* wholesale: "pay part now, the rest when it arrives" */
.co-wsx { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.co-wsx div { display: grid; } .co-wsx small { font-size: 12px; color: var(--ink-soft); } .co-wsx em { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }
.co-wsx > div:first-child b { font-size: 17px; color: var(--ink-soft); text-decoration: none; }
.co-wsx .pay { justify-items: end; text-align: right; } .co-wsx .pay b { font-size: 24px; color: var(--red); line-height: 1.1; }
.co-wsx .pct { margin-top: 3px; padding: 2px 10px; border-radius: 99px; font-weight: 800; font-size: 13px !important; color: #fff !important; background: #16a34a; }
.co-wsbar { height: 10px; border-radius: 99px; overflow: hidden; margin-bottom: 12px; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--ink-soft) 15%, transparent) 0 6px, color-mix(in srgb, var(--ink-soft) 8%, transparent) 6px 12px); }
.co-wsbar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #16a34a, #22c55e); }

/* "pay a bill" view (js/chai-billpay.js): the checkout's own cards, plus these */
.bp-load { padding: 40px; text-align: center; color: var(--ink-soft); }
.bp-now { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, color-mix(in srgb, #16a34a 10%, var(--card)), var(--card)); }
.bp-now .bp-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #22c55e, #15803d); }
.bp-now .bp-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.bp-now > div { flex: 1; min-width: 0; } .bp-now b { display: block; font-size: 15.5px; } .bp-now small { color: var(--ink-soft); font-size: 12.5px; }
.bp-now em { flex: none; font-style: normal; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; color: #c2410c; background: color-mix(in srgb, #f97316 14%, transparent); }
.bp-addr { cursor: default; } .bp-addr:hover { transform: none; }
.bp-qty { font-weight: 700; color: var(--ink-soft); font-size: 14px; }
.bp-line { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.bp-line > div { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.bp-line em { font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 8px; color: var(--ink-soft); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.bp-line > b { font-size: 14.5px; }
.co-br span small { font-size: 12px; color: var(--ink-soft); }
.bp-msg { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 32px 20px; max-width: 520px; margin: 0 auto; }
.bp-msg .bp-ic { font-size: 34px; } .bp-msg b { font-size: 18px; } .bp-msg p { margin: 0 0 6px; color: var(--ink-soft); }
.bp-msg.ok b { color: #15803d; } .bp-msg .bp-back { width: auto; padding: 12px 24px; text-decoration: none; }
.co-billpay .co-main:only-child { grid-column: 1 / -1; }
.co-ok.due { color: #b45309; background: color-mix(in srgb, #f59e0b 15%, transparent); }
/* a hidden line (e.g. "shipping from China" for a retail cart) stays hidden: .co-line sets display */
.co-line[hidden] { display: none !important; }
