/* --- EINHEITLICHES HEADLINE STYLING --- */
h2 {
    font-family: 'Klebekunst Headline', sans-serif;
    font-size: 6.5rem; /* Deine Wunschgröße für Desktop */
    line-height: 0.9;  /* Verhindert riesige Abstände bei der Größe */
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 2px solid var(--primary); 
    padding-bottom: 15px; 
    margin-top: 0;
    margin-bottom: 25px;
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; /* Wichtig für Handy-Umbruch */
}

/* Logo-Größe innerhalb der Headline */
h2 img {
    height: 100px; /* Logo etwas größer passend zur Schrift */
    margin-right: 20px;
}

/* --- MOBILE ANPASSUNG (Überschreibt Desktop nur auf dem Handy) --- */
@media (max-width: 480px) {
    h2 {
        font-size: 2.5rem; /* Viel kleiner fürs Handy, damit es passt */
        padding-bottom: 10px;
    }
    h2 img {
        height: 50px; /* Logo auf Handy mitschrumpfen */
        margin-right: 10px;
    }
}

@font-face {
    font-family: 'Klebekunst Headline'; /* So nennst du die Schrift im Code */
    src: url('fonts/Klebekunst-Regular.ttf') format('truetype'); /* Pfad zur Datei */
    font-weight: normal;
    font-style: normal;
}

/* --- BASIS-STILE --- */
:root {
    --primary: #000000;
    --text-color: #1a1a1a;
    --border-color: #e0e0e0;
    --bg-page: #ffffff;
    --bg-summary: #fafafa;
}

body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    background-color: var(--bg-page); 
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6; 
    display: block; 
    min-height: 100vh;
}

.container { 
    width: 100%;
    max-width: 1100px;
    margin: 0 auto; 
    padding: 30px 20px;
    box-sizing: border-box;
}

/* Die Produktnamen */
h4 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    margin-bottom: 5px;
}

/* WICHTIG: Buttons & Inputs übernehmen Schriften nicht immer automatisch */
button, input, select {
    font-family: inherit;
}


/* --- PRODUKT-BEREICH --- */
.product-scroll-area {
    padding: 15px !important; /* Wichtig für den Zoom-Platz */
    overflow-y: auto;
}

.product-item { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    padding: 15px 0; 
    border-bottom: 1px solid var(--border-color); 
    overflow: visible !important; /* Erlaubt das Rausragen beim Zoomen */
}

.product-item:last-child { border-bottom: none; }

.product-image { 
    width: 100px;
    height: 100px; 
    border-radius: 4px; 
    object-fit: cover; 
    background: #f0f0f0; 
    border: 1px solid #eee;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.product-image:hover { 
    transform: scale(1.1); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 999; /* Schiebt das Bild beim Hovern über alles andere */
}

.product-details { flex-grow: 1; }
.product-details h4 { margin: 0 0 3px 0; font-size: 16px; font-weight: 700; }
.product-details p { margin: 0; color: #555; font-size: 14px; }

/* --- PLUS/MINUS BUTTONS & ZAHLEN-ZENTRIERUNG --- */
.product-qty { 
    display: flex; 
    align-items: center; 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    overflow: hidden;
}

/* Einheitliches Design für die Plus/Minus Buttons */
.qty-btn {
    /* Grundform */
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Farben - hier kannst du deine Wunschfarbe anpassen */
    background-color: #333; /* Ein schickes Dunkelgrau/Schwarz */
    color: #ffffff;         /* Weißes Plus/Minus */
    
    /* Rahmen & Ecken */
    border: none;
    border-radius: 8px;     /* Leicht abgerundet */
    
    /* Schrift */
    font-size: 1.2rem;
    font-weight: bold;
    
    /* Interaktion */
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Verhindert Safari-Standard-Styling */
    -webkit-appearance: none;
    appearance: none;
}

/* Effekt beim Drüberfahren (Desktop) */
.qty-btn:hover {
    background-color: #555;
    transform: translateY(-1px);
}

/* Effekt beim Klicken */
.qty-btn:active {
    background-color: #000;
    transform: translateY(1px);
}

/* Layout-Fix für die Einheit */
.product-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f5f5f5; /* Heller Hintergrund für die ganze Gruppe */
    padding: 4px;
    border-radius: 10px;
}

.calc-input {
    width: 30px !important;
    border: none !important;
    background: transparent !important;
    text-align: center;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 1rem;
    color: #333;
    /* Verhindert die kleinen Standard-Pfeile im Input-Feld */
    -moz-appearance: textfield;
}

.calc-input::-webkit-outer-spin-button,
.calc-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-qty input::-webkit-outer-spin-button,
.product-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- EINGABEFELDER --- */
.form-group { margin-bottom: 15px; }

label { 
    display: block; 
    margin-bottom: 5px; 
    font-weight: 700; 
    font-size: 13px;
    text-transform: uppercase;
    color: #666;
}

