/* CSS Basis V3 + V15 Layout/Aktions-Anpassungen */
body { font-family: sans-serif; margin: 20px; background-color: #f4f4f4; color: #333; }
h1 { text-align: center; margin-bottom: 20px; color: #333; }
.header-info { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; background-color: #fff; padding: 15px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.header-info .kundenfelder, .header-info .adresseblock { flex: 1; min-width: 250px; }
.header-info .adresseblock { text-align: right; font-size: 0.9em; line-height: 1.3; color: #555; }
@media (max-width: 600px) { .header-info { flex-direction: column; text-align: left; } .header-info .adresseblock { text-align: left; margin-top: 10px; } }
.form-group { margin-bottom: 10px; display: flex; flex-direction: column; }
.form-group label { margin-bottom: 5px; font-weight: bold; color: #555; }
input[type="text"], input[type="email"], input[type="number"], select { padding: 8px; font-size: 1em; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; width: 100%; }
.btn { background-color: #007bff; color: white; padding: 10px 15px; border: none; cursor: pointer; margin-top: 5px; border-radius: 4px; font-size: 1em; transition: background-color 0.3s ease; }
.btn:hover { background-color: #0056b3; }
.btn:disabled { background-color: #cccccc; cursor: not-allowed; }
.btn-secondary { background-color: #6c757d; }
.btn-secondary:hover { background-color: #545b62; }
.form-area { display: flex; gap: 15px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 20px; background-color: #fff; padding: 15px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
#scannerContainer { display: none; margin-bottom: 20px; text-align: center; background-color: #fff; padding: 15px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
#scannerVideo { width: 100%; max-width: 600px; border: 2px solid #007bff; margin-bottom: 10px; object-fit: cover; border-radius: 4px; }
#scannerControls { display: flex; gap: 10px; margin-bottom: 10px; justify-content: center; align-items: center; }
#zoomSlider { width: 150px; }
#scannerResult { font-size: 1.2em; margin-top: 10px; color: #333; }

#produktGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
@media (max-width: 600px) {
    #produktGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.product-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.product-card:hover {
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    align-self: center;
    object-fit: contain;
}

.card-info strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.05em;
    color: #333;
}

.card-info p {
    margin: 4px 0;
    font-size: 0.9em;
    line-height: 1.3;
    color: #555;
}
.card-info p.product-preis-absatz strong {
    color: #333;
}

.card-footer {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.card-footer input[type="number"] {
    width: 60px;
    padding: 6px;
    font-size: 0.9em;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.card-footer .btn {
    padding: 6px 10px;
    font-size: 0.9em;
}
/* Styles for barcode in product card */
.barcode-wrapper {
    margin-top: auto;
    padding-top: 8px;
    text-align: center;
}
.barcode-wrapper svg {
    display: block;
    max-width: 100%;
    height: 50px; /* Adjust height as needed */
    margin: 0 auto;
}

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background: rgba(0,0,0,0.6); }
.modal-content { background: #fff; margin: 5% auto; padding: 25px; border-radius: 8px; width: 90%; max-width: 750px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); animation: modalopen 0.3s; }
@keyframes modalopen { from { opacity: 0; transform: translateY(-50px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }
.modal-header h2 { margin: 0; font-size: 1.5em; color: #333; }
.modal-close { float: right; font-size: 1.8em; cursor: pointer; line-height: 1; background: none; border: none; color: #888; }
.modal-close:hover { color: #000; }
.promo-hinweis { font-size: 0.85em; color: green; display: block; margin-top: 3px; }
.promo-warnung { font-size: 0.85em; color: orange; display: block; margin-top: 3px; }
.gratis-text {color: #28a745; font-weight: bold;}

#aktionsListeContainer { border: 1px solid #ddd; padding: 20px; border-radius: 8px; margin-bottom: 20px; order: 5; width: 100%; max-width: 800px; margin-left: auto; margin-right: auto; background-color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
#aktionsListeContainer h3 { margin-top: 0; margin-bottom: 15px; color: #333; border-bottom: 1px solid #eee; padding-bottom: 10px;}
.aktions-item { display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #eee; padding: 15px 0; flex-wrap: wrap; }
.aktions-item:last-child { border-bottom: none; }
.aktions-item img { max-height: 60px; max-width: 80px; width: auto; height: auto; border: 1px solid #ccc; object-fit: contain; flex-shrink: 0; border-radius: 4px; margin-right: 10px; /* Etwas Abstand zum Text */ }
.aktions-item .info { flex-grow: 1; font-size: 0.95em; min-width: 220px; max-width: calc(100% - 200px); /* Ggf. anpassen wenn Bild + Button breiter/schmaler */}
.aktions-item .info strong { color: #007bff; }
.aktions-item .info span { display: block; font-size: 0.85em; color: #555; margin-top: 4px; }
.aktions-item .menge-input { width: 70px; padding: 8px; text-align: center; flex-shrink: 0; margin-left: auto; }
.aktions-item .config-btn { margin-left: auto; padding: 8px 12px; font-size: 0.9em; }

#zusammenfassung { max-width: 800px; margin: 20px auto; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
#zusammenfassung h2 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px;}
#zusammenfassung table { width: 100%; border-collapse: collapse; margin-bottom: 15px; }
#zusammenfassung th, #zusammenfassung td { border: 1px solid #ddd; padding: 10px; text-align: left; font-size: 0.95em; }
#zusammenfassung th { background-color: #f8f9fa; color: #333; font-weight: bold; }
#zusammenfassung td:nth-child(2), #zusammenfassung td:nth-child(5) { text-align: center; }
#zusammenfassung input[type="number"] { width: 70px; text-align: center; padding: 8px;}
.summary-gratis-row td { background-color: #e6ffed !important; color: #155724 !important; }
.summary-gratis-row .menge-display { text-align: center; }
#zusammenfassung .summary-actions { margin-top: 20px; display: flex; justify-content: space-between; }

#mixMatchModal .modal-body { display: flex; flex-direction: column; gap: 20px; max-height: 65vh; overflow-y: auto; padding-right: 10px; }
#mixMatchModal .auswahl-sektion { border: 1px solid #e0e0e0; padding: 15px; border-radius: 6px; background-color: #f9f9f9;}
#mixMatchModal .auswahl-sektion h4 { margin-top: 0; margin-bottom: 10px; font-size: 1.2em; color: #007bff; border-bottom: 1px solid #eee; padding-bottom: 8px;}
#mixMatchModal .auswahl-sektion p { font-size: 0.9em; margin-bottom: 10px;}
#mixMatchModal .artikel-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; max-height: 280px; overflow-y: auto; padding: 10px; border: 1px solid #eee; background-color: #fff; border-radius: 4px;}
#mixMatchModal .artikel-item-modal { border: 1px solid #ddd; padding: 10px; font-size: 0.9em; display: flex; flex-direction: column; justify-content: space-between; background-color: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);}
#mixMatchModal .artikel-item-modal img { max-width: 100px; max-height: 100px; object-fit: contain; margin: 0 auto 8px auto; }
#mixMatchModal .artikel-item-modal p { margin: 4px 0; font-size: 0.85em; }
#mixMatchModal .artikel-item-modal strong { color: #333; }
#mixMatchModal .artikel-item-modal input[type="number"] { width: 100%; box-sizing: border-box; text-align: center; padding: 6px; margin-top: 8px; border: 1px solid #ccc; border-radius: 3px;}
#mixMatchModal .fortschritt-text { font-weight: bold; margin-top: 5px; color: #555; }
#mixMatchModal .modal-footer { margin-top: 25px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #eee; padding-top: 20px; }

/* NEU: Style für Scroll-To-Top Button */
#scrollToTopBtn {
    display: none; /* Standardmäßig ausgeblendet */
    position: fixed; /* Feste Position am Bildschirm */
    bottom: 20px; /* Abstand von unten */
    right: 30px; /* Abstand von rechts */
    z-index: 99; /* Stellt sicher, dass er über anderen Elementen liegt */
    border: none;
    outline: none;
    background-color: #007bff; /* Gleiche Farbe wie andere Buttons */
    color: white;
    cursor: pointer;
    padding: 12px 15px; /* Etwas Polsterung */
    border-radius: 10px;
    font-size: 18px; /* Schriftgröße des Pfeils */
    transition: background-color 0.3s ease, opacity 0.5s ease;
    opacity: 0.8;
}

#scrollToTopBtn:hover {
    background-color: #0056b3; /* Dunklerer Blauton beim Hover */
    opacity: 1;
}