/**
 * Listing Frontend Styles
 * 
 * Oeffentliche Archive- und Single-Templates fuer Immobilien-Inserate.
 * Homegate/ImmoScout-Stil, responsive, Astra-Theme-kompatibel.
 * 
 * WICHTIG: Alle Regeln mit !important (WordPress-Theme-Override).
 * 
 * @package STWEG_Member_Dashboard
 * @subpackage Listings
 * @since 1.17.0
 */

/* =========================================================================
   CSS Custom Properties
   ========================================================================= */

:root {
    --stweg-fe-brand: #1CCA5B;
    --stweg-fe-brand-hover: #17b550;
    --stweg-fe-text: #0F172A;
    --stweg-fe-text-muted: #64748b;
    --stweg-fe-text-light: #94a3b8;
    --stweg-fe-bg: #f8fafc;
    --stweg-fe-surface: #ffffff;
    --stweg-fe-border: #e2e8f0;
    --stweg-fe-border-hover: #cbd5e1;
    --stweg-fe-radius: 12px;
    --stweg-fe-radius-sm: 8px;
    --stweg-fe-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --stweg-fe-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.03);
    --stweg-fe-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
    --stweg-fe-offer-miete: #0284c7;
    --stweg-fe-offer-kauf: #7c3aed;
    --stweg-fe-success: #16a34a;
    --stweg-fe-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}


/* =========================================================================
   Astra Theme Overrides fuer Listing Archive
   ========================================================================= */

/* Single-Listing-Seite zentrieren — hoechste specificity (html+ID+site-content) */
html body.single-stweg_listing #page .site-content .ast-container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
html body.single-stweg_listing #page .estw-listing-single .estw-container {
    max-width: var(--estw-container-max, 1140px) !important;
    margin: 0 auto !important;
}
/* Flexbox-Fix: .ast-container ist display:flex ab 922px (Astra). 
   Ohne width:100% schrumpft .estw-listing-single auf Content-Breite */
html body.single-stweg_listing .estw-listing-single {
    width: 100% !important;
}

body.post-type-archive-stweg_listing,
body.post-type-archive-stweg_listing .site {
    overflow-x: hidden !important;
}

body.post-type-archive-stweg_listing .ast-container,
body.post-type-archive-stweg_listing #content,
body.post-type-archive-stweg_listing #primary,
body.post-type-archive-stweg_listing #main,
body.post-type-archive-stweg_listing .content-area,
body.post-type-archive-stweg_listing .site-main,
body.post-type-archive-stweg_listing .site-content,
body.post-type-archive-stweg_listing .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

body.post-type-archive-stweg_listing .ast-container {
    padding: 0 !important;
}

body.post-type-archive-stweg_listing .site-content > .ast-container {
    display: block !important;
}

body.post-type-archive-stweg_listing .ast-row {
    display: block !important;
}


/* =========================================================================
   Global Wrapper
   ========================================================================= */

.stweg-listing-frontend {
    font-family: var(--stweg-fe-font) !important;
    color: var(--stweg-fe-text) !important;
    line-height: 1.6 !important;
    -webkit-font-smoothing: antialiased !important;
    min-height: 60vh !important;
    padding-bottom: 40px !important;
}

.stweg-fe-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}


/* =========================================================================
   Hero (Archive)
   ========================================================================= */

.stweg-fe-hero {
    background-color: #FFFFFF !important;
    background-image: linear-gradient(180deg, #F0F3F4 0%, rgba(217,250,246,.5) 100%) !important;
    padding: 48px 24px 56px !important;
    margin-bottom: 0 !important;
    text-align: center !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    box-sizing: border-box !important;
}

.stweg-fe-hero-inner {
    max-width: 680px !important;
    margin: 0 auto !important;
}

.stweg-fe-hero-title {
    color: var(--stweg-fe-text, #0F172A) !important;
    font-size: 36px !important;
    font-weight: 800 !important;
    margin: 0 0 10px !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
    text-transform: none !important;
}

.stweg-fe-hero-subtitle {
    color: #747E83 !important;
    font-size: 16px !important;
    margin: 0 !important;
    font-weight: 500 !important;
}


/* =========================================================================
   Landing / Intro Section (Archive) — Homegate-Style
   ========================================================================= */

.stweg-fe-landing {
    margin-top: 32px !important;
    margin-bottom: 8px !important;
}

.stweg-fe-landing-hidden {
    display: none !important;
}

/* Ergebnis-Info verstecken wenn Landing sichtbar */
.stweg-fe-results-info-hidden {
    display: none !important;
}

/* Ergebnis-Container + Pagination verstecken wenn Landing sichtbar */
.stweg-fe-results-hidden {
    display: none !important;
}

/* Heading */
.stweg-fe-landing-heading {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 20px !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em !important;
}

/* --- Kategorie-Grid --- */
.stweg-fe-landing-categories {
    margin-bottom: 40px !important;
}

.stweg-fe-category-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

.stweg-fe-category-tile {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 28px 16px 24px !important;
    background: #fff !important;
    border: 1px solid var(--stweg-border, #e5e7eb) !important;
    border-radius: 14px !important;
    text-decoration: none !important;
    color: inherit !important;
    cursor: default !important;
}


.stweg-fe-category-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
    background: #f0fdf4 !important;
    color: var(--stweg-fe-brand, #1CCA5B) !important;
    margin-bottom: 14px !important;
}

.stweg-fe-category-label {
    display: block !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin-bottom: 4px !important;
}

.stweg-fe-category-desc {
    display: block !important;
    font-size: 13px !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
    line-height: 1.4 !important;
}

/* --- USP Cards --- */
.stweg-fe-landing-usps {
    margin-bottom: 40px !important;
}

.stweg-fe-usp-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

.stweg-fe-usp-card {
    padding: 24px !important;
    background: #fff !important;
    border: 1px solid var(--stweg-border, #e5e7eb) !important;
    border-radius: 14px !important;
    text-align: left !important;
}

.stweg-fe-usp-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    margin-bottom: 16px !important;
}

.stweg-fe-usp-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
}

.stweg-fe-usp-text {
    font-size: 14px !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    margin: 0 !important;
    line-height: 1.55 !important;
}

/* --- So funktioniert's Steps --- */
.stweg-fe-landing-steps {
    margin-bottom: 40px !important;
}

.stweg-fe-steps-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

.stweg-fe-step-card {
    position: relative !important;
    padding: 28px 24px 24px !important;
    background: #fff !important;
    border: 1px solid var(--stweg-border, #e5e7eb) !important;
    border-radius: 14px !important;
    text-align: center !important;
}

.stweg-fe-step-number {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--stweg-fe-brand, #1CCA5B) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 auto 14px !important;
}

.stweg-fe-step-title {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
}

.stweg-fe-step-text {
    font-size: 14px !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    margin: 0 !important;
    line-height: 1.55 !important;
}

/* --- CTA Banner --- */
.stweg-fe-landing-cta {
    margin-bottom: 0 !important;
}

.stweg-fe-cta-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 24px !important;
    padding: 28px 32px !important;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%) !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 16px !important;
}

.stweg-fe-cta-text {
    flex: 1 1 auto !important;
}

.stweg-fe-cta-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 6px !important;
    line-height: 1.3 !important;
}

