/* ═══ TOSIGO KARTEN — Final Fix ═══ */

.advert_kachel { cursor: pointer; }

.tsg-card {
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.tsg-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

/* ── BILD-WRAPPER: feste Höhe, overflow:hidden ── */
.tsg-card .tsg-card-img {
    position: relative !important;
    overflow: hidden !important;
    width: 100%;
    height: 185px;
    flex-shrink: 0;
    background: #e8edf2;
    display: block;
}

/* image_container FÜLLT den Wrapper komplett */
.tsg-card .tsg-card-img .image_container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    transition: transform .3s;
}
.tsg-card:hover .tsg-card-img .image_container {
    transform: scale(1.04);
}

/* ── BADGES OBEN LINKS ── */
.tsg-card .tsg-card-badges {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 10;
    pointer-events: none;
}
.tsg-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.6;
}
.tsg-badge-fp   { background: var(--pv-fp-bg,  #039BE5); color: var(--pv-fp-text,  #fff); }
.tsg-badge-vb   { background: var(--pv-vb-bg,  #607D8B); color: var(--pv-vb-text,  #fff); }
.tsg-badge-free { background: var(--pv-free-bg, #7C3AED); color: var(--pv-free-text,#fff); }
.tsg-badge-neu  { background: var(--pv-new-bg,  #FF8F00); color: var(--pv-new-text, #fff); }

/* ── HERZ OBEN RECHTS ── */
.tsg-card .tsg-card-fav {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    z-index: 10;
    background: rgba(255,255,255,.92);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e74c3c;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    text-decoration: none;
}

/* ── PREIS UNTEN: dunkler Gradient + weißer Text ── */
.tsg-card .tsg-card-price-overlay {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, transparent 100%);
    padding: 24px 10px 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.tsg-price-val {
    font-size: 15px;
    font-weight: 900;
    color: #fff !important;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.tsg-price-type {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,.8) !important;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* ── KARTEN-BODY ── */
.tsg-card .tsg-card-body {
    padding: 8px 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.tsg-card-sub {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--pv-sub-text, #039BE5);
    background: var(--pv-sub-bg, #E1F5FE);
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    align-self: flex-start;
}
.tsg-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--pv-card-title, #334155);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 35px;
    margin: 0;
}
.tsg-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 4px;
}
.tsg-card-body .advert_location {
    color: #94A3B8;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
    padding: 0 !important;
}
.tsg-card-body .advert_location i { font-size: 10px; margin-right: 2px; }
.tsg-card-time {
    font-size: 10px;
    color: #CBD5E1;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 4px;
}

@media (max-width: 768px) {
    .tsg-card .tsg-card-img { height: 140px; }
    .tsg-card-title { min-height: 30px; font-size: 12px; }
}
