/* =============================================================================
   PROJEKT-SEITE MIT SIDEBAR-LAYOUT
   Modernisiertes Design mit eleganten Gradienten und feinerer Typografie
   ============================================================================= */

/* Zurueck-Link (ueber dem Grid) */
.brandner-project-back {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 20px;
}

.brandner-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1e3a5f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.brandner-back-link:hover {
    color: #2a4d7a;
    gap: 10px;
}

.brandner-back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.brandner-back-link:hover svg {
    transform: translateX(-2px);
}

/* Haupt-Container mit Sidebar-Layout */
.brandner-project-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    align-items: start;
}

/* Sidebar (links) - Modernisiertes Design */
.brandner-project-sidebar {
    background: linear-gradient(160deg, #1a3654 0%, #234b73 50%, #1e3a5f 100%);
    color: #fff;
    border-radius: 16px;
    padding: 0;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.25), 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Sidebar-Content als Flex-Container */
.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 20px;
}

/* Sidebar: Titelbild */
.sidebar-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* Gradient-Overlay auf dem Bild fuer weicheren Uebergang */
.sidebar-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(26, 54, 84, 0.9) 0%, transparent 100%);
    pointer-events: none;
}

/* Sidebar: Titel */
.sidebar-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #fff;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

/* Sidebar: Status Badge */
.sidebar-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.sidebar-status.status-active {
    background: #22c55e;
}

.sidebar-status.status-upcoming {
    background: #f59e0b;
}

.sidebar-status.status-ended {
    background: #6b7280;
}

/* Sidebar: Kalender-Datums-Badge (oben links im Bild) - Optimiert */
.sidebar-date-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #fff;
    color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 2;
    box-sizing: border-box;
    padding: 0;
}

.sidebar-date-badge .date-day {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: #1e3a5f;
    margin-top: 2px;
}

.sidebar-date-badge .date-month {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5a7a9a;
    margin-top: 1px;
}

.sidebar-date-badge.status-active {
    border-bottom: 3px solid #22c55e;
}

.sidebar-date-badge.status-active.urgent {
    border-bottom: 3px solid #ef4444;
    animation: pulse-urgent-sidebar 2s ease-in-out infinite;
}

.sidebar-date-badge.status-upcoming {
    border-bottom: 3px solid #f59e0b;
}

.sidebar-date-badge.status-ended {
    background: rgba(255,255,255,0.9);
    border-bottom: 3px solid #9ca3af;
}

.sidebar-date-badge.status-ended .date-day,
.sidebar-date-badge.status-ended .date-month {
    color: #6b7280;
}

@keyframes pulse-urgent-sidebar {
    0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 2px 12px rgba(239,68,68,0.5); }
}

/* Sidebar: Meta-Items (Standort, Artikel) */
.sidebar-meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
}

.sidebar-meta-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
    margin-top: 1px;
}

.sidebar-meta-item strong {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.6;
    margin-bottom: 3px;
    font-weight: 600;
}

.sidebar-meta-item span {
    font-weight: 500;
}

.sidebar-meta-item a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    transition: all 0.2s ease;
}

.sidebar-meta-item a:hover {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.6);
}

