/* Modellvergleich [ac_model_comparison] — Karten + tiny-slider-Carousel */

.ac-compare {
    position: relative;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
}

.ac-compare__viewport {
    overflow: hidden;
}

/* Sticky-Modellnamen: erscheinen, sobald die Kartennamen aus dem Sichtfeld
   gescrollt sind — so bleibt beim Vergleichen klar, welche Spalte zu welchem
   Modell gehört. JS toggelt is-stuck (Sichtbarkeit) und setzt den top-Offset
   (Höhe des Sticky-Site-Headers). Im Carousel-Modus (is-carousel) wird nur
   das aktive Modell angezeigt. */
.ac-compare__sticky {
    /* position:fixed statt sticky: WPBakery-/Theme-Wrapper mit overflow
       hebeln sticky aus. top/left/width setzt js (Section-Geometrie +
       Header-Offset). */
    position: fixed;
    z-index: 60;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}
.ac-compare__sticky.is-stuck {
    opacity: 1;
    visibility: visible;
}
/* Eine schwarze, abgerundete Zelle pro Modell-Spalte (gleiches Raster wie
   die Karten: flex 1:1:1 + identischer gap → Zellen fluchten mit den Spalten). */
.ac-compare__sticky-track {
    display: flex;
    gap: 24px;
    padding: 8px 0;
}
.ac-compare__sticky-cell {
    flex: 1 1 0;
    min-width: 0;
    background: #000;
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-compare__sticky.is-carousel .ac-compare__sticky-cell { display: none; }
.ac-compare__sticky.is-carousel .ac-compare__sticky-cell.is-active { display: block; }

/* Fallback vor tns-Init (und no-JS): Karten nebeneinander, mobil scrollbar */
.ac-compare__track {
    display: flex;
    gap: 24px;
}
.ac-compare__track:not(.tns-slider) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ac-compare__track:not(.tns-slider)::-webkit-scrollbar { display: none; }
.ac-compare__track:not(.tns-slider) > .ac-compare__card {
    flex: 0 0 min(400px, 82vw);
}

/* Desktop ohne aktiven Slider (≤3 Modelle, tns disable): Karten füllen die
   volle Content-Breite des Containers als gleich breite Spalten. */
@media (min-width: 1100px) {
    .ac-compare__track:not(.tns-slider) {
        overflow: visible;
    }
    .ac-compare__track:not(.tns-slider) > .ac-compare__card {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
    }
}

/* Karte */
.ac-compare__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e0d8;
    border-radius: 12px;
    padding: 20px 22px 24px;
    box-sizing: border-box;
    height: auto; /* tns setzt gleichhohe Slides via CSS unten */
}

.ac-compare__image {
    position: relative;
    background: #f6f1ed;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 18px;
}
.ac-compare__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Wanne/Sitz-Ansichten mit Umschalter im unteren Drittel — Bilder in
   natürlicher Höhe (kein Ratio-Beschnitt). */
.ac-compare__image--switch .ac-compare__image-view {
    display: none;
}
.ac-compare__image--switch .ac-compare__image-view.is-active {
    display: block;
}
.ac-compare__view-switch {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    z-index: 2;
}
.ac-compare__view-btn {
    border: none;
    background: transparent;
    color: #000;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.ac-compare__view-btn.is-active {
    background: #000;
    color: #fff;
}

.ac-compare__name {
    font-size: 32px;
    margin: 0 0 6px;
}

/* Sterne-Bewertung unter dem Modellnamen (Google-Reviews aus dem Plugin) */
.ac-compare__rating {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 10px;
    text-decoration: none !important;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
}
a.ac-compare__rating:hover .ac-compare__rating-text { text-decoration: underline; }
.ac-compare__stars {
    position: relative;
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}
.ac-compare__stars-base { color: #d8d2c7; }
.ac-compare__stars-fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #f2c14e;
    white-space: nowrap;
    pointer-events: none;
}
.ac-compare__rating-count {
    font-weight: 600;
    color: #1a1a1a;
}

