/* =====================================
   GLASS MORPHISM HEADER - UNIFIED DESIGN
   Marleo-Handarbeit
   ===================================== */

:root {
    --primary-pink: #ff66b2;
    --primary-blue: #3399ff;
    --light-pink: #ffe6f3;
    --gradient-primary: linear-gradient(135deg, #ff66b2 0%, #764ba2 50%, #3399ff 100%);
    --gradient-reverse: linear-gradient(135deg, #3399ff 0%, #764ba2 50%, #ff66b2 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-light: 0 8px 32px rgba(255, 102, 178, 0.15);
    --shadow-medium: 0 12px 40px rgba(51, 153, 255, 0.2);

    /* Einheitliche Schriftart für den gesamten Header */
    --font-primary: 'Poppins', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* =====================================
   ANIMATED BACKGROUND GRADIENT
   ===================================== */

body {
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        rgba(255, 102, 178, 0.03) 0%,
        rgba(118, 75, 162, 0.03) 25%,
        rgba(51, 153, 255, 0.03) 50%,
        rgba(118, 75, 162, 0.03) 75%,
        rgba(255, 102, 178, 0.03) 100%
    );
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-5%, 5%) rotate(120deg); }
    66% { transform: translate(5%, -5%) rotate(240deg); }
}

/* =====================================
   GLASS MORPHISM HEADER
   ===================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--glass-border);
    box-shadow:
        var(--shadow-light),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Header Scroll Effect */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-medium);
}

/* =====================================
   NAVIGATION CONTAINER
   ===================================== */

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    position: relative;
}

/* =====================================
   LOGO WITH GRADIENT ANIMATION
   ===================================== */

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 4s ease infinite;
    transition: all 0.3s ease;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    font-family: var(--font-primary);
}

.logo a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.logo a:hover::after {
    width: 100%;
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* =====================================
   NAVIGATION MENU
   ===================================== */

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    font-family: var(--font-primary);
}

/* Glass Background Effect */
.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 50px;
}

/* Shimmer Effect on Hover */
.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
}

.nav-link:hover::after {
    left: 100%;
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 102, 178, 0.3);
}

/* =====================================
   HEADER ACTIONS (ICONS)
   ===================================== */

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.account-btn,
.account-icon,
.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #2d3748;
    text-decoration: none;
    font-family: var(--font-primary);
}

.account-btn:hover,
.account-icon:hover,
.cart-icon:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 102, 178, 0.4);
    border-color: transparent;
}

.account-btn .account-icon {
    font-size: 1.1rem;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.account-btn .account-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.account-icon span,
.cart-icon span:not(.cart-count) {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    box-shadow: 0 2px 8px rgba(255, 102, 178, 0.4);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* =====================================
   MOBILE MENU TOGGLE
   ===================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    z-index: 101;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 102, 178, 0.1);
    border-color: var(--primary-pink);
    transform: scale(1.05);
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
    animation: shimmer 3s linear infinite;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* =====================================
   DESKTOP ENHANCEMENTS
   ===================================== */

@media (min-width: 769px) {
    /* Desktop Navigation mit extra Effekten */
    .nav-menu {
        position: relative;
    }

    .nav-menu::before {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 100%;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--primary-pink), var(--primary-blue), transparent);
        opacity: 0;
        transition: opacity 0.3s;
    }

    .nav-menu:hover::before {
        opacity: 0.3;
    }

    /* Größere Icons auf Desktop */
    .account-icon,
    .cart-icon {
        padding: 0.6rem 1.2rem;
    }

    /* Desktop: Smooth mega-menu hover effect (für zukünftige Erweiterung) */
    .nav-link {
        position: relative;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: var(--gradient-primary);
        transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 80%;
    }

    /* Header Shadow Depth bei Scroll */
    .header.scrolled {
        box-shadow:
            0 10px 40px rgba(255, 102, 178, 0.15),
            0 5px 15px rgba(51, 153, 255, 0.1);
    }

    /* Particle Effect on Hover (optional) */
    .logo a:hover {
        filter: drop-shadow(0 0 10px rgba(255, 102, 178, 0.5));
    }
}

/* Extra Large Desktop (>1400px) */
@media (min-width: 1400px) {
    .nav-container {
        max-width: 1600px;
        padding: 1.2rem 3rem;
    }

    .logo a {
        font-size: 2rem;
    }

    .nav-link {
        padding: 0.85rem 1.8rem;
        font-size: 1.05rem;
    }
}

/* =====================================
   MOBILE RESPONSIVE
   ===================================== */