/* Sidebar: Highlights */
.sidebar-highlights {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.85;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

/* Sidebar: Abholtermine - Modernisiert */
.sidebar-pickup {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 14px;
}

.sidebar-pickup h4 {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-pickup ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-pickup li {
    padding: 5px 0;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-pickup li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Sidebar: Zuschlagszeiten — Basis */
.sidebar-zuschlag {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.sidebar-zuschlag h4 {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #22c55e;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-zuschlag p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    white-space: pre-line;
}

/* Zustand 1: Vorschau (upcoming) — bestehende Styles genuegen */

/* Zustand 2: Aktiv — dezenter Puls */
.sidebar-zuschlag--active {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.4);
    animation: zuschlag-pulse 2.5s ease-in-out infinite;
}

@keyframes zuschlag-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
    50%      { box-shadow: 0 0 12px 2px rgba(34, 197, 94, 0.25); }
}

.sidebar-zuschlag--active p {
    color: #22c55e;
    font-size: 16px;
}

/* Zustand 3: Beendet — ausgegraut */
.sidebar-zuschlag--ended {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-zuschlag--ended h4 {
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-zuschlag--ended p {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

/* Sidebar: Besichtigungstermine */
.sidebar-besichtigung {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 14px;
}

.sidebar-besichtigung h4 {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-besichtigung ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-besichtigung li {
    padding: 5px 0;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-besichtigung li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-besichtigung .hinweis {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.7;
    font-style: italic;
}

.sidebar-buchungslink {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-buchungslink:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}

.sidebar-buchungslink svg {
    flex-shrink: 0;
    opacity: 0.85;
}

/* Sidebar: Dokumente */
.sidebar-dokumente {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}

.sidebar-dokumente h4 {
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-dokumente ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-dokumente li {
    padding: 0;
    margin-bottom: 8px;
}

.sidebar-dokumente li:last-child {
    margin-bottom: 0;
}

.sidebar-dokumente a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-dokumente a:hover {
    background: rgba(255,255,255,0.2);
}

.sidebar-dokumente a svg {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

/* ============================================
   LUXURY DOCUMENT VIEWER - Premium Modal Design
   Aesthetic: Refined dark glass with warm accents
   ============================================ */

.dokument-modal-overlay {
    position: fixed;
    inset: 0;
    /* Tiefes, warmes Overlay mit subtiler Vignette */
    background:
        radial-gradient(ellipse at center, rgba(10, 15, 25, 0.75) 0%, rgba(5, 8, 15, 0.92) 100%);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dokument-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dokument-modal {
    pointer-events: auto;
    /* Eleganter dunkler Glaseffekt */
    background: linear-gradient(
        165deg,
        rgba(32, 36, 45, 0.97) 0%,
        rgba(22, 25, 32, 0.98) 50%,
        rgba(18, 20, 26, 0.99) 100%
    );
    border-radius: 20px;
    width: 920px;
    max-width: calc(100vw - 64px);
    height: 88vh;
    max-height: 900px;
    display: flex;
    flex-direction: column;
    /* Subtiler Glasrand mit Lichtreflexion */
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Mehrstufiger Premium-Schatten */
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 4px 6px -1px rgba(0, 0, 0, 0.2),
        0 10px 15px -3px rgba(0, 0, 0, 0.25),
        0 20px 25px -5px rgba(0, 0, 0, 0.2),
        0 40px 50px -12px rgba(0, 0, 0, 0.35),
        /* Subtiler warmer Glow */
        0 0 80px -20px rgba(180, 140, 100, 0.08);
    transform: translateY(30px) scale(0.97);
    opacity: 0;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    /* Innerer Lichtschein oben */
    position: relative;
}

.dokument-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.15) 20%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.15) 80%,
        transparent 100%
    );
    z-index: 10;
}

.dokument-modal-overlay.active .dokument-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header - Raffinierte Werkzeugleiste */
.dokument-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.01) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    position: relative;
}

.dokument-modal-header h3 {
    margin: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55%;
    /* Dezenter Icon-Platz */
    display: flex;
    align-items: center;
    gap: 10px;
}

.dokument-modal-header h3::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 22px;
    background: linear-gradient(135deg, #e8d5b7 0%, #c9a86c 100%);
    border-radius: 3px;
    flex-shrink: 0;
    /* PDF-Icon Simulation */
    box-shadow:
        inset 0 -6px 0 rgba(0,0,0,0.1),
        0 1px 3px rgba(0,0,0,0.2);
}

.dokument-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buttons - Elegante Glasoptik */
.dokument-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dokument-modal-btn.btn-newtab {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

.dokument-modal-btn.btn-newtab:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.dokument-modal-btn.btn-newtab:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.08);
}

.dokument-modal-btn.btn-newtab svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.dokument-modal-btn.btn-close {
    width: 36px;
    height: 36px;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dokument-modal-btn.btn-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
    transform: scale(1.05);
}

.dokument-modal-btn.btn-close:active {
    transform: scale(0.98);
}

.dokument-modal-btn.btn-close svg {
    width: 18px;
    height: 18px;
}

/* Body - Der PDF Container mit verstecktem Rand */
.dokument-modal-body {
    flex: 1;
    min-height: 0;
    position: relative;
    /* Exakt passende Hintergrundfarbe zum Chrome PDF Viewer */
    background: #525659;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    /* Container fuer die Oversized-iframe-Technik */
}

/* Eleganter innerer Schatten fuer Tiefenwirkung */
.dokument-modal-body::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0 0 20px 20px;
    box-shadow:
        inset 0 1px 0 rgba(0, 0, 0, 0.3),
        inset 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    z-index: 10;
}

/* Dezente Ecken-Akzente - subtil und elegant */
.dokument-modal-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(
        to top,
        rgba(18, 20, 26, 0.15) 0%,
        transparent 100%
    );
    border-radius: 0 0 20px 20px;
    pointer-events: none;
    z-index: 10;
}

/* OVERSIZED IFRAME TECHNIK - Versteckt nur den schwarzen PDF-Viewer-Rand */
.dokument-modal-body iframe {
    /* Iframe ist 16px groesser als Container (8px pro Seite) */
    width: calc(100% + 16px);
    height: calc(100% + 16px);
    /* Symmetrische Margins verstecken den schwarzen Rand */
    margin: -8px;
    border: none;
    display: block;
}

.dokument-modal-btn:focus-visible {
    outline: 2px solid rgba(180, 140, 100, 0.6);
    outline-offset: 2px;
}

/* ============================================
   MOBILE RESPONSIVE - Volle Bildschirmnutzung
   ============================================ */
@media (max-width: 768px) {
    .dokument-modal-overlay {
        padding: 0;
        background: rgba(5, 8, 15, 0.95);
        backdrop-filter: none;
    }

    .dokument-modal {
        width: 100vw;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        max-width: none;
        border: none;
        box-shadow: none;
    }

    .dokument-modal::before {
        display: none;
    }

    .dokument-modal-body {
        border-radius: 0;
    }

    .dokument-modal-body::before,
    .dokument-modal-body::after {
        border-radius: 0;
    }

    /* Auch auf Mobile den schwarzen Rand verstecken */
    .dokument-modal-body iframe {
        width: calc(100% + 16px);
        height: calc(100% + 16px);
        margin: -8px;
    }

    .dokument-modal-header {
        padding: 14px 16px;
        background: rgba(22, 25, 32, 0.98);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .dokument-modal-header h3 {
        font-size: 13px;
        max-width: 50%;
    }

    .dokument-modal-header h3::before {
        width: 14px;
        height: 18px;
    }

    .dokument-modal-btn.btn-newtab span {
        display: none;
    }

    .dokument-modal-btn.btn-newtab {
        width: 38px;
        height: 38px;
        padding: 0;
        border-radius: 10px;
    }

    .dokument-modal-btn.btn-close {
        width: 38px;
        height: 38px;
    }
}

/* Sidebar Tabs - Elegantere Gestaltung */
.sidebar-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

.sidebar-tab {
    flex: 1;
    padding: 10px 12px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 7px;
}

.sidebar-tab:hover {
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.05);
}

.sidebar-tab.active {
    color: #1e3a5f;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.sidebar-tab svg {
    width: 14px;
    height: 14px;
}

/* Tab Content - scrollbar */
.sidebar-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.sidebar-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar für Tab-Inhalt */
.sidebar-tab-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-tab-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.sidebar-tab-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Kategorie-Filter */
.sidebar-categories {
    max-height: 200px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-categories.expanded {
    max-height: none;
}

.sidebar-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    cursor: pointer;
    color: rgba(255,255,255,0.9);
}

.sidebar-category-item:hover {
    color: rgba(255,255,255,1);
}

.sidebar-category-item input[type="checkbox"] {
    accent-color: #22c55e;
    width: 16px;
    height: 16px;
}

.sidebar-category-item .count {
    opacity: 0.6;
    font-size: 12px;
    margin-left: auto;
}

.sidebar-show-more {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 8px 0;
    text-decoration: underline;
}

.sidebar-show-more:hover {
    color: #fff;
}

.sidebar-filter-section {
    margin-bottom: 12px;
}

.sidebar-filter-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.sidebar-filter-btn {
    width: 100%;
    padding: 10px;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.sidebar-filter-btn:hover {
    background: #16a34a;
}

.sidebar-filter-reset {
    width: 100%;
    padding: 8px;
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
}

.sidebar-filter-reset:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* Produkt-Bereich (rechts) */
.brandner-project-products {
    min-width: 0; /* Wichtig fuer Grid */
}

/* Header: Beschreibung | Anzahl | Sortierung in einer Zeile */
.brandner-project-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.brandner-project-products-header .header-description {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
    min-width: 200px;
}

.brandner-project-products-header .header-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.brandner-project-products-header .header-count {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.brandner-project-products-header .header-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brandner-project-products-header .header-sort label {
    font-size: 14px;
    color: #6b7280;
    white-space: nowrap;
}

.brandner-project-products-header .header-sort select {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #fff;
    cursor: pointer;
}

.brandner-project-products-header .header-sort select:hover {
    border-color: #9ca3af;
}

.brandner-project-products-header .header-sort select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 991px) {
    .brandner-project-page {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .brandner-project-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 20px;
        align-items: start;
        max-height: none;
    }

    .sidebar-image {
        margin-bottom: 0;
    }

    .sidebar-content {
        display: flex;
        flex-direction: column;
    }

    .sidebar-tab-content {
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    .brandner-project-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar-image {
        max-width: 200px;
    }

    /* Header auf Mobile: untereinander */
    .brandner-project-products-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .brandner-project-products-header .header-description {
        min-width: 100%;
    }

    .brandner-project-products-header .header-meta {
        width: 100%;
        justify-content: space-between;
    }
}

/* =============================================================================
   CLIENT-SEITIGER FILTER
   ============================================================================= */

/* Keine Ergebnisse Meldung */
#filter-no-results {
    margin-top: 20px;
}

/* =============================================================================
   MOBILE RESPONSIVE - Produkt-Grid + Sidebar
   ============================================================================= */

/* Mobile: 1-Spalte Produkt-Grid */
@media (max-width: 767px) {
    .brandner-project-products ul.products {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    /* Produkt-Titel vollstaendig anzeigen (kein Abschneiden) */
    .brandner-project-products ul.products li .woocommerce-loop-product__title,
    .brandner-project-products ul.products li .product-title a {
        font-size: 12px !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        -webkit-line-clamp: unset !important;
        display: block !important;
        word-wrap: break-word;
        line-height: 1.3;
    }

    /* Preis auf Mobile */
    .brandner-project-products ul.products li .price {
        font-size: 15px;
    }

    /* Sidebar: Kompakte horizontale Zusammenfassung */
    .brandner-project-sidebar {
        grid-template-columns: 1fr !important;
        border-radius: 12px;
        max-height: none;
    }

    /* Sidebar-Bild auf Mobile verstecken */
    .brandner-project-sidebar .sidebar-image {
        display: none;
    }

    /* Sidebar-Content als kompakter Strip */
    .brandner-project-sidebar .sidebar-content {
        padding: 14px 16px;
    }

    .brandner-project-sidebar .sidebar-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    /* Meta-Items horizontal */
    .brandner-project-sidebar .sidebar-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .brandner-project-sidebar .sidebar-meta-item {
        font-size: 12px;
    }

    .brandner-project-sidebar .sidebar-meta-item svg {
        width: 14px;
        height: 14px;
    }

    /* Sidebar-Tabs auf Mobile verstecken (Filter kommt als Bottom-Sheet) */
    .brandner-project-sidebar .sidebar-tabs {
        display: none;
    }

    /* Details standardmaessig verstecken */
    .brandner-project-sidebar .sidebar-tab-content {
        display: none !important;
    }

    /* Mobile Expand Button */
    .sidebar-mobile-expand {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        padding: 10px;
        margin-top: 8px;
        background: rgba(255,255,255,0.12);
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 8px;
        color: rgba(255,255,255,0.85);
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        transition: background 0.2s ease;
    }

    .sidebar-mobile-expand:hover {
        background: rgba(255,255,255,0.2);
    }

    .sidebar-mobile-expand svg {
        width: 14px;
        height: 14px;
        transition: transform 0.3s ease;
    }

    /* Wenn expandiert: Details anzeigen */
    .brandner-project-sidebar.expanded .sidebar-tab-content#tab-info {
        display: flex !important;
        flex-direction: column;
    }

    .brandner-project-sidebar.expanded .sidebar-mobile-expand svg {
        transform: rotate(180deg);
    }

    /* Zuschlag-Box kompakter */
    .brandner-project-sidebar .sidebar-zuschlag {
        padding: 10px;
        margin-bottom: 10px;
    }

    .brandner-project-sidebar .sidebar-zuschlag p {
        font-size: 13px;
    }

    /* Pickup + Besichtigung kompakter */
    .brandner-project-sidebar .sidebar-pickup,
    .brandner-project-sidebar .sidebar-besichtigung {
        padding: 10px;
        margin-bottom: 10px;
    }

    /* Projekt-Seite: Weniger Padding */
    .brandner-project-page {
        padding: 0 12px 40px;
        gap: 16px;
    }

    /* Products Header kompakter */
    .brandner-project-products-header {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    .brandner-project-products-header .header-description {
        font-size: 16px;
    }
}

/* Mobile Filter FAB Button */
.project-filter-fab {
    display: none;
}

@media (max-width: 767px) {
    .project-filter-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        position: fixed;
        bottom: max(20px, env(safe-area-inset-bottom, 20px));
        right: 16px;
        z-index: 9990;
        padding: 12px 20px;
        background: #1e3a5f;
        color: #fff;
        border: none;
        border-radius: 24px;
        font-size: 14px;
        font-weight: 600;
        box-shadow: 0 4px 16px rgba(30, 58, 95, 0.4);
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .project-filter-fab:active {
        transform: scale(0.95);
    }

    .project-filter-fab svg {
        width: 16px;
        height: 16px;
    }
}

/* Hide mobile-expand on Desktop */
@media (min-width: 768px) {
    .sidebar-mobile-expand {
        display: none !important;
    }
}

/* =============================================================================
   MOBILE FILTER BOTTOM SHEET
   ============================================================================= */

/* Project filter sheet: bottom-sheet.js liefert die Basis-Styles
   (.bottom-sheet, .bottom-sheet-overlay). Hier nur Ergaenzungen. */
.project-filter-sheet {
    max-height: 80vh;
}

.bottom-sheet-handle {
    width: 36px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
}

.bottom-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px;
    flex-shrink: 0;
}

.bottom-sheet-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.bottom-sheet-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.2s ease;
}

.bottom-sheet-close:hover {
    background: #e5e7eb;
}

.bottom-sheet-close svg {
    width: 18px;
    height: 18px;
}

.bottom-sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px 20px;
    min-height: 0;
}

