/* ============================================================
   PAPER BIRDS — CHECKOUT FLOW
   ============================================================ */

.pbc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(10,8,20,.6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.pbc-overlay.open { opacity: 1; pointer-events: all; }

.pbc-modal {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(30,27,46,.22);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  scrollbar-width: thin;
}
.pbc-overlay.open .pbc-modal { transform: translateY(0) scale(1); }

/* ── HEADER ──────────────────────────────────────────────── */
.pbc-header {
  padding: 22px 24px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.pbc-header-left h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #1a1825;
  margin: 0 0 2px;
}
.pbc-header-left p { font-size: .8rem; color: #7a7890; margin: 0; }
.pbc-x {
  background: none;
  border: none;
  cursor: pointer;
  color: #7a7890;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.pbc-x:hover { background: #f0eef8; color: #1a1825; }

/* ── STEP INDICATOR ──────────────────────────────────────── */
.pbc-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 18px 24px 0;
}
.pbc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  position: relative;
}
.pbc-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e8e4f4;
  z-index: 0;
  transition: background .3s;
}
.pbc-step.done:not(:last-child)::after { background: #e060a0; }
.pbc-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e8e4f4;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #aaa8c0;
  position: relative;
  z-index: 1;
  transition: all .25s;
}
.pbc-step.active .pbc-step-dot {
  border-color: #e060a0;
  background: #e060a0;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(224,96,160,.15);
}
.pbc-step.done .pbc-step-dot {
  border-color: #e060a0;
  background: #e060a0;
  color: #fff;
}
.pbc-step-label {
  font-size: .68rem;
  color: #aaa8c0;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pbc-step.active .pbc-step-label { color: #e060a0; }
.pbc-step.done  .pbc-step-label  { color: #9040e0; }

/* ── BODY ────────────────────────────────────────────────── */
.pbc-body { padding: 20px 24px 24px; }

/* ── ORDER SUMMARY MINI ──────────────────────────────────── */
.pbc-summary {
  background: #f8f7ff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid #eceaf8;
}
.pbc-summary-title {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7a7890;
  margin-bottom: 10px;
}
.pbc-summary-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .83rem;
  color: #1a1825;
  padding: 3px 0;
}
.pbc-summary-item span:last-child { font-weight: 600; }
.pbc-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: .92rem;
  font-weight: 700;
  color: #1a1825;
  border-top: 1px solid #eceaf8;
  padding-top: 10px;
  margin-top: 6px;
}
.pbc-summary-swatch {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  flex-shrink: 0;
  margin-right: 8px;
}

