/* --- General & Mobile-First Styles --- */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f4f4f4;
    --accent-color: #007bff;
    --panel-bg: #e0e0e0;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Import Raleway from Google Fonts */
@import url('https://fonts.googleapis.com/css?family=Raleway:400,700&display=swap');

/* Apply font family globally */
body {
    font-family: 'Raleway', sans-serif;
    margin: 0;
    background-color: #ffffff;
    color: var(--primary-color);
    line-height: 1.6;
}

h1, h2, h3 {
    line-height: 1.2;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* --- HEADER STYLES --- */
header {
    width: 100vw;
    background: var(--primary-color);
    color: #fff;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

header h1 {
    color: #fff;
    margin: 0;
    font-size: 1.6em;
    letter-spacing: 0.08em;
}

header nav {
    display: flex;
    align-items: center;
    gap: 40px;
    background: transparent;
    position: relative;
}

header nav a {
    color: #fff;
    text-transform: uppercase;
    font-size: 1.1em;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0 5px;
}

header nav a:hover {
    color: var(--accent-color);
}

/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
}

.hamburger span {
    height: 4px;
    width: 100%;
    background: #fff;
    margin: 4px 0;
    border-radius: 2px;
    display: block;
    transition: 0.3s;
}

/* --- Main, Footer Styles --- */
main, footer {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 20px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #666;
}

/* --- Configurator Styles --- */
.configurator-container {
    text-align: center;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

#configurator-grid {
    display: grid;
    gap: 15px;
    margin: 30px auto;
    justify-content: center;
}

.panel {
    width: 120px;
    height: 120px;
    background-color: var(--panel-bg);
    border: 2px dashed #ccc;
    cursor: pointer;
    position: relative;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2), 
                inset 0 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel:hover {
    transform: scale(1.03);
}

.panel.selected {
    border: 3px solid var(--accent-color);
}

.panel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.panel-image[data-rotation="90"] { transform: rotate(90deg); }
.panel-image[data-rotation="180"] { transform: rotate(180deg); }
.panel-image[data-rotation="270"] { transform: rotate(270deg); }

.rotate-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18px" height="18px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    z-index: 10;
}

#price-summary {
    margin: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
}

/* --- Modern Request Form Styles --- */
.request-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    font-family: 'Raleway', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center align fields */
}

.request-form label,
.request-form input,
.request-form textarea,
.request-form button {
    width: 100%;
    text-align: center; /* Center text in fields */
}

.request-form button {
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s, transform 0.1s;
}

.request-form button:hover {
    background: #222;
    transform: translateY(-2px) scale(1.02);
}

/* --- Image Gallery Modal --- */
#image-gallery-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 60vh;
    background-color: white;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    pointer-events: none;
    opacity: 0;
}

#image-gallery-modal.visible {
    transform: translateY(0);
    pointer-events: auto;
    opacity: 1;
}

.modal-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#gallery-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
}

#gallery-images img {
    width: 100%;
    height: auto;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.2s;
}

#gallery-images img:hover {
    border: 2px solid var(--accent-color);
}

#close-gallery-btn {
    margin-top: 20px;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* --- Legal & Cookie Styles --- */
.legal-content {
    max-width: 800px;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: none; /* Changed by JS */
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 2000;
}
#cookie-banner.show {
    display: flex;
}

/* --- Absatz zu den unbegrenzten Möglichkeiten --- */
.panel-possibilities {
    max-width: 700px;
    margin: 5rem auto 4.5rem auto;
    font-size: 1.15em;
    text-align: center;
    border-radius: 14px;
    padding: 1.5em 1em;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    color: #222;
}
.panel-possibilities strong {
    color: black;
    font-size: 1.18em;
}

/* --- Dunkles Design für unbegrenzte Möglichkeiten --- */
.panel-possibilities.dark {
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    padding: 1.7em 1em 1.3em 1em;
    max-width: 700px;
    margin: 2rem auto 1.5rem auto;
    text-align: center;
}
.panel-possibilities.dark {
    font-size: 2.3em;
    font-weight: 800;
    color: black;
    margin-bottom: 0.35em;
    letter-spacing: 0.02em;
}

/* --- Custom Styles --- */
.possibilities-number {
    font-size: 2.5em;
    font-weight: 900;   
    margin-bottom: 0.4em;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* --- Desktop & Tablet Styles --- */
@media (min-width: 768px) {
    header .header-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .panel {
        width: 150px;
        height: 150px;
    }
    
    #image-gallery-modal {
        left: 50%;
        top: 50%;
        bottom: auto;
        width: 80vw;
        max-width: 900px;
        height: auto;
        max-height: 80vh;
        border-radius: 10px;
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    #image-gallery-modal.visible {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    header nav {
        flex-direction: column;
        gap: 20px;
    }
    header .lang-switcher {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Flag size and centering fix */
.lang-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.lang-switcher img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    /* Remove box-shadow and border */
    box-shadow: none;
    border: none;
}

/* Center flags on mobile */
@media (max-width: 768px) {
    .lang-switcher {
        justify-content: center;
        margin: 20px auto 0 auto;
    }
}

/* Mobile navbar centering and spacing */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        padding: 15px 0;
    }
    header nav {
        position: static;
        background: none;
        flex-direction: column;
        align-items: center;
        gap: 0;
        width: 100%;
        max-width: none;
        padding: 0;
        box-shadow: none;
        min-height: auto;
        display: flex;
        visibility: visible;
        opacity: 1;
        transform: none;
        text-align: center;
    }
    header nav a {
        padding: 15px 0;
        font-size: 1.2em;
        width: 100%;
        display: block;
        text-align: center;
    }
    .lang-switcher {
        margin: 20px auto 0 auto;
        display: flex;
        gap: 10px;
        justify-content: center;
    }
}