.stweg-fe-cta-desc {
    font-size: 14px !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

.stweg-fe-cta-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 24px !important;
    background: var(--stweg-fe-brand, #1CCA5B) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background .2s, transform .15s !important;
    cursor: pointer !important;
}

.stweg-fe-cta-btn:hover {
    background: #17b550 !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}



/* =========================================================================
   Filter Bar (Archive) — Modern 2026 Design
   ========================================================================= */

.stweg-fe-filter-bar {
    display: block !important;
    background: var(--stweg-fe-surface) !important;
    border-radius: 16px !important;
    padding: 20px 24px 16px !important;
    margin-top: -28px !important;
    margin-bottom: 0 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 24px rgba(0,0,0,.06) !important;
    position: relative !important;
    z-index: 10 !important;
    border: 1px solid rgba(0,0,0,.04) !important;
}

.stweg-fe-filter-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: flex-end !important;
}

.stweg-fe-filter-group {
    flex: 1 1 140px !important;
    min-width: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
}

.stweg-fe-filter-group.stweg-fe-filter-wide {
    flex: 1 1 170px !important;
    min-width: 150px !important;
}

.stweg-fe-filter-group.stweg-fe-filter-narrow {
    flex: 0 1 100px !important;
    min-width: 85px !important;
}

.stweg-fe-filter-group label {
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    line-height: 1 !important;
    padding-left: 2px !important;
}

.stweg-fe-filter-bar select,
.stweg-fe-filter-bar input[type="text"],
.stweg-fe-filter-bar input[type="number"],
.stweg-fe-filter-bar input[type="date"] {
    height: 40px !important;
    padding: 0 12px !important;
    border: 1.5px solid var(--stweg-fe-border) !important;
    border-radius: 10px !important;
    background: var(--stweg-fe-bg, #f8fafc) !important;
    color: var(--stweg-fe-text) !important;
    font-size: 14px !important;
    font-family: var(--stweg-fe-font) !important;
    font-weight: 500 !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
    width: 100% !important;
    box-sizing: border-box !important;
    outline: none !important;
    -webkit-appearance: none !important;
}

/* v1.38.9: Date input needs native calendar picker — override shared none-appearance */
.stweg-fe-filter-bar input[type="date"] {
    -webkit-appearance: auto !important;
    appearance: auto !important;
}

.stweg-fe-filter-bar select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    padding-right: 30px !important;
    cursor: pointer !important;
}

.stweg-fe-filter-bar select:focus,
.stweg-fe-filter-bar input:focus {
    outline: none !important;
    border-color: var(--stweg-fe-brand) !important;
    box-shadow: 0 0 0 3px rgba(28, 202, 91, 0.12) !important;
    background: #fff !important;
}

.stweg-fe-filter-bar input::placeholder {
    color: var(--stweg-fe-border-hover, #cbd5e1) !important;
    font-weight: 400 !important;
}

.stweg-fe-filter-actions {
    display: flex !important;
    gap: 6px !important;
    align-items: flex-end !important;
    flex-shrink: 0 !important;
}


/* =========================================================================
   Buttons — Modern 2026
   ========================================================================= */

.stweg-fe-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    font-family: var(--stweg-fe-font) !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    border: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

.stweg-fe-btn-primary {
    height: 40px !important;
    padding: 0 20px !important;
    background: var(--stweg-fe-brand) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(28, 202, 91, 0.3) !important;
}

.stweg-fe-btn-primary:hover {
    background: var(--stweg-fe-brand-hover) !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(28, 202, 91, 0.35) !important;
    transform: translateY(-1px) !important;
}

.stweg-fe-btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(28, 202, 91, 0.25) !important;
}

.stweg-fe-btn-ghost {
    height: 40px !important;
    padding: 0 14px !important;
    background: transparent !important;
    color: var(--stweg-fe-text-muted) !important;
    border: none !important;
}

.stweg-fe-btn-ghost:hover {
    background: var(--stweg-surface-3, #f1f5f9) !important;
    color: var(--stweg-fe-text) !important;
    text-decoration: none !important;
}

.stweg-fe-btn-secondary {
    background: transparent !important;
    color: var(--stweg-fe-text-muted) !important;
    border: 1px solid var(--stweg-fe-border) !important;
}

.stweg-fe-btn-secondary:hover {
    background: var(--stweg-fe-bg) !important;
    color: var(--stweg-fe-text) !important;
    text-decoration: none !important;
}


/* =========================================================================
   Filter Meta Row (Toggle + Sort)
   ========================================================================= */

.stweg-fe-filter-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-top: 12px !important;
    padding-top: 12px !important;
    border-top: 1px solid var(--stweg-surface-3, #f1f5f9) !important;
}

.stweg-fe-toggle-extended {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: color 0.15s ease !important;
    padding: 4px 0 !important;
}

.stweg-fe-toggle-extended:hover {
    color: #0f172a !important;
    text-decoration: none !important;
}

.stweg-fe-toggle-extended.stweg-fe-toggle-active {
    color: var(--stweg-fe-brand) !important;
}

.stweg-fe-toggle-chevron {
    transition: transform 0.25s ease !important;
    flex-shrink: 0 !important;
}

.stweg-fe-toggle-active .stweg-fe-toggle-chevron {
    transform: rotate(180deg) !important;
}

.stweg-fe-filter-count-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 6px !important;
    border-radius: 10px !important;
    background: var(--stweg-fe-brand) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.stweg-fe-sort-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.stweg-fe-sort-wrap label {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
    white-space: nowrap !important;
}

.stweg-fe-sort-wrap select {
    padding: 6px 30px 6px 10px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: 1.5px solid var(--stweg-fe-border) !important;
    border-radius: 8px !important;
    background: var(--stweg-fe-bg, #f8fafc) !important;
    color: var(--stweg-fe-text) !important;
    outline: none !important;
    cursor: pointer !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    -webkit-appearance: none !important;
    transition: border-color 0.2s !important;
}

.stweg-fe-sort-wrap select:focus {
    border-color: var(--stweg-fe-brand) !important;
    box-shadow: 0 0 0 3px rgba(28, 202, 91, 0.12) !important;
}


/* =========================================================================
   Extended Search Panel
   ========================================================================= */

.stweg-fe-extended-panel {
    display: none !important;
    margin-top: 16px !important;
    padding-top: 16px !important;
    border-top: 1px solid var(--stweg-surface-3, #f1f5f9) !important;
}

.stweg-fe-extended-panel.stweg-fe-extended-open {
    display: block !important;
}

.stweg-fe-extended-fields {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px !important;
}

.stweg-fe-extended-fields .stweg-fe-filter-group {
    flex: none !important;
    min-width: 0 !important;
}


/* =========================================================================
   Feature Chips — Modern Toggle Pills
   ========================================================================= */

.stweg-fe-features-panel {
    margin-top: 16px !important;
    padding-top: 14px !important;
    border-top: 1px solid var(--stweg-surface-3, #f1f5f9) !important;
}

.stweg-fe-features-label {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    margin-bottom: 10px !important;
    padding-left: 2px !important;
}

.stweg-fe-chips-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.stweg-fe-chip {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 7px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--stweg-text-secondary, #475569) !important;
    background: var(--stweg-surface-3, #f1f5f9) !important;
    border: 1.5px solid transparent !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.stweg-fe-chip input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.stweg-fe-chip:hover {
    background: #e2e8f0 !important;
    color: var(--stweg-color-slate-700, #334155) !important;
}

.stweg-fe-chip-active,
.stweg-fe-chip:has(input:checked) {
    background: #dcfce7 !important;
    color: #15803d !important;
    border-color: #86efac !important;
    font-weight: 600 !important;
}

.stweg-fe-chip-active:hover,
.stweg-fe-chip:has(input:checked):hover {
    background: #bbf7d0 !important;
    border-color: #4ade80 !important;
}


/* =========================================================================
   Results Info
   ========================================================================= */

.stweg-fe-results-info {
    font-size: 14px !important;
    color: var(--stweg-fe-text-muted) !important;
    margin-bottom: 20px !important;
    padding: 0 4px !important;
}


/* =========================================================================
   Card Grid (Archive)
   ========================================================================= */

.stweg-fe-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
}

/* v2.0.0: Phase 2 Restdateien-Migration — Skeleton-Loader nutzt engeren Top-Margin */
.stweg-fe-grid.skeleton-mode {
    margin-top: 16px !important;
}

@media (max-width: 1024px) {
    .stweg-fe-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    .stweg-fe-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}


/* =========================================================================
   Card
   ========================================================================= */

.stweg-fe-card {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--stweg-fe-surface) !important;
    border: 1px solid var(--stweg-fe-border) !important;
    border-radius: var(--stweg-fe-radius) !important;
    overflow: hidden !important;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
    box-shadow: var(--stweg-fe-shadow) !important;
}

.stweg-fe-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--stweg-fe-shadow-lg) !important;
    border-color: var(--stweg-fe-border-hover) !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Overlay-Link fuer gesamte Karte */
.stweg-fe-card-link {
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
}

/* v1.36.99: Focus-Visible — Keyboard-User sehen Fokus-Ring */
.stweg-fe-card-link:focus {
    outline: none !important;
}
.stweg-fe-card-link:focus-visible {
    outline: 2px solid var(--stweg-fe-brand, #1CCA5B) !important;
    outline-offset: 2px !important;
    border-radius: var(--stweg-fe-radius, 12px) !important;
}

/* v1.36.98 + 1.36.99: Im Detail-View muss der Stretch-Link z-index 2 haben,
   damit er ueber den Slides liegt, aber unter Action-Buttons + Slideshow-Buttons. */
.stweg-fe-card--detail .stweg-fe-card-link {
    z-index: var(--stweg-card-z-link, 2) !important;
}

/* Card-interne Links ueber Overlay heben */
.stweg-fe-card-title a {
    position: relative !important;
    z-index: 2 !important;
    color: inherit !important;
    text-decoration: none !important;
}

.stweg-fe-card-title a:hover {
    text-decoration: underline !important;
}


/* Card Image */

.stweg-fe-card-image {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
    overflow: hidden !important;
    background: var(--stweg-surface-3, #f1f5f9) !important;
}

.stweg-fe-card-image a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
}

.stweg-fe-card-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s !important;
}

/* Hinweis: Hover-Scale auf dem Bild wurde bewusst entfernt.
   Bei gestapelten Slideshow-Slides wuerde scale(1.03) beim Bildwechsel "springen".
   Stattdessen wird die Card selbst (transform: translateY) animiert (siehe oben). */

.stweg-fe-card-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    color: var(--stweg-fe-border-hover, #cbd5e1) !important;
}

/* Detail-View: Placeholder braucht Mindest-Hoehe wenn keine Slideshow da ist */
.stweg-fe-card-detail-media > .stweg-fe-card-placeholder {
    min-height: 280px !important;
    aspect-ratio: 4 / 3 !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   Card Slideshow (Diashow)
   ─────────────────────────────────────────────────────────────────────
   Robuste Cross-Fade-Diashow mit Auto-Play, Touch/Keyboard/A11y.
   Ersetzt die alte Hover-only-Implementierung.

   Architektur (BEM-ähnlich, daten- statt klassenattributiert):
   - .stweg-fe-card-image--slideshow  ← Modifikator am Image-Container
   - .stweg-fe-slideshow              ← Slideshow-Root
     - .stweg-fe-slideshow-link       ← Nur die Slides (im <a>)
     - .stweg-fe-slideshow-slide      ← Einzelne Slides (cross-fade via opacity)
     - .stweg-fe-slideshow-btn        ← Prev/Next Buttons
     - .stweg-fe-slideshow-counter    ← "1 / N" Anzeige
     - .stweg-fe-slideshow-dots       ← Dot-Container
     - .stweg-fe-slideshow-dot        ← Einzelne Dots
   ═══════════════════════════════════════════════════════════════════════ */

/* Slideshow-Wurzel: fullbleed im Image-Container */
.stweg-fe-slideshow {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

/* Inner-Link enthaelt nur die Slides (kein interaktiver Inhalt!) */
.stweg-fe-slideshow-link {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* Slides: gestapelt, Cross-Fade via opacity (KEIN transform — das wuerde Sprung verursachen) */
.stweg-fe-slideshow-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1 !important;
    transition: opacity 0.35s ease !important;
    pointer-events: none !important;
    will-change: opacity !important;
}

.stweg-fe-slideshow-slide--active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
    pointer-events: auto !important;
}

/* Reduced-Motion: keine Transition, sofortiger Wechsel */
@media (prefers-reduced-motion: reduce) {
    .stweg-fe-slideshow-slide {
        transition: none !important;
    }
    .stweg-fe-slideshow-dot,
    .stweg-fe-slideshow-btn {
        transition: none !important;
    }
}

/* ── Counter (1 / N) — rechts unten, permanent sichtbar ────────────── */
.stweg-fe-slideshow-counter {
    position: absolute !important;
    right: 8px !important;
    bottom: 8px !important;
    z-index: 4 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    padding: 3px 8px !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.65) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    letter-spacing: 0.02em !important;
    pointer-events: none !important;
    font-variant-numeric: tabular-nums !important;
    user-select: none !important;
    opacity: 0.9 !important;
}

.stweg-fe-slideshow:hover .stweg-fe-slideshow-counter,
.stweg-fe-slideshow:focus-within .stweg-fe-slideshow-counter {
    opacity: 1 !important;
}

.stweg-fe-slideshow-current,
.stweg-fe-slideshow-total {
    color: #ffffff !important;
    font-size: 11px !important;
    line-height: 1 !important;
}

.stweg-fe-slideshow-sep {
    color: rgba(255, 255, 255, 0.55) !important;
    font-size: 11px !important;
    line-height: 1 !important;
    margin: 0 1px !important;
}

/* Hinweis: Dot-Indikator wurde in v1.36.96 entfernt.
   Counter (1 / N rechts unten) liefert die gleiche Information kompakter.
   Mobile + Desktop teilen denselben simplen Indikator. */

/* ── Prev/Next Buttons — nur auf Hover sichtbar (Desktop) ────────────── */
.stweg-fe-slideshow-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 5 !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.92) !important;
    color: #0f172a !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease !important;
}

.stweg-fe-slideshow-btn svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    pointer-events: none !important;
}

.stweg-fe-slideshow-prev {
    left: 8px !important;
}

.stweg-fe-slideshow-next {
    right: 8px !important;
}

/* Sichtbar bei Hover (Desktop) oder Fokus (Keyboard) */
.stweg-fe-slideshow:hover .stweg-fe-slideshow-btn,
.stweg-fe-slideshow:focus-within .stweg-fe-slideshow-btn,
.stweg-fe-slideshow-btn:focus-visible {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.stweg-fe-slideshow-btn:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24) !important;
    transform: translateY(-50%) scale(1.06) !important;
}

.stweg-fe-slideshow-btn:active {
    transform: translateY(-50%) scale(0.94) !important;
}

.stweg-fe-slideshow-btn:focus-visible {
    outline: 2px solid var(--stweg-fe-brand, #1CCA5B) !important;
    outline-offset: 2px !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Mobile (kein Hover): Controls permanent sichtbar (Touch braucht Target) */
@media (hover: none) {
    .stweg-fe-slideshow-btn {
        opacity: 1 !important;
        pointer-events: auto !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }
    .stweg-fe-slideshow-prev {
        left: 6px !important;
    }
    .stweg-fe-slideshow-next {
        right: 6px !important;
    }
}

/* ── Autoplay-Status (per JS gesetzt) ─────────────────────────────────── */
.stweg-fe-slideshow[data-autoplay-paused="1"] .stweg-fe-slideshow-counter {
    /* Optisches Signal: leichte Abdunklung wenn pausiert */
    background: rgba(15, 23, 42, 0.45) !important;
}

/* ── Kein Hover-Scale auf Slides (würde beim Wechsel "springen") ───────── */
.stweg-fe-card:hover .stweg-fe-slideshow-slide {
    transform: none !important;
}


/* Badges on Image */

.stweg-fe-badge-offer {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #ffffff !important;
    z-index: 2 !important;
}

.stweg-fe-badge-miete {
    background: var(--stweg-fe-offer-miete) !important;
}

.stweg-fe-badge-kauf {
    background: var(--stweg-fe-offer-kauf) !important;
}

/* Hinweis: .stweg-fe-badge-gallery wurde entfernt.
   Der Galerie-Counter wird jetzt direkt in der Slideshow angezeigt
   (.stweg-fe-slideshow-counter, .stweg-fe-slideshow-dots) — keine Duplikation mehr. */


/* Card Body */

.stweg-fe-card-body {
    padding: 16px 18px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
}

.stweg-fe-card-price {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--stweg-fe-text) !important;
    margin-bottom: 6px !important;
    line-height: 1.2 !important;
}

.stweg-fe-card-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text) !important;
    margin: 0 0 6px !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.stweg-fe-card-location {
    font-size: 13px !important;
    color: var(--stweg-fe-text-muted) !important;
    margin-bottom: 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.stweg-fe-card-location svg {
    flex-shrink: 0 !important;
    color: var(--stweg-fe-text-light) !important;
}


/* Card Specs */

.stweg-fe-card-specs {
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-top: auto !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--stweg-surface-3, #f1f5f9) !important;
    align-items: center !important;
}

.stweg-fe-spec {
    font-size: 13px !important;
    color: var(--stweg-fe-text-muted) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-weight: 500 !important;
}

.stweg-fe-spec svg {
    color: var(--stweg-fe-text-light) !important;
    flex-shrink: 0 !important;
}


/* Type Badge in Specs */

.stweg-fe-type-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: var(--stweg-fe-text-muted) !important;
    background: var(--stweg-surface-3, #f1f5f9) !important;
    margin-left: auto !important;
}


/* =========================================================================
   Pagination
   ========================================================================= */

.stweg-fe-pagination {
    display: flex !important;
    justify-content: center !important;
    padding: 20px 0 40px !important;
}

.stweg-fe-pagination ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.stweg-fe-pagination li {
    list-style: none !important;
}

.stweg-fe-pagination a,
.stweg-fe-pagination span {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 12px !important;
    border: 1px solid var(--stweg-fe-border) !important;
    border-radius: var(--stweg-fe-radius-sm) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--stweg-fe-text) !important;
    text-decoration: none !important;
    transition: all 0.2s !important;
    background: var(--stweg-fe-surface) !important;
}

.stweg-fe-pagination a:hover {
    background: var(--stweg-fe-bg) !important;
    border-color: var(--stweg-fe-border-hover) !important;
    text-decoration: none !important;
}

.stweg-fe-pagination .current {
    background: var(--stweg-fe-brand) !important;
    color: #ffffff !important;
    border-color: var(--stweg-fe-brand) !important;
}


/* =========================================================================
   Empty State (Archive)
   ========================================================================= */

.stweg-fe-empty {
    text-align: center !important;
    padding: 60px 20px !important;
    color: var(--stweg-fe-text-muted) !important;
}

.stweg-fe-empty svg {
    margin-bottom: 16px !important;
    color: var(--stweg-fe-border-hover, #cbd5e1) !important;
}

.stweg-fe-empty h3 {
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text) !important;
    margin: 0 0 8px !important;
}

.stweg-fe-empty p {
    font-size: 15px !important;
    margin: 0 0 24px !important;
}

/* v2.0.0: Phase 2 Restdateien-Migration — AJAX-Fehlermeldung (renderError() in listing-filter.js) */
.stweg-fe-empty.variant-error {
    padding: 60px 24px !important;
}

.stweg-fe-empty-error-text {
    font-size: 14px !important;
    color: #ef4444 !important;
}


/* =========================================================================
   Breadcrumb (Single)
   ========================================================================= */

.stweg-fe-breadcrumb {
    padding: 16px 0 12px !important;
    font-size: 13px !important;
    color: var(--stweg-fe-text-muted) !important;
}

.stweg-fe-breadcrumb a {
    color: var(--stweg-fe-brand) !important;
    text-decoration: none !important;
}

.stweg-fe-breadcrumb a:hover {
    text-decoration: underline !important;
}

.stweg-fe-breadcrumb-sep {
    margin: 0 8px !important;
    color: var(--stweg-fe-text-light) !important;
}

.stweg-fe-breadcrumb-current {
    color: var(--stweg-fe-text-muted) !important;
}


/* =========================================================================
   Gallery (Single)
   ========================================================================= */

.stweg-fe-gallery {
    position: relative !important;
    margin-bottom: 24px !important;
    border-radius: var(--stweg-fe-radius) !important;
    overflow: hidden !important;
}

.stweg-fe-gallery-badge {
    z-index: 5 !important;
}


/* Single Image */

.stweg-fe-gallery-single {
    width: 100% !important;
    max-height: 500px !important;
    overflow: hidden !important;
}

.stweg-fe-gallery-single img,
.stweg-fe-gallery-main-img {
    width: 100% !important;
    height: auto !important;
    max-height: 500px !important;
    object-fit: cover !important;
    display: block !important;
}


/* Multi-Image Grid */

.stweg-fe-gallery-grid {
    display: grid !important;
    gap: 4px !important;
    max-height: 480px !important;
    overflow: hidden !important;
}

.stweg-fe-gallery-grid-2 {
    grid-template-columns: 1fr 1fr !important;
}

.stweg-fe-gallery-grid-3 {
    grid-template-columns: 2fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
}

.stweg-fe-gallery-grid-3 .stweg-fe-gallery-main {
    grid-row: 1 / -1 !important;
}

.stweg-fe-gallery-grid-4,
.stweg-fe-gallery-grid-5 {
    grid-template-columns: 2fr 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
}

.stweg-fe-gallery-grid-4 .stweg-fe-gallery-main,
.stweg-fe-gallery-grid-5 .stweg-fe-gallery-main {
    grid-row: 1 / -1 !important;
}

.stweg-fe-gallery-item {
    overflow: hidden !important;
    cursor: pointer !important;
    position: relative !important;
}

.stweg-fe-gallery-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.3s !important;
}

