/* =====================================================================
   ASOSmobil – Produktvergleich (heizprodukte.php)
   Moderne, mobil-taugliche Vergleichsansicht aller 5 Modelle.
   Setzt asosmobil-modern.css (Design-Tokens) voraus. Alle Regeln
   liegen innerhalb von .amb-cmp (Kapselung), Markup im .amb-scope.
   ===================================================================== */

.amb-cmp { padding: 8px 0 24px; }
.amb-cmp__head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.amb-cmp__head h2 { text-transform: uppercase; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); margin: 0 0 8px; }
.amb-cmp__head h2 span { color: var(--amb-amber); }
.amb-cmp__head p { color: var(--amb-slate); margin: 0 auto; max-width: 60ch; }

/* Umschalter Leistungsklasse (reine CSS-Filter via :checked) --------- */
.amb-cmp__filter { display: flex; justify-content: center; gap: 8px; margin: 0 0 26px; flex-wrap: wrap; }
.amb-cmp__filter input { position: absolute; opacity: 0; width: 0; height: 0; }
.amb-cmp__filter label {
    cursor: pointer; padding: 10px 20px; border: 2px solid var(--amb-line-strong);
    border-radius: var(--amb-r-pill); font-weight: 700; font-size: .92rem;
    text-transform: uppercase; letter-spacing: .02em; color: var(--amb-slate);
    background: #fff; transition: all .15s ease;
}
.amb-cmp__filter label:hover { border-color: var(--amb-amber); color: var(--amb-amber-dark); }
#amb-f-all:checked   ~ .amb-cmp__filter label[for="amb-f-all"],
#amb-f-21:checked    ~ .amb-cmp__filter label[for="amb-f-21"],
#amb-f-36:checked    ~ .amb-cmp__filter label[for="amb-f-36"] {
    background: var(--amb-grad-brand); color: var(--amb-dark); border-color: transparent;
}

/* Grid der Modellkarten ---------------------------------------------- */
.amb-cmp__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    align-items: stretch;
}

/* Filter-Logik: 21 zeigt nur .is-21, 36 nur .is-36 ------------------- */
#amb-f-21:checked ~ .amb-cmp__grid .amb-cmp-card:not(.is-21),
#amb-f-36:checked ~ .amb-cmp__grid .amb-cmp-card:not(.is-36) { display: none; }
#amb-f-21:checked ~ .amb-cmp__grid { grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; }
#amb-f-36:checked ~ .amb-cmp__grid { grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; }

.amb-cmp-card {
    display: flex; flex-direction: column;
    background: #fff; border: 1px solid var(--amb-line);
    border-radius: var(--amb-r); overflow: hidden;
    transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.amb-cmp-card:hover { transform: translateY(-3px); box-shadow: var(--amb-shadow); }
.amb-cmp-card.is-featured { border: 2px solid var(--amb-amber); box-shadow: 0 0 0 4px var(--amb-amber-soft); }

.amb-cmp-card__top { position: relative; padding: 16px 16px 0; }
.amb-cmp-card__badge {
    position: absolute; top: 12px; left: 12px;
    font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 4px 9px; border-radius: var(--amb-r-pill);
    background: var(--amb-grad-brand); color: var(--amb-dark);
}
.amb-cmp-card__media {
    height: 170px; display: grid; place-items: center;
    background: linear-gradient(180deg,#fff,var(--amb-bg-soft));
    border-radius: var(--amb-r-sm);
}
.amb-cmp-card__media img { height: 158px; width: auto; max-width: 100%; }

.amb-cmp-card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex: 1; }
.amb-cmp-card__class {
    font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--amb-muted);
}
.amb-cmp-card__name { text-transform: uppercase; font-size: 1.15rem; margin: 2px 0 2px; color: var(--amb-ink); }
.amb-cmp-card__name b { color: var(--amb-amber-dark); }
.amb-cmp-card__tag { font-size: .84rem; color: var(--amb-slate); margin: 0 0 12px; }

/* Kern-Specs */
.amb-cmp-specs { border-top: 1px solid var(--amb-line); margin: 4px 0 0; }
.amb-cmp-specs > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--amb-line); }
.amb-cmp-specs dt { font-size: .78rem; color: var(--amb-muted); text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.amb-cmp-specs dd { font-size: .86rem; font-weight: 600; color: var(--amb-ink); margin: 0; text-align: right; }

/* Feature-Checkliste */
.amb-cmp-feats { list-style: none; margin: 14px 0 0; padding: 0; }
.amb-cmp-feats li {
    position: relative; padding-left: 26px; margin-bottom: 8px;
    font-size: .86rem; color: var(--amb-ink); line-height: 1.35;
}
.amb-cmp-feats li::before {
    position: absolute; left: 0; top: 0; width: 18px; height: 18px;
    display: grid; place-items: center; border-radius: 50%; font-size: .72rem; font-weight: 700;
}
.amb-cmp-feats li.yes::before { content: "\2713"; background: rgba(42,167,55,.14); color: var(--amb-green); }
.amb-cmp-feats li.no::before  { content: "\2013"; background: var(--amb-bg-tint); color: var(--amb-muted); }
.amb-cmp-feats li.no { color: var(--amb-muted); }

/* Ideal fuer */
.amb-cmp-card__ideal {
    margin: 14px 0 0; padding: 10px 12px; border-radius: var(--amb-r-sm);
    background: var(--amb-bg-soft); border: 1px solid var(--amb-line);
    font-size: .84rem; color: var(--amb-slate);
}
.amb-cmp-card__ideal b { color: var(--amb-ink); }

/* CTA */
.amb-cmp-card__cta { margin-top: auto; padding-top: 16px; display: grid; gap: 8px; }
.amb-cmp-card__cta .amb-btn { width: 100%; }

/* Zubehoer-Teaser unter dem Vergleich */
.amb-cmp-extra {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px;
    margin-top: 28px;
}
.amb-cmp-extra a {
    display: flex; align-items: center; gap: 14px; text-decoration: none;
    background: #fff; border: 1px solid var(--amb-line); border-radius: var(--amb-r);
    padding: 14px 16px; transition: border-color .2s ease, transform .18s ease, box-shadow .2s ease;
}
.amb-cmp-extra a:hover { border-color: var(--amb-amber); transform: translateY(-2px); box-shadow: var(--amb-shadow-sm); text-decoration: none; }
.amb-cmp-extra img { width: 56px; height: 56px; object-fit: contain; flex: 0 0 auto; }
.amb-cmp-extra b { display: block; color: var(--amb-ink); text-transform: uppercase; font-size: .9rem; }
.amb-cmp-extra span { color: var(--amb-slate); font-size: .82rem; }

/* Berater-Hinweis */
.amb-cmp-hint {
    margin-top: 26px; text-align: center;
    background: var(--amb-dark); border-radius: var(--amb-r); padding: 24px;
    border-bottom: 3px solid var(--amb-amber);
}
.amb-cmp-hint p { color: #fff; margin: 0 0 14px; font-size: 1.05rem; }
.amb-cmp-hint p span { color: var(--amb-amber); font-weight: 700; }

/* Responsive ---------------------------------------------------------- */
@media (max-width: 1100px) {
    .amb-cmp__grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
    #amb-f-21:checked ~ .amb-cmp__grid,
    #amb-f-36:checked ~ .amb-cmp__grid { grid-template-columns: repeat(auto-fit, minmax(230px, 300px)); }
}
@media (max-width: 560px) {
    .amb-cmp__grid { grid-template-columns: 1fr; }
    .amb-cmp-card__media { height: 190px; }
    .amb-cmp-card__media img { height: 180px; }
}
