/* ─── CHECKOUT PAGE ─── */

.checkout-page {
  padding: 130px 0 80px;
  min-height: 100vh;
  position: relative;
}

.checkout-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.checkout-header {
  margin-bottom: 48px;
}

.checkout-title {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.checkout-title span {
  background: linear-gradient(135deg, var(--primary) 0%, #ff4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.checkout-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* ─── FORM CARD ─── */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.form-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section-title::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-label .required { color: var(--primary); }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-white);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  transition: var(--transition-fast);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-dim); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-red);
  background: rgba(230, 0, 18, 0.04);
  box-shadow: 0 0 0 3px rgba(230, 0, 18, 0.1);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: 'Inter', sans-serif;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-select option { background: #111; color: var(--text-white); }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Selected Item Display */
.selected-item-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--primary-glow-soft);
  border: 1px solid var(--border-red);
  border-radius: var(--radius-sm);
}

.selected-item-emoji { font-size: 1.8rem; }

.selected-item-info { flex: 1; }

.selected-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-white);
}

.selected-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.selected-item-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.no-item-selected {
  padding: 14px 16px;
  background: rgba(255,255,255,0.02);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  color: var(--text-dim);
  text-align: center;
}

/* Payment Methods */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.payment-method:hover { background: var(--bg-glass-hover); }

.payment-method.active {
  background: var(--primary-glow-soft);
  border-color: var(--border-red);
  box-shadow: 0 0 0 1px var(--border-red);
}

.payment-method-icon { font-size: 1.4rem; }

.payment-method-info { display: flex; flex-direction: column; }

.payment-method-name {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-white);
}

.payment-method-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* File Upload */
.file-upload-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: rgba(255,255,255,0.02);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.file-upload-label:hover {
  border-color: var(--border-red);
  background: var(--primary-glow-soft);
}

.file-upload-icon { font-size: 1.8rem; }

.file-upload-text {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.file-upload-text strong { color: var(--text-white); }

.file-upload-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.file-input { display: none; }

.file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--primary-glow-soft);
  border: 1px solid var(--border-red);
  border-radius: var(--radius-sm);
}

.file-preview-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.file-preview-info { flex: 1; }

.file-preview-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.file-preview-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

.file-preview-remove:hover { color: var(--primary); }

/* ─── SUMMARY CARD ─── */
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(10px);
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.summary-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.05em;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-glass);
}

.summary-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.summary-item-emoji { font-size: 1.4rem; }

.summary-item-info { flex: 1; min-width: 0; }

.summary-item-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.summary-item-qty {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.summary-item-price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
}

.summary-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.825rem;
}

.summary-totals { display: flex; flex-direction: column; gap: 10px; }

.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.summary-total-row.grand {
  padding-top: 14px;
  border-top: 1px solid var(--border-glass);
  font-size: 1rem;
}

.summary-total-row.grand .label {
  font-weight: 600;
  color: var(--text-white);
}

.summary-total-row.grand .amount {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
}

.submit-order-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: 0 4px 20px var(--primary-glow-soft);
}

.submit-order-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--primary-glow);
}

.submit-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── PAYMENT INFO CARD ─── */
.payment-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.payment-info-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.05em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-glass);
}

.gopay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.gopay-info { display: flex; flex-direction: column; gap: 2px; }

.gopay-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.gopay-number {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-white);
}

.copy-gopay-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.copy-gopay-btn:hover {
  background: var(--primary-glow-soft);
  border-color: var(--border-red);
  color: var(--primary);
}

.qris-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qris-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.qris-img-wrap {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: white;
  padding: 12px;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qris-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qris-error {
  font-size: 0.825rem;
  color: var(--primary);
  text-align: center;
  padding: 20px;
}

.qris-instructions {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  padding: 0 8px;
}

/* ─── SUCCESS MODAL ─── */
.success-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.success-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.success-modal {
  background: linear-gradient(135deg, #111 0%, #0d0d0d 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  padding: 48px 36px;
  position: relative;
  text-align: center;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
}

.success-modal-overlay.open .success-modal {
  transform: scale(1) translateY(0);
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px var(--primary-glow);
  animation: success-pulse 2s infinite;
}

@keyframes success-pulse {
  0%, 100% { box-shadow: 0 0 40px var(--primary-glow); }
  50% { box-shadow: 0 0 60px var(--primary-glow), 0 0 80px rgba(230,0,18,0.2); }
}

.success-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 12px;
}

.success-message {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.success-actions { display: flex; gap: 12px; justify-content: center; }