.filter-sheet-section {
    margin-bottom: 16px;
}

.filter-sheet-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9ca3af;
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
}

.filter-sheet-categories {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-sheet-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    font-size: 15px;
    color: #374151;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    min-height: 44px;
}

.filter-sheet-item:last-child {
    border-bottom: none;
}

.filter-sheet-item input[type="checkbox"] {
    accent-color: #1e3a5f;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.filter-sheet-item .count {
    color: #9ca3af;
    font-size: 13px;
    margin-left: auto;
}

.bottom-sheet-footer {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.filter-sheet-reset {
    flex: 0 0 auto;
    padding: 12px 20px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 44px;
}

.filter-sheet-reset:hover {
    background: #e5e7eb;
}

.filter-sheet-apply {
    flex: 1;
    padding: 12px 20px;
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 44px;
}

.filter-sheet-apply:hover {
    background: #152d47;
}

/* =============================================================================
   KOMPAKTE GRID-ANSICHT (2x2) - Mobile Toggle
   ============================================================================= */

/* Toggle-Buttons: Desktop versteckt */
.view-toggle {
    display: none;
}

@media (max-width: 767px) {
    /* Toggle sichtbar auf Mobile */
    .view-toggle {
        display: flex;
        background: #f3f4f6;
        border-radius: 8px;
        padding: 2px;
        gap: 2px;
    }

    .view-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 30px;
        border: none;
        background: transparent;
        border-radius: 6px;
        color: #9ca3af;
        cursor: pointer;
        transition: all 0.2s ease;
        padding: 0;
    }

    .view-toggle-btn.active {
        background: #fff;
        color: #1e3a5f;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .view-toggle-btn svg {
        display: block;
    }

    /* Compact Grid: 2 Spalten */
    .brandner-project-products.compact-grid ul.products {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }

    /* Timer verstecken, Enddatum zeigen */
    .compact-grid .auction-card-timer {
        display: none !important;
    }

    .compact-grid .auction-card-enddate {
        display: block !important;
        text-align: center;
        font-size: 11px;
        color: #6b7280;
        padding: 4px 0 2px;
        font-weight: 500;
    }

    /* Titel kleiner + 2 Zeilen max */
    .compact-grid .auction-card-title {
        font-size: 11px !important;
        line-height: 1.3 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: auto !important;
        margin-bottom: 2px !important;
    }

    /* Preis kleiner */
    .compact-grid .brandner-current-bid .bid-value,
    .compact-grid .brandner-current-bid {
        font-size: 13px !important;
    }

    /* Meta-Zeile verstecken (Gebote/Bietschritte) */
    .compact-grid .auction-card-meta {
        display: none !important;
    }

    /* Reserve-Hint verstecken */
    .compact-grid .auction-card-reserve-hint {
        display: none !important;
    }

    /* Bieten-Button kleiner */
    .compact-grid .bid-submit-btn {
        padding: 8px !important;
        font-size: 13px !important;
        min-height: 36px !important;
    }

    /* Bild quadratisch */
    .compact-grid .auction-card-image img {
        aspect-ratio: 1;
        object-fit: cover;
    }

    /* Padding reduzieren */
    .compact-grid .brandner-auction-card-bid {
        padding: 6px !important;
    }

    /* Bid-Input-Group verstecken (nur Button bleibt) */
    .compact-grid .bid-input-group {
        display: none !important;
    }

    /* Watchlist-Herz anpassen */
    .compact-grid .auction-card-watchlist {
        top: 4px !important;
        right: 4px !important;
    }
    .compact-grid .auction-card-watchlist .watchlist-btn {
        width: 28px !important;
        height: 28px !important;
    }

    /* SKU / Los-Nr kleiner */
    .compact-grid .auction-card-sku {
        font-size: 10px !important;
    }

    /* Zuschlag/Ended Badge */
    .compact-grid .auction-card-badge {
        font-size: 10px !important;
        padding: 2px 6px !important;
    }
}
