
/* ========================================
   Checkout Page
   ======================================== */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 780px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-right { order: -1; }
}

.checkout-section {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(168,144,122,0.06);
}

.checkout-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-dark);
}

.checkout-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  flex: 1;
}

.checkout-form-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brown);
}

.checkout-form-group input,
.checkout-form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
}

.checkout-form-group input:focus,
.checkout-form-group textarea:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--white);
}

.checkout-form-group textarea {
  resize: vertical;
  min-height: 68px;
}

.checkout-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.req  { color: #b85450; font-weight: 700; }
.opt  { font-size: 0.72rem; color: var(--text-light); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Stripe card element wrapper */
#card-element-wrap {
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--cream);
  transition: border-color 0.2s;
  min-height: 44px;
}

#card-element-wrap:focus-within {
  border-color: var(--sage);
  background: var(--white);
}

.checkout-error {
  margin-top: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  color: #c0392b;
  font-weight: 600;
}

.checkout-error-banner {
  background: #fdf0f0;
  border: 1px solid #f0c0c0;
  border-radius: 6px;
  padding: 12px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #a33;
  margin-bottom: 16px;
}

.btn-pay {
  width: 100%;
  padding: 15px;
  min-height: 52px;
  background: var(--brown);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  touch-action: manipulation;
}

.btn-pay:hover:not(:disabled)  { background: var(--brown-dark); }
.btn-pay:disabled               { opacity: 0.7; cursor: not-allowed; }

.spin-icon {
  width: 18px; height: 18px;
  stroke: var(--white);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.checkout-secure-note {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 12px;
}

.checkout-secure-note svg { stroke: var(--sage); flex-shrink: 0; }

/* Order Summary Panel */
.checkout-summary-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(168,144,122,0.06);
  margin-bottom: 12px;
}

.summary-items { margin-bottom: 12px; }

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  border-bottom: 1px solid var(--cream-dark);
}

.summary-item:last-child { border-bottom: none; }

.summary-item-name { flex: 1; }
.summary-item-name em { font-style: normal; color: var(--text-light); }

.summary-divider { height: 1px; background: var(--cream-dark); margin: 12px 0; }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.summary-total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brown-dark);
  border-top: 1px solid var(--cream-dark);
  padding-top: 10px;
  margin-top: 4px;
  margin-bottom: 0;
}

.btn-back-cart {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  touch-action: manipulation;
}

.btn-back-cart:hover { background: var(--cream); border-color: var(--sage-light); color: var(--brown); }

/* ========================================
   Thank You Page
   ======================================== */
.thankyou-wrap {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0 40px;
}

.thankyou-icon {
  margin: 0 auto 24px;
  width: 72px; height: 72px;
  background: #eaf4ea;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.thankyou-icon svg {
  width: 38px; height: 38px;
  stroke: #2e6b2e;
}

.thankyou-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 28px;
}

.thankyou-detail-card {
  background: var(--white);
  border: 1px solid var(--cream-dark);
  border-radius: 12px;
  padding: 20px 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(168,144,122,0.06);
  text-align: left;
}

.thankyou-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  color: var(--text-light);
  padding: 8px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.thankyou-detail-row:last-child { border-bottom: none; }
.thankyou-detail-row strong { color: var(--text); }

.thankyou-notice {
  background: var(--cream-dark);
  border-left: 4px solid var(--sage);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 28px;
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.65;
}

.thankyou-notice strong {
  display: block;
  font-family: 'Playfair Display', serif;
  color: var(--brown-dark);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.btn-back-shop {
  display: inline-block;
  padding: 13px 32px;
  min-height: 48px;
  background: var(--brown);
  color: var(--white);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
  touch-action: manipulation;
}

.btn-back-shop:hover { background: var(--brown-dark); }
