.artikel {
    width: 100%;
    table-layout: fixed; /* Fixiert das Layout, sodass die Spalten gleichmäßig verteilt werden */
    border-collapse: collapse;
}

.artikel {
    border-bottom: gray solid 1px;
}

.artikel td {
    vertical-align: top; /* Stellt sicher, dass Inhalte oben beginnen */
    padding: 10px;
}

.artikelbild {
    width: 250px; /* Maximale Breite des Bildbereichs */
    overflow: hidden;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.artikeltext {
    color: black;
    padding-left: 20px;
    padding-right: 10px;
}

/* Fehlerzustand für Textarea (Wunschtext-Validierung) */
textarea.invalid {
    border: 2px solid #ff4444 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.3) !important;
    animation: shake 0.5s ease-in-out;
}

/* Shake-Animation für Textarea */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Mehr lesen/Weniger lesen Funktionalität für mobile Geräte */
@media (max-width: 768px) {
    .artikel-description {
        position: relative;
    }
    
    .artikel-description.collapsed {
        max-height: 200px;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .artikel-description.expanded {
        max-height: none;
        transition: max-height 0.3s ease;
    }
    
    .read-more-btn {
        background: linear-gradient(to bottom, transparent 0%, lightgray 70%, lightgray 100%);
        border: none;
        color: #ef770b;
        font-weight: bold;
        padding: 15px 10px 10px 10px;
        cursor: pointer;
        width: 100%;
        text-align: center;
        margin-top: -20px;
        position: relative;
        z-index: 1;
        font-size: 14px;
        transition: all 0.3s ease;
    }
    
    .read-more-btn:hover {
        color: #d65f00;
    }
    
    .read-more-btn.hidden {
        display: none;
    }
}

.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  }
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: none;
  }

.preis {
    float: right; /* Div schwebt nach rechts */
    background-color: #c0c0c0;
    border: solid gray 1px;
    border-radius: 5px;
    padding: 5px;
    margin: 5px 0 0 5px; /* Abstand zum umfließenden Text */
}

.preis span {
    display: block;
}

.mengeneinheit {
    color: black;
}

.summe {
    font-size: x-large;
}

.angebot {
    font-size: x-large;
    font-weight: bold;
    color: red;
}

.alterPreis {
    text-decoration: line-through;
}

.versandhinweis {
    font-size: small;
}

/* Responsives Verhalten bei kleineren Bildschirmen */
@media (max-width: 500px) {
    .artikel {
        table-layout: auto; /* Ermöglicht flexibleres Layout bei kleinen Bildschirmen */
    }

    .artikelbild, .artikeltext {
        display: block;
        width: 100%; /* Macht Bild und Text spaltenübergreifend */
        max-width: none;
    }

    .artikelbild {
        margin-bottom: 20px; /* Fügt Abstand zwischen Bild und Text hinzu */
    }
}

.footerheader {
    font-size: small;
    position: absolute;
    width: 100%;
    text-align: center;
    transform: translateY(-19px);
    border-bottom: solid gray 1px;
    margin: 0 -20px 0 -20px;
    background-color: lightgray;
}