/* Globale Stile */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navigation */
header {
    background-color: #0056b3;
    color: white;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1000;
}

header .logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: inline-block;
}

header .logo:hover {
    opacity: 0.9;
}

/* Hamburger Menü-Button (Standardmäßig versteckt) */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

nav a {
    color: #e0e0e0;
    text-decoration: none;
    margin-left: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover, nav a.active {
    color: white;
    background-color: #004085;
}

/* Hauptbereich */
main {
    flex: 1;
    padding: 2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #007bff, #00c6ff);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; }

/* Buttons & Links */
.btn {
    display: inline-block;
    background-color: #ffc107;
    color: #212529;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    text-align: center;
}

.btn:hover { background-color: #e0a800; }

/* Karten & Grid Layouts */
.categories, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 1.5rem;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.card h3 { margin-bottom: 10px; color: #0056b3; }
.card p { margin-bottom: 15px; font-size: 0.95rem; }

/* Icons auf Startseite */
.category-card {
    text-align: center;
    padding: 30px 20px;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.category-card h3 {
    margin-top: 10px;
}

/* Produktkarten im Shop */
.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.product-image-wrapper {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.product-card p {
    color: #666;
    flex-grow: 1;
}

.product-card .price {
    font-size: 1.2rem;
    color: #0056b3;
    margin: 15px 0 10px 0;
}

.product-btn {
    width: 100%;
}

/* Login Formular */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-box {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h2 { margin-bottom: 20px; text-align: center; }

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Rechtliche Texte */
.legal-content p {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* Admin-Panel Tabellen & Form */
.admin-form-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.admin-table-wrapper {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background-color: #f4f7f9;
    color: #0056b3;
}

/* Footer */
footer {
    background-color: #212529;
    color: #aaa;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    margin-top: auto;
}

footer a { color: #fff; text-decoration: none; }


/* ==========================================================================
   HANDY-ANSICHT (RESPONSIVE DESIGN) VIA MEDIA QUERIES
   ========================================================================== */

@media (max-width: 768px) {
    /* Header & Navigation für Mobilgeräte */
    header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem;
    }

    .menu-toggle {
        display: block; /* Hamburger Button auf Handy anzeigen */
    }

    nav {
        display: none; /* Menü standardmäßig auf Handy ausblenden */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #0056b3;
        padding: 10px 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    /* Wenn das Menü aktiv geschaltet wird */
    nav.show {
        display: flex;
    }

    nav a {
        margin: 8px 20px;
        padding: 10px;
        text-align: center;
    }

    /* Hero Text verkleinern */
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    /* Grids zwingen, einspaltig zu werden */
    .categories, .products-grid {
        grid-template-columns: 1fr;
    }

    /* Admin-Tabelle für kleine Bildschirme optimieren */
    .admin-table th:nth-child(1), .admin-table td:nth-child(1) {
        display: none; /* Versteckt die Bildvorschau auf dem Handy für mehr Platz */
    }
    
    .admin-table th, .admin-table td {
        padding: 8px;
        font-size: 0.85rem;
    }
}
