* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #f6f7f9;
  color: #111827;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.checkout-shell {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 32px;
  box-shadow:
    0 20px 50px rgba(15, 23, 42, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #111827;
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
}

.brand-subtitle {
  margin-top: 2px;
  color: #6b7280;
  font-size: 13px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.intro p,
.success p {
  color: #6b7280;
  line-height: 1.65;
}

.setup-form {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

input:focus {
  border-color: #111827;
  box-shadow:
    0 0 0 3px rgba(17, 24, 39, 0.07);
}

.money-input {
  position: relative;
}

.money-input span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-weight: 600;
}

.money-input input {
  padding-left: 50px;
}

.primary-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform 0.1s,
    opacity 0.15s;
}

.primary-button:hover {
  opacity: 0.92;
}

.primary-button:active {
  transform: scale(0.99);
}

.primary-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.payment-area {
  margin-top: 26px;
}

.summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 15px 16px;
  background: #f9fafb;
  border-radius: 12px;
}

.summary span {
  color: #6b7280;
  font-size: 14px;
}

.summary strong {
  font-size: 18px;
}

.section-label {
  margin-bottom: 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: #9ca3af;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #e5e7eb;
  flex: 1;
}

.pay-button {
  margin-top: 20px;
}

.message {
  margin-top: 15px;
  padding: 12px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  line-height: 1.5;
}

footer {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #f0f1f3;
  color: #9ca3af;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
}

.lock {
  margin-right: 3px;
}

.hidden {
  display: none !important;
}

.success {
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: #111827;
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
}

.link-button {
  display: grid;
  place-items: center;
  margin-top: 26px;
  text-decoration: none;
}

@media (max-width: 560px) {
  .page {
    padding: 0;
    align-items: stretch;
  }

  .checkout-shell {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 28px 20px;
    box-shadow: none;
  }

  h1 {
    font-size: 27px;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 170px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
  transition:
    transform 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #111827;
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.08);
}

.product-card:disabled {
  opacity: 0.55;
  cursor: wait;
}

.product-label {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.product-card strong {
  margin-top: 12px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.product-action {
  margin-top: auto;
  padding-top: 22px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

#product-name {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 700;
}

.back-button {
  margin-bottom: 18px;
  padding: 0;
  background: none;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 460px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 145px;
  }
}
