/* ============================================================
   Detailsearch V3 – berge-meer.de inspirierte Kartenansicht
   ============================================================
   Erweitert detailsearch-v2.css, ohne es zu brechen.
   Alle Klassen nutzen den Prefix ".v3-" um Kollisionen
   mit dem bestehenden .destination-card System zu vermeiden.
   ============================================================ */

/* ── View-Toggle ──────────────────────────────────────────── */

.v3-view-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.v3-view-toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.v3-view-toggle button.is-active {
    background: linear-gradient(135deg, var(--primary), var(--orange));
    color: #111827;
    box-shadow: 0 6px 16px rgba(249, 115, 22, .18);
}

.v3-view-toggle button:hover:not(.is-active) {
    background: #f1f5f9;
    color: var(--dark);
}

/* ── Ergebnis-Liste (vertikal gestapelt) ───────────────────── */

.v3-result-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Horizontale Reisekarte (berge-meer Stil) ─────────────── */

.v3-travel-card {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
    transition: transform .18s ease, box-shadow .18s ease;
}

.v3-travel-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

/* ── Bildbereich (links) ──────────────────────────────────── */

/* Wrapper hält Bild-Link + Favorit-Button (geschwister, nicht verschachtelt) */
.v3-card-image-wrap {
    position: relative;
    flex: 0 0 280px;
    min-height: 220px;
    overflow: hidden;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.v3-card-image {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 220px;
    overflow: hidden;
    background:
        radial-gradient(circle at 22% 20%, rgba(255, 183, 3, .22), transparent 18%),
        linear-gradient(135deg, #eef6ff, #f8fbff);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.v3-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.v3-travel-card:hover .v3-card-image img {
    transform: scale(1.04);
}

/* Hover-Overlay auf dem Bild (Pfeil-Icon) */
.v3-card-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 17, 31, .32);
    opacity: 0;
    transition: opacity .2s ease;
    color: #fff;
    pointer-events: none;
}

.v3-card-image-overlay svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .30));
    transform: translateX(0);
    transition: transform .2s ease;
}

.v3-travel-card:hover .v3-card-image-overlay {
    opacity: 1;
}

.v3-travel-card:hover .v3-card-image-overlay svg {
    transform: translateX(4px);
}

/* Match-Badge (oben rechts im Bild) */
.v3-card-match {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(22, 163, 74, .92);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .02em;
    box-shadow: 0 8px 18px rgba(22, 163, 74, .28);
}

.v3-card-match svg {
    width: 13px;
    height: 13px;
}

/* Beste-Reisezeit-Badge (oben rechts im Bild) */
.v3-card-best-time {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    color: #92400e;
    font-size: 11px;
    font-weight: 950;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
}

/* Favorit-Button (unten links im Bild) — Wrapper für WishlistButtonV2 */
.v3-card-fav {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 5;
    /* Verhindert, dass der Klick auf das Herz den Link auslöst */
    pointer-events: auto;
}

.v3-card-fav .v2-wishlist-button--floating {
    width: 36px;
    height: 36px;
    min-height: 36px;
    font-size: 16px;
    border-width: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.v3-card-fav .v2-wishlist-button--floating:hover {
    transform: scale(1.12);
}

/* ── Inhaltsbereich (rechts) ──────────────────────────────── */

.v3-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 24px;
    min-width: 0;
}

/* Breadcrumb-Zeile (Kontinent > Land) */
.v3-card-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.v3-card-breadcrumb span {
    opacity: .5;
}

/* Titel */
.v3-card-title {
    margin: 0 0 10px;
    color: var(--dark);
    font-size: 21px;
    line-height: 1.18;
    letter-spacing: -.035em;
    font-weight: 950;
}

.v3-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color .12s ease;
}

.v3-card-title a:hover {
    color: var(--blue);
}

/* Key-Facts Liste (wie berge-meer ShortSummary) */
.v3-card-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-bottom: 14px;
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.v3-card-facts li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 780;
    line-height: 1.4;
}

.v3-card-facts li .v3-fact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f1f5f9;
    font-size: 11px;
}

/* Aktivitäts-Tags (wie berge-meer ExtraTags) */
.v3-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.v3-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid rgba(14, 165, 233, .22);
    border-radius: 999px;
    background: rgba(14, 165, 233, .06);
    color: #0369a1;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .01em;
}

