/* XTech Ankauf — Public Styles */
.xta-wizard { max-width: 900px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Fortschritt */
.xta-progress { display: flex; margin-bottom: 32px; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.xta-step { flex: 1; padding: 14px; text-align: center; font-size: 13px; font-weight: 600; color: #94a3b8; background: #f8fafc; }
.xta-step span { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #e2e8f0; color: #64748b; font-size: 12px; margin-right: 6px; }
.xta-step.active { color: #1e3a5f; background: #eff6ff; }
.xta-step.active span { background: #1e3a5f; color: #fff; }
.xta-step.done { color: #059669; }
.xta-step.done span { background: #059669; color: #fff; }

/* Panels */
.xta-panel { display: none; }
.xta-panel.active { display: block; }

/* Header */
.xta-panel-header h2 { font-size: 28px; font-weight: 800; margin: 0 0 8px; color: #0f172a; }
.xta-trust { display: flex; gap: 16px; color: #059669; font-size: 14px; margin-bottom: 24px; }

/* Suche */
.xta-search-box { position: relative; margin-bottom: 24px; }
.xta-search-box input { width: 100%; padding: 16px 20px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 15px; box-sizing: border-box; outline: none; transition: border-color .2s; }
.xta-search-box input:focus { border-color: #1e3a5f; }
.xta-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e2e8f0; border-top: none; border-radius: 0 0 12px 12px; box-shadow: 0 8px 24px rgba(0,0,0,.1); z-index: 100; display: none; max-height: 320px; overflow-y: auto; }
.xta-dropdown.open { display: block; }
.xta-search-item { padding: 12px 20px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.xta-search-item:hover { background: #f8fafc; }
.xta-search-item strong { display: block; font-size: 14px; }
.xta-search-item small { color: #64748b; font-size: 12px; }

/* Marken */
.xta-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: #64748b; margin: 0 0 12px; }
.xta-brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.xta-brand-btn { border: 2px solid #e2e8f0; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: border-color .2s, box-shadow .2s; background: #fff; }
.xta-brand-btn:hover { border-color: #94a3b8; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.xta-brand-btn.active { border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.2); }
.xta-brand-btn img { max-height: 44px; max-width: 80px; object-fit: contain; }
.xta-brand-text { font-size: 14px; font-weight: 700; color: #1e3a5f; }
.xta-brand-label { font-size: 12px; color: #64748b; }

/* Modell-Sektion */
.xta-model-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.xta-link { background: none; border: none; color: #2563eb; cursor: pointer; font-size: 13px; }
.xta-device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.xta-device-card { border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px; cursor: pointer; transition: border-color .2s; background: #fff; }
.xta-device-card:hover { border-color: #1e3a5f; }
.xta-device-card img { width: 100%; height: 80px; object-fit: contain; margin-bottom: 8px; }
.xta-device-card .xta-device-icon { font-size: 32px; text-align: center; margin-bottom: 8px; }
.xta-device-card strong { display: block; font-size: 13px; margin-bottom: 4px; }
.xta-device-card .xta-price-hint { font-size: 12px; color: #059669; }
.xta-loading { text-align: center; padding: 40px; color: #94a3b8; }

/* Schritt 2 */
.xta-device-summary { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; margin-bottom: 20px; font-size: 14px; color: #374151; }
.xta-row { display: flex; gap: 24px; align-items: flex-start; }
.xta-col { flex: 1; }
.xta-price-col { flex: 0 0 220px; position: sticky; top: 20px; }

.xta-option-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.xta-option-btn {
  padding: 12px 22px;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  background: #f8fafc;
  color: #1e3a5f;
  transition: all .15s;
  min-width: 80px;
  text-align: center;
}
.xta-option-btn:hover {
  border-color: #1e3a5f;
  background: #eff6ff;
  transform: translateY(-1px);
}
.xta-option-btn.active {
  border-color: #1e3a5f;
  background: #1e3a5f;
  color: #fff;
  box-shadow: 0 4px 12px rgba(30,58,95,.25);
}

.xta-color-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.xta-color-swatch {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid #cbd5e1;
  cursor: pointer;
  transition: all .15s;
  box-shadow: inset 0 0 0 2px #fff;
  position: relative;
}
.xta-color-swatch:hover {
  transform: scale(1.12);
  border-color: #94a3b8;
}
.xta-color-swatch.active {
  border-color: #1e3a5f;
  border-width: 3px;
  transform: scale(1.18);
  box-shadow: inset 0 0 0 2px #fff, 0 4px 10px rgba(0,0,0,.15);
}
.xta-color-swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}

.xta-condition-grid { display: flex; flex-direction: column; gap: 8px; }
.xta-cond-card { padding: 12px 16px; border: 2px solid #cbd5e1; border-radius: 8px; cursor: pointer; transition: all .15s; background: #f8fafc; }
.xta-cond-card:hover { border-color: #94a3b8; background: #fff; }
.xta-cond-card.active { border-color: #1e3a5f; background: #eff6ff; box-shadow: 0 2px 8px rgba(30,58,95,.1); }
.xta-cond-card strong { display: block; font-size: 14px; margin-bottom: 2px; }
.xta-cond-card span { font-size: 12px; color: #64748b; }

.xta-price-card { background: #1e3a5f; color: #fff; border-radius: 12px; padding: 24px; text-align: center; }
.xta-price-label { font-size: 13px; opacity: .8; margin-bottom: 8px; }
.xta-price-value { font-size: 48px; font-weight: 800; margin-bottom: 8px; }
.xta-price-note { font-size: 12px; opacity: .7; margin-bottom: 16px; }

/* Schritt 3 */
.xta-imei-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 24px; margin-bottom: 24px; }
.xta-imei-box h3 { margin: 0 0 8px; }
.xta-imei-box input { width: 100%; padding: 12px 16px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 16px; letter-spacing: 2px; box-sizing: border-box; margin-top: 12px; }

/* Schritt 4 */
.xta-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.xta-form-2col h3 { margin: 0 0 12px; font-size: 16px; color: #1e3a5f; }
.xta-form-2col label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 4px; margin-top: 12px; color: #475569; text-transform: uppercase; letter-spacing: .3px; }
.xta-form-2col input[type=text], .xta-form-2col input[type=email], .xta-form-2col input[type=tel] {
  width: 100%; padding: 10px 14px; border: 2px solid #cbd5e1; border-radius: 8px; font-size: 14px; box-sizing: border-box; transition: border-color .15s; }
.xta-form-2col input:focus { border-color: #1e3a5f; outline: none; }

.xta-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xta-grid-2 > div label:first-child { margin-top: 12px; }
.xta-grid-3-1 { display: grid; grid-template-columns: 3fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .xta-grid-2 { grid-template-columns: 1fr; }
}

.xta-payment-opts { display: flex; flex-direction: column; gap: 8px; }
.xta-pay-opt { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border: 2px solid #cbd5e1; border-radius: 8px; cursor: pointer; font-size: 14px; background: #f8fafc; transition: all .15s; }
.xta-pay-opt:hover { border-color: #94a3b8; background: #fff; }
.xta-pay-opt.active { border-color: #1e3a5f; background: #eff6ff; box-shadow: 0 2px 8px rgba(30,58,95,.1); }
.xta-pay-opt input { margin: 0; }

/* Account-Bestaetigung */
.xta-account-confirm { background: #fef9e7; border: 2px solid #fde68a; border-radius: 10px; padding: 16px; margin-top: 18px; }
.xta-account-confirm h3 { margin: 0 0 12px; font-size: 14px; color: #92400e; text-transform: uppercase; letter-spacing: .5px; }
.xta-confirm-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #fde68a; cursor: pointer; }
.xta-confirm-row:last-child { border-bottom: none; }
.xta-confirm-row input[type=checkbox] {
  margin-top: 3px;
  width: 18px; height: 18px;
  accent-color: #1e3a5f;
  cursor: pointer;
  flex-shrink: 0;
}
.xta-confirm-row span { font-size: 13px; line-height: 1.4; color: #1f2937; }
.xta-confirm-row small { color: #64748b; font-size: 11px; }

/* Buttons */
.xta-btn-primary { background: #1e3a5f; color: #fff; border: none; padding: 14px 28px; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 12px; transition: background .2s; }
.xta-btn-primary:hover { background: #1e40af; }
.xta-btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.xta-btn-back { background: none; border: 1px solid #e2e8f0; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 14px; color: #64748b; }
.xta-btn-back:hover { border-color: #94a3b8; }

.xta-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.xta-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }

/* Erfolg */
.xta-success { text-align: center; padding: 48px 24px; }
.xta-success-icon { font-size: 64px; margin-bottom: 16px; }
.xta-success h2 { font-size: 32px; margin-bottom: 12px; color: #059669; }
.xta-success-box { background: #f0fdf4; border: 1px solid #86efac; border-radius: 10px; padding: 20px; margin: 24px auto; max-width: 480px; text-align: left; line-height: 2; }

/* Responsive */
@media (max-width: 640px) {
  .xta-brand-grid { grid-template-columns: repeat(3, 1fr); }
  .xta-row { flex-direction: column; }
  .xta-price-col { position: static; width: 100%; }
  .xta-form-2col { grid-template-columns: 1fr; }
  .xta-panel-header h2 { font-size: 22px; }
  .xta-progress .xta-step { font-size: 11px; padding: 10px 6px; }
}

/* ── Defekt-Checkliste mit echten Preisabschlaegen ───────────────────────── */
.xta-defect-list { display: flex; flex-direction: column; gap: 8px; }
.xta-defect-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
  background: #f8fafc;
}
.xta-defect-item:hover { border-color: #94a3b8; background: #fff; }
.xta-defect-item input {
  width: 20px; height: 20px;
  accent-color: #1e3a5f;
  cursor: pointer;
}
.xta-defect-item.checked {
  border-color: #dc2626;
  background: #fef2f2;
  box-shadow: 0 2px 6px rgba(220,38,38,.1);
}
.xta-defect-label {
  font-size: 13px;
  color: #374151;
  line-height: 1.35;
}
.xta-defect-price {
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
  white-space: nowrap;
  padding: 4px 10px;
  background: #fef2f2;
  border-radius: 99px;
  border: 1px solid #fecaca;
}
.xta-defect-item.checked .xta-defect-price {
  background: #dc2626;
  color: #fff;
  border-color: #dc2626;
}

/* ── Step 2: 3-Spalten-Layout (Optionen | Defekte | Preis+Vorschau) ───── */
.xta-step2-grid {
  display: grid;
  grid-template-columns: 230px 1fr 320px;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.xta-step2-col-side {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (max-width: 1024px) {
  .xta-step2-grid { grid-template-columns: 1fr 1fr; }
  .xta-step2-col-side { grid-column: 1 / -1; flex-direction: row; }
  .xta-step2-col-side > div { flex: 1; }
}
@media (max-width: 700px) {
  .xta-step2-grid { grid-template-columns: 1fr; }
  .xta-step2-col-side { position: static; flex-direction: column; }
}

/* ── Geraete-Vorschau-Box (rechte Spalte) ───────────────────────────────── */
.xta-device-preview-box {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 320px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.xta-device-preview-box .xta-device-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}
.xta-device-preview-box .xta-device-preview img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: filter .35s ease;
}
.xta-device-preview-placeholder {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.xta-device-preview-placeholder .xta-preview-icon {
  font-size: 56px;
  opacity: .35;
  margin-bottom: 8px;
}
.xta-device-preview-placeholder .xta-preview-text {
  font-weight: 600;
  margin-bottom: 4px;
}
.xta-device-preview-placeholder small {
  font-size: 11px;
  display: block;
}
/* ── Farbwechsel-Effekt (Filter-Klassen) ────────────────────────────────── */
.xta-device-preview img.color-black     { filter: brightness(0.55) saturate(0.3); }
.xta-device-preview img.color-white     { filter: brightness(1.25) saturate(0.4); }
.xta-device-preview img.color-gold      { filter: sepia(0.4) hue-rotate(-10deg) saturate(1.4) brightness(1.05); }
.xta-device-preview img.color-silver    { filter: grayscale(0.7) brightness(1.15); }
.xta-device-preview img.color-blue      { filter: hue-rotate(195deg) saturate(1.6); }
.xta-device-preview img.color-darkblue  { filter: hue-rotate(210deg) saturate(1.6) brightness(0.85); }
.xta-device-preview img.color-green     { filter: hue-rotate(80deg) saturate(1.5); }
.xta-device-preview img.color-red       { filter: hue-rotate(335deg) saturate(1.9); }
.xta-device-preview img.color-pink      { filter: hue-rotate(310deg) saturate(1.3) brightness(1.1); }
.xta-device-preview img.color-purple    { filter: hue-rotate(265deg) saturate(1.5); }
.xta-device-preview img.color-titanium  { filter: sepia(0.3) hue-rotate(-15deg) brightness(0.95) saturate(0.7); }
.xta-device-preview img.color-graphite  { filter: brightness(0.6) saturate(0.5); }
.xta-device-preview img.color-yellow    { filter: hue-rotate(30deg) saturate(1.6) brightness(1.1); }
.xta-device-preview img.color-orange    { filter: hue-rotate(20deg) saturate(1.8); }

/* Farb-Punkt-Anzeige rechts unten am Bild — zeigt aktuelle Auswahl */
.xta-color-indicator {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  transition: background .25s;
}

/* ── Kategorie-Auswahl (Step 1a) ─────────────────────────────────────────── */
.xta-cat-section { margin: 24px 0; }
.xta-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.xta-cat-btn {
  background: #fff;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px 16px;
  cursor: pointer;
  text-align: center;
  transition: all .18s;
  position: relative;
}
.xta-cat-btn:hover {
  border-color: #1e3a5f;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(30,58,95,.12);
}
.xta-cat-btn.active {
  border-color: #1e3a5f;
  background: #1e3a5f;
  color: #fff;
}
.xta-cat-icon { font-size: 42px; line-height: 1; margin-bottom: 10px; }
.xta-cat-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.xta-cat-desc { font-size: 12px; color: #64748b; line-height: 1.3; }
.xta-cat-btn.active .xta-cat-desc { color: rgba(255,255,255,.7); }
.xta-cat-count {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: #f1f5f9;
  border-radius: 99px;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}
.xta-cat-btn.active .xta-cat-count {
  background: rgba(255,255,255,.15);
  color: #fff;
}
@media (max-width: 640px) {
  .xta-category-grid { grid-template-columns: repeat(2, 1fr); }
  .xta-cat-btn { padding: 16px 10px; }
  .xta-cat-icon { font-size: 32px; }
  .xta-cat-name { font-size: 14px; }
}
