/* ══════════════════════════════════════════
   ElektroGH.wien – Checkout Styles
   ══════════════════════════════════════════ */

.checkout-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 32px 0;
}
.checkout-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.02em;
}

/* ──────────── STEP INDICATOR ──────────── */
.step-indicator {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s;
}
.step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.3s;
}
.step.active .step-num {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}
.step.active .step-label { color: var(--black); }
.step.done .step-num {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.step.done .step-num .lucide { width: 16px; height: 16px; }
.step.done .step-label { color: var(--green); }

/* ──────────── STEP PROGRESS BAR FILL ──────────── */
.step-line {
  width: 60px;
  height: 2px;
  background: var(--border);
  margin: 0 16px;
  position: relative;
  overflow: hidden;
}
.step-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.step-line.done::after {
  transform: scaleX(1);
}

/* ──────────── STEP NUMBER COMPLETION POP ──────────── */
@keyframes stepDone {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.step.done .step-num {
  animation: stepDone 0.4s ease;
}

/* ──────────── CHECKOUT LAYOUT ──────────── */
.checkout-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 48px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
}

/* ──────────── CHECKOUT FORM PANELS ──────────── */
/* ──────────── STEP PANEL SLIDE TRANSITIONS ──────────── */
@keyframes panelSlideIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (min-width: 768px) {
  @keyframes panelSlideIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
  }
}

.checkout-panel {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: none;
}
.checkout-panel.active {
  display: block;
  animation: panelSlideIn 0.3s ease both;
}

.panel-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title .lucide { width: 22px; height: 22px; color: var(--yellow-dark); }

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

.b2b-fields {
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.b2b-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--yellow-dark);
  display: flex;
  align-items: center;
  gap: 6px;
}
.b2b-title .lucide { width: 16px; height: 16px; }