/* ── FORM ────────────────────────────────────────────────── */
.pbc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.pbc-field label {
  font-size: .78rem;
  font-weight: 500;
  color: #7a7890;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.pbc-input, .pbc-textarea {
  padding: 10px 14px;
  border: 1.5px solid #e8e4f4;
  border-radius: 10px;
  font-size: .88rem;
  font-family: 'Inter', sans-serif;
  color: #1a1825;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  box-sizing: border-box;
}
.pbc-input:focus, .pbc-textarea:focus {
  outline: none;
  border-color: #e060a0;
  box-shadow: 0 0 0 3px rgba(224,96,160,.1);
}
.pbc-textarea { resize: vertical; min-height: 72px; }
.pbc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── PAYMENT METHOD CARDS ────────────────────────────────── */
.pbc-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.pbc-method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid #e8e4f4;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, background .2s;
  position: relative;
}
.pbc-method-card:hover { border-color: #c090d8; background: #fdf8ff; }
.pbc-method-card.selected {
  border-color: #e060a0;
  background: #fff5fb;
  box-shadow: 0 0 0 4px rgba(224,96,160,.1);
}
.pbc-method-card input[type="radio"] { display: none; }
.pbc-method-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.pbc-method-card.bkash   .pbc-method-icon { background: linear-gradient(135deg,#e2136e,#c0004e); }
.pbc-method-card.bank    .pbc-method-icon { background: linear-gradient(135deg,#1a56a0,#0d3070); }
.pbc-method-card.cod     .pbc-method-icon { background: linear-gradient(135deg,#30b060,#1a8040); }
.pbc-method-info h4 {
  font-size: .92rem;
  font-weight: 600;
  color: #1a1825;
  margin: 0 0 2px;
}
.pbc-method-info p { font-size: .78rem; color: #7a7890; margin: 0; }
.pbc-method-check {
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #e8e4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
  font-size: .8rem;
  color: transparent;
}
.pbc-method-card.selected .pbc-method-check {
  background: #e060a0;
  border-color: #e060a0;
  color: #fff;
}

/* ── PAYMENT DETAILS BOX ─────────────────────────────────── */
.pbc-pay-box {
  background: #f8f7ff;
  border: 1.5px solid #e8e4f4;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
}
.pbc-pay-box h4 {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7a7890;
  margin: 0 0 12px;
}
.pbc-pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  font-size: .85rem;
  border-bottom: 1px solid #eceaf8;
}
.pbc-pay-row:last-child { border-bottom: none; }
.pbc-pay-row span:first-child { color: #7a7890; }
.pbc-pay-row strong { font-weight: 600; color: #1a1825; }
.pbc-pay-highlight {
  background: #fff;
  border: 2px solid #e060a0;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pbc-pay-highlight .pbc-ph-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1825;
  letter-spacing: .04em;
}
.pbc-copy-btn {
  background: none;
  border: 1.5px solid #e8e4f4;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: .75rem;
  cursor: pointer;
  color: #7a7890;
  transition: all .15s;
  white-space: nowrap;
}
.pbc-copy-btn:hover { border-color: #e060a0; color: #e060a0; background: #fff5fb; }
.pbc-amount-badge {
  display: inline-block;
  background: linear-gradient(135deg,#e060a0,#9040e0);
  color: #fff;
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 14px;
}
.pbc-note {
  background: #fffbf0;
  border: 1px solid #f0d890;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .78rem;
  color: #806010;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── COD INFO ────────────────────────────────────────────── */
.pbc-cod-info {
  text-align: center;
  padding: 16px 0;
}
.pbc-cod-icon { font-size: 2.8rem; margin-bottom: 10px; }
.pbc-cod-info h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1825;
  margin: 0 0 6px;
}
.pbc-cod-info p { font-size: .85rem; color: #7a7890; margin: 0 0 6px; }

/* ── SUCCESS SCREEN ──────────────────────────────────────── */
.pbc-success {
  text-align: center;
  padding: 16px 0 8px;
}
.pbc-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg,#e060a0,#9040e0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 2rem;
  animation: pbcPop .4s cubic-bezier(.34,1.56,.64,1) forwards;
}
.pbc-success h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: #1a1825;
  margin: 0 0 6px;
}
.pbc-success p { font-size: .88rem; color: #7a7890; margin: 0 0 8px; }
.pbc-order-id {
  display: inline-block;
  font-family: monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #e060a0;
  background: #fff5fb;
  border: 1.5px solid #f0c0d8;
  border-radius: 10px;
  padding: 8px 20px;
  margin: 12px 0 20px;
  letter-spacing: .08em;
}

/* ── FOOTER ACTIONS ──────────────────────────────────────── */
.pbc-footer {
  display: flex;
  gap: 10px;
  padding-top: 8px;
}
.pbc-btn {
  flex: 1;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .12s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pbc-btn:hover { opacity: .88; transform: translateY(-1px); }
.pbc-btn:active { transform: translateY(0); }
.pbc-btn-primary { background: linear-gradient(135deg,#e060a0,#9040e0); color: #fff; box-shadow: 0 4px 14px rgba(224,96,160,.3); }
.pbc-btn-ghost { background: transparent; border: 1.5px solid #e8e4f4; color: #1a1825; flex: 0 0 auto; padding: 12px 18px; }
.pbc-btn-ghost:hover { border-color: #e060a0; color: #e060a0; }
.pbc-error { color: #e04040; font-size: .82rem; margin-top: 4px; min-height: 18px; }

@keyframes pbcPop {
  0%   { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ── SECTION HEADERS ─────────────────────────────────────── */
.pbc-sec-hd {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #1a1825;
  padding: 20px 0 12px;
  border-bottom: 1.5px solid #e8e4f4;
  margin-bottom: 16px;
}
.pbc-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #aaa8c0;
  font-size: .74rem;
}
.pbc-muted { color: #aaa8c0; font-style: normal; }

/* ── SHIPPING OPTIONS ────────────────────────────────────── */
.pbc-ship-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1.5px solid #e8e4f4;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.pbc-ship-option:hover { border-color: #c090d8; background: #fdf8ff; }
.pbc-ship-option.selected {
  border-color: #e060a0;
  background: #fff5fb;
  box-shadow: 0 0 0 3px rgba(224,96,160,.1);
}
.pbc-ship-option.selected .pbc-method-check {
  background: #e060a0;
  border-color: #e060a0;
  color: #fff;
}
.pbc-ship-option input[type="radio"] { display: none; }
.pbc-ship-icon { font-size: 1.3rem; flex-shrink: 0; }
.pbc-ship-info { flex: 1; }
.pbc-ship-info strong { display: block; font-size: .88rem; color: #1a1825; }
.pbc-ship-info span   { font-size: .74rem; color: #7a7890; }
.pbc-ship-price { font-size: .92rem; font-weight: 700; color: #1a1825; flex-shrink: 0; }

/* ── INLINE PAYMENT DETAILS ──────────────────────────────── */
.pbc-pay-inline {
  background: #f8f7ff;
  border: 1.5px solid #eceaf8;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 16px;
  margin-top: -10px;
  margin-bottom: 8px;
}

/* ── ORDER TOTAL BAR ─────────────────────────────────────── */
.pbc-total-bar {
  background: #f8f7ff;
  border: 1.5px solid #eceaf8;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 10px 0 16px;
}
.pbc-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .86rem;
  color: #7a7890;
  padding: 4px 0;
}
.pbc-total-row span:last-child { font-weight: 500; color: #1a1825; }
.pbc-total-final {
  border-top: 1.5px solid #e8e4f4;
  margin-top: 8px;
  padding-top: 10px;
  font-size: 1rem;
}
.pbc-total-final span { color: #1a1825 !important; font-weight: 700 !important; }

/* ── BKASH CREDENTIAL DISPLAY ────────────────────────────── */
.pbc-bkash-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.pbc-bkash-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: #5a5870;
}
.pbc-bkash-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e2136e;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pbc-bkash-label {
  font-size: .7rem;
  color: #7a7890;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pbc-bkash-type-badge {
  background: #fce8f1;
  color: #c0004e;
  font-size: .67rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ── BKASH TRANSACTION POPUP ─────────────────────────────── */
.pbc-bkash-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10,8,20,.65);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .22s ease;
}
.pbc-bkash-popup-overlay.open { opacity: 1; }

.pbc-bkash-popup {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(30,27,46,.28);
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  transform: translateY(16px) scale(.97);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.pbc-bkash-popup-overlay.open .pbc-bkash-popup {
  transform: translateY(0) scale(1);
}

.pbc-bkash-popup-header {
  background: linear-gradient(135deg, #e2136e, #c0004e);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}
.pbc-bkash-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .01em;
}
.pbc-bkash-popup-close {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.pbc-bkash-popup-close:hover { background: rgba(255,255,255,.35); }

.pbc-bkash-popup-body { padding: 20px 20px 0; }

.pbc-bkash-popup-amount {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff5fa;
  border: 1.5px solid #f9d0e4;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 4px;
}
.pbc-bkash-popup-amount span { font-size: .82rem; color: #7a7890; }
.pbc-bkash-popup-amount strong { font-size: 1.2rem; color: #c0004e; font-weight: 700; }

.pbc-bkash-popup-instruction {
  font-size: .84rem;
  color: #5a5870;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .pbc-row { grid-template-columns: 1fr; }
  .pbc-modal { border-radius: 18px 18px 0 0; margin-top: auto; max-height: 95vh; }
  .pbc-overlay { align-items: flex-end; padding: 0; }
  .pbc-bkash-popup { border-radius: 18px 18px 0 0; }
  .pbc-bkash-popup-overlay { align-items: flex-end; padding: 0; }
}
