/* ═══════════════════════════════════════════════
   TOSIGO ARTIKELSEITE / ADVERT DETAIL CSS
   ═══════════════════════════════════════════════ */

/* ── GRID LAYOUT ── */
.tsg-detail-grid {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 20px;
    margin-top: 20px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 16px;
}
.tsg-detail-left {
    min-width: 0;
}
.tsg-detail-right {
    min-width: 0;
}

/* ── BREADCRUMB ── */
.tsg-detail-breadcrumb {
    font-size: 12px;
    color: var(--pv-btn-bg, #039BE5);
    margin-bottom: 12px;
}
.tsg-detail-breadcrumb a { color: var(--pv-btn-bg, #039BE5); text-decoration: none; }
.tsg-detail-breadcrumb a:hover { text-decoration: underline; }

/* ── BILD ── */
.tsg-detail-image {
    position: relative;
    height: 425px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    cursor: pointer;
    display: block;
}
.tsg-detail-image img.swap {
    filter: none;
    position: absolute;
    display: block;
    max-width: 100%;
    max-height: 100%;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    z-index: 2;
}
.tsg-detail-image img.swap:first-child {
    opacity: 0.7;
    z-index: 1;
    height: 100%;
    width: 100%;
    max-width: none;
    max-height: none;
    filter: blur(15px);
    object-fit: cover;
}
.tsg-img-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    z-index: 3;
    transition: background .15s;
}
.tsg-img-nav:hover { background: rgba(0,0,0,.75); }
.tsg-img-left { left: 12px; }
.tsg-img-right { right: 12px; }
.tsg-img-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    z-index: 3;
    backdrop-filter: blur(4px);
}

/* ── INFO BLOCK ── */
.tsg-detail-info {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
}
.tsg-detail-type {
    color: #888;
    font-size: 13px;
    margin-bottom: 6px;
}
.tsg-detail-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 130%;
}