/* Eigenschaften: Bezeichnung als kleiner Heading (ehem. Überpunkt-Styling)
   mit Trennlinie, Wert darunter */
.ac-compare__prop {
    border-top: 1px solid #e5e0d8;
    margin-top: 14px;
    padding-top: 10px;
}
.ac-compare__prop-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 4px;
}
.ac-compare__prop-image {
    margin: 4px 0 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #f6f1ed;
}
.ac-compare__prop-image img {
    width: 100%;
    height: auto;
    display: block;
}
.ac-compare__value {
    font-size: 15px;
    color: #1a1a1a;
}
/* Ja/Nein inkl. Icon: immer schwarz, größer als der Fließtext-Wert */
.ac-compare__value.is-yes,
.ac-compare__value.is-no {
    color: #000;
    font-size: 17px;
}
.ac-compare__check {
    display: inline-block;
    margin-right: 5px;
    font-size: 22px;
    line-height: 1;
    vertical-align: -3px;
    color: #000;
}

/* Footer: Preis + Buttons, unten bündig über alle Karten */
.ac-compare__footer {
    margin-top: auto;
    padding-top: 20px;
}
/* Preis als eigener Punkt (gleiche Optik wie die Eigenschaften: Trennlinie
   + kleine Bezeichnung „Preis", darunter der Wert) */
.ac-compare__prop--price {
    margin-top: 0;      /* Abstand kommt vom Footer-padding */
    margin-bottom: 14px;
}
.ac-compare__price {
    font-size: 20px;
    font-weight: 600;
}
.ac-compare__price .woocommerce-Price-amount { font-weight: 600; }
.ac-compare__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
.ac-compare__actions .angelcab-nav-button {
    margin-right: 0;
    /* Theme-Mobile-Regel (style.css @768px: margin-top:20px) neutralisieren —
       der Abstand zwischen den Buttons kommt allein vom gap (wie Desktop). */
    margin-top: 0;
    justify-content: space-between;
}

/* tns: gleich hohe Karten */
.ac-compare .tns-slider { display: flex; }
.ac-compare .tns-slider > .tns-item { display: flex; }
.ac-compare .tns-slider > .tns-item > .ac-compare__card { width: 100%; }
.ac-compare .tns-item .ac-compare__card,
.ac-compare .tns-slider .ac-compare__card { height: 100%; }

/* Pfeile: gleicher Look wie die übrigen tiny-slider des Themes (runde
   schwarze Buttons mit weißem SVG-Pfeil, vgl. style.css:8171), aber klein
   und RECHTS OBEN ÜBER dem Slider. DOM-Reihenfolge (Controls nach dem
   Viewport) wird per flex order umgedreht. Nur sichtbar, wenn das Carousel
   aktiv ist (JS toggelt is-active). */
.ac-compare__controls {
    display: none;
    order: -1;
    align-self: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}
.ac-compare__controls.is-active { display: flex; }
.ac-compare__arrow {
    width: 36px;
    height: 36px;
    background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg transform='matrix(6.123233995736766e-17 1 -1 6.123233995736766e-17 31.8 -0.2)'%3E%3Cpath d='m16 4.6 7.7 7.7-1.4 1.4-5.3-5.3.0001 18.6h-2l-.0001-18.6-5.3 5.3-1.4-1.4z' fill='%23fff'/%3E%3C/g%3E%3C/svg%3E") center center no-repeat;
    background-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
    border: none;
    padding: 0;
    font-size: 0;
    color: transparent;
    line-height: 0;
}
.ac-compare__arrow--prev {
    transform: rotate(180deg);
}
.ac-compare__arrow:hover {
    opacity: 0.8;
}
.ac-compare__arrow[disabled] {
    opacity: 0.25;
    pointer-events: none;
}

@media (max-width: 767px) {
    .ac-compare__card { padding: 16px 16px 20px; }
}
