:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-soft: #f7f7f8;
  --border: #e9e9ec;
  --text: #111111;
  --muted: #6f7280;
  --accent: #111111;
  --accent-soft: #f3f4f6;
  --success: #157347;
  --danger: #c62828;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

body {
  min-height: 100vh;
}

.mobile-shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
}

.step {
  display: none;
  min-height: 100vh;
  padding: 20px 16px 110px;
}

.step-active {
  display: block;
}

.mobile-header {
  padding: 8px 4px 20px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
}

.mobile-header h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.step-content {
  display: block;
}

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

.product-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: #f3f3f4;
}

.product-body {
  padding: 16px;
}

.product-body h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.2;
}

.product-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
}

.qty-control button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: #ffffff;
  color: var(--text);
  font-size: 22px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.qty-control span {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.summary-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.section-head.compact {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.cart-items {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.empty-state {
  color: var(--muted);
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: #fcfcfc;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  padding: 14px;
  background: var(--panel-soft);
  border-radius: var(--radius-md);
}

.cart-name {
  font-weight: 700;
}

.cart-meta,
.cart-line-total {
  color: var(--muted);
}

.cart-line-total {
  font-weight: 700;
}

.totals {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-final {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.customer-box {
  margin-bottom: 16px;
}

.customer-box label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.customer-box input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

.customer-box input:focus {
  border-color: #cfd3da;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.04);
}

.payment-shell {
  margin-top: 8px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hidden {
  display: none;
}

.payment-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.payment-title-row h3 {
  margin: 0;
  font-size: 18px;
}

.payment-badge {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

#payment-element {
  margin-bottom: 14px;
}

.payment-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

.bottom-bar-double {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.primary-button,
.secondary-button,
.link-button {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.primary-button {
  color: #fff;
  background: #111111;
}

.secondary-button {
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--border);
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-button:not(:disabled):active,
.secondary-button:not(:disabled):active {
  transform: scale(0.99);
}

.success-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.success-card {
  width: 100%;
  max-width: 640px;
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.success-card h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.05;
}

.success-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-top: 20px;
  background: #111111;
  color: #fff;
}

@media (min-width: 721px) {
  body {
    background: #f6f7f8;
  }

  .mobile-shell {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
  }

  .step {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.receipt-box {
  margin-bottom: 16px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 12px;
  cursor: pointer;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.receipt-email-wrap {
  margin-top: 10px;
}

.receipt-email-wrap label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
}

.receipt-email-wrap input {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
  font-size: 16px;
  outline: none;
}

.receipt-email-wrap input:focus {
  border-color: #cfd3da;
  box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.04);
}

.receipt {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--border);
}

.receipt h3 {
  margin: 0 0 16px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 15px;
}

.receipt-row.total {
  border-bottom: none;
  font-size: 18px;
  padding-top: 14px;
}

.receipt {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.receipt-title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.receipt-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.receipt-status {
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef7f0;
  color: #157347;
  white-space: nowrap;
}

.receipt-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.receipt-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.receipt-meta-item span {
  color: var(--muted);
}

.receipt-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.receipt-lines {
  display: grid;
  gap: 12px;
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.receipt-line-left {
  min-width: 0;
}

.receipt-product-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

.receipt-product-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.receipt-line-total {
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
}

.receipt-footer-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.receipt-download-button {
  margin-top: 14px;
}