/* Checkout Specific Styles */
.checkout-header {
  background: linear-gradient(135deg, #1a1a40, #2a2a60);
  padding: 20px 0;
  border-bottom: 1px solid #333;
}

.checkout-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(162, 73, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #a249ff;
  font-size: 14px;
  color: #a249ff;
}

.checkout-main {
  min-height: 80vh;
  padding: 40px 20px;
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 40px;
  align-items: start;
}

/* Order Summary */
.order-summary {
  background: rgba(26, 26, 64, 0.8);
  border-radius: 12px;
  padding: 30px;
  border: 1px solid #333;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 20px;
}

.order-summary h2 {
  color: #a249ff;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.product-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #333;
}

.product-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #a249ff;
}

.product-details {
  flex: 1;
}

.product-details h3 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: white;
}

.product-details p {
  font-size: 0.85rem;
  color: #ccc;
  margin: 0;
}

.product-price {
  text-align: right;
}

.original-price {
  display: block;
  text-decoration: line-through;
  color: #888;
  font-size: 0.9rem;
}

.sale-price {
  display: block;
  color: #00ff88;
  font-size: 1.2rem;
  font-weight: bold;
}

.order-total {
  margin-top: 20px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.total-line.final-total {
  border-top: 1px solid #333;
  padding-top: 15px;
  margin-top: 15px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #00ff88;
}

.discount {
  color: #00ff88;
}

/* Payment Form */
.payment-form {
  background: rgba(26, 26, 64, 0.8);
  border-radius: 12px;
  padding: 30px;
  border: 1px solid #333;
  backdrop-filter: blur(10px);
}

.payment-form h2 {
  color: #a249ff;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

/* Progress Steps */
.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.progress-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: #333;
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.step i {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  color: #666;
  transition: all 0.3s ease;
}

.step.active i {
  background: #a249ff;
  color: white;
}

.step.completed i {
  background: #00ff88;
  color: white;
}

.step span {
  font-size: 0.85rem;
  color: #ccc;
}

.step.active span {
  color: #a249ff;
  font-weight: bold;
}

/* Form Sections */
.form-section {
  transition: all 0.3s ease;
}

.form-section.hidden {
  display: none;
}

.form-section h3 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.2rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid #444;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #a249ff;
  box-shadow: 0 0 0 2px rgba(162, 73, 255, 0.2);
}

.form-group input.error {
  border-color: #ff4444;
  box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.error-message {
  color: #ff4444;
  font-size: 0.8rem;
  margin-top: 5px;
  display: block;
  min-height: 1rem;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.payment-method {
  flex: 1;
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.payment-method.active {
  border-color: #a249ff;
  background: rgba(162, 73, 255, 0.1);
}

.payment-method i {
  font-size: 1.2rem;
  color: #a249ff;
}

/* Card Brands */
.card-brands {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  justify-content: center;
}

.card-brands img {
  width: 40px;
  height: 25px;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.card-brands img.active {
  opacity: 1;
}

/* Card Input */
.card-input-wrapper {
  position: relative;
}

.card-brand-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* installment */
.installment-group {
  margin-bottom: 30px;
}

.installment-group label {
  display: block;
  margin-bottom: 8px;
  color: #ccc;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.btn {
  padding: 14px 24px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn.primary {
  background: linear-gradient(45deg, #a249ff, #7924ff);
  color: white;
  flex: 1;
}

.btn.primary:hover {
  background: linear-gradient(45deg, #9239ef, #6914ef);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(162, 73, 255, 0.4);
}

.btn.secondary {
  background: rgba(0, 0, 0, 0.5);
  color: #ccc;
  border: 1px solid #444;
}

.btn.secondary:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: #666;
  color: white;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner.hidden {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success Section */
.success-message {
  text-align: center;
  padding: 40px 20px;
}

.success-message i {
  font-size: 4rem;
  color: #00ff88;
  margin-bottom: 20px;
}

.success-message h3 {
  color: #00ff88;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.success-message p {
  color: #ccc;
  margin-bottom: 25px;
  line-height: 1.6;
}

.order-details {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 8px;
  margin: 25px 0;
  text-align: left;
}

.order-details p {
  margin: 10px 0;
  color: #ccc;
}

.order-details span {
  color: white;
  font-weight: bold;
}

/* Security Footer */
.security-footer {
  background: rgba(26, 26, 64, 0.9);
  padding: 30px 20px;
  text-align: center;
  border-top: 1px solid #333;
}

.security-badges {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.badge i {
  font-size: 1.5rem;
  color: #00ff88;
}

.badge span {
  font-size: 0.85rem;
  color: #ccc;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.loading-overlay.hidden {
  display: none;
}

.loading-content {
  text-align: center;
  color: white;
}

.spinner-large {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(162, 73, 255, 0.3);
  border-top: 4px solid #a249ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

.loading-content h3 {
  margin-bottom: 10px;
  color: #a249ff;
}

.loading-content p {
  color: #ccc;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .checkout-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .order-summary {
    position: static;
    order: 2;
  }
  
  .payment-form {
    order: 1;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .progress-steps {
    flex-direction: column;
    gap: 15px;
  }
  
  .progress-steps::before {
    display: none;
  }
  
  .step {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }
  
  .step i {
    margin-bottom: 0;
    margin-right: 15px;
  }
  
  .security-badges {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .checkout-header .container {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .checkout-main {
    padding: 20px 10px;
  }
  
  .order-summary,
  .payment-form {
    padding: 20px;
  }
  
  .product-item {
    flex-direction: column;
    text-align: center;
  }
  
  .product-item img {
    align-self: center;
  }
}

/* Animation Classes */
.slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

.slide-in-left {
  animation: slideInLeft 0.3s ease-out forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Form Validation Styling */
.form-group.valid input {
  border-color: #00ff88;
}

.form-group.valid::after {
  content: '✓';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #00ff88;
  font-weight: bold;
}
