/*
 Theme Name: PC Werkstatt NRW Child
 Template: Pc-Werkstatt-nrw
 Version: 1.0
*/

/* ===============================
   HEADER – GRUNDLAYOUT
   =============================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(3, 7, 18, 0.92);
    backdrop-filter: blur(12px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 16px 20px;
}

/* Logo links */

.site-header__left {
    display: flex;
    align-items: center;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-logo__img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.45));
}

/* Mitte: Navigation */

.site-header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Rechts: Icons & CTA */

.site-header__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.header-icon__symbol {
    font-size: 18px;
    line-height: 1;
}

.header-icon__label {
    font-size: 11px;
    margin-top: 2px;
    opacity: 0.8;
}

.header-cta {
    margin-left: 4px;
}

/* ===============================
   NAVIGATION – DESKTOP
   =============================== */

.main-menu,
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    display: inline-block;
    position: relative;
}

/* Hover-Unterstreichung */

.main-menu > li > a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8, #6366f1);
    opacity: 0;
    transform: scaleX(0.4);
    transform-origin: center;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.main-menu > li > a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Dropdown 1. Ebene (Shop) */

.main-menu li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(4, 10, 25, 0.98);
    padding: 8px 0;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.main-menu li ul li {
    position: relative;
}

.main-menu li ul li a {
    display: block;
    padding: 6px 16px;
    font-size: 13px;
}

/* Dropdown 2. Ebene (Hardware → CPUs) als Flyout nach rechts */

.main-menu li ul ul {
    top: 0;
    left: 100%;
    margin-left: 0; /* keine Lücke, damit Hover nicht abbricht */
}

/* Anzeigen bei Hover / Tastatur-Fokus */

.main-menu li:hover > ul,
.main-menu li:focus-within > ul {
    display: block;
}

/* ===============================
   MOBILE NAV (Grundzustand)
   =============================== */

.mobile-nav {
    display: none; /* wird erst unter 768px eingeblendet */
}

.mobile-menu,
.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Toggle-Buttons (kleiner Pfeil) */

.submenu-toggle {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translateY(-50%);
}

.submenu-toggle::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #e5e7eb;
    border-bottom: 2px solid #e5e7eb;
    transform: rotate(45deg);
    margin: 0 auto;
    transition: transform 0.2s ease;
}

/* wenn offen: Pfeil nach oben */

.menu-item-has-children.is-open > .submenu-toggle::before {
    transform: rotate(-135deg);
}

/* ===============================
   TABLET (bis 1024px)
   =============================== */

@media (max-width: 1024px) {
    .site-header__inner {
        gap: 20px;
        padding: 10px 12px;
    }

    .main-menu > li > a {
        font-size: 13px;
    }

    .header-cta {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ===============================
   HANDY (bis 768px)
   – Desktop-Menü ausblenden
   – Mobile-Menü in 2 Reihen
   =============================== */

@media (max-width: 768px) {

    .site-header__inner {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
        padding: 8px 10px;
    }

    .site-logo__img {
        height: 32px;
    }

    /* Reihenfolge im Header */
    .site-header__left {
        order: 1;
    }

    .site-header__right {
        order: 2;
        margin-left: auto;
        gap: 10px;
    }

    .site-header__nav {
        display: none; /* Desktop-Menü verstecken */
    }

    /* MOBILE NAV AKTIVIEREN */
    .mobile-nav {
        display: block;
        width: 100%;
        padding: 8px 8px 10px;
        background: rgba(3, 7, 18, 0.98);
        border-top: 1px solid rgba(148, 163, 184, 0.25);
        border-bottom: 1px solid rgba(15, 23, 42, 0.9);
    }

    .mobile-menu {
        max-width: 480px;
        margin: 0 auto;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 8px;
        column-gap: 16px;
    }

    .mobile-menu > li {
        flex: 0 1 calc(50% - 16px); /* zwei Spalten */
        position: relative;
        text-align: center;
    }

    .mobile-menu > li > a {
        display: inline-block;
        font-size: 16px;
        font-weight: 500;
        padding: 4px 2px;
        text-decoration: none;
        color: #ffffff;
    }

    .mobile-menu > li > a:hover {
        color: #60a5fa;
    }

    /* Untermenüs (Shop, Hardware, …) STANDARD: versteckt */

    .mobile-menu .submenu {
        display: none;
        width: 100%;
        text-align: left;
        margin-top: 4px;
    }

    .mobile-menu .submenu li {
        padding-left: 6px;
    }

    .mobile-menu .submenu li a {
        display: block;
        font-size: 14px;
        padding: 2px 0;
        color: #e5e7eb;
        text-decoration: none;
    }

    .mobile-menu .submenu li a:hover {
        color: #60a5fa;
    }

    /* 2. Ebene (Hardware → CPUs …) etwas weiter eingerückt */

    .mobile-menu .submenu .submenu {
        padding-left: 10px;
    }

    /* wenn .is-open auf dem LI: Untermenü anzeigen */

    .mobile-menu .menu-item-has-children.is-open > .submenu {
        display: block;
    }
}

/* ===============================
   SEHR KLEINE HANDYS (bis 480px)
   =============================== */

@media (max-width: 480px) {

    .mobile-menu {
        max-width: 393px;
        column-gap: 12px;
        row-gap: 6px;
    }

    .mobile-menu > li {
        flex: 0 1 calc(50% - 12px);
    }

    .mobile-menu > li > a {
        font-size: 15px;
    }
}
/* ========= MOBILE: Position der Untermenü-Toggles (Shop, Hardware, ...) ========= */
@media (max-width: 768px) {

    /* Jeder Menüpunkt mit Untermenü bekommt Platz rechts für das Icon */
    .main-menu li.menu-item-has-children {
        position: relative;
    }

    .main-menu li.menu-item-has-children > a {
        padding-right: 18px; /* Platz für das Rhombus-Icon */
    }

    /* Das kleine Rhombus-Icon (◇) direkt rechts neben den Text setzen */
    .main-menu li.menu-item-has-children > .mobile-sub-toggle {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 0.8rem;
        line-height: 1;
        cursor: pointer;
        display: inline-block;
    }
}
/* ===== WooCommerce: großes Kategorie-Bild ausblenden ===== */
.woocommerce-products-header img,
.woocommerce-products-header__image {
    display: none !important;
}
