* {
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  padding: 20px;
  margin: 0;
  color: #333;
  background: #fff;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 600;
}

.page-header p {
  margin: 0 0 24px;
  color: #555;
}

.panel {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn {
  border: none;
  padding: 8px 14px;
  font-size: 0.9rem;
  cursor: pointer;
}

.btn-primary {
  background: #000;
  color: #fff;
}

.btn-primary:hover {
  background: #222;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-secondary {
  background: #fff;
  color: #333;
  border: 1px solid #ccc;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10001;
  padding: 20px;
}

.overlay-panel {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow: auto;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checkout-form label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.checkout-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}

.checkout-form h4 {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.checkout-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.checkout-actions .btn-primary {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

#cart .btn-primary {
  margin-top: 15px;
  width: 100%;
}

.hidden {
  display: none;
}

#payment-message {
  color: #666;
  font-size: 0.9rem;
  text-align: center;
}

#email-errors {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: -8px;
}

.spinner,
.spinner:before,
.spinner:after {
  border-radius: 50%;
}

.spinner {
  color: #fff;
  font-size: 22px;
  text-indent: -99999px;
  margin: 0 auto;
  position: relative;
  width: 20px;
  height: 20px;
  box-shadow: inset 0 0 0 2px;
  transform: translateZ(0);
}

.spinner:before,
.spinner:after {
  position: absolute;
  content: "";
}

.spinner:before {
  width: 10.4px;
  height: 20.4px;
  background: #000;
  border-radius: 20.4px 0 0 20.4px;
  top: -0.2px;
  left: -0.2px;
  transform-origin: 10.4px 10.2px;
  animation: spin 2s infinite ease 1.5s;
}

.spinner:after {
  width: 10.4px;
  height: 10.2px;
  background: #000;
  border-radius: 0 10.2px 10.2px 0;
  top: -0.1px;
  left: 10.2px;
  transform-origin: 0 10.2px;
  animation: spin 2s infinite ease;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-page {
  max-width: 480px;
  margin: 0 auto;
}

.success-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 12px;
}

.order-summary p {
  margin: 10px 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.order-summary .muted {
  color: #666;
}

.error-box {
  color: #c0392b;
  background: #fdecea;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #f5c6cb;
}