@media (max-width: 768px) {
    .header {
        overflow-x: hidden; /* Verhindert horizontales Überlaufen */
    }

    .nav-container {
        padding: 0.75rem 0.75rem;
        position: relative;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow: visible;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0;
    }

    /* NEUE REIHENFOLGE: Button - Logo - Icons */
    .mobile-menu-toggle {
        order: 1; /* Links */
    }

    .logo {
        order: 2; /* In der Mitte */
        flex-shrink: 0;
        flex: 1 1 auto;
        text-align: center;
    }

    .logo a {
        font-size: 1.2rem;
    }

    .nav-menu {
        order: 99; /* Ganz nach unten (versteckt) */
    }

    .header-actions {
        order: 3; /* Rechts */
    }

    /* FORCE HIDE menu by default on mobile */
    .nav-menu {
        display: none !important;
        position: fixed;
        top: 75px;
        left: 0;
        width: 100%;
        height: calc(100vh - 75px);
        flex-direction: column;
        padding: 2rem;
        gap: 0.5rem;
        z-index: 100;
        overflow-y: auto;

        /* Glass Morphism für Mobile Menu */
        backdrop-filter: blur(25px) saturate(180%);
        -webkit-backdrop-filter: blur(25px) saturate(180%);
        background: rgba(255, 255, 255, 0.95);
        border-top: 2px solid transparent;
        border-image: var(--gradient-primary);
        border-image-slice: 1;
        box-shadow: 0 -5px 30px rgba(255, 102, 178, 0.2);

        animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* FORCE SHOW menu when .active class is present */
    .nav-menu.active {
        display: flex !important;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        margin-bottom: 0.5rem;
    }

    .nav-link:hover,
    .nav-link.active {
        background: var(--gradient-primary);
        color: white;
        transform: scale(1.02);
        border-color: transparent;
    }

    /* Hamburger Button - LINKS */
    .mobile-menu-toggle {
        display: flex !important;
        flex-shrink: 0;
        order: 1;
        margin-right: 0.5rem;
    }

    /* Header Actions - RECHTS */
    .header-actions {
        display: flex;
        gap: 0.75rem;
        flex-shrink: 0;
        order: 3;
        margin-left: 0.5rem;
    }

    .account-btn,
    .account-icon,
    .cart-icon {
        padding: 0.5rem;
        font-size: 1.3rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .account-btn .account-text,
    .account-icon span {
        display: none; /* Text verstecken, nur Icon zeigen */
    }

    .account-btn .account-icon {
        font-size: 1.3rem;
    }

    /* Warenkorb-Badge */
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

/* =====================================
   FLOATING GLASS DECORATIONS
   ===================================== */

.glass-decoration {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.glass-decoration:nth-child(1) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 102, 178, 0.4) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.glass-decoration:nth-child(2) {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(51, 153, 255, 0.4) 0%, transparent 70%);
    bottom: -250px;
    left: -250px;
    animation-delay: -10s;
}

.glass-decoration:nth-child(3) {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.4) 0%, transparent 70%);
    top: 50%;
    right: 10%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    33% {
        transform: translate(30px, -30px) rotate(120deg) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg) scale(0.9);
    }
}

/* =====================================
   SCROLL TO TOP BUTTON (Bonus)
   ===================================== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 102, 178, 0.4);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 102, 178, 0.6);
}

/* =====================================
   SPECIAL BUTTONS (Admin, etc.)
   ===================================== */

/* Admin Dashboard Button & Similar CTA Buttons */
a[href*="admin"],
a[href*="dashboard"],
.cta-button,
.primary-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    background: var(--gradient-primary);
    background-size: 200% 100%;
    color: white !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 8px 25px rgba(255, 102, 178, 0.4),
        0 3px 10px rgba(51, 153, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    font-family: var(--font-primary);
}

/* Shine Animation */
a[href*="admin"]::before,
a[href*="dashboard"]::before,
.cta-button::before,
.primary-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
    z-index: 1;
    pointer-events: none;
}

a[href*="admin"]:hover::before,
a[href*="dashboard"]:hover::before,
.cta-button:hover::before,
.primary-action-btn:hover::before {
    left: 100%;
}

a[href*="admin"]:hover,
a[href*="dashboard"]:hover,
.cta-button:hover,
.primary-action-btn:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 178, 0.5);
}

a[href*="admin"]:active,
a[href*="dashboard"]:active,
.cta-button:active,
.primary-action-btn:active {
    transform: translateY(-2px) scale(1.02);
}

/* Icon inside button */
a[href*="admin"] span:first-child,
a[href*="dashboard"] span:first-child,
.cta-button span:first-child,
.primary-action-btn span:first-child {
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}
