@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&display=swap');

:root {
    --gold-color: #bfa76f;
    --bot-blue: #004080;
}

@media screen and (max-width: 1329px) {
    /* === GRUNDLAYOUT === */
    html, body {
        margin: 0;
        padding: 0;
        font-family: Arial, sans-serif;
        height: 100%;
        overflow-x: hidden;
        width: 100%;
        background-repeat: no-repeat;
        background-attachment: fixed;
        background-position: center;
        background-size: cover;
        display: flex;
        flex-direction: column;
    }

    /* === Struktur-Wrapper === */
    .page-wrapper {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
        box-sizing: border-box;
    }

    /* === HEADER === */
    header {
        background-color: rgba(46, 74, 63, 0.5);
        padding: 16px 10px;
        text-align: center;
        color: #C2B280;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .header-container {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    header h1 {
        font-family: 'Playfair Display', serif;
        font-weight: 700;
        font-size: 2em;
        margin: 0 auto;
    }

    /* === NAVIGATION === */
    .main-nav {
        display: flex;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding: 0 10px;
    }

    .main-nav a {
        flex: 1;
        text-align: center;
        padding: 12px 0;
        font-size: 1.05em;
        color: #F9E79F;
        text-decoration: none;
        white-space: nowrap;
    }

    .beratung-link {
        display: block;
    }

    /* === MAIN-INHALT === */
    .main {
        margin: 20px auto;
        padding: 20px;
        background-color: rgba(46, 74, 63, 0.5);
        border-radius: 12px;
        color: #C2B280;
        font-size: 1em;
        box-sizing: border-box;
        width: 95vw;
        max-width: 1000px;
        height: auto;
        overflow: visible;
    }


    /* === PRODUKT-GRID === */
    .products {
        display: grid;
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem;
        padding: 1rem 0;
        justify-content: center;
        box-sizing: border-box;
         width: 100%;
        max-width: 100%;
    }


    @media screen and (max-width: 600px) {
        .products {
            grid-template-columns: 1fr;
        }

    .product-card {
        width: 100%;
        box-sizing: border-box;
        background: #1b4d3e;
        color: white;
        padding: 1rem;
        border-radius: 10px;
        text-align: center;
        box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
        transition: transform 0.2s ease;
        min-height: 150px;
        overflow-wrap: break-word;
    }

    .product-card:hover {
        transform: translateY(-3px);
    }

    /* === FOOTER === */
    footer {
        background-color: rgba(46, 74, 63, 0.5);
        color: #C2B280;
        text-align: center;
        padding: 12px;
        font-size: 0.9em;
        margin-top: auto;
    }

    /* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: var(--sidebar-top, 80px);
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #2e4a3f !important; /* undurchsichtig */
    color: #C2B280;
    padding: 1rem !important;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
    border-top-right-radius: 20px !important;
    border-bottom-right-radius: 20px !important;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: Arial, sans-serif;
    z-index: 1000;
    box-sizing: border-box;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-280px);
}


/* === SIDEBAR-TOGGLE-BUTTON === */
.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 8px;
    background-color: #1b4d3e;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    z-index: 1001;
    font-size: 1.2rem;
    color: #bfa76f;
}

/* === INHALTE DER SIDEBAR === */
.sidebar {
    position: fixed;
    top: var(--sidebar-top, 80px);
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #2e4a3f; /* vollständig undurchsichtig */
    color: #C2B280;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    overflow-y: auto;
    z-index: 1000;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-280px);
}

.sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 8px;
    background-color: #1b4d3e;
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    z-index: 1001;
    font-size: 1.2rem;
    color: var(--gold-color);
}

.sidebar-section {
    padding: 0.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.search-section {
    max-height: 75px;
    padding: 0.3rem;
    overflow: hidden;
}

#productSearchWrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#productSearch {
    padding: 0.3rem;
    font-size: 0.8rem;
    border: none;
    border-radius: 6px;
    background-color: rgba(255,255,255,0.15);
    color: #fff;
}

#productSearch::placeholder {
    color: #ddd;
}

.search-buttons button {
    flex: 1;
    padding: 0.5rem 0.5rem;
    margin-top: -5px;
    font-size: 0.75rem;
    background-color: #1b4d3e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* === CHATBOT === */
.chatbot-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    text-align: center;
    color: var(--gold-color);
    margin-bottom: 0.2rem;
}

.chatbot-section,
.chatbot-inner,
#chatbot {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

#chatWindow {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.6rem;
    box-sizing: border-box;
    min-height: 0;
}

.chat-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: auto;
}

.bot-line {
    margin-bottom: 0.5rem;
    background-color: rgba(0, 255, 255, 0.05);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
}

.user-line {
    margin-bottom: 0.5rem;
    background-color: rgba(191, 167, 111, 0.15);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    text-align: right;
}

.input-area input {
    width: 100%;
    padding: 0.5rem;
    border-radius: 6px;
    border: none;
    background-color: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box;
}

.input-area input::placeholder {
    color: #ddd;
}

.submit-button {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 0.2rem;
}

.submit-button button {
    padding: 0.4rem 0.6rem;
    background-color: #1b4d3e;
    color: var(--gold-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* === SCROLLBAR === */
#chatWindow::-webkit-scrollbar {
    width: 8px;
}

#chatWindow::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

#chatWindow::-webkit-scrollbar-thumb {
    background-color: #bfa76f;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

#chatWindow::-webkit-scrollbar-thumb:hover {
    background-color: #a28b58;
}

#chatWindow {
    scrollbar-width: thin;
    scrollbar-color: #bfa76f rgba(255, 255, 255, 0.05);
}

}
