/**
 * MINIMALISTISCHES MEGA MENU CSS - Elegantes Design mit Bildern
 * Ersetzen Sie den Inhalt von /assets/css/simple-mega-menu.css mit diesem Code
 */

/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

/* ALTE ULTRA STYLES ÜBERSCHREIBEN */
.uh-menu,
.uh-mega,
.uh-sub {
    display: none !important;
}

/* Header Container - Minimalistisch */
.shop-header {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    position: relative;
}

/* Logo Section - Elegant */
.logo-section {
    flex: 0 0 auto;
    max-width: 200px;
}

.site-logo {
    font-size: 24px;
    font-weight: 300;
    color: #2c2c2c;
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.site-logo:hover {
    color: #666;
}

.site-logo img {
    max-height: 35px;
    width: auto;
}

/* Navigation Section - Clean */
.nav-section {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* WordPress Menu Styles - Minimalistisch */
.nav-section .menu,
.nav-section ul {
    display: flex;
    gap: 45px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Hauptmenü Items - Dünner */
.nav-section .menu > li,
.nav-section ul > li {
    position: relative;
    margin: 0;
}

.nav-section .menu > li > a,
.nav-section ul > li > a {
    text-decoration: none;
    color: #2c2c2c;
    font-weight: 300;
    font-size: 15px;
    letter-spacing: 0.5px;
    padding: 25px 0;
    display: block;
    transition: all 0.3s ease;
    text-transform: uppercase;
    position: relative;
}

/* Schmale wachsende Linie oben */
.nav-section .menu > li > a::before,
.nav-section ul > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #2c2c2c;
    transition: width 0.3s ease;
}

.nav-section .menu > li > a:hover,
.nav-section ul > li > a:hover {
    color: #666;
}

.nav-section .menu > li > a:hover::before,
.nav-section ul > li > a:hover::before {
    width: 100%;
}

/* DESKTOP MEGA MENU - Minimalistisches Design mit Bildern */
@media screen and (min-width: 769px) {
    /* Mega Menu Dropdown - Mittig 80% Browserbreite */
    .nav-section .menu .sub-menu,
    .nav-section .sub-menu {
        position: fixed;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
        background: #ffffff;
        box-shadow: 0 5px 25px rgba(0,0,0,0.08);
        border: 1px solid #f5f5f5;
        border-radius: 0;
        padding: 0;
        
        /* 80% der Browserbreite */
        width: 80vw;
        max-width: 1200px;
        min-width: 800px;
        
        display: none;
        z-index: 1000;
        list-style: none;
        margin: 0;
        
        /* Flexbox für Spalten-Layout */
        flex-direction: row;
        justify-content: stretch;
        flex-wrap: nowrap;
        gap: 0;
        align-items: stretch;
    }

    /* Sub-Kategorien (2. Ebene) - Cleane Spalten mit Bildern */
    .nav-section .menu .sub-menu > li,
    .nav-section .sub-menu > li {
        margin: 0;
        flex: 1 1 0;
        position: relative;
        padding: 35px 30px;
        border-right: 1px solid #f8f8f8;
        min-height: 280px;
        display: block;
        
        /* Vertikales Layout für Inhalte */
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .nav-section .menu .sub-menu > li:last-child,
    .nav-section .sub-menu > li:last-child {
        border-right: none;
    }

    /* NEUE: Kategorie Bild Container */
    .nav-section .menu .sub-menu > li .category-image-container,
    .nav-section .sub-menu > li .category-image-container {
        width: 100%;
        height: 120px;
        margin-bottom: 20px;
        overflow: hidden;
        border-radius: 8px;
        position: relative;
        background: #f8f8f8;
        flex-shrink: 0;
    }

    .nav-section .menu .sub-menu > li .category-image,
    .nav-section .sub-menu > li .category-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .nav-section .menu .sub-menu > li:hover .category-image,
    .nav-section .sub-menu > li:hover .category-image {
        transform: scale(1.05);
    }

    /* Fallback für fehlende Bilder */
    .nav-section .menu .sub-menu > li .category-image-placeholder,
    .nav-section .sub-menu > li .category-image-placeholder {
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #999;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .nav-section .menu .sub-menu > li .category-image-placeholder::before,
    .nav-section .sub-menu > li .category-image-placeholder::before {
        content: '◊';
        font-size: 24px;
        opacity: 0.3;
    }

    /* Kategorie-Titel (2. Ebene) - Elegant */
    .nav-section .menu .sub-menu > li > a,
    .nav-section .sub-menu > li > a {
        text-decoration: none;
        color: #2c2c2c;
        font-weight: 400;
        font-size: 15px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        display: block;
        padding: 0 0 15px 0;
        border-bottom: 1px solid #f0f0f0;
        margin-bottom: 20px;
        transition: color 0.3s ease;
        flex-shrink: 0;
    }

    .nav-section .menu .sub-menu > li > a:hover,
    .nav-section .sub-menu > li > a:hover {
        color: #666;
    }

    /* Sub-Sub-Menü (3. Ebene) - Minimalistisch OHNE BILDER */
    .nav-section .menu .sub-menu .sub-menu,
    .nav-section .sub-menu .sub-menu {
        /* Zurücksetzen aller absolute/transform Werte */
        position: static !important;
        background: none !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        width: auto !important;
        min-width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        
        /* Immer sichtbar */
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        
        z-index: auto !important;
        
        /* Vertikales Layout */
        flex-direction: column !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        align-items: stretch !important;
        
        flex: 1 1 auto;
        list-style: none;
    }

    /* Sub-Sub-Menü Items (3. Ebene) - Clean OHNE BILD-CONTAINER */
    .nav-section .menu .sub-menu .sub-menu li,
    .nav-section .sub-menu .sub-menu li {
        margin: 0;
        padding: 0;
        width: 100%;
        flex: none;
        display: block;
        border-right: none;
        min-height: auto;
        border-radius: 0;
    }

    /* WICHTIG: Sub-Sub-Menü Items haben KEINE Bild-Container */
    .nav-section .menu .sub-menu .sub-menu li .category-image-container,
    .nav-section .sub-menu .sub-menu li .category-image-container {
        display: none !important;
    }

    .nav-section .menu .sub-menu .sub-menu li a,
    .nav-section .sub-menu .sub-menu li a {
        text-decoration: none;
        color: #666;
        font-weight: 300;
        font-size: 13px;
        letter-spacing: 0.3px;
        display: block;
        padding: 8px 0;
        margin: 0;
        border-radius: 0;
        transition: all 0.3s ease;
        border-bottom: none;
        background: none;
        text-transform: none;
    }

    .nav-section .menu .sub-menu .sub-menu li a:hover,
    .nav-section .sub-menu .sub-menu li a:hover {
        color: #2c2c2c;
        background: none;
        padding-left: 8px;
        transform: translateX(3px);
    }

    /* Zeige Mega Menu bei Hover */
    .nav-section .menu > li.menu-item-has-children:hover .sub-menu,
    .nav-section ul > li.menu-item-has-children:hover .sub-menu {
        display: flex !important;
        animation: fadeInUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* Icons Section - Mit Mask-Images */
.icons-section {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Icon Base Styles */
.header-icon,
.uh-icon {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    text-decoration: none;
    color: inherit;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-icon:hover,
.uh-icon:hover {
    transform: translateY(-1px);
    opacity: 0.7;
}

/* SVG Icons (Fallback) */
.header-icon svg {
    width: 22px;
    height: 22px;
    stroke: #2c2c2c;
    fill: none;
    stroke-width: 1.2;
}

/* Mask Image Icons */
.uh-ico {
    display: block;
    width: 22px;
    height: 22px;
    background-color: #2c2c2c;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    transition: background-color 0.3s ease;
}

.uh-icon:hover .uh-ico {
    background-color: #666;
}

/* Specific Icon Masks */
.uh-ico-search {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="%23000" d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79L20 21.5 21.5 20 15.5 14zM9.5 14C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
}

.uh-ico-cart {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="%23000" d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2S15.9 22 17 22s2-.9 2-2-.9-2-2-2zM7.16 14l.84-2h8l2.76-7H6.21l-.94-2H1v2h2l3.6 7.59L5.25 16c-.2.45-.25.94-.25 1.41C5 18.3 5.7 19 6.59 19H19v-2H6.42c-.14 0-.25-.11-.25-.25l.99-2.75z"/></svg>');
}

.uh-ico-heart {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="%23000" d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 6 4 4 6.5 4c1.74 0 3.41.81 4.5 2.09C12.09 4.81 13.76 4 15.5 4 18 4 20 6 20 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
}

.uh-ico-user {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="%23000" d="M12 12c2.7 0 5-2.3 5-5s-2.3-5-5-5-5 2.3-5 5 2.3 5 5 5zm0 2c-3.3 0-10 1.7-10 5v3h20v-3c0-3.3-6.7-5-10-5z"/></svg>');
}

/* Badge Styles */
.cart-badge,
.uh-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #2c2c2c;
    color: white;
    font-size: 10px;
    font-weight: 300;
    padding: 2px 5px;
    border-radius: 50%;
    min-width: 16px;
    text-align: center;
    line-height: 1.2;
}

/* Mobile Menu Toggle - Clean */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: opacity 0.3s ease;
}

.mobile-toggle:hover {
    opacity: 0.7;
}

.mobile-toggle svg {
    width: 22px;
    height: 22px;
    stroke: #2c2c2c;
    stroke-width: 1.2;
}

/* Animation für Dropdown - Elegant */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Search Overlay - Minimalistisch */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-box {
    background: transparent;
    padding: 40px;
    border-radius: 0;
    width: 90%;
    max-width: 600px;
    position: relative;
    text-align: center;
}

.search-input {
    width: 100%;
    padding: 20px 0;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 1px;
    outline: none;
    background: transparent;
    text-align: center;
    color: #2c2c2c;
}

.search-input::placeholder {
    color: #999;
    font-weight: 300;
}

.search-input:focus {
    border-bottom-color: #2c2c2c;
}

.search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2c2c2c;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.search-close:hover {
    opacity: 0.7;
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .shop-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .shop-header {
        top: 46px;
    }
}

/* MOBILE STYLES - Minimalistisches Design (UNVERÄNDERT) */
@media (max-width: 768px) {
    .header-container {
        padding: 20px;
        gap: 20px;
    }

    .mobile-toggle {
        display: block;
        order: -1;
        margin-right: 20px;
    }

    .nav-section {
        display: none;
    }

    .logo-section {
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    .icons-section {
        gap: 20px;
        flex-shrink: 0;
    }

    .site-logo {
        font-size: 20px;
        max-width: 150px;
    }

    /* MOBILE NAVIGATION - Clean Design (UNVERÄNDERT) */
    .mobile-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        background: #ffffff;
        z-index: 10001;
        transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        overflow-y: auto;
        padding-top: 0;
        box-shadow: 3px 0 20px rgba(0,0,0,0.1);
        display: none !important;
    }

    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(255,255,255,0.9);
        backdrop-filter: blur(5px);
        z-index: 10000;
        display: none !important;
    }

    /* Mobile Navigation Header - Clean */
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 25px 25px;
        border-bottom: 1px solid #f5f5f5;
        background: #ffffff;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .mobile-nav-logo {
        font-size: 18px;
        font-weight: 300;
        color: #2c2c2c;
        letter-spacing: 1px;
    }

    .mobile-nav-logo a {
        color: inherit;
        text-decoration: none;
    }

    .mobile-nav-close {
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        color: #2c2c2c;
        transition: opacity 0.3s ease;
    }

    .mobile-nav-close:hover {
        opacity: 0.7;
    }

    .mobile-nav-close svg {
        width: 18px;
        height: 18px;
        stroke: currentColor;
        stroke-width: 1.2;
    }

    /* Mobile Menu Items - Clean */
    .mobile-nav .menu,
    .mobile-nav ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: block;
        gap: 0;
    }

    .mobile-nav .menu > li,
    .mobile-nav ul > li {
        border-bottom: 1px solid #f8f8f8;
        position: relative;
        display: block;
    }

    .mobile-nav .menu > li:last-child {
        border-bottom: none;
    }

    /* Menu Item Row */
    .menu-item-row {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 55px;
    }

    /* Menu Item Links - Elegant */
    .mobile-nav .menu-item-link,
    .mobile-nav .menu > li > a,
    .mobile-nav ul > li > a {
        flex: 1;
        padding: 18px 25px;
        margin: 0;
        color: #2c2c2c;
        text-decoration: none;
        font-weight: 300;
        font-size: 15px;
        letter-spacing: 0.5px;
        line-height: 1.4;
        border: none;
        background: none;
        text-align: left;
        transition: all 0.3s ease;
        cursor: pointer;
        box-sizing: border-box;
        display: flex;
        align-items: center;
    }

    .mobile-nav .menu-item-link:hover,
    .mobile-nav .menu > li > a:hover,
    .mobile-nav ul > li > a:hover {
        color: #666;
        padding-left: 30px;
    }

    /* Submenu Toggle Buttons - Minimal */
    .submenu-toggle-btn {
        background: transparent;
        border: none;
        border-left: 1px solid #f5f5f5;
        padding: 18px 15px;
        cursor: pointer;
        color: #999;
        min-width: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .submenu-toggle-btn:hover {
        color: #666;
    }

    .submenu-toggle-btn.active {
        background: #f5f5f5;
        color: #2c2c2c;
    }

    /* Toggle Arrow - Clean */
    .toggle-arrow {
        font-size: 11px;
        display: inline-block;
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        line-height: 1;
        font-weight: 300;
    }

    .submenu-toggle-btn.active .toggle-arrow {
        transform: rotate(90deg);
    }

    /* Submenus - Clean */
    .mobile-nav .sub-menu {
        display: none;
        width: 100%;
        background: #fafafa;
        list-style: none;
        margin: 0;
        padding: 0;
        border-top: 1px solid #f5f5f5;
    }

    .mobile-nav .sub-menu.active {
        display: block;
        visibility: visible;
        opacity: 1;
    }

    .mobile-nav .sub-menu li {
        border-bottom: 1px solid #f0f0f0;
        display: block;
    }

    .mobile-nav .sub-menu li:last-child {
        border-bottom: none;
    }

    .mobile-nav .sub-menu a {
        display: block;
        width: 100%;
        padding: 15px 35px;
        margin: 0;
        color: #666;
        text-decoration: none;
        font-weight: 300;
        font-size: 14px;
        letter-spacing: 0.3px;
        line-height: 1.4;
        border: none;
        background: none;
        transition: all 0.3s ease;
        text-align: left;
        box-sizing: border-box;
        position: relative;
    }

    .mobile-nav .sub-menu a:hover {
        color: #2c2c2c;
        padding-left: 40px;
    }

    /* Mobile Icons Section - Clean */
    .mobile-icons-section {
        padding: 25px;
        border-top: 1px solid #f5f5f5;
        background: #fafafa;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .mobile-icon {
        display: flex;
        align-items: center;
        padding: 15px 20px;
        color: #2c2c2c;
        text-decoration: none;
        background: #ffffff;
        border: 1px solid #f0f0f0;
        border-radius: 0;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .mobile-icon:hover {
        color: #666;
        transform: none;
        border-color: #e0e0e0;
    }

    .mobile-icon svg {
        width: 18px;
        height: 18px;
        margin-right: 15px;
        stroke: currentColor;
        stroke-width: 1.2;
        flex-shrink: 0;
    }

    .mobile-icon span {
        font-size: 14px;
        font-weight: 300;
        letter-spacing: 0.3px;
    }

    /* Search Box Mobile */
    .search-box {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .search-input {
        font-size: 16px;
        padding: 15px 0;
    }
    
    /* Admin Bar Mobile */
    body.admin-bar .mobile-nav {
        padding-top: 0;
    }
}

/* Tablet Anpassungen */
@media (max-width: 1024px) and (min-width: 769px) {
    .header-container {
        padding: 20px 25px;
    }
    
    .nav-section .menu,
    .nav-section ul {
        gap: 35px;
    }
    
    /* Tablet: 85% Breite für bessere Nutzung */
    .nav-section .menu .sub-menu,
    .nav-section .sub-menu {
        width: 85vw;
        min-width: 600px;
        max-width: 900px;
    }
    
    .nav-section .menu .sub-menu > li,
    .nav-section .sub-menu > li {
        padding: 30px 25px;
        min-height: 250px;
    }
    
    .nav-section .menu .sub-menu > li .category-image-container,
    .nav-section .sub-menu > li .category-image-container {
        height: 100px;
        margin-bottom: 15px;
    }
    
    .icons-section {
        gap: 25px;
    }
}

/* Sehr große Bildschirme */
@media (min-width: 1400px) {
    .nav-section .menu .sub-menu,
    .nav-section .sub-menu {
        width: 75vw; /* Etwas schmaler auf sehr großen Bildschirmen */
        max-width: 1400px;
    }
}

/* Hide default WordPress submenu indicators */
.nav-section .menu .menu-item-has-children > a::after,
.nav-section ul .menu-item-has-children > a::after {
    display: none;
}

/* Utility Classes */
.no-scroll {
    overflow: hidden;
}

/* Accessibility - Clean Focus States */
.header-icon:focus,
.mobile-toggle:focus,
.search-close:focus,
.mobile-nav-close:focus {
    outline: 1px solid #e0e0e0;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .shop-header {
        position: static;
        box-shadow: none;
        border-bottom: 1px solid #000;
    }
    
    .nav-section .menu .sub-menu,
    .nav-section .sub-menu,
    .mobile-nav,
    .search-overlay {
        display: none !important;
    }
}