.checkout-main {
  color: #fff;
  padding-bottom: 6rem;
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.checkout-header {
  text-align: center;
  margin-bottom: 3rem;
}

.checkout-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.checkout-content {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.checkout-form-section {
  width: 100%;
}

.checkout-summary-section {
  width: 100%;
}

/* Form Styles */
.checkout-form {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  backdrop-filter: blur(5px);
}

/* Payment Section Transition */
.payment-section {
  transition: all 0.3s ease-in-out;
  opacity: 1;
}

.payment-section[style*="display: none"] {
  opacity: 0;
  transform: translateY(-10px);
}

/* Error Display */
.error-display {
  background-color: rgba(223, 27, 65, 0.1);
  border: 1px solid rgba(223, 27, 65, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  color: #df1b41;
  font-size: 0.9rem;
  line-height: 1.4;
  white-space: pre-line;
}

.stripe-errors {
  color: #df1b41;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  min-height: 1.2rem;
}

/* Secondary Button */
.checkout-button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  margin-top: 0.5rem;
}

.checkout-button.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

/* Disabled form fields */
.form-field-disabled {
  opacity: 0.6;
  pointer-events: none;
  background-color: rgba(255, 255, 255, 0.02) !important;
}

.form-section {
  margin-bottom: 2rem;
}

.form-section:last-child {
  margin-bottom: 0;
}

.form-section h2 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #8a2be2;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  color: #fff;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
  box-sizing: border-box;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #8a2be2;
  background-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.form-group select option {
  background-color: #1a1a1a;
  color: #fff;
}

.checkbox-group {
  margin-bottom: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  margin-right: 0.75rem;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.checkbox-label:hover .checkmark {
  border-color: #8a2be2;
}

.checkbox-label input:checked ~ .checkmark {
  background-color: #8a2be2;
  border-color: #8a2be2;
}

.checkbox-label input:checked ~ .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label a {
  color: #8a2be2;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.order-summary {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  backdrop-filter: blur(5px);
  height: fit-content;
}

.order-summary h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #8a2be2;
}

.order-table {
  margin-bottom: 2rem;
  width: 100%;
  border-collapse: collapse;
  color: #fff;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-overflow-scrolling: touch;
}

.order-table {
  min-width: 600px;
}

.order-table thead {
  background-color: rgba(138, 43, 226, 0.1);
}

.order-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: #8a2be2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.order-table th:last-child {
  text-align: right;
}

.order-table td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.order-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.order-table td:nth-last-child(2) {
  white-space: nowrap;
}

.order-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.order-table tbody tr:last-child td {
  border-bottom: none;
}

.product-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 0.375rem;
}

.image-cell {
  width: 70px;
}

.action-cell {
  width: 60px;
  text-align: center;
}

.remove-btn {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border: none;
  border-radius: 0.375rem;
  padding: 0.5rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.remove-btn:active {
  transform: translateY(0);
}

.remove-btn svg {
  width: 16px;
  height: 16px;
}

.order-totals {
  margin-bottom: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: #a0a0a0;
  padding: 0 1rem;
}

.total-final {
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.5rem;
}

.payment-section {
  margin-bottom: 2rem;
}

.payment-section h3 {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.payment-option {
  margin-bottom: 1rem;
}

.payment-option label {
  align-items: center;
  color: #fff;
  cursor: pointer;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.payment-option input[type="radio"] {
  margin-right: 0.5rem;
  accent-color: #8a2be2;
}

.card-icon {
  height: 20px;
  width: auto;
}

.stripe-element {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 0.5rem;
  min-height: 40px;
}

.stripe-errors {
  color: #df1b41;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  min-height: 20px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
  margin-left: 0.5rem;
}

.spinner.hidden {
  display: none;
}

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

/* Success Page Styles */
.success-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.success-icon {
  color: #10b981;
  margin-bottom: 2rem;
}

.success-content h1 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.success-message {
  color: #a0a0a0;
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.success-details {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.success-details p {
  color: #fff;
  margin-bottom: 1rem;
}

.success-details p:last-child {
  margin-bottom: 0;
}

.success-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.action-button {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease-in-out;
}

.action-button.primary {
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: #fff;
}

.action-button.primary:hover {
  background: linear-gradient(135deg, #9932cc, #5d1a8f);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

.action-button.secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.action-button.secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.terms-section {
  margin-bottom: 2rem;
}

.terms-section .checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.5;
  gap: 0.5rem;
}

.terms-section input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.terms-section .checkmark {
  width: 18px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  flex-shrink: 0;
  transition: all 0.3s ease-in-out;
  position: relative;
}

.terms-section .checkbox-label:hover .checkmark {
  border-color: #8a2be2;
}

.terms-section input:checked ~ .checkmark {
  background-color: #8a2be2;
  border-color: #8a2be2;
}

.terms-section input:checked ~ .checkmark::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.terms-section a {
  color: #8a2be2;
  text-decoration: none;
}

.terms-section a:hover {
  text-decoration: underline;
}

.checkout-button {
  width: 100%;
  background: linear-gradient(135deg, #8a2be2, #4b0082);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.checkout-button:hover {
  background: linear-gradient(135deg, #9932cc, #5d1a8f);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

.checkout-button:active {
  transform: translateY(0);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .checkout-content {
    gap: 2rem;
  }
  
  .checkout-container {
    padding: 1.5rem 1rem;
  }

  .checkout-header h1 {
    font-size: 2rem;
  }
  
  .checkout-form {
    padding: 1.5rem;
  }
  
  .form-section h2 {
    font-size: 1.125rem;
  }
  
  .form-group input,
  .form-group select {
    padding: 0.625rem;
  }

  .order-summary {
    padding: 1.5rem;
  }

  .order-summary h2 {
    font-size: 1.25rem;
  }

  .product-image {
    width: 40px;
    height: 40px;
  }

  .image-cell {
    width: 60px;
  }
  
  .action-cell {
    width: 50px;
  }
  
  .remove-btn {
    padding: 0.375rem;
  }
  
  .remove-btn svg {
    width: 14px;
    height: 14px;
  }
}