/* Preis + Zustand */
.tsg-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.tsg-detail-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--pv-btn-bg, #039BE5);
}
.tsg-condition-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}
.tsg-condition-neu { background: rgba(3,155,229,0.1); color: var(--pv-btn-bg, #039BE5); }
.tsg-condition-gebraucht { background: #fff3e0; color: #e65100; }
.tsg-condition-defekt { background: #ffebee; color: #c62828; }

/* Meta */
.tsg-detail-meta {
    font-size: 14px;
    color: #888;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.tsg-detail-meta i { margin-right: 3px; }
.tsg-detail-meta .advert_location {
    display: inline;
    font-size: 14px;
    color: #888;
    margin: 0;
}

/* Beobachter-Badge */
.tsg-watchers-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff3e0;
    color: #e65100;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Entfernungs-Badge */
.tsg-distance-badge {
    display: inline-flex;
    align-items: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

.tsg-detail-divider {
    height: 1px;
    background: #f0ede8;
    margin: 16px 0;
}

/* Beschreibung */
.tsg-detail-section-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}
.tsg-detail-description {
    font-size: 15px;
    line-height: 1.65;
    color: #444;
}

/* Rechtliche Angaben */
.tsg-detail-legal {
    background: #fff;
    border-radius: 12px;
    padding: 14px 24px;
    margin-top: 12px;
}
.tsg-legal-toggle {
    background: none;
    border: none;
    color: var(--pv-btn-bg, #039BE5);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
}
.tsg-legal-toggle:hover { text-decoration: underline; }

/* Werbe-Banner */
.tsg-detail-ad-banner {
    margin-top: 16px;
    border-radius: 12px;
    overflow: hidden;
}

/* ── NACHRICHT SCHREIBEN ── */
.tsg-detail-message {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 16px;
}
.tsg-msg-row { margin-bottom: 12px; }
.tsg-msg-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    display: block;
}
.tsg-msg-textarea {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    transition: border-color .15s;
}
.tsg-msg-textarea:focus { outline: none; border-color: var(--pv-btn-bg, #039BE5); }
.tsg-msg-input {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    background: #f9f9f7;
    font-family: inherit;
}
.tsg-btn-send {
    width: 100%;
    background: var(--pv-btn-bg, #039BE5);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .15s;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.tsg-btn-send:hover {
    background: var(--pv-btn-bg, #039BE5); filter: brightness(0.88);
    transform: translateY(-1px);
}

/* ══ RECHTE SPALTE ══ */

/* Action Buttons */
.tsg-action-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}
.tsg-btn-action {
    display: block;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all .15s;
    border: none;
    text-decoration: none;
    margin-bottom: 8px;
}
.tsg-btn-action:last-child { margin-bottom: 0; }
.tsg-btn-primary {
    background: var(--pv-btn-bg, #039BE5);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.tsg-btn-primary:hover {
    background: var(--pv-btn-bg, #039BE5); filter: brightness(0.88);
    color: #fff;
    transform: translateY(-1px);
    text-decoration: none;
}
.tsg-btn-offer {
    background: linear-gradient(135deg, #FFA726, #FFCA28);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,.2);
    box-shadow: 0 2px 8px rgba(255,167,38,.25);
}
.tsg-btn-offer:hover {
    background: linear-gradient(135deg, #F57C00, #FFA726);
    color: #fff;
    transform: translateY(-1px);
}
.tsg-btn-offer:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}
.tsg-btn-outline {
    background: #fff;
    color: var(--pv-btn-bg, #039BE5);
    border: 1.5px solid rgba(0,0,0,0.12);
}
.tsg-btn-outline:hover {
    background: #f0f5ff;
    border-color: var(--pv-btn-bg, #039BE5);
    color: var(--pv-btn-bg, #039BE5);
    text-decoration: none;
}
.tsg-btn-outline:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.tsg-btn-outline i { margin-right: 4px; }

/* Verkäufer-Karte */
.tsg-seller-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
}
.tsg-seller-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
}
.tsg-seller-header:hover { text-decoration: none; }
.tsg-seller-header:hover .tsg-seller-name { color: var(--pv-btn-bg, #039BE5); }
.tsg-seller-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pv-btn-bg, #039BE5);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tsg-seller-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    transition: color .15s;
}
.tsg-seller-verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #ffd700;
    color: #000;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    margin-top: 2px;
}
.tsg-seller-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}
.tsg-seller-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0ede8;
}
.tsg-seller-count {
    font-size: 13px;
    color: var(--pv-btn-bg, #039BE5);
    font-weight: 600;
    text-decoration: none;
}
.tsg-seller-count:hover {
    text-decoration: underline;
    color: var(--pv-btn-bg, #039BE5);
}
.tsg-btn-follow {
    padding: 6px 18px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid rgba(0,0,0,0.12);
    background: #fff;
    color: var(--pv-btn-bg, #039BE5);
    cursor: pointer;
    transition: all .15s;
}
.tsg-btn-follow:hover { background: rgba(var(--pv-btn-bg, #039BE5), 0.08); border-color: var(--pv-btn-bg, #039BE5); }
.tsg-btn-follow:disabled { opacity: .5; cursor: not-allowed; }

/* Anzeigen-ID */
.tsg-id-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    text-align: center;
}
.tsg-id-label { font-size: 13px; font-weight: 700; color: var(--pv-btn-bg, #039BE5); }
.tsg-id-value { font-size: 11px; color: #888; word-break: break-all; }

/* Sidebar Werbung */
.tsg-sidebar-ad {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

/* Melden / Drucken */
.tsg-report-card {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
}
.tsg-btn-report {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid #e8d4d4;
    background: #fff;
    color: #c0392b;
    margin-bottom: 8px;
    transition: all .15s;
}
.tsg-btn-report:hover { background: #fdf0f0; border-color: #c0392b; }
.tsg-btn-report:disabled { opacity: .5; cursor: not-allowed; }
.tsg-btn-print {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid rgba(0,0,0,0.12);
    background: #f0f5ff;
    color: var(--pv-btn-bg, #039BE5);
    transition: all .15s;
}
.tsg-btn-print:hover { background: #f0f5ff; }

/* ══ WEITERE ANZEIGEN ══ */
.tsg-more-adverts {
    margin-top: 28px;
}
.tsg-more-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.tsg-more-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a1a2e;
}
.tsg-more-link {
    font-size: 13px;
    color: var(--pv-btn-bg, #039BE5);
    text-decoration: none;
    font-weight: 600;
}
.tsg-more-link:hover { text-decoration: underline; }

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
    .tsg-detail-grid {
        grid-template-columns: 1fr;
    }
    .tsg-detail-image {
        height: 280px;
        border-radius: 8px;
    }
    .tsg-detail-info { padding: 16px; }
    .tsg-detail-title { font-size: 18px; }
    .tsg-detail-price { font-size: 18px; }
    .tsg-detail-meta { font-size: 12px; }
}


/* ── Rating-Badges (Seller-Card) ── */
.tsg-seller-rating-badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.tsg-badge-rating {
    display: inline-flex; align-items: center; gap: 3px;
    background: #7c3aed; color: #fff; padding: 2px 9px;
    border-radius: 12px; font-size: 10px; font-weight: 700;
}
.tsg-badge-rating-naja { background: #dc3545; }
.tsg-badge-sustainability {
    display: inline-flex; align-items: center; gap: 3px;
    background: #059669; color: #fff; padding: 2px 9px;
    border-radius: 12px; font-size: 10px; font-weight: 700;
}
.tsg-seller-rating-newuser { font-size: 10px; color: #94a3b8; font-style: italic; margin-top: 3px; }