.stweg-fe-gallery-item:hover img {
    transform: scale(1.05) !important;
}

.stweg-fe-gallery-more {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.45) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    font-weight: 700 !important;
}


/* Empty Gallery */

.stweg-fe-gallery-empty {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 300px !important;
    background: var(--stweg-surface-3, #f1f5f9) !important;
    color: var(--stweg-fe-border-hover, #cbd5e1) !important;
    border-radius: var(--stweg-fe-radius) !important;
    gap: 12px !important;
}

.stweg-fe-gallery-empty span {
    font-size: 14px !important;
    color: var(--stweg-fe-text-light) !important;
}


/* =========================================================================
   Single Layout (2-Spalten)
   ========================================================================= */


/* =========================================================================
   Single Layout (2-Spalten)
   ========================================================================= */

.stweg-fe-single-layout {
    display: grid !important;
    grid-template-columns: 1fr 360px !important;
    gap: 32px !important;
    align-items: start !important;
    padding-bottom: 48px !important;
}

@media (max-width: 960px) {
    .stweg-fe-single-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }
}


/* Single Header */

.stweg-fe-single-header {
    margin-bottom: 20px !important;
}

.stweg-fe-single-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--stweg-fe-text) !important;
    margin: 0 0 8px !important;
    line-height: 1.25 !important;
}

