/* Checkout Page */
.checkout-page {
  /* background: linear-gradient(135deg, #f8f9fa, #e9ecef); */
  min-height: 100vh;
  padding: 2rem 0;
}

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

.checkout-header h1 {
  color: #2c3e50;
  margin-bottom: 1rem;
  position: relative;
}

.checkout-header h1::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  border-radius: 2px;
}

.checkout-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  padding: 0 20px;
}

/* Checkout Form */
.checkout-form {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.checkout-form h2 {
  color: #2c3e50;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f3f4;
}

.checkout-form h3 {
  color: #2c3e50;
  margin: 2rem 0 1rem 0;
}

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

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

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Place Order Button */
.place-order-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #27ae60, #229954);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.place-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.place-order-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Order Summary */
.order-summary {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.order-summary h2 {
  color: #2c3e50;
  margin-bottom: 1.5rem;
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f1f3f4;
}

/* Order Items */
.order-items {
  margin-bottom: 2rem;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #f1f3f4;
}

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

.order-item-details {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.order-item-image {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.order-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-info h4 {
  color: #2c3e50;
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
}

.order-item-platform {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.order-item-platform.xbox {
  background: linear-gradient(135deg, #107c10, #0f5f0f);
  color: white;
}

.order-item-platform.pc {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
}

.order-item-quantity {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.order-item-price {
  font-weight: 600;
  color: #27ae60;
  text-align: right;
}

/* Order Total */
.order-total {
  border-top: 2px solid #f1f3f4;
  padding-top: 1.5rem;
}

.total-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.total-item:last-child {
  font-weight: 700;
  font-size: 1.2rem;
  color: #2c3e50;
  border-top: 1px solid #f1f3f4;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.total-label {
  color: #666;
}

.total-value {
  font-weight: 600;
  color: #2c3e50;
}

.total-final {
  font-size: 1.5rem;
  font-weight: 700;
  color: #27ae60;
}

/* Form Validation */
.form-group.error input {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.form-group.success input {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

/* Loading State */
.checkout-loading {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

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

/* Success State */
.checkout-success {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 500px;
  margin: 4rem auto;
}

.success-icon {
  font-size: 3rem;
  color: #27ae60;
  margin-bottom: 1rem;
}

.checkout-success h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
}

.checkout-success p {
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.back-to-home-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-to-home-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
  color: white;
}

/* Responsive Design */
@media (max-width: 1280px) {
  .checkout-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .order-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .checkout-page {
    padding: 1rem 0;
  }

  .checkout-header {
    margin-bottom: 2rem;
    padding: 1rem 0;
  }

  .checkout-header h1 {
    font-size: 2rem;
  }

  .checkout-content {
    padding: 0 15px;
  }

  .checkout-form {
    padding: 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
    margin-top: 2rem;
  }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .order-item-details {
    width: 100%;
  }

  .order-item-price {
    text-align: left;
    width: 100%;
  }

  .checkout-success {
    padding: 2rem 1.5rem;
    margin: 0 15px;
  }
}

@media (max-width: 360px) {
  .checkout-header h1 {
    font-size: 1.8rem;
  }

  .checkout-form {
    padding: 1rem;
  }

  .order-summary {
    padding: 1rem;
  }

  .order-item-image {
    width: 50px;
    height: 50px;
  }

  .order-item-info h4 {
    font-size: 0.9rem;
  }

  .checkout-success {
    padding: 1.5rem 1rem;
  }

  .success-icon {
    font-size: 3rem;
  }
}
