/* Base Styles */
:root {
  --primary-color: #4169E1;
  --success-color: #22c55e;
  --error-color: #dc2626;
  --border-color: #e6eaf1;
  --background-light: #f4f6fa;
  --text-primary: #23272f;
  --text-secondary: #64748b;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --border-radius-sm: 0.5rem;
  --border-radius-md: 1rem;
  --border-radius-lg: 1.5rem;
}

/* Mobile-first styles */
.checkout-main {
  padding: 0;
  background: var(--background-light);
  min-height: calc(100vh - 4rem); /* Account for navbar */
}

.checkout-grid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Order Summary Section */
.order-summary-section {
  background: #fff;
  margin-bottom: 1.5rem;
}

.order-image-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background: #fff;
}

.order-image-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-details {
  padding: 1.5rem;
}

.order-event-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.order-meta {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.order-meta span {
  display: block;
  margin-bottom: 0.5rem;
}

.order-meta i {
  width: 1.5rem;
  color: var(--primary-color);
}

/* Quantity Selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.qty-btn {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: var(--border-radius-sm);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--background-light);
}

#summaryQuantity {
  font-size: 1.2rem;
  font-weight: 600;
  min-width: 2ch;
  text-align: center;
}

/* Price Summary */
.order-summary-totals {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.price-row.total {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--success-color);
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* Personal Information Form */
.personal-info-section {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  font-size: 1rem;
  transition: all 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(65, 105, 225, 0.1);
}

.form-group input.error {
  border-color: var(--error-color);
}

.error-message {
  color: var(--error-color);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Checkout Button */
.checkout-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.checkout-button:hover {
  background: #3557c0;
}

.checkout-button i {
  font-size: 1rem;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: var(--border-radius-sm);
  margin-bottom: 1.5rem;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Footer */
.footer-mobile {
  padding: 1.5rem;
  background: #fff;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Desktop Styles */
@media (min-width: 768px) {
  .checkout-main {
    padding: 2rem;
  }

  .checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
  }

  .order-summary-section {
    position: sticky;
    top: 2rem;
  }

  .order-image-wrap {
    padding-top: 75%; /* 4:3 Aspect Ratio for desktop */
  }

  .personal-info-section {
    padding: 2rem;
  }

  .footer-mobile {
    display: none;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-in {
  animation: fadeIn 0.3s ease-out;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}
