/* Warm, readable pricing and checkout cards. */
.payment-section {
  padding: 86px max(24px, 6vw);
  background: linear-gradient(145deg, #f5eadb, #fbf6ec 55%, #efe1cf);
  border-top: 1px solid var(--line, #ddd1c2);
  color: var(--espresso, #39291e);
}

.payment-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 36px;
  max-width: 1400px;
  margin: 0 auto 38px;
}

.payment-heading h2 {
  max-width: 670px;
  margin: 14px 0 0;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.payment-heading > p {
  max-width: 340px;
  margin: 0;
  color: var(--cocoa, #725745);
  font-size: 15px;
  line-height: 1.7;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1400px;
  margin: 0 auto;
}

.payment-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 290px;
  overflow: hidden;
  padding: 27px;
  border: 1px solid #dfd0bd;
  border-radius: 20px;
  background: #fffdf8;
  box-shadow: 0 8px 24px #513b2510;
  isolation: isolate;
}

.payment-card::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #a35835, #d3a06f 58%, #ead3b6);
  content: "";
}

.payment-number {
  display: grid;
  width: 36px;
  height: 36px;
  margin-bottom: 22px;
  place-items: center;
  border: 1px solid #e8d7c1;
  border-radius: 50%;
  background: #f7ede0;
  color: var(--crust, #a35835);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.payment-card h3 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.14;
  letter-spacing: -.6px;
}

.payment-card > p {
  max-width: 440px;
  margin: 0 0 25px;
  color: var(--cocoa, #725745);
  font-size: 13px;
  line-height: 1.65;
}

.payment-card-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 17px;
  margin-top: auto;
}

.payment-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.payment-price strong {
  font-size: 34px;
  line-height: 1;
  letter-spacing: -1px;
}

.payment-price small {
  color: #876d58;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.payment-card-bottom :is(a, button) {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--espresso, #39291e);
  border-radius: 8px;
  background: var(--espresso, #39291e);
  color: #fff8ed;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .45px;
  text-align: left;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.payment-card-bottom :is(a, button):hover {
  transform: translateY(-1px);
  border-color: #a35835;
  background: #a35835;
  color: #fff8ed;
}

.payment-card-bottom :is(a, button):focus-visible,
.bag-stripe-link:focus-visible,
.payment-help:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.payment-card-bottom :is(a, button) > span {
  font-size: 19px;
}

.payment-card-course {
  grid-column: span 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .65fr);
  align-items: center;
  column-gap: 42px;
  min-height: 220px;
  background: var(--espresso, #39291e);
  color: #fff8ed;
}

.payment-card-course::before {
  inset: 0 auto 0 0;
  width: 5px;
  height: auto;
  background: linear-gradient(180deg, #d6a779, #a35835);
}

.payment-card-course .payment-number {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 15px;
  border-color: #ffffff35;
  background: #ffffff12;
  color: #f0d3b3;
}

.payment-card-course h3 {
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 10px;
  font-size: 29px;
}

.payment-card-course > p {
  grid-column: 1;
  grid-row: 3;
  margin-bottom: 0;
  color: #dccbb5;
}

.payment-card-course .payment-card-bottom {
  grid-column: 2;
  grid-row: 1 / span 3;
  gap: 20px;
}

.payment-card-course .payment-price small {
  color: #dccbb5;
}

.payment-card-course .payment-card-bottom :is(a, button) {
  border-color: #fff8ed;
  background: #fff8ed;
  color: var(--espresso, #39291e);
}

.payment-card-course .payment-card-bottom :is(a, button):hover {
  border-color: #f1cc91;
  background: #f1cc91;
}

.payment-section-note {
  max-width: 830px;
  margin: 25px auto 8px;
  color: var(--cocoa, #725745);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.payment-help {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  color: var(--espresso, #39291e);
  font-size: 12px;
  line-height: 1.6;
  text-underline-offset: 4px;
}

.modal-product .basket-secondary {
  border: 1px solid var(--line, #ddd1c2);
  background: transparent;
  color: var(--espresso, #39291e);
}

.modal-product .basket-secondary:hover {
  background: var(--oat, #f8f3e9);
}

.modal-product .stripe-note {
  margin: 12px 0 20px;
  color: var(--cocoa, #725745);
  font-size: 12px;
  line-height: 1.6;
}

.bag-stripe-link {
  display: inline-block;
  padding: 10px 0 0;
  color: var(--crust, #a35835);
  font-size: 11px;
  line-height: 1.4;
  text-underline-offset: 3px;
}

.bag-payment-note {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 1px solid var(--line, #ddd1c2);
  border-radius: 10px;
  background: var(--oat, #f8f3e9);
  color: var(--cocoa, #725745);
  font-size: 12px;
  line-height: 1.6;
}

.bag-footer > .stripe-checkout,
.bag-payment-option .stripe-checkout {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.bag-payment-options > h3 {
  margin: 20px 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.bag-payment-option {
  margin: 16px 0;
  padding: 18px;
  border: 1px solid var(--line, #ddd1c2);
  border-radius: 12px;
  background: var(--oat, #f8f3e9);
}

.bag-payment-option > span {
  display: block;
  margin-bottom: 13px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.bag-payment-option > small {
  display: block;
  margin-top: 12px;
  color: var(--cocoa, #725745);
  font-size: 11px;
  line-height: 1.6;
}

/* Combined checkout appears only after the commerce backend confirms readiness. */
.combined-checkout {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  white-space: normal;
}

.combined-checkout > span {
  font-family: Gilroy, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.combined-checkout:disabled {
  transform: none;
  opacity: .7;
  cursor: progress;
  box-shadow: none;
}

.checkout-feedback {
  margin: 12px 0;
  color: var(--cocoa, #725745);
  font-size: 13px;
  line-height: 1.6;
}

.checkout-feedback:empty { display: none; }

.checkout-feedback[role="alert"] {
  padding: 12px 14px;
  border: 1px solid #b87454;
  border-radius: 8px;
  background: #fff5ed;
  color: #773a20;
}

.footer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.footer-top .footer-whatsapp { border-color: #d8c5ae; background: transparent; color: #fff5e8; font-size: 14px; letter-spacing: .3px; }
.footer-top .footer-whatsapp:hover { background: #fff5e814; color: #fff5e8; }

@media (max-width: 900px) {
  .payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-heading { align-items: start; flex-direction: column; gap: 18px; }
  .payment-heading > p { max-width: 560px; }
  .payment-card-course { grid-column: span 2; }
}

@media (max-width: 700px) {
  .payment-section { padding: 52px 20px; }
  .payment-heading { margin-bottom: 26px; }
  .payment-heading h2 { font-size: 38px; letter-spacing: -1px; }
  .payment-heading > p { font-size: 13px; }
  .payment-grid { gap: 12px; }
  .payment-card { min-height: 270px; padding: 19px 16px; border-radius: 15px; }
  .payment-number { width: 31px; height: 31px; margin-bottom: 16px; font-size: 10px; }
  .payment-card h3 { font-size: 20px; letter-spacing: -.35px; overflow-wrap: anywhere; }
  .payment-card > p { margin-bottom: 20px; font-size: 11px; line-height: 1.55; }
  .payment-card-bottom { gap: 13px; }
  .payment-price { gap: 5px; }
  .payment-price strong { font-size: 26px; letter-spacing: -.7px; }
  .payment-price small { font-size: 9px; letter-spacing: .7px; }
  .payment-card-bottom :is(a, button) { min-height: 44px; gap: 6px; padding: 11px 10px; font-size: 9px; letter-spacing: 0; }
  .payment-card-bottom :is(a, button) > span { font-size: 16px; }
  .payment-card-course { min-height: 225px; grid-template-columns: minmax(0, 1fr); align-items: stretch; row-gap: 0; }
  .payment-card-course .payment-number,
  .payment-card-course h3,
  .payment-card-course > p,
  .payment-card-course .payment-card-bottom { grid-column: 1; grid-row: auto; }
  .payment-card-course h3 { font-size: 23px; }
  .payment-card-course > p { font-size: 12px; }
  .payment-card-course .payment-card-bottom { gap: 15px; }
  .payment-section-note { margin-top: 20px; text-align: left; font-size: 11px; }
  .payment-help { margin: 0; font-size: 11px; }
  .bag-stripe-link { font-size: 10px; }
  .combined-checkout { gap: 12px; padding: 16px 14px; font-size: 15px; }
  .combined-checkout > span { font-size: 14px; }
  .footer-actions { align-items: stretch; flex-direction: column; }
  .footer-actions .cta { justify-content: center; text-align: center; }
  .footer-top .footer-whatsapp { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .payment-card-bottom :is(a, button) { transition: none; }
}
