body { background: var(--light); }

.nav-back {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--gray);
  transition: color var(--transition);
}
.nav-back:hover { color: var(--black); }

.checkout-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 5% 80px;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 60px;
  align-items: start;
}

.co-title {
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

/* ── ORDER SUMMARY ── */
.order-summary {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid var(--border);
  position: sticky;
  top: 100px;
}

.order-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--light);
  border-radius: 14px;
  margin-bottom: 28px;
}
.order-img-wrap {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd;
  flex-shrink: 0;
}
.order-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.order-details { flex: 1; }
.order-name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 10px;
}
.order-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta-tag {
  font-family: var(--font-brand);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
  color: var(--gray);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
  color: var(--gray);
}
.order-total-row.total {
  border-bottom: none;
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--black);
  padding-top: 16px;
}
.free-tag {
  color: #2d6a4f;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.8rem;
}
.secure-note {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--gray);
  font-family: var(--font-brand);
}

/* ── QPAY PANEL ── */
.qpay-panel {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  border: 1px solid var(--border);
}

.qp-state { text-align: center; }
.qp-state.hidden { display: none; }

/* Loading */
.qp-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 40px auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.qp-state p { color: var(--gray); font-size: 0.9rem; }

/* QR */
.qp-instruction {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 20px;
}

.qr-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 20px;
}
.qr-wrap img {
  width: 220px;
  height: 220px;
  border-radius: 16px;
  border: 3px solid var(--black);
  display: block;
}
.qr-timer {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 100px;
}

/* Bank links */
.bank-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.bank-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
  background: #fff;
}
.bank-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.bank-btn img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}
.bank-btn span {
  font-family: var(--font-brand);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gray);
  text-align: center;
  line-height: 1.2;
}

/* Checking pulse */
.qp-checking {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--gray);
  font-size: 0.82rem;
  font-family: var(--font-brand);
}
.dot-pulse {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.4; }
}

/* Success */
.success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #2d6a4f;
  color: #fff;
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 24px auto 20px;
  animation: pop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
.qp-state h3 {
  font-family: var(--font-brand);
  font-weight: 900;
  font-size: 1.3rem;
  margin-bottom: 10px;
}
.order-num {
  margin-top: 16px;
  font-family: var(--font-brand);
  font-size: 0.8rem;
  color: var(--gray);
  background: var(--light);
  border-radius: 100px;
  padding: 8px 20px;
  display: inline-block;
}

/* Error */
.error-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: #c0392b;
  color: #fff;
  font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  margin: 24px auto 20px;
}

/* ── CUSTOMER FORM ── */
.customer-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.co-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.co-field label {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--black);
}
.co-field .req { color: var(--accent); }
.co-field .opt { font-weight: 400; color: var(--gray); font-size: 0.72rem; }
.co-field input,
.co-field textarea {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--black);
  background: #fff;
  resize: none;
  transition: border-color 0.2s;
  width: 100%;
}
.co-field input:focus,
.co-field textarea:focus {
  outline: none;
  border-color: var(--black);
}
.co-pay-btn {
  width: 100%;
  padding: 16px;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .checkout-wrap { grid-template-columns: 1fr; }
  .order-summary { position: static; }
}
