/* Buy button in the fixed bar (replaces the hosted Razorpay button) */
.pay { flex: 0 1 auto; min-width: 0; min-height: 44px; display: flex; justify-content: flex-end; }
.buy-btn {
  display: flex; align-items: center; justify-content: center;
  min-width: 190px; height: 52px; padding: 0 24px;
  border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, #F0641F 0%, var(--orange) 100%);
  color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 18px; line-height: 24px;
  box-shadow: 0 4px 0 #A8350A, 0 8px 18px rgba(217, 72, 15, .35);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  animation: payPulse 2.6s ease-in-out infinite;
}
.buy-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.buy-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #A8350A, 0 3px 8px rgba(217, 72, 15, .3); animation: none; }
.buy-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@keyframes payPulse {
  0%, 100% { box-shadow: 0 4px 0 #A8350A, 0 8px 18px rgba(217, 72, 15, .35); }
  50%      { box-shadow: 0 4px 0 #A8350A, 0 8px 26px rgba(217, 72, 15, .6); }
}

/* Checkout modal */
.co-backdrop {
  position: fixed; top: var(--vv-top, 0); left: 0; right: 0;
  height: var(--vv-height, 100%); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(42, 36, 24, .6);
  overflow-y: auto; overscroll-behavior: contain;
  animation: coFade .18s ease-out;
}
.co-backdrop[hidden] { display: none; }
.co-modal {
  position: relative; width: 100%; max-width: 420px; margin: auto;
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 22px;
  padding: 24px 20px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  animation: coPop .2s ease-out;
}
.co-close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
  font-size: 26px; line-height: 1; cursor: pointer;
}
.co-close:hover { background: var(--sun-soft); }
.co-title { font-family: var(--font-display); font-weight: 800; font-size: 21px; line-height: 1.35; margin: 0 40px 6px 0; }
.co-price { font-family: var(--font-display); font-weight: 800; font-size: 32px; line-height: 1.2; color: var(--orange); margin: 0 0 14px; }
.co-price s { font-size: 18px; color: var(--muted); font-weight: 500; margin-right: 8px; }
.co-field { margin: 0 0 12px; }
.co-field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.co-input-row { display: flex; align-items: stretch; }
.co-input, .co-prefix { font: inherit; font-size: 17px; color: var(--ink); }
.co-input {
  width: 100%; min-width: 0; height: 48px; padding: 0 12px;
  border: 2px solid var(--ink); border-radius: 12px; background: #fff;
}
.co-prefix {
  display: flex; align-items: center; padding: 0 10px; font-weight: 700;
  border: 2px solid var(--ink); border-right: 0; border-radius: 12px 0 0 12px; background: var(--sun-soft);
}
.co-prefix + .co-input { border-radius: 0 12px 12px 0; }
.co-input:focus-visible { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--orange); }
.co-input[aria-invalid="true"] { border-color: #B42318; background: #FFF4F2; }
.co-err { color: #B42318; font-size: 14px; font-weight: 600; margin: 4px 0 0; min-height: 0; }
.co-err:empty { display: none; }
.co-alert {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: #FFF4F2; border: 2px solid #B42318; color: #7A1A10; font-weight: 600; font-size: 15px;
}
.co-alert[hidden] { display: none; }
.co-submit {
  width: 100%; height: 54px; border: 0; border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, #F0641F 0%, var(--orange) 100%); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 19px;
  box-shadow: 0 4px 0 #A8350A;
}
.co-submit:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.co-submit[disabled] { cursor: progress; filter: grayscale(.25) brightness(.95); }
.co-spin { width: 18px; height: 18px; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: coSpin .8s linear infinite; }
.co-spin[hidden] { display: none; }
.co-secure { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
@keyframes coFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes coPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes coSpin { to { transform: rotate(360deg); } }
@media (max-width: 440px) {
  .co-backdrop { padding: 8px; }
  .pay { flex: 0 0 auto; width: 100%; justify-content: center; }
  .buy-btn { width: 100%; max-width: 340px; height: 48px; }
  .co-modal { padding: 22px 16px 16px; }
  .co-price { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .buy-btn { animation: none; }
  .co-backdrop, .co-modal { animation: none; }
  .co-spin { animation-duration: 2.4s; }
}
