/* ============================================================================
   Checkout Page Enhancements - Better UX & Visual Hierarchy
   ============================================================================ */

/* Enhanced Content Layout */
.checkout__content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .checkout__content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Enhanced Order Summary Card */
.order-summary-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid var(--soft-2);
}

.card-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--soft-2);
}

.card-header h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.card-header h2 svg {
  color: var(--focus);
}

.card-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Summary Grid */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .summary-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Preview Container Enhancement */
.summary-preview {
  position: relative;
}

.preview-container {
  aspect-ratio: 1.46;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--soft-2);
  position: relative;
  background: var(--soft);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

/* Detail Section */
.detail-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--soft-2);
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 16px 0;
}

/* Summary Items Enhancement */
.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 16px;
}

.summary-item .label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.summary-item .label svg {
  color: var(--focus);
  flex-shrink: 0;
}

.summary-item .value {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

.summary-item .value--highlight {
  color: var(--focus);
  font-weight: 700;
}

/* Price Section */
.price-section {
  margin-top: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(25, 156, 120, 0.05) 0%, rgba(25, 156, 120, 0.08) 100%);
  border-radius: 10px;
  border: 2px solid var(--focus);
}

.price-item {
  padding: 0;
}

.price-item .label {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.price-item .price {
  font-size: 28px;
  font-weight: 800;
  color: var(--focus);
  letter-spacing: -0.02em;
}

/* Enhanced Shipping Info */
.shipping-info {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 2px solid #bae6fd;
}

.shipping-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.shipping-header svg {
  color: #0284c7;
  flex-shrink: 0;
}

.shipping-badge {
  font-weight: 700;
  font-size: 16px;
  color: #0284c7;
}

.shipping-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 10px;
  background: white;
  border-radius: 8px;
}

.shipping-timeline svg {
  color: var(--focus);
  flex-shrink: 0;
}

.shipping-timeline span {
  font-size: 14px;
  color: var(--ink);
}

.shipping-note {
  font-size: 12px;
  color: #0c4a6e;
  margin: 8px 0 0 0;
  line-height: 1.5;
}

/* ============================================================================
   Progress Steps Enhancement
   ============================================================================ */

.progress-bar-container {
  position: relative;
  height: 4px;
  background: var(--soft-2);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}

.progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--focus) 0%, #1aab8a 100%);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-steps {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: 1px solid var(--soft-2);
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 16px;
  top: 50px;
  width: 2px;
  height: 100%;
  background: var(--soft-2);
}

.step.completed:not(:last-child)::after {
  background: var(--focus);
}

.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  background: var(--soft-2);
  color: var(--muted);
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 1;
}

.step.completed .step-number {
  background: var(--focus);
  color: white;
  box-shadow: 0 0 0 4px rgba(25, 156, 120, 0.15);
}

.step.current .step-number {
  background: var(--focus);
  color: white;
  box-shadow: 0 0 0 4px rgba(25, 156, 120, 0.15);
  animation: pulse-ring 2s ease-in-out infinite;
}

@keyframes pulse-ring {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(25, 156, 120, 0.15);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(25, 156, 120, 0.1);
  }
}

.step-info {
  flex: 1;
}

.step-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.step-status {
  font-size: 12px;
  color: var(--muted);
}

.step.current .step-status {
  color: var(--focus);
  font-weight: 600;
}

.step.completed .step-status {
  color: var(--focus);
}

/* ============================================================================
   Enhanced Action Buttons
   ============================================================================ */

.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.action-description {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  font-size: 14px;
  color: #1e40af;
  font-weight: 500;
}

.action-description svg {
  color: #3b82f6;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  text-decoration: none;
  width: 100%;
}

.btn--primary {
  background: linear-gradient(135deg, var(--focus) 0%, #148564 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(25, 156, 120, 0.2);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 156, 120, 0.35);
  background: linear-gradient(135deg, #1aab8a 0%, #106d4f 100%);
}

.btn--primary.btn--large {
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 700;
}

.btn--secondary {
  background: white;
  color: var(--ink);
  border: 2px solid var(--soft-2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.btn--secondary:hover {
  border-color: var(--focus);
  color: var(--focus);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ============================================================================
   Trust & Security Section
   ============================================================================ */

.trust-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.security-note,
.guarantee-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 10px;
  border: 1px solid var(--soft-2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.security-note svg,
.guarantee-note svg {
  color: var(--focus);
  flex-shrink: 0;
  margin-top: 2px;
}

.security-note div,
.guarantee-note div {
  flex: 1;
}

.security-note strong,
.guarantee-note strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.security-note p,
.guarantee-note p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ============================================================================
   Responsive Adjustments
   ============================================================================ */

@media (max-width: 768px) {
  .checkout__header {
    padding: 20px;
  }
  
  .trust-indicators {
    width: 100%;
    justify-content: space-between;
  }
  
  .trust-badge {
    font-size: 11px;
    padding: 5px 10px;
    gap: 4px;
  }
  
  .checkout__content {
    padding: 20px;
  }
  
  .order-summary-card {
    padding: 24px;
  }
  
  .card-header h2 {
    font-size: 20px;
  }
  
  .summary-grid {
    gap: 20px;
  }
  
  .progress-steps {
    padding: 20px;
  }
  
  .step-text {
    font-size: 15px;
  }
  
  .btn {
    font-size: 14px;
  }
}

/* ============================================================================
   Accessibility & Motion Preferences
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .brand__icon {
    animation: none;
  }
  
  .step.current .step-number {
    animation: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .binding-card,
  .order-summary-card,
  .progress-steps,
  .security-note,
  .guarantee-note {
    border-width: 2px;
  }
  
  .btn--primary {
    background: var(--focus);
  }
}