input, select, textarea { 
    width: 100%; 
    padding: 10px 12px; 
    border: 1px solid var(--border-color); 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-size: 15px;
    transition: border-color 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group[style*="display: flex"] { gap: 15px !important; }

/* --- CUSTOM DROPDOWN --- */
select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 16px !important;
    background-color: #fff !important;
    cursor: pointer;
}

/* --- PREISÜBERSICHT --- */
.price-summary { 
    background: var(--bg-summary); 
    padding: 20px; 
    border-radius: 8px; 
    margin: 20px 0; 
}

.summary-row { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 8px; 
    font-size: 14px; 
    color: #444; 
}

.summary-total { 
    display: flex; 
    justify-content: space-between; 
    margin-top: 15px; 
    padding-top: 15px; 
    border-top: 1px solid var(--border-color); 
    font-size: 20px; 
    font-weight: 800; 
    color: var(--primary);
}

.disclaimer { font-size: 12px; color: #888; margin-top: 10px; }

/* --- BUTTON & HINWEIS --- */
button[type="submit"] { 
    width: 100%; 
    padding: 15px; 
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 4px; 
    font-size: 18px; 
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer; 
    transition: background-color 0.2s; 
}

button[type="submit"]:hover { background-color: #333; }

#order-form > p {
    font-size: 12px; 
    color: #777; 
    text-align: center; 
    margin-top: 15px;
}

/* --- MODAL / POP-UP --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8); 
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background-color: var(--bg-page);
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    position: relative;
    max-height: 90vh; 
    overflow-y: auto; 
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #999;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

#modal-img { width: 100%; border-radius: 4px; margin-bottom: 20px; border: 1px solid var(--border-color); }
#modal-title { margin-top: 0; font-size: 24px; font-weight: 800; text-transform: uppercase; }
#modal-desc { color: #555; line-height: 1.6; font-size: 15px; }
.modal-gallery { display: flex; gap: 10px; margin-top: 20px; overflow-x: auto; padding-bottom: 5px; }
.modal-gallery img { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; cursor: pointer; border: 1px solid var(--border-color); opacity: 0.6; }
.modal-gallery img:hover { opacity: 1; }

/* =========================================================
🚀 DESKTOP LAYOUT (SPLIT-SCREEN + SCROLL)
========================================================= */
@media (min-width: 850px) { 
    /* FIX: min-height statt height und kein overflow:hidden mehr */
    body { 
        min-height: 100vh; 
    } 
    
    .container { 
        min-height: 100vh; 
        display: flex; 
        flex-direction: column; 
    }
    #order-form {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr; 
        gap: 0 40px; 
        flex-grow: 1;
        overflow: visible !important;
    }
    
    hr { display: none; }

    .product-scroll-area {
        grid-column: 1;
        grid-row: 1 / span 10;
        overflow-y: auto;
        padding-right: 20px !important;
        max-height: 70vh;
    }

    .right-column-wrapper {
        grid-column: 2;
        grid-row: 1 / span 5;
        display: flex;
        flex-direction: column;
    }

    .price-summary { grid-column: 2; grid-row: 6; margin-top: auto; }
    button[type="submit"] { grid-column: 2; grid-row: 7; align-self: end; height: 60px; }
    #order-form > p { grid-column: 2; grid-row: 8; }
}

/* Schönerer Scrollbalken für die Produktliste */
.product-scroll-area::-webkit-scrollbar { width: 4px; }
.product-scroll-area::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }


/* 2. Responsive Buttons & Layout */
.product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
}

.product-qty {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px; /* Verhindert das Verschwinden */
}

.qty-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
}

.calc-input {
    width: 40px !important;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: bold;
}

/* 3. Spezielle Regeln für schmale Handys */
@media (max-width: 480px) {
    h2 {
        font-size: 4.5rem; /* Jetzt können wir richtig groß werden! */
        line-height: 1;
        padding-bottom: 15px;
        flex-direction: column; /* Schiebt das Logo ÜBER den Text */
        text-align: center;
        justify-content: center;
    }
    h2 img {
        height: 70px;
        margin-right: 0; /* Rechtsabstand wegnehmen */
        margin-bottom: 10px; /* Dafür Abstand nach unten zum Text */
    }
    
    .product-details h4 {
        font-size: 0.9rem; /* Produktname etwas kleiner, damit mehr Platz für Buttons bleibt */
    }

    .container {
        padding: 10px;
    }
    
    /* Falls die Zeile immer noch zu eng ist, Produkt-Details und Buttons untereinander: */
    /* .product-item {
        flex-direction: column;
        align-items: flex-start;
    }
    */
}

/* --- FOOTER / KONTAKT --- */
.impressum-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 13px;
    color: #777;
}

.impressum-footer p {
    margin: 5px 0;
}

.impressum-footer a {
    color: var(--primary); /* Nutzt dein Schwarz */
    text-decoration: none;
    font-weight: bold;
}

.impressum-footer a:hover {
    text-decoration: underline;
}