/* ──────────── SHIPPING OPTIONS ──────────── */
.shipping-options { display: flex; flex-direction: column; gap: 10px; }
.shipping-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.shipping-option:hover { border-color: var(--yellow); }
.shipping-option.selected { border-color: var(--yellow); background: var(--yellow-light); }
.shipping-option input[type="radio"] { accent-color: var(--yellow); width: 18px; height: 18px; cursor: pointer; }
.shipping-info { flex: 1; }
.shipping-name { font-size: 0.9rem; font-weight: 700; color: var(--black); }
.shipping-desc { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.shipping-price { font-size: 0.95rem; font-weight: 800; color: var(--black); }

/* ──────────── PAYMENT OPTIONS ──────────── */
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.payment-option:hover { border-color: var(--yellow); }
.payment-option.selected { border-color: var(--yellow); background: var(--yellow-light); }
.payment-option input[type="radio"] { accent-color: var(--yellow); width: 18px; height: 18px; cursor: pointer; }
.payment-icon { display: flex; }
.payment-icon .lucide { width: 24px; height: 24px; color: var(--text); }
.payment-name { font-size: 0.9rem; font-weight: 700; color: var(--black); }
.payment-desc { font-size: 0.78rem; color: var(--muted); }

/* ──────────── SHIPPING TOGGLE ──────────── */
.shipping-toggle { margin-top: 8px; }
.shipping-toggle .checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; font-weight: 600; color: var(--black); cursor: pointer;
}
.shipping-toggle input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--yellow); }
.shipping-address-form {
  border-top: 1px solid var(--border, #e5e5e5); padding-top: 20px; margin-top: 8px;
}

/* ──────────── CHECKOUT BUTTONS ──────────── */
.checkout-btns {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.btn-back {
  height: 48px;
  padding: 0 24px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.btn-back .lucide { width: 16px; height: 16px; }
.btn-back:hover { background: var(--border); }

.btn-next {
  flex: 1;
  height: 48px;
  background: var(--yellow);
  color: var(--black);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s;
}
.btn-next .lucide { width: 18px; height: 18px; }
.btn-next:hover { background: var(--yellow-hover); }

/* ──────────── ORDER SUMMARY SIDEBAR ──────────── */
.order-summary {
  background: var(--white);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: var(--nav-offset);
  height: fit-content;
}
.order-summary-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.order-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.order-item {
  display: flex;
  gap: 12px;
  align-items: center;
}
.order-item-img {
  width: 48px; height: 48px;
  background: var(--surface);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.order-item-img .lucide { width: 20px; height: 20px; color: var(--muted); }
.order-item-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 6px; }
.order-item-img.has-img { background: #fff; }
.order-item-name { font-size: 0.82rem; font-weight: 600; color: var(--black); line-height: 1.3; }
.order-item-qty { font-size: 0.72rem; color: var(--muted); }
.order-item-price { margin-left: auto; font-size: 0.85rem; font-weight: 700; color: var(--black); white-space: nowrap; }

/* ──────────── CONFIRMATION SUCCESS ANIMATION ──────────── */
@keyframes confirmPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes confirmFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.confirmation {
  text-align: center;
  padding: 48px 32px;
}
.confirmation > .lucide {
  width: 64px; height: 64px; color: var(--green); margin-bottom: 20px;
  animation: confirmPop 0.6s ease both;
}
.confirmation h2 {
  font-size: 1.6rem; font-weight: 800; color: var(--black); margin-bottom: 8px;
  animation: confirmFadeUp 0.45s ease both;
  animation-delay: 0.3s;
}
.confirmation p {
  font-size: 0.95rem; color: var(--muted); margin-bottom: 6px;
  animation: confirmFadeUp 0.45s ease both;
  animation-delay: 0.45s;
}
.order-number {
  display: inline-block;
  background: var(--yellow-light);
  border: 1px solid var(--yellow-border);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-family: 'DM Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--black);
  margin: 16px 0;
  animation: confirmFadeUp 0.45s ease both;
  animation-delay: 0.6s;
}

/* ──────────── ORDER SUMMARY PRICE FLASH ──────────── */
@keyframes priceFlash {
  0% { background-color: transparent; }
  30% { background-color: var(--yellow-light); }
  100% { background-color: transparent; }
}
.summary-value-flash {
  animation: priceFlash 0.6s ease;
}

@media (max-width: 768px) {
  .checkout-layout { grid-template-columns: 1fr; padding: 0 16px 32px; gap: 16px; }
  .checkout-header { padding: 20px 16px 0; }
  .checkout-header h1 { font-size: 1.4rem; }
  .step-indicator { padding: 16px 12px; gap: 0; overflow-x: auto; justify-content: center; }
  .step-label { display: none; }
  .step-num { width: 32px; height: 32px; font-size: 0.78rem; }
  .step-line { width: 24px; margin: 0 6px; }
  .checkout-panel { padding: 20px; }
  .panel-title { font-size: 1rem; }
  .order-summary { position: static; padding: 20px; }
  .order-summary-title { font-size: 0.92rem; }
  .checkout-btns { flex-direction: column-reverse; gap: 8px; }
  .btn-back { justify-content: center; height: 44px; }
  .btn-next { height: 46px; font-size: 0.9rem; }
  .shipping-option, .payment-option { padding: 14px; gap: 10px; }
  .confirmation { padding: 32px 16px; }
  .confirmation h2 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  .checkout-layout { padding: 0 12px 24px; }
  .checkout-panel { padding: 16px; }
  .order-summary { padding: 16px; }
  .order-item-name { font-size: 0.78rem; }
}

/* ──────────── REDUCED MOTION ──────────── */
@media (prefers-reduced-motion: reduce) {
  .checkout-panel.active { animation: none; }
  .step.done .step-num { animation: none; }
  .step-line::after { transition: none; }
  .confirmation > .lucide,
  .confirmation h2,
  .confirmation p,
  .order-number { animation: none; opacity: 1; transform: none; }
  .summary-value-flash { animation: none; }
}
