

.checkout-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 700;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.checkout-overlay.open { display: flex; }

.checkout-modal {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 560px;
  max-height: 92dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -8px 40px rgba(0,0,0,.15);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: ckFade .2s ease;
}

@keyframes ckFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.checkout-grab { display: block; width: 40px; height: 5px; border-radius: 3px; background: #d1d1d6; margin: 9px auto 0; flex-shrink: 0; }


@media(min-width: 600px) {
  .checkout-grab { display: none; }
  .checkout-overlay { align-items: center; padding: 20px; }
  .checkout-modal {
    border-radius: 20px; max-height: 90vh;
    animation: ckFade .2s ease;
  }
}


.checkout-hdr {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e5e5ea;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.checkout-hdr h2 { font-size: 17px; font-weight: 700; }
.checkout-close {
  background: #f5f5f7; border: none; border-radius: 50%;
  width: 30px; height: 30px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #6e6e73; transition: background .2s;
}
.checkout-close:hover { background: #e5e5ea; }



.checkout-body {
  flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 18px;
}


.checkout-section-title {
  font-size: 13px; font-weight: 700; color: #6e6e73;
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 10px;
}


.co-shop-group { margin-bottom: 10px; }


.co-shop-label-banner {
  display: flex; align-items: center; gap: 6px;
  background: #1d1d1f; color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 7px 12px; border-radius: 8px;
  margin-bottom: 6px; margin-top: 8px;
}
.co-shop-group:first-child .co-shop-label-banner { margin-top: 0; }


.co-shop-label {
  font-size: 11px; font-weight: 700; color: #6e6e73;
  text-transform: uppercase; letter-spacing: .4px;
  padding: 6px 0 4px;
  border-top: 1px solid #f0f0f5;
  margin-top: 4px;
}
.co-shop-label:first-child { border-top: none; margin-top: 0; }
.co-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f9f9fb;
}
.co-item:last-child { border-bottom: none; }
.co-item-img {
  width: 36px; height: 48px; object-fit: cover;
  border-radius: 5px; background: #f5f5f7; flex-shrink: 0;
}
.co-item-img-ph {
  width: 36px; height: 48px; border-radius: 5px;
  background: #f5f5f7; display: flex; align-items: center;
  justify-content: center; font-size: 16px; flex-shrink: 0;
}
.co-item-info { flex: 1; min-width: 0; }
.co-item-name {
  font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.co-item-sub { font-size: 11px; color: #6e6e73; }
.co-item-right { text-align: right; flex-shrink: 0; }
.co-item-qty { font-size: 11px; color: #6e6e73; }
.co-item-price { font-size: 13px; font-weight: 700; }

.checkout-total-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0 0; border-top: 1px solid #e5e5ea; margin-top: 6px;
  font-size: 15px; font-weight: 600;
}
.checkout-total-val { font-size: 20px; font-weight: 700; color: #1d1d1f; }


.co-fg { margin-bottom: 12px; }
.co-fg:last-child { margin-bottom: 0; }
.co-fg label {
  display: block; font-size: 12px; font-weight: 600;
  color: #3a3a3c; margin-bottom: 5px;
}
.co-fg input, .co-fg textarea {
  width: 100%; background: #f5f5f7;
  border: 1.5px solid #e5e5ea; border-radius: 10px;
  color: #1d1d1f; font-family: inherit; font-size: 15px;
  padding: 10px 14px; outline: none;
  transition: border-color .2s, background .2s;
}
.co-fg input:focus, .co-fg textarea:focus {
  border-color: #1d1d1f; background: #fff;
}
.co-fg textarea {
  min-height: 80px; resize: vertical; line-height: 1.5;
}


.checkout-err {
  background: #fff0f0; color: #e63946;
  border: 1px solid #ffc9c9; border-radius: 10px;
  padding: 10px 14px; font-size: 13px; margin-bottom: 4px;
}


.checkout-payment-note {
  background: #f0f7ff; border: 1px solid #bfdbfe;
  border-radius: 12px; padding: 12px 16px;
  font-size: 13px; color: #1e40af; line-height: 1.5;
}


.checkout-footer {
  padding: 14px 20px;
  border-top: 1px solid #e5e5ea;
  display: flex; gap: 10px; flex-shrink: 0;
  background: #fff;
}
.checkout-btn-cancel {
  background: #f5f5f7; color: #1d1d1f; border: none;
  border-radius: 9999px; padding: 12px 22px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.checkout-btn-cancel:hover { background: #e5e5ea; }
.checkout-btn-submit {
  flex: 1; background: #1d1d1f; color: #fff; border: none;
  border-radius: 9999px; padding: 12px 22px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.checkout-btn-submit:hover { background: #3a3a3c; }
.checkout-btn-submit:disabled {
  background: #c7c7cc; cursor: default;
}


#checkoutPayment { animation: none; }

.co-payment-card {
  background: #f9f9fb; border-radius: 14px;
  padding: 16px; margin-bottom: 14px;
  border: 1px solid #e5e5ea;
}
.co-payment-card:last-child { margin-bottom: 0; }

.co-payment-shop {
  font-size: 13px; font-weight: 700;
  color: #3a3a3c; margin-bottom: 4px;
}


.co-bank-info {
  background: #fff; border: 1px solid #e5e5ea;
  border-radius: 10px; overflow: hidden;
  margin-bottom: 12px;
}
.co-bank-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; font-size: 13px;
  border-bottom: 1px solid #f5f5f7;
}
.co-bank-row:last-child { border-bottom: none; }
.co-bank-row span { color: #6e6e73; }
.co-bank-row strong { color: #1d1d1f; }

.co-pay-header{background:#1d1d1f;color:#fff;border-radius:14px;padding:16px 16px 15px;margin-bottom:14px;text-align:center}
.co-pay-head-row{display:flex;align-items:center;justify-content:center;gap:8px;font-size:15px;font-weight:700}
.co-pay-check{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#fff;color:#1d1d1f;font-size:13px;font-weight:800;flex-shrink:0}
.co-pay-multi{margin-top:12px;font-size:12.5px;line-height:1.5;font-weight:600;color:#fff;background:rgba(230,57,70,.22);border:1px solid rgba(230,57,70,.55);border-radius:11px;padding:8px 12px;text-align:center}
.co-shop-step{display:inline-block;margin-left:6px;font-size:11px;font-weight:700;color:#e63946;background:rgba(230,57,70,.09);border:1px solid rgba(230,57,70,.35);border-radius:9999px;padding:2px 9px;vertical-align:1px}
.co-pay-countdown{margin-top:12px;font-size:14px;font-weight:600;color:rgba(255,255,255,.92);background:rgba(255,255,255,.09);border-radius:9999px;padding:7px 15px;display:inline-block}
.co-pay-countdown.urgent{color:#fff;background:rgba(230,57,70,.92)}
.co-pay-countdown b{font-variant-numeric:tabular-nums;letter-spacing:.03em}
.co-pay-reassure{margin-top:12px;font-size:12px;line-height:1.5;color:rgba(255,255,255,.64)}
.co-pay-instruct{font-size:12.5px;color:#6e6e73;text-align:center;margin-bottom:16px;font-weight:600}
.co-bank-acct{display:inline-flex;align-items:center;gap:9px}
.co-copy-btn{border:1px solid #d1d1d6;background:#fff;color:#1d1d1f;border-radius:8px;font-family:inherit;font-size:12px;font-weight:600;padding:4px 11px;cursor:pointer;transition:background .15s,border-color .15s;flex-shrink:0}
.co-copy-btn:hover{background:#f5f5f7}
.co-copy-btn.copied{border-color:#1d1d1f;background:#1d1d1f;color:#fff}
@media(prefers-reduced-motion:reduce){.co-copy-btn{transition:none}}


.co-slip-section { margin-top: 10px; }

.co-slip-label {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%;
  background: #fff; border: 1.5px dashed #c7c7cc;
  border-radius: 10px; padding: 12px;
  font-size: 13px; font-weight: 600; color: #3a3a3c;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.co-slip-label:hover {
  border-color: #1d1d1f; background: #f5f5f7;
}
