* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  background-color: #f6f9fc;
  color: #1a1a1a;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.checkout-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.checkout-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.logo {
  color: #635bff;
}

.error-message {
  color: #fff;
  background-color: #df1b41;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
  width: 100%;
  text-align: center;
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-message.visible {
  display: block;
}

.checkout-main {
  display: flex;
  flex-direction: column-reverse;
}

@media (min-width: 768px) {
  .checkout-main {
    flex-direction: row;
  }
}

.payment-form-container {
  padding: 32px 24px;
  flex-grow: 1;
}

.payment-form-container h1 {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 24px;
}

.payment-method-selector {
  margin-bottom: 24px;
}

.payment-method-header {
  margin-bottom: 12px;
}

.payment-method-header h2 {
  font-size: 14px;
  font-weight: 500;
  color: #4a4a4a;
}

.payment-method-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #4a4a4a;
}

.payment-tab.active {
  border-color: #635bff;
  background-color: rgba(99, 91, 255, 0.05);
  color: #635bff;
}

.payment-tab-icon {
  display: flex;
  align-items: center;
  color: inherit;
}

.order-summary {
  padding: 24px;
  background-color: #f7f9fc;
  border-bottom: 1px solid #f0f0f0;
}

@media (min-width: 768px) {
  .order-summary {
    width: 40%;
    border-left: 1px solid #f0f0f0;
    border-bottom: none;
  }
}

.summary-header {
  margin-bottom: 16px;
}

.summary-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.product-details {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 14px;
}

.product-name {
  font-weight: 400;
  color: #4a4a4a;
}

.divider {
  height: 1px;
  background-color: #f0f0f0;
  margin: 16px 0;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 25px;
}

.form-group {
  margin-bottom: 20px;
  position: relative;
}

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

label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #4a4a4a;
}

input, select {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.2s;
  background-color: white;
}

input:focus, select:focus {
  outline: none;
  border-color: #635bff;
  box-shadow: 0 0 0 1px #635bff;
}

input.error, select.error {
  border-color: #df1b41;
  box-shadow: 0 0 0 1px #df1b41;
}

input.error:focus, select.error:focus {
  border-color: #df1b41;
  box-shadow: 0 0 0 1px #df1b41;
}

input::placeholder {
  color: #a0aec0;
}

.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #4a4a4a;
  pointer-events: none;
}

select {
  appearance: none;
  padding-right: 30px;
}

.card-details {
  margin-bottom: 24px;
}

.card-input-container {
  position: relative;
}

.card-input {
  padding-right: 120px;
  width: 100%;
}

.card-icons-container {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  align-items: center;
  height: 24px;
}

.card-icon {
  width: 24px;
  height: 16px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.card-icon.hidden {
  display: none;
}

.card-icon.active {
  width: 38px;
  height: 24px;
}

.card-extra-row {
  margin-top: 1px;
}

.card-brands {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.card-brand-icon {
  width: 40px;
  height: 25px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.card-brand-icon.active {
  opacity: 1;
}

.pay-button {
  width: 100%;
  padding: 14px;
  background-color: #635bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.pay-button:hover {
  background-color: #5a51e5;
}

.pay-button:active {
  background-color: #4a43c8;
  transform: translateY(1px);
}

.pay-button:disabled {
  background-color: #a5a5a5;
  cursor: not-allowed;
}

.secure-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  font-size: 13px;
  color: #6b7c93;
}

.lock-icon {
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.checkout-footer {
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (min-width: 768px) {
  .checkout-footer {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: #6b7c93;
  text-decoration: none;
  font-size: 13px;
}

.footer-links a:hover {
  color: #4a4a4a;
  text-decoration: underline;
}

.powered-by {
  font-size: 13px;
  color: #6b7c93;
}