.stweg-fe-single-location {
    font-size: 15px !important;
    color: var(--stweg-fe-text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 10px !important;
}

.stweg-fe-single-location svg {
    color: var(--stweg-fe-text-light) !important;
    flex-shrink: 0 !important;
}


/* =========================================================================
   Specs Bar (Single)
   ========================================================================= */

.stweg-fe-specs-bar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    background: var(--stweg-fe-bg) !important;
    border: 1px solid var(--stweg-fe-border) !important;
    border-radius: var(--stweg-fe-radius) !important;
    padding: 0 !important;
    margin-bottom: 28px !important;
    overflow: hidden !important;
}

.stweg-fe-spec-item {
    flex: 1 1 auto !important;
    min-width: 120px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 16px 12px !important;
    border-right: 1px solid var(--stweg-fe-border) !important;
}

.stweg-fe-spec-item:last-child {
    border-right: none !important;
}

.stweg-fe-spec-value {
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--stweg-fe-text) !important;
    line-height: 1.2 !important;
}

.stweg-fe-spec-label {
    font-size: 12px !important;
    color: var(--stweg-fe-text-muted) !important;
    margin-top: 2px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}


/* =========================================================================
   Sections (Single)
   ========================================================================= */

.stweg-fe-section {
    margin-bottom: 32px !important;
}