.v3-tag--best-time {
    border-color: rgba(22, 163, 74, .28);
    background: rgba(22, 163, 74, .08);
    color: #15803d;
}

/* Meta-Pills (Klimadaten, wie berge-meer Badge) */
.v3-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.v3-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.v3-meta-pill--temp {
    background: linear-gradient(135deg, rgba(249, 115, 22, .10), rgba(255, 183, 3, .10));
    color: #92400e;
}

.v3-meta-pill--sun {
    background: linear-gradient(135deg, rgba(255, 183, 3, .12), rgba(255, 183, 3, .06));
    color: #92400e;
}

.v3-meta-pill--water {
    background: linear-gradient(135deg, rgba(14, 165, 233, .12), rgba(14, 165, 233, .06));
    color: #0369a1;
}

.v3-meta-pill--flight {
    background: rgba(15, 23, 42, .05);
    color: var(--muted);
}

/* ── Footer (CTA + Preis) ─────────────────────────────────── */

.v3-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.v3-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--orange));
    color: #111827;
    font-size: 13px;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 8px 20px rgba(249, 115, 22, .20);
}

.v3-card-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(249, 115, 22, .30);
}

.v3-card-cta svg {
    width: 14px;
    height: 14px;
    transition: transform .15s ease;
}

.v3-card-cta:hover svg {
    transform: translateX(3px);
}

.v3-card-detail-link {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    transition: color .12s ease;
}

.v3-card-detail-link:hover {
    color: var(--dark);
}

/* ── Beste-Reisezeit-Monate als kompakte Badges ───────────── */

.v3-best-months {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.v3-month-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 6px;
    border-radius: 6px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .02em;
}

.v3-month-badge--active {
    background: rgba(22, 163, 74, .12);
    color: #15803d;
}

/* ── Leerer Zustand ───────────────────────────────────────── */

.v3-empty-state {
    padding: 60px 30px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
}

.v3-empty-state h3 {
    margin: 0 0 8px;
    color: var(--dark);
    font-size: 20px;
    font-weight: 950;
}

.v3-empty-state p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ── Ergebnis-Zähler (wie berge-meer TotalProductCount) ──── */

.v3-results-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    border: 1px solid var(--border);
    color: var(--dark);
    font-size: 14px;
    font-weight: 950;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.v3-results-count span {
    color: var(--orange);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 1100px) {
    .v3-travel-card {
        flex-direction: column;
    }

    .v3-card-image-wrap {
        flex: 0 0 auto;
        min-height: 180px;
        max-height: 200px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .v3-card-image {
        min-height: 180px;
    }

    .v3-card-content {
        padding: 16px 18px;
    }

    .v3-card-title {
        font-size: 18px;
    }
}

@media (max-width: 700px) {
    .v3-travel-card {
        border-radius: var(--radius-md);
    }

    .v3-card-image-wrap {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .v3-card-image {
        min-height: 160px;
    }

    .v3-card-content {
        padding: 14px 16px;
    }

    .v3-card-title {
        font-size: 16px;
    }

    .v3-card-facts {
        gap: 4px 10px;
    }

    .v3-card-facts li {
        font-size: 12px;
    }

    .v3-card-meta {
        gap: 6px;
    }

    .v3-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .v3-card-cta {
        justify-content: center;
        width: 100%;
    }

    .v3-view-toggle {
        align-self: flex-start;
    }
}

/* ── Animationen ──────────────────────────────────────────── */

@keyframes v3-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.v3-travel-card {
    animation: v3-fade-in .35s ease-out both;
}

.v3-travel-card:nth-child(1) { animation-delay: .04s; }
.v3-travel-card:nth-child(2) { animation-delay: .08s; }
.v3-travel-card:nth-child(3) { animation-delay: .12s; }
.v3-travel-card:nth-child(4) { animation-delay: .16s; }
.v3-travel-card:nth-child(5) { animation-delay: .20s; }
.v3-travel-card:nth-child(6) { animation-delay: .24s; }
.v3-travel-card:nth-child(7) { animation-delay: .28s; }
.v3-travel-card:nth-child(8) { animation-delay: .32s; }
.v3-travel-card:nth-child(9) { animation-delay: .36s; }
.v3-travel-card:nth-child(10) { animation-delay: .40s; }
.v3-travel-card:nth-child(n+11) { animation-delay: .44s; }
