.foam-configurator {
  padding: 60px 0;
}

/* =========================
   LINKE SPALTE / SCHRITTE
   ========================= */

.configurator-head {
  margin-bottom: 30px;
}

.configurator-head h2 {
  margin-bottom: 10px;
}

.configurator-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-step {
  border: 1px solid #ddd;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  transition: all 0.25s ease;
}

.config-step.active {
  border-color: #ffb300;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.config-step.done .step-header {
  background: #f4f9f4;
}

.config-step.locked {
  opacity: 0.55;
}

.config-step.locked .step-header {
  cursor: not-allowed;
}

.step-header {
  width: 100%;
  border: 0;
  background: #f8f8f8;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffb300;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-title-wrap {
  flex: 1;
}

.step-title-wrap h3 {
  margin: 0 0 4px 0;
  font-size: 20px;
}

.step-summary {
  margin: 0;
  font-size: 14px;
  color: #666;
}

.step-body {
  display: none;
  padding: 10px;
  border-top: 1px solid #eee;
}

.config-step.active .step-body {
  display: block;
}

/* =========================
   STATUS-ICONS
   ========================= */

.step-status {
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}

.step-status::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

/* gesperrt */
.config-step.locked .step-status::before {
  content: "\f023";
  color: #999;
}

/* offen */
.config-step:not(.locked):not(.active):not(.done) .step-status::before {
  content: "\f3c1";
  color: #ffb300;
}

/* aktiv */
.config-step.active .step-status::before {
  content: "\f303";
  color: #394583;
  transform: scale(1.1);
}

/* erledigt */
.config-step.done .step-status::before {
  content: "\f00c";
  color: #28a745;
}

/* =========================
   OPTIONEN
   ========================= */

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.option {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 14px;
  padding: 4px 10px;
  font: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:hover {
  border-color: #ffb300;
}

.option.active {
  background: #ffb300;
  border-color: #ffb300;
  color: #fff;
  font-weight: 700;
}

/* =========================
   RECHTE SPALTE / ERGEBNIS
   ========================= */

.configurator-result {
  height: 100%;
}

.result-card {
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 24px;
  background: #fff;
  height: 100%;
}

.result-kicker {
  margin: 0 0 8px 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #394583;
}

.result-card h3 {
  margin-bottom: 18px;
}

.result-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 5px 0;
}

.result-card li {
  margin-bottom: 10px;
  font-size: 15px;
}

.result-placeholder {
  font-size: 15px;
  color: #666;
  line-height: 1.5;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

/* =========================
   SCHAUMSTOFF-KARTEN
   ========================= */

.foam-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.foam-card {
  border: 1px solid #ddd;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  transition: all 0.25s ease;
  position: relative;
}

.foam-card.recommended {
  border: 2px solid #ffb300;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.foam-card.valid {
  opacity: 1;
}

.foam-card.invalid {
  opacity: 0.35;
  filter: grayscale(100%);
}

.foam-card-thumb {
  height: 170px;
  background: linear-gradient(135deg, #f3f3f3, #e2e2e2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #666;
  position: relative;
}

.foam-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0;
  display: block;
}

.foam-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.foam-card-body h4 {
  margin: 0 0 5px 0;
  font-size: 20px;
}

/* bestehendes Empfehlungs-Badge rechts oben */
.foam-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #ffb300;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  z-index: 3;
}

/* =========================
   MATCH-BADGES links oben
   ========================= */

.foam-match {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Empfohlen */
.foam-match.top {
  background: #28a745;
  color: #fff;
}

/* Gut geeignet */
.foam-match.good {
  background: #17a2b8;
  color: #fff;
}

/* EingeschrĆ¤nkt geeignet */
.foam-match.ok {
  background: #ffc107;
  color: #333;
}

/* Optional: bei invalid trotzdem Badge lesbar */
.foam-card.invalid .foam-match {
  opacity: 1;
  filter: none;
}

.foam-meta {
  list-style: none;
  padding: 0;
  margin: 0;
}

.foam-meta li {
  font-size: 14px;
  margin-bottom: 0;
  color: #444;
}

.foam-note {
  margin-top: 2px;
  font-size: 14px;
  color: #666;
  line-height: 1.45;
}

/* =========================
   AUFKLAPPBEREICH
   ========================= */

.foam-extra {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 14px;
  margin-top: 0px;
  color: #555;
}

.foam-card.open .foam-extra {
  max-height: 1200px;
}

.foam-extra-toggle {
  margin-top: auto; /* š„ DAS ist der Trick */
  
  display: block;
  width: 100%;

  padding: 0px;
  margin-top: 16px;

  text-align: center;
  font-size: 14px;
  font-weight: 600;

  background: #f4f6fb;

  border-radius: 10px;
  cursor: pointer;

  transition: all 0.2s ease;
}

.foam-extra-toggle::after {
  content: "\f078"; /* Chevron down */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
}

.foam-card.open .foam-extra-toggle::after {
  content: "\f077"; /* Chevron up */
}

.foam-extra-toggle:hover {
  background: #ffb300;
  color: #fff;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 991.98px) {
  .foam-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .foam-results-grid {
    grid-template-columns: 1fr;
  }
}




#selectionSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

#selectionSummary li {
  margin: 0;
  font-size: 15px;
  padding: 12px 14px;
  background: #f8f8f8;
  border-radius: 12px;
  line-height: 1.4;
}

#selectionSummary li strong {
  display: block;
  margin-bottom: 4px;
}


#selectionSummary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

#selectionSummary li {
  margin: 0;
  font-size: 15px;
  padding: 12px 14px;
  background: #f8f8f8;
  border-radius: 12px;
  line-height: 1.4;
}

#selectionSummary li strong {
  display: block;
  margin-bottom: 4px;
}

.foam-card.invalid .foam-extra-toggle {
  display: none;
}




.foam-extra-cta {
  display: none;
  margin-top: 15px;
}

.foam-card.open .foam-extra-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.foam-btn {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
}

/* Primärer Button (orange, dein Ding) */
.foam-btn-primary {
  background-color: var(--weg_orange);
  color: #fff;
}

.foam-btn-primary:hover {
  background-color: #e6a200;
  transform: translateY(-1px);
}

/* Sekundärer Button (dezenter) */
.foam-btn-secondary {
  background-color: #f1f1f1;
  color: #333;
}

.foam-btn-secondary:hover {
  background-color: #e0e0e0;
}