.quick-order td {
    vertical-align: middle;
}

/* Spalten auf Minimum - ABER nicht für Artikelspalte */
#example th,
#example td {
    white-space: nowrap;
    padding: 8px 4px;
}

/* Artikelspalte MUSS Umbruch erlauben - WICHTIG: Spezifischer Selektor */
#example tbody td:nth-child(3) {
    white-space: normal !important;
    word-wrap: break-word;
    line-height: 1.4;
    overflow-wrap: break-word;
}

/* Quantity Input kompakt */
.quick-order input[type="number"] {
    width: 70px;
    padding: 4px;
}

/* Filter Inputs */
.filters input[type="text"] {
    width: 100%;
    padding: 4px;
    box-sizing: border-box;
}

/* Mobile: Bild und Marke verstecken */
@media screen and (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    /* Noch kompakter auf Mobile */
    #example {
        font-size: 13px;
    }
    
    #example th,
    #example td {
        padding: 6px 3px;
    }
    
    .quick-order input[type="number"] {
        width: 60px;
        font-size: 13px;
    }
}

/* Tabelle verstecken bis DataTable initialisiert ist */
#example {
    display: none;
}

/* DataTable zeigt sie dann automatisch wieder an */
table.dataTable {
    display: table !important;
}

/* Beide Header-Zeilen fixieren beim Scrollen */
#example thead tr:first-child {
    position: sticky;
    top: 0;
    background: white;
    z-index: 11;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Filter-Row direkt darunter fixieren */
#example thead tr.filters {
    position: sticky;
    top: 42px;
    background: white;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

/* Quick-Order DataTables Layout */
.dataTables_wrapper .bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    margin-bottom: 0px;
}

.dataTables_wrapper .dataTables_info {
    flex: 0 0 auto;
    margin: 0;
}

.dataTables_wrapper .pagination-right {
    flex: 0 0 auto;
    margin: 0;
}

.dataTables_wrapper .dataTables_paginate {
    margin: 0;
}

.dataTables_wrapper .dataTables_length {
    margin: 15px 0;
}

/* QO: Bildzuschnitt in Höhe und Breite optimiert */
.quick-order td img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

/* Bild-Container für Hover nach rechts */
#example td:nth-child(1) {
    position: relative;
    overflow: visible !important;
	background-color: white;
}

#example td:nth-child(1) img {
    transition: all 0.3s ease;
    position: relative;
    display: block;
	background-color: white;
}

/* Standard Hover - für alle mittleren Bilder */
#example td:nth-child(1) img:hover {
    transform: scale(10);
    transform-origin: center left; /* Vertikal mittig */
    z-index: 1001;
	background-color: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* Obere 3 Zeilen - wachsen nach unten */
#example tbody tr:nth-child(1) td:nth-child(1) img:hover,
#example tbody tr:nth-child(2) td:nth-child(1) img:hover,
#example tbody tr:nth-child(3) td:nth-child(1) img:hover {
    transform-origin: top left; /* Nach rechts-unten */
}

/* Untere 3 Zeilen - wachsen nach oben */
#example tbody tr:nth-last-child(1) td:nth-child(1) img:hover,
#example tbody tr:nth-last-child(2) td:nth-child(1) img:hover,
#example tbody tr:nth-last-child(3) td:nth-child(1) img:hover {
    transform-origin: bottom left; /* Nach rechts-oben */
}

/* Produktname und Kurzbeschreibung Container */
#example tbody td:nth-child(3) * {
    white-space: normal !important;
}

/* Kurzbeschreibung mit Textbegrenzung */
.product-short-desc {
    font-size: 0.85em !important;
    color: #666 !important;
    font-style: italic !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 5 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-top: 4px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 100% !important;
}

/* Mindestbestellmenge Tooltip */
.min-qty-tooltip {
    border-bottom: 1px dotted #999;
    position: relative;
    display: inline-block;
}

.min-qty-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1002;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.min-qty-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    z-index: 1002;
}