/* =========================================
   1. MAIN HEADER (Grid Layout for Dead-Centering)
   ========================================= */
.site-header {
    top: 0;
    z-index: 50;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    min-height: 5rem;
    box-sizing: border-box;
}

/* =========================================
   2. LOGO (Locked to the Left)
   ========================================= */
.header-left {
    grid-column: 1;
    display: flex;
    justify-content: flex-start;
}

.header-left .site-logo {
    display: block;
}

.header-left .site-logo svg {
    width: 14rem;
    height: auto;
    padding: 2rem 0;
    fill: #16a34a;
}

/* =========================================
   3. NAVIGATION (Locked to the Center)
   ========================================= */
.header-center {
    grid-column: 2;
    display: flex;
    justify-content: center;
    position: relative;
}

.primary-nav {
    background-color: #16a34a;
    border-radius: 9999px;
    padding: 1rem 3rem;
    position: relative;
}

.primary-nav .nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
    position: relative;
}

.primary-nav .nav-list > li {
    position: relative;
}

.primary-nav .nav-list a {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    font-size: 1.1rem;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.primary-nav .nav-list a:hover {
    color: #ffffff;
}

/* WordPress Active Menu Item Class */
.primary-nav .nav-list li.current-menu-item a {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.catalog-mega-menu {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    width: min(1200px, 92vw);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding: 1.25rem;
    margin-top: 2rem;
    border-top: 15px solid transparent;
    background-clip: padding-box;
}

.catalog-menu-item:hover .catalog-mega-menu {
    display: block;
}

.catalog-mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    max-height: 70vh;
    overflow: auto;
}

.catalog-brand-group {
    border: 1px solid #eef2f7;
    border-radius: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
}

.catalog-brand-name {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.catalog-product-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.3rem;
}

.catalog-product-list a {
    color: #232323 !important;
    text-decoration: none !important;
    font-size: 0.8rem !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.catalog-product-list a:hover {
    color: #16a34a;
    text-decoration: underline;
}


/* =========================================
   4. RESPONSIVE (Tablets & Mobile)
   ========================================= */
@media (max-width: 1049px) {
    .site-header {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        min-height: auto;
        gap: 1rem;
    }

    .header-left {
        justify-content: center;
    }

    .header-center {
        width: 100%;
    }

    .primary-nav {
        width: 100%;
        padding: 0.75rem 1rem;
        display: flex;
        justify-content: center;
    }

    .primary-nav .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .catalog-mega-menu {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 1rem;
    }
}