/* shop/public/css/header.css */
/* ===========================
   HEADER – Grundlayout
   =========================== */

.shop-header {
    width: 100%;
    background: linear-gradient(to right, #7e7f80, #e3e3e4);
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* ===========================
   ZEILE 1 – Logos
   =========================== */

.header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 20px;
}

.partner-logo img {
    max-height: 40px;
    opacity: 0.85;
}

.partner-logo.left {
    justify-self: start;
}

.partner-logo.right {
    justify-self: end;
}

.logo img {
    max-height: 70px;
    display: block;
    margin: 0 auto;
}

/* ===========================
   ZEILE 2 – Menü zentriert + Warenkorb rechts
   =========================== */

.header-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: linear-gradient(to right, #7e7f80, #e3e3e4);
    color: #000000;
    position: relative;
}

nav {
    width: 100%;
}

/* Hauptcontainer */
.nav-links {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Drei Zonen */
.nav-left,
.nav-right {
    width: 25%;
    /* links und rechts gleich breit → Mitte bleibt exakt mittig */
    display: flex;
    align-items: center;
}

.nav-center {
    width: 50%;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

/* Warenkorb rechts */
.nav-right {
    justify-content: flex-end;
}

/* Links */
.nav-links a {
    text-decoration: none;
    color: #000000;
    font-weight: 500;
}

.nav-links a:hover {
    color: #f0c040;
}

/* ===========================
   AKTIVE SEITE MARKIEREN
   =========================== */

.nav-links li.active>a {
    color: #f0c040;
    /* z. B. gelb */
    font-weight: 700;
    text-decoration: underline;
}

/* Toggle rechts */
.menu-toggle {
    position: absolute;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #fff;
    display: none;
}

/* =========================
   User Dropdown
   ========================= */
.user-nav {
    position: relative;
}

.user-nav-trigger {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
}

.user-nav-trigger:hover {
    opacity: 0.8;
}

/* Dropdown – standardmäßig versteckt */
.user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.13);
    list-style: none;
    margin: 0;
    padding: 0.4rem 0;
    z-index: 1000;
    /* Kleine Lücke zwischen Button und Dropdown überbrücken */
    margin-top: 0;
}

/* Unsichtbare Brücke damit Maus zwischen Button und Dropdown
   nicht das Dropdown schließt */
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

.user-nav.open .user-nav:hover .user-dropdown,
.user-nav:focus-within .user-dropdown {
    display: block;
}

.user-dropdown li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.12s;
}

.user-dropdown li a:hover {
    background: #f5f5f5;
}

.user-dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 0.3rem 0;
    pointer-events: none;
}

.user-dropdown-logout {
    color: #c0392b !important;
}

.user-dropdown-logout:hover {
    background: #fdf0ef !important;
}

/* ===========================
   MOBILE
   =========================== */

@media (max-width: 768px) {

    .header-bottom {
        flex-wrap: wrap;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        width: 100%;
    }

    .nav-links {
        flex-direction: column;
        background: #333;
        padding: 1rem;
        border-radius: 8px;
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-left,
    .nav-center,
    .nav-right {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links li.active>a {
        color: #f0c040;
        /* Mobile ebenfalls markieren */
        font-weight: 700;
        text-decoration: underline;
    }
}