.stweg-fe-section-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--stweg-fe-text) !important;
    margin: 0 0 14px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid var(--stweg-fe-border) !important;
}

.stweg-fe-description {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: var(--stweg-fe-text) !important;
}

.stweg-fe-description p {
    margin: 0 0 12px !important;
}


/* =========================================================================
   Features (Single)
   ========================================================================= */

.stweg-fe-features {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.stweg-fe-feature-group-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text-muted) !important;
    margin: 0 0 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
}

.stweg-fe-feature-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.stweg-fe-feature-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    background: rgba(28, 202, 91, 0.08) !important;
    color: var(--stweg-fe-success) !important;
    border: 1px solid rgba(28, 202, 91, 0.15) !important;
}

.stweg-fe-feature-pill svg {
    flex-shrink: 0 !important;
    color: var(--stweg-fe-brand) !important;
}


/* =========================================================================
   Details Table (Single)
   ========================================================================= */

.stweg-fe-details-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.stweg-fe-details-table tr {
    border-bottom: 1px solid var(--stweg-fe-border) !important;
}

.stweg-fe-details-table tr:last-child {
    border-bottom: none !important;
}

.stweg-fe-details-table th {
    text-align: left !important;
    padding: 12px 16px 12px 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--stweg-fe-text-muted) !important;
    width: 40% !important;
    vertical-align: top !important;
}

.stweg-fe-details-table td {
    padding: 12px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text) !important;
}


/* =========================================================================
   Sidebar (Single)
   ========================================================================= */

.stweg-fe-single-sidebar {
    position: sticky !important;
    top: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

@media (max-width: 960px) {
    .stweg-fe-single-sidebar {
        position: static !important;
    }
}


/* Price Box */

.stweg-fe-price-box {
    background: var(--stweg-fe-surface) !important;
    border: 1px solid var(--stweg-fe-border) !important;
    border-radius: var(--stweg-fe-radius) !important;
    padding: 24px !important;
    box-shadow: var(--stweg-fe-shadow) !important;
}

.stweg-fe-price-amount {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--stweg-fe-text) !important;
    line-height: 1.2 !important;
}

.stweg-fe-price-additional {
    font-size: 13px !important;
    color: var(--stweg-fe-text-muted) !important;
    margin-top: 6px !important;
}


/* Contact Box */

.stweg-fe-contact-box {
    background: var(--stweg-fe-surface) !important;
    border: 1px solid var(--stweg-fe-border) !important;
    border-radius: var(--stweg-fe-radius) !important;
    padding: 24px !important;
    box-shadow: var(--stweg-fe-shadow) !important;
}

.stweg-fe-contact-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--stweg-fe-text) !important;
    margin: 0 0 14px !important;
}

.stweg-fe-contact-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 0 !important;
    font-size: 14px !important;
    color: var(--stweg-fe-text) !important;
    border-bottom: 1px solid var(--stweg-fe-border) !important;
}

.stweg-fe-contact-row:last-child {
    border-bottom: none !important;
}

.stweg-fe-contact-row svg {
    flex-shrink: 0 !important;
    color: var(--stweg-fe-text-light) !important;
}

.stweg-fe-contact-row a {
    color: var(--stweg-fe-brand) !important;
    text-decoration: none !important;
}

.stweg-fe-contact-row a:hover {
    text-decoration: underline !important;
}


/* Sidebar Boxes */

.stweg-fe-sidebar-box {
    background: var(--stweg-fe-surface) !important;
    border: 1px solid var(--stweg-fe-border) !important;
    border-radius: var(--stweg-fe-radius) !important;
    padding: 20px 24px !important;
}

.stweg-fe-sidebar-box-title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text-muted) !important;
    margin: 0 0 4px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

.stweg-fe-sidebar-box-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--stweg-fe-text) !important;
    margin: 0 !important;
}


/* Sidebar Meta */

.stweg-fe-sidebar-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    padding: 4px 0 !important;
    font-size: 13px !important;
    color: var(--stweg-fe-text-light) !important;
}

.stweg-fe-sidebar-meta span {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
}

.stweg-fe-sidebar-meta svg {
    flex-shrink: 0 !important;
}


/* Back Link */

.stweg-fe-back-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--stweg-fe-brand) !important;
    text-decoration: none !important;
    padding: 8px 0 !important;
}

.stweg-fe-back-link:hover {
    text-decoration: underline !important;
}

.stweg-fe-back-link svg {
    flex-shrink: 0 !important;
}


/* =========================================================================
   Report Area (inject via the_content)
   ========================================================================= */

.stweg-fe-report-area {
    margin-top: 20px !important;
}


/* =========================================================================
   Archive Page Background
   ========================================================================= */

.stweg-listing-archive-wrap {
    background: var(--stweg-fe-bg) !important;
    min-height: 60vh !important;
    padding-bottom: 40px !important;
}

.stweg-listing-single-wrap {
    background: var(--stweg-fe-bg) !important;
    min-height: 60vh !important;
}


/* =========================================================================
   Responsive: Landing / Intro Section
   ========================================================================= */

@media (max-width: 1024px) {
    .stweg-fe-category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .stweg-fe-landing {
        margin-top: 24px !important;
    }

    .stweg-fe-landing-heading {
        font-size: 19px !important;
    }

    .stweg-fe-category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stweg-fe-category-tile {
        padding: 20px 12px 18px !important;
    }

    .stweg-fe-category-icon {
        width: 48px !important;
        height: 48px !important;
        margin-bottom: 10px !important;
    }

    .stweg-fe-usp-grid,
    .stweg-fe-steps-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .stweg-fe-cta-inner {
        flex-direction: column !important;
        text-align: center !important;
        padding: 24px 20px !important;
    }
}

