body.page-payment { background: #f7f5f0; }
body.page-payment .announcement,
body.page-payment .site-header,
body.page-payment .service-strip,
body.page-payment .site-footer { display: none; }

.pay-page { min-height: 100vh; padding-bottom: 36px; }
.pay-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1180px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pay-logo { font-family: var(--serif); font-size: 27px; letter-spacing: 3px; line-height: 1; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.pay-logo img { height: 38px; width: auto; }
.pay-logo span { display: block; font-family: var(--sans); font-size: 6px; font-weight: 600; letter-spacing: 2.4px; color: var(--muted); margin-top: 3px; }
.pay-secure { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; letter-spacing: .5px; color: var(--muted); white-space: nowrap; }
.pay-secure svg { color: #4b7d63; }

.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 70px; max-width: 1180px; padding-top: 52px; padding-bottom: 54px; }
.pay-main > .eyebrow { font-size: 9px; letter-spacing: 2.6px; color: var(--muted); margin-bottom: 16px; }
.pay-main h1 { font-size: 48px; letter-spacing: -1.3px; margin-bottom: 14px; }
.pay-lead { max-width: 540px; color: var(--muted); font-size: 12.5px; line-height: 1.8; margin-bottom: 32px; }

/* ---------- animated card ---------- */
.pay-card-stage { width: min(430px, 100%); perspective: 1300px; margin: 0 0 32px; }
.pay-card { position: relative; width: 100%; aspect-ratio: 1.586; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.7,.2,1); transform: rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg))); will-change: transform; }
.pay-card-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; padding: 23px 25px; color: #fff; overflow: hidden; box-shadow: 0 26px 45px -22px rgba(43, 25, 34, .65), inset 0 1px 0 rgba(255, 255, 255, .22); }
.pay-card-front { background: linear-gradient(135deg, #2b1922 0%, #573e4a 48%, #8a6455 100%); }
.pay-card-front::before { content: ""; position: absolute; width: 260px; height: 260px; right: -100px; top: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%); }
.pay-card-front::after { content: ""; position: absolute; width: 210px; height: 210px; left: -110px; bottom: -130px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 70%); }
.pay-card-back { transform: rotateY(180deg); background: linear-gradient(145deg, #24151d, #573e4a); }
.pay-card-top { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.pay-chip { width: 33px; height: 25px; border-radius: 6px; background: linear-gradient(135deg, #f4e3b2, #c9a75f 55%, #e8d49a); box-shadow: inset 0 0 0 1px rgba(90, 66, 26, .35); position: relative; }
.pay-chip::before { content: ""; position: absolute; inset: 6px 8px; border: 1px solid rgba(90, 66, 26, .45); border-radius: 3px; }
.pay-contactless { color: rgba(255, 255, 255, .8); margin-left: 2px; }
.pay-card-brand { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: 2px; color: rgba(255, 255, 255, .82); text-transform: uppercase; }
.pay-card-number { position: relative; z-index: 1; margin: 0; padding-top: 27px; font-family: 'DM Sans', monospace; font-size: 19px; font-weight: 500; letter-spacing: 2.2px; color: rgba(255, 255, 255, .96); }
.pay-card-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; margin-top: 21px; }
.pay-card-bottom span { display: block; min-width: 0; }
.pay-card-bottom small { display: block; font-size: 6.5px; letter-spacing: 1.6px; color: rgba(255, 255, 255, .55); margin-bottom: 3px; }
.pay-card-bottom b { display: block; font-size: 10px; font-weight: 500; letter-spacing: .8px; color: rgba(255, 255, 255, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; text-transform: uppercase; }
.pay-card-logos { position: absolute; right: 24px; bottom: 20px; z-index: 1; display: flex; align-items: center; gap: 11px; }
.pay-card-logos .pay-brand { filter: grayscale(1) brightness(0) invert(1); opacity: .48; transition: opacity .25s; }
.pay-card-logos .pay-brand.is-active { opacity: 1; }
.pay-card-strip { display: block; height: 40px; margin: 4px -25px 16px; background: #1c1016; }
.pay-card-signature { display: flex; align-items: center; justify-content: space-between; height: 34px; background: #f1ece4; color: #2b1922; padding: 0 12px; border-radius: 3px; font-size: 9px; letter-spacing: 1px; }
.pay-card-signature small { font-size: 7px; letter-spacing: 1.4px; color: #7c6a70; }
.pay-card-signature b { font-size: 12px; letter-spacing: 2px; }
.pay-card-backnote { margin-top: 16px; font-size: 8px; line-height: 1.7; color: rgba(255, 255, 255, .55); max-width: 240px; }
.pay-card .pay-brand-visa { color: #fff; }
.pay-card .pay-brand-troy { color: #fff; }

/* ---------- brand marks ---------- */
.pay-brand { display: inline-flex; align-items: center; line-height: 1; user-select: none; }
.pay-brand-visa { font-style: italic; font-weight: 800; font-size: 15px; letter-spacing: .3px; color: #1a1f71; }
.pay-brand-mastercard { display: inline-flex; align-items: center; gap: 0; }
.pay-brand-mastercard i { display: block; width: 15px; height: 15px; border-radius: 50%; }
.pay-brand-mastercard i:first-child { background: #eb001b; margin-right: -6px; }
.pay-brand-mastercard i:nth-child(2) { background: #f79e1b; mix-blend-mode: multiply; }
.pay-brand-mastercard em { font-style: normal; font-size: 8px; font-weight: 600; letter-spacing: .2px; color: #2b2b2b; margin-left: 4px; }
.pay-brand-troy { font-weight: 800; font-size: 15px; letter-spacing: -1px; color: #00a19a; }

/* ---------- form ---------- */
.pay-form { max-width: 540px; display: grid; gap: 15px; }
.pay-field label { display: block; font-size: 10px; font-weight: 600; letter-spacing: .7px; color: var(--muted); text-transform: uppercase; margin-bottom: 7px; }
.pay-field input { width: 100%; height: 52px; border: 1px solid #dedbd2; background: #fff; padding: 0 15px; font-size: 14px; color: var(--ink); border-radius: 0; transition: border-color .15s, box-shadow .15s; }
.pay-field input::placeholder { color: #b3ada6; }
.pay-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(101, 70, 83, .11); }
.pay-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.pay-input-wrap { position: relative; }
.pay-input-wrap input { padding-right: 170px; }
.pay-input-brands { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 9px; pointer-events: none; }
.pay-input-brands .pay-brand { opacity: .35; transition: opacity .2s; }
.pay-input-brands .pay-brand.is-active { opacity: 1; }
.pay-cvv-help { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border: 1px solid #d8d3c9; border-radius: 50%; font-size: 10px; color: var(--muted); background: #fff; line-height: 1; }
.pay-error { margin: 0; padding: 11px 13px; border-left: 3px solid #a84a4a; background: #fbf1f1; color: #7a3535; font-size: 11.5px; }
.pay-submit { width: 100%; justify-content: space-between; min-height: 56px; margin-top: 5px; font-size: 13px; }
.pay-submit[disabled] { opacity: .7; }
.pay-note { display: flex; align-items: flex-start; gap: 7px; margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.pay-note svg { flex: none; margin-top: 2px; color: #4b7d63; }
.pay-test { max-width: 540px; margin-bottom: 18px; font-size: 11px; }

.pay-state { max-width: 540px; padding: 28px; background: #fff; border: 1px solid var(--line); }
.pay-state h2 { font-size: 30px; margin-bottom: 10px; }
.pay-state p { color: var(--muted); font-size: 12px; margin-bottom: 20px; }

/* ---------- summary ---------- */
.pay-side { display: flex; flex-direction: column; gap: 18px; }
.pay-summary { background: #fff; border: 1px solid var(--line); padding: 25px; }
.pay-summary-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.pay-summary-head span { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: var(--muted); }
.pay-summary-head b { font-size: 10px; font-weight: 500; letter-spacing: .3px; color: var(--ink); }
.pay-items { list-style: none; margin: 0; padding: 6px 0 10px; }
.pay-items li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed #ece8e0; font-size: 11.5px; }
.pay-items li:last-child { border-bottom: 0; }
.pay-item-qty { color: var(--muted); font-size: 10px; }
.pay-item-name { color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.pay-items b { font-weight: 500; font-size: 11px; }
.pay-totals { border-top: 1px solid var(--line); padding-top: 13px; display: grid; gap: 8px; }
.pay-totals > div { display: flex; justify-content: space-between; gap: 14px; font-size: 11.5px; color: var(--muted); }
.pay-totals > div b { color: var(--ink); font-weight: 500; }
.pay-totals .pay-discount b { color: #4b7d63; }
.pay-totals .pay-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 12px; color: var(--ink); font-size: 13px; }
.pay-totals .pay-total b { font-size: 20px; font-family: var(--serif); letter-spacing: -.4px; }
.pay-trust { background: #f1eee7; padding: 19px 20px; }
.pay-trust-brands { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pay-trust p { margin: 0; font-size: 10px; line-height: 1.75; color: #6f6961; }
.pay-trust strong { color: var(--ink); }
.pay-back { font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.pay-back:hover { color: var(--ink); }
.pay-footer { display: flex; justify-content: space-between; gap: 20px; max-width: 1180px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9.5px; letter-spacing: .4px; }

@media (max-width: 1020px) {
  .pay-layout { grid-template-columns: 1fr; gap: 36px; padding-top: 38px; }
  .pay-side { max-width: 540px; }
  .pay-main h1 { font-size: 42px; }
}
@media (max-width: 600px) {
  .pay-header { padding: 16px 0; }
  .pay-logo { font-size: 22px; letter-spacing: 2px; }
  .pay-logo img { height: 30px; }
  .pay-secure { font-size: 8.5px; }
  .pay-layout { padding-top: 30px; gap: 28px; }
  .pay-main h1 { font-size: 33px; }
  .pay-lead { font-size: 11.5px; margin-bottom: 24px; }
  .pay-card { border-radius: 15px; }
  .pay-card-face { padding: 17px 18px; border-radius: 15px; }
  .pay-card-number { font-size: 15px; letter-spacing: 1.4px; padding-top: 20px; }
  .pay-card-bottom { margin-top: 14px; }
  .pay-card-bottom b { max-width: 150px; font-size: 8.5px; }
  .pay-card-logos { right: 17px; bottom: 15px; gap: 8px; }
  .pay-input-wrap input { padding-right: 140px; }
  .pay-input-brands { gap: 6px; right: 10px; }
  .pay-brand-visa { font-size: 12px; }
  .pay-brand-troy { font-size: 12px; }
  .pay-brand-mastercard i { width: 12px; height: 12px; }
  .pay-brand-mastercard em { font-size: 6.5px; }
  .pay-row { gap: 10px; }
  .pay-summary { padding: 19px; }
  .pay-footer { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .pay-card { transition: none; }
}
