/* Checkout page styles */
.checkout-page {
  background: var(--cream);
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
}

.checkout__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
}

@media (max-width: 900px) {
  .checkout__container {
    grid-template-columns: 1fr;
  }
  .checkout__sidebar {
    order: -1;
  }
}

/* Header */
.checkout__header {
  margin-bottom: 32px;
}

.checkout__back {
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 16px;
  transition: color 0.15s;
}

.checkout__back:hover {
  color: var(--terra);
}

.checkout__header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}

/* Sections */
.checkout__section {
  background: var(--white);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  border: 1px solid var(--cream-200);
}

.checkout__section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 24px;
  color: var(--ink);
}

/* Form */
.checkout__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.form__field input,
.form__field select {
  padding: 12px 14px;
  border: 1px solid var(--cream-200);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form__field input:focus,
.form__field select:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(91, 117, 83, 0.1);
}

.form__field input::placeholder {
  color: #B0A8A0;
}

/* Processing fee notice */
.processing-fee-notice {
  background: var(--cream);
  border-left: 4px solid var(--terra);
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.processing-fee-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.processing-fee-label {
  font-weight: 600;
  color: var(--ink);
}

.processing-fee-price {
  font-weight: 700;
  color: var(--terra);
}

.info-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--ink-soft);
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.15s;
}

.info-btn:hover {
  background: var(--ink-soft);
  color: #fff;
}

.info-tooltip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--cream-200);
}

.info-tooltip p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* Stripe Elements */
.stripe-card {
  padding: 14px;
  border: 1px solid var(--cream-200);
  border-radius: 8px;
  background: #fff;
}

.card-errors {
  color: var(--terra);
  font-size: 0.85rem;
  margin-top: 8px;
}

.checkout__secure {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.secure-icon {
  margin-right: 6px;
}

/* Sidebar */
.order-summary {
  background: var(--white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--cream-200);
  position: sticky;
  top: 24px;
}

.order-summary h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--ink);
}

/* Order items */
.order-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 0.9rem;
}

.order-item-info {
  flex: 1;
}

.order-item-name {
  font-weight: 500;
  color: var(--ink);
}

.order-item-price {
  font-weight: 600;
  color: var(--ink);
  margin-left: 12px;
}

.order-item--free .order-item-price {
  color: var(--olive);
}

/* Order totals */
.order-totals {
  border-top: 1px solid var(--cream-200);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.order-line--fee {
  color: var(--ink);
}

.order-line--savings {
  background: var(--olive-soft);
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--olive-dark);
  font-weight: 600;
  margin-top: 8px;
}

.order-line--savings .savings-amount {
  color: var(--olive-dark);
  font-weight: 700;
  font-size: 1.05rem;
}

.order-line--total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--cream-200);
}

/* Checkout upsells */
.checkout-upsells {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--cream-200);
}

.checkout-upsells h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--ink);
}

.upsell-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--cream-100);
  border-radius: 8px;
  margin-bottom: 8px;
  transition: background 0.15s;
}

.upsell-card:hover {
  background: #F5EDE0;
}

.upsell-info h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.upsell-info p {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.upsell-price {
  font-weight: 700;
  color: var(--terra);
  font-size: 0.9rem;
}

.upsell-toggle {
  padding: 8px 16px;
  background: var(--olive);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.upsell-toggle:hover {
  background: #4A6143;
}

.upsell-toggle.added {
  background: var(--terra);
}

/* Skeleton loading animation */
@keyframes skeleton-pulse {
  0% { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}

.skeleton-price {
  display: inline-block;
  width: 60px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(90deg, #E8E0D6 25%, #F5EDE0 50%, #E8E0D6 75%);
  background-size: 200px 100%;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
  vertical-align: middle;
}

.order-line--fee-skeleton {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.order-line--fee-skeleton span:first-child {
  opacity: 0.6;
}