@media (max-width: 480px) {
    .stweg-fe-category-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .stweg-fe-category-desc {
        display: none !important;
    }

    .stweg-fe-category-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    .stweg-fe-cta-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}


/* =========================================================================
   Responsive: Filter Bar
   ========================================================================= */

@media (max-width: 768px) {
    .stweg-fe-hero {
        padding: 32px 20px 28px !important;
    }

    .stweg-fe-hero-title {
        font-size: 24px !important;
    }

    .stweg-fe-filter-bar {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 16px !important;
    }

    .stweg-fe-filter-group {
        flex: 1 1 100% !important;
    }

    .stweg-fe-filter-group.stweg-fe-filter-narrow {
        flex: 1 1 100% !important;
    }

    .stweg-fe-filter-actions {
        width: 100% !important;
    }

    .stweg-fe-filter-actions .stweg-fe-btn {
        flex: 1 !important;
        justify-content: center !important;
    }
}


/* =========================================================================
   Responsive: Single
   ========================================================================= */

@media (max-width: 768px) {
    .stweg-fe-single-title {
        font-size: 22px !important;
    }

    .stweg-fe-specs-bar {
        flex-direction: column !important;
    }

    .stweg-fe-spec-item {
        flex-direction: row !important;
        justify-content: space-between !important;
        border-right: none !important;
        border-bottom: 1px solid var(--stweg-fe-border) !important;
        padding: 12px 16px !important;
    }

    .stweg-fe-spec-item:last-child {
        border-bottom: none !important;
    }

    .stweg-fe-gallery-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        max-height: none !important;
    }

    .stweg-fe-gallery-grid .stweg-fe-gallery-main {
        grid-row: auto !important;
    }

    .stweg-fe-gallery-grid .stweg-fe-gallery-item:not(.stweg-fe-gallery-main) {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .stweg-fe-card-image {
        aspect-ratio: 16 / 9 !important;
    }

    .stweg-fe-card-price {
        font-size: 18px !important;
    }

    .stweg-fe-price-amount {
        font-size: 24px !important;
    }

    .stweg-fe-hero {
        padding: 32px 16px 28px !important;
    }

    .stweg-fe-hero-title {
        font-size: 24px !important;
    }

    .stweg-fe-hero-subtitle {
        font-size: 14px !important;
    }

    .stweg-fe-container {
        padding: 0 12px !important;
    }
}


/* =========================================================================
   AJAX Filter: Loading States & Skeleton
   ========================================================================= */

/* Loading overlay */
#stweg-filter-results.stweg-fe-loading {
    opacity: 1 !important;
    pointer-events: none !important;
    min-height: 300px !important;
}

.stweg-fe-loading-text {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
    font-style: italic !important;
}

/* Skeleton Card */
.stweg-fe-skeleton-card {
    background: #fff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.08) !important;
}

.stweg-fe-skeleton-image {
    width: 100% !important;
    aspect-ratio: 16/10 !important;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%) !important;
    background-size: 400% 100% !important;
    animation: stweg-skeleton-shimmer 1.4s ease infinite !important;
}

.stweg-fe-skeleton-body {
    padding: 16px 18px 18px !important;
}

.stweg-fe-skeleton-line {
    height: 14px !important;
    border-radius: 6px !important;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%) !important;
    background-size: 400% 100% !important;
    animation: stweg-skeleton-shimmer 1.4s ease infinite !important;
    margin-bottom: 10px !important;
}

.stweg-fe-skeleton-price {
    width: 45% !important;
    height: 20px !important;
}

.stweg-fe-skeleton-title {
    width: 80% !important;
}

.stweg-fe-skeleton-location {
    width: 60% !important;
    margin-bottom: 14px !important;
}

.stweg-fe-skeleton-specs {
    height: 12px !important;
    width: 70% !important;
    border-radius: 6px !important;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%) !important;
    background-size: 400% 100% !important;
    animation: stweg-skeleton-shimmer 1.4s ease infinite !important;
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--stweg-surface-3, #f1f5f9) !important;
}

@keyframes stweg-skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Fade-in Animation fuer AJAX-Ergebnisse */
.stweg-fe-fade-in {
    animation: stweg-fade-in 0.3s ease-out !important;
}

@keyframes stweg-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================================================================
   AJAX Pagination
   ========================================================================= */

.stweg-fe-pagination-ajax {
    padding: 24px 0 !important;
    text-align: center !important;
}

.stweg-fe-pagination-ajax ul {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.stweg-fe-pagination-ajax li {
    margin: 0 !important;
    padding: 0 !important;
}

.stweg-fe-page-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--stweg-text-secondary, #475569) !important;
    background: #fff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
}

.stweg-fe-page-link:hover {
    background: var(--stweg-surface-3, #f1f5f9) !important;
    border-color: var(--stweg-fe-border-hover, #cbd5e1) !important;
    color: #0f172a !important;
}

.stweg-fe-page-link.stweg-fe-page-active {
    background: var(--stweg-fe-brand, #1CCA5B) !important;
    border-color: var(--stweg-fe-brand, #1CCA5B) !important;
    color: #fff !important;
    font-weight: 600 !important;
    pointer-events: none !important;
}

.stweg-fe-page-link.prev,
.stweg-fe-page-link.next {
    font-size: 13px !important;
    padding: 0 14px !important;
}

.stweg-fe-page-dots {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px !important;
    height: 36px !important;
    font-size: 14px !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
}


/* =========================================================================
   Distance Badge (Umkreissuche)
   ========================================================================= */

.stweg-fe-badge-distance {
}


/* =========================================================================
   Responsive: AJAX Filter Extensions
   ========================================================================= */

@media (max-width: 1024px) {
    .stweg-fe-extended-fields {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .stweg-fe-filter-bar {
        padding: 16px !important;
        border-radius: 12px !important;
    }

    .stweg-fe-filter-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .stweg-fe-filter-group,
    .stweg-fe-filter-group.stweg-fe-filter-narrow,
    .stweg-fe-filter-group.stweg-fe-filter-wide {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }

    .stweg-fe-filter-actions {
        flex-direction: row !important;
        width: 100% !important;
    }

    .stweg-fe-filter-actions .stweg-fe-btn {
        flex: 1 !important;
        justify-content: center !important;
    }

    .stweg-fe-extended-fields {
        grid-template-columns: 1fr 1fr !important;
    }

    .stweg-fe-filter-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .stweg-fe-sort-wrap {
        width: 100% !important;
    }

    .stweg-fe-sort-wrap select {
        flex: 1 !important;
    }

    .stweg-fe-chips-wrap {
        gap: 5px !important;
    }

    .stweg-fe-chip {
        padding: 6px 11px !important;
        font-size: 12px !important;
    }

    .stweg-fe-pagination-ajax ul {
        flex-wrap: wrap !important;
    }

    .stweg-fe-page-link.prev,
    .stweg-fe-page-link.next {
        font-size: 12px !important;
        padding: 0 10px !important;
    }
}

@media (max-width: 480px) {
    .stweg-fe-extended-fields {
        grid-template-columns: 1fr !important;
    }

    .stweg-fe-chip {
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
}


/* ═══════════════════════════════════════════════════════════════════════
   v1.36.97: View-Switcher (Grid | Detail)
   ═══════════════════════════════════════════════════════════════════════ */

.stweg-fe-meta-controls {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

/* Pill-Container */
.stweg-fe-view-toggle {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px !important;
    border-radius: 10px !important;
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    border: 1px solid var(--stweg-fe-border, #e2e8f0) !important;
    gap: 2px !important;
}

/* Einzelne Pill */
.stweg-fe-view-btn {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 12px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease !important;
    white-space: nowrap !important;
    font-family: inherit !important;
}

.stweg-fe-view-btn svg {
    display: block !important;
    width: 15px !important;
    height: 15px !important;
    flex: 0 0 auto !important;
    pointer-events: none !important;
}

.stweg-fe-view-btn:hover {
    color: var(--stweg-fe-text, #0f172a) !important;
    background: rgba(28, 202, 91, 0.08) !important;
}

.stweg-fe-view-btn:focus-visible {
    outline: 2px solid var(--stweg-fe-brand, #1CCA5B) !important;
    outline-offset: 1px !important;
}

.stweg-fe-view-btn--active,
.stweg-fe-view-btn--active:hover {
    background: var(--stweg-fe-surface, #ffffff) !important;
    color: var(--stweg-fe-text, #0f172a) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    cursor: default !important;
}

/* v1.38.15: Favoriten-Toggle — aktiver Zustand sichtbarer (subtile Brand-Farbe) */
.stweg-favorites-toggle.stweg-fe-view-btn--active {
    background: rgba(28, 202, 91, 0.10) !important;
    color: #1CCA5B !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

.stweg-favorites-toggle.stweg-fe-view-btn--active svg {
    fill: #1CCA5B !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   v1.36.99: Z-Index Tokens (Detail-View Card-as-Link)
   ═══════════════════════════════════════════════════════════════════════
   Saubere Hierarchie statt Magic-Numbers. Bei Erweiterungen
   nur neue Tokens definieren, nicht in jedem Selektor hardcoden. */

.stweg-fe-card--detail {
    /* v1.36.99: Touch-action — 300ms-Delay auf Mobile vermeiden */
    touch-action: manipulation !important;
    /* v1.36.99: Cursor — visuelles Feedback: Card ist klickbar */
    cursor: pointer !important;
}

/* Lokale z-index Tokens (private zum Card-Scope, kollidiert nicht mit anderen Komponenten) */
.stweg-fe-card--detail {
    --stweg-card-z-base:    1;   /* Slides (inactive) + Stretch-Link (Grid) */
    --stweg-card-z-link:    2;   /* Stretch-Link im Detail-View */
    --stweg-card-z-slide:   2;   /* Active Slide */
    --stweg-card-z-media:   3;   /* Media-Container */
    --stweg-card-z-header:  4;   /* Card-Header (Meta + Actions) */
    --stweg-card-z-action:  5;   /* Hide / Favorite Buttons */
    --stweg-card-z-control: 6;   /* Slideshow Prev/Next */
}

.stweg-fe-grid--detail {
    /* 1-Spalten Stack — Cards sind selbst 2-Spalten (Media | Content) */
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.stweg-fe-card--detail {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr) !important;
    gap: 0 !important;
    background: var(--stweg-fe-surface, #ffffff) !important;
    border: 1px solid var(--stweg-fe-border, #e2e8f0) !important;
    border-radius: var(--stweg-fe-radius, 12px) !important;
    overflow: hidden !important;
    box-shadow: var(--stweg-fe-shadow, 0 1px 3px rgba(0, 0, 0, 0.06)) !important;
    transition: box-shadow 0.2s, border-color 0.2s !important;
    text-decoration: none !important;
    color: inherit !important;
}

.stweg-fe-card--detail:hover {
    box-shadow: var(--stweg-fe-shadow-lg, 0 10px 25px rgba(0, 0, 0, 0.08)) !important;
    border-color: var(--stweg-fe-border-hover, #cbd5e1) !important;
}

/* Linke Spalte: Media (Slideshow + Thumbnails) */
.stweg-fe-card-detail-media {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    min-width: 0 !important;
    /* v1.36.99: z-index Token statt Magic-Number */
    z-index: var(--stweg-card-z-media, 3) !important;
}

.stweg-fe-card--detail .stweg-fe-slideshow {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 4 / 3 !important;
    overflow: hidden !important;
    flex: 1 1 auto !important;
}

.stweg-fe-card--detail .stweg-fe-slideshow-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: 1 !important;
    transition: opacity 0.35s ease !important;
    pointer-events: none !important;
}

.stweg-fe-card--detail .stweg-fe-slideshow-slide--active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
}

/* Detail-Slideshow: Pfeile etwas groesser und frueher sichtbar (Wohnung-Suche ist bewusste Interaktion) */
.stweg-fe-card--detail .stweg-fe-slideshow-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    opacity: 0.92 !important;
    pointer-events: auto !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    /* v1.36.99: z-index Token + touch-action (Mobile) */
    z-index: var(--stweg-card-z-control, 6) !important;
    touch-action: manipulation !important;
}

.stweg-fe-card--detail .stweg-fe-slideshow-btn:hover {
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.06) !important;
}

/* Thumbnails unter dem Hauptbild */
.stweg-fe-card-detail-thumbs {
    display: flex !important;
    gap: 6px !important;
    padding: 8px !important;
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    border-top: 1px solid var(--stweg-fe-border, #e2e8f0) !important;
}

.stweg-fe-card-detail-thumb {
    appearance: none !important;
    -webkit-appearance: none !important;
    flex: 1 1 0 !important;
    aspect-ratio: 4 / 3 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 6px !important;
    background: var(--stweg-fe-border, #e2e8f0) !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: border-color 0.15s ease, opacity 0.15s ease !important;
    opacity: 0.7 !important;
}

.stweg-fe-card-detail-thumb img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    pointer-events: none !important;
}

.stweg-fe-card-detail-thumb:hover {
    opacity: 1 !important;
}

.stweg-fe-card-detail-thumb--active,
.stweg-fe-card-detail-thumb--active:hover {
    border-color: var(--stweg-fe-brand, #1CCA5B) !important;
    opacity: 1 !important;
    cursor: default !important;
}

.stweg-fe-card-detail-thumb:focus-visible {
    outline: 2px solid var(--stweg-fe-brand, #1CCA5B) !important;
    outline-offset: 1px !important;
}

/* Rechte Spalte: Content */
.stweg-fe-card-detail-content {
    display: flex !important;
    flex-direction: column !important;
    padding: 20px 24px !important;
    gap: 12px !important;
    min-width: 0 !important;
}

.stweg-fe-card-detail-header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    /* v1.36.99: z-index Token — v1.38.19: pointer-events: none damit Klick
       auf den Header-Bereich durch den Stretch-Link (.stweg-fe-card-link)
       abgefangen wird. Action-Buttons innerhalb des Headers haben
       pointer-events: auto (siehe .stweg-fe-card-detail-action). */
    position: relative !important;
    z-index: var(--stweg-card-z-header, 4) !important;
    pointer-events: none !important;
}

.stweg-fe-card-detail-meta {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

/* Im Detail-View: Badges sind im flex-Flow (nicht absolute positioniert) */
.stweg-fe-card-detail-meta .stweg-fe-badge-offer,
.stweg-fe-card-detail-meta .stweg-fe-badge-distance {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
}

.stweg-fe-card-detail-meta .stweg-fe-badge-offer {
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 6px !important;
}

.stweg-fe-card-detail-meta .stweg-fe-badge-distance {
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    background: rgba(15, 23, 42, 0.7) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}

.stweg-fe-card-detail-meta .stweg-fe-badge-distance svg {
    flex: 0 0 auto !important;
    stroke: currentColor !important;
}

.stweg-fe-card-detail-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex: 0 0 auto !important;
}

.stweg-fe-card-detail-action {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid var(--stweg-fe-border, #e2e8f0) !important;
    border-radius: 50% !important;
    background: var(--stweg-fe-surface, #ffffff) !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease !important;
    /* v1.36.99: z-index Token + touch-action (Mobile) */
    position: relative !important;
    z-index: var(--stweg-card-z-action, 5) !important;
    touch-action: manipulation !important;
    pointer-events: auto !important;
}

.stweg-fe-card-detail-action:hover {
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    color: var(--stweg-fe-text, #0f172a) !important;
    border-color: var(--stweg-fe-border-hover, #cbd5e1) !important;
}

.stweg-fe-card-detail-action:focus-visible {
    outline: 2px solid var(--stweg-fe-brand, #1CCA5B) !important;
    outline-offset: 1px !important;
}

.stweg-fe-card-detail-action:active {
    transform: scale(0.95) !important;
}

.stweg-fe-card-detail-action svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    pointer-events: none !important;
}

/* Active State fuer Favorite (Heart gefuellt) */
.stweg-fe-card-detail-favorite--active,
.stweg-fe-card-detail-favorite--active:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.stweg-fe-card-detail-favorite--active svg {
    fill: currentColor !important;
}

/* Active State fuer Hide (Auge durchgestrichen) */
.stweg-fe-card-detail-hide--active,
.stweg-fe-card-detail-hide--active:hover {
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    color: var(--stweg-fe-text, #0f172a) !important;
}

/* v1.36.98: Hinweis — .stweg-fe-card-detail-link entfernt.
   Title ist jetzt <h2> ohne inneren <a>. Der Stretch-Link (.stweg-fe-card-link)
   am Card-Ende macht die ganze Card klickbar. */

.stweg-fe-card-detail-title {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--stweg-fe-text, #0f172a) !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    /* Ueber Stretch-Link (z-index 1) damit Hover-Farbe sichtbar bleibt */
    position: relative !important;
    z-index: 2 !important;
    transition: color 0.15s ease !important;
}

/* Card-Hover: Title-Farbe aendert sich (visuelles Feedback: Card ist klickbar) */
.stweg-fe-card--detail:hover .stweg-fe-card-detail-title {
    color: var(--stweg-fe-brand-hover, #17b550) !important;
}

.stweg-fe-card-detail-price {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: var(--stweg-fe-text, #0f172a) !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
}

.stweg-fe-card-detail-location {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 14px !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    line-height: 1.4 !important;
}

.stweg-fe-card-detail-location svg {
    flex: 0 0 auto !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
}

.stweg-fe-card-detail-specs {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 14px !important;
    padding-top: 8px !important;
    border-top: 1px solid var(--stweg-fe-bg, #f1f5f9) !important;
}

.stweg-fe-card-detail-spec {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 13px !important;
    color: var(--stweg-fe-text, #334155) !important;
    font-weight: 500 !important;
}

.stweg-fe-card-detail-spec svg {
    flex: 0 0 auto !important;
    color: var(--stweg-fe-text-light, #94a3b8) !important;
}

.stweg-fe-card-detail-type {
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    padding: 3px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: var(--stweg-fe-text-muted, #64748b) !important;
    font-weight: 500 !important;
}

.stweg-fe-card-detail-description {
    font-size: 14px !important;
    line-height: 1.55 !important;
    color: var(--stweg-fe-text, #334155) !important;
}

.stweg-fe-card-detail-description p {
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.stweg-fe-card-detail-features {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

.stweg-fe-feature-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    background: var(--stweg-fe-bg, #f1f5f9) !important;
    color: var(--stweg-fe-text, #475569) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

/* Hinweis: .stweg-fe-card-detail-cta wurde in v1.36.98 entfernt.
   Die ganze Card ist jetzt klickbar via Stretch-Link (.stweg-fe-card-link).
   Hover-Feedback kommt vom Title (Brand-Color) und der Card selbst (Box-Shadow). */

/* Hidden-State (per JS via LocalStorage) */
.stweg-fe-card--hidden {
    display: none !important;
}

/* v1.38.13: Soft-Hide (5s Undo-Toast) — grau + deaktiviert vor Hard-Hide */
.stweg-fe-card--hiding {
    opacity: 0.35 !important;
    filter: grayscale(0.6) !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, filter 0.3s ease !important;
}

/* v1.38.13: Hide-Undo Toast (Gmail-Style, zentriert unten) */
.stweg-hide-undo-toast {
    position: fixed !important;
    bottom: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(20px) !important;
    z-index: 100000 !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    padding: 12px 20px !important;
    background: #1e293b !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease !important;
    pointer-events: none !important;
}

.stweg-hide-undo-toast--visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
}

.stweg-hide-undo-toast button {
    appearance: none !important;
    -webkit-appearance: none !important;
    background: none !important;
    border: none !important;
    color: #1CCA5B !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-family: inherit !important;
    white-space: nowrap !important;
}

.stweg-hide-undo-toast button:hover {
    color: #17b352 !important;
    text-decoration: underline !important;
}

/* Responsive: Tablet 1-Spalte */
@media (max-width: 1024px) {
    .stweg-fe-card--detail {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr) !important;
    }
    .stweg-fe-card-detail-content {
        padding: 16px 18px !important;
    }
    .stweg-fe-card-detail-title {
        font-size: 18px !important;
    }
    .stweg-fe-card-detail-price {
        font-size: 22px !important;
    }
}

/* Responsive: Mobile 1-Spalte (Media oben, Content unten) */
@media (max-width: 720px) {
    .stweg-fe-card--detail {
        grid-template-columns: 1fr !important;
    }
    .stweg-fe-card--detail .stweg-fe-slideshow {
        aspect-ratio: 16 / 10 !important;
    }
    .stweg-fe-card-detail-content {
        padding: 16px 18px 18px !important;
    }
    /* v1.36.98: .stweg-fe-card-detail-cta entfernt (Stretch-Link-Pattern). */
}

/* =========================================================================
   v1.38.6: Company logo overlay on grid card image (Best Practice 2026)
   Logo-only, bottom-right corner, semi-transparent backdrop.
   ========================================================================= */

.stweg-fe-card-owner-overlay {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 5px 8px !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
}

.stweg-fe-card-owner-overlay img {
    width: auto !important;
    height: 26px !important;
    max-width: 100px !important;
    object-fit: contain !important;
    display: block !important;
    border: 0 !important;
    border-radius: 0 !important;
}

/* =========================================================================
   v1.38.4: Detail card title row with inline company logo (Best Practice 2026)
   ========================================================================= */

.stweg-fe-card-detail-title-row {
    display: flex !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 8px !important;
}

.stweg-fe-card-detail-title-row .stweg-fe-card-detail-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
}

.stweg-fe-card-detail-owner-logo {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

.stweg-fe-card-detail-owner-logo img {
    width: auto !important;
    height: auto !important;
    max-height: 44px !important;
    max-width: 120px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 6px !important;
}

/* =========================================================================
   v1.38.0: Owner logo in detail page sidebar (stweg-fe template)
   ========================================================================= */

.stweg-fe-owner-logo {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.stweg-fe-owner-logo-img {
    max-width: 160px !important;
    height: auto !important;
    max-height: 48px !important;
    object-fit: contain !important;
    display: block !important;
}

