/* Mega Menu Style (matches screenshot) */

.mega-nav {
    /* background: #fff; */
    /* border-bottom: 1px solid #ececec; */
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.03); */
    position: relative;
    z-index: 1002;
}
.mega-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0;
    position: relative;
}
.mega-category-row {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.mega-category-item {
    font-size: 1rem;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    padding: 1.25rem 0 1rem 0;
    background: none;
    border: none;
    outline: none;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
    border-bottom: 2px solid transparent;
}
.mega-category-item.active,
.mega-category-item:hover {
    color: var(--highlight_color);
    /* border-bottom: 2px solid var(--highlight_color); */
    /* background: #fafaff; */
}

.mega-more-dropdown {
    display: none !important;
}
.mega-more-btn {
    display: none !important;
    background: none;
    border: none;
    color: #4f4f6e;
    font-size: 1rem;
    font-weight: 500;
    padding: 1.25rem 0 1rem 0;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    transition: color 0.2s;
}
.mega-more-btn.active,
.mega-more-btn:hover {
    color: var(--highlight_color);
}
.mega-more-list {
    display: none;
}

.mega-more-dropdown.open .mega-more-list {
    display: block;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #ececec;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-radius: 6px;
    margin-top: 0.5rem;
    z-index: 1003;
    list-style: none;
    padding: 0.5rem 0;
}

body.js-initialized.mega-style-active .mega-more-dropdown.show-more {
    display: block !important;
}
.mega-more-list li {
    padding: 0.5rem 1.25rem;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.mega-more-list li:hover {
    background: #f5f6fa;
    color: var(--highlight_color);
}

.mega-menu-overlay-bg {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.12);
    z-index: 1000;
}
.mega-menu-overlay-bg.active {
    display: block;
}

.mega-menu-dropdown {
    display: none !important;
}
.mega-menu-dropdown.active {
    display: block !important;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    z-index: 1001;
    padding: 2.5rem 0 2.5rem 0;
    min-height: 260px;
}
.mega-menu-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.mega-menu-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.mega-menu-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--highlight_color);
    margin-bottom: 0.25rem;
}
.mega-menu-desc {
    color: #444;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.mega-menu-view-link {
    color: var(--highlight_color);
    font-weight: 500;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s;
}
.mega-menu-view-link:hover {
    color: var(--primary_color);
    text-decoration: underline;
}
.mega-subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem .5rem;
    margin-top: 2rem;
}
.mega-subcategory-item {
    color: #444;
    font-size: 1.08rem;
    padding: 0.5rem;
    text-align: left;
    transition: color 0.2s;
    cursor: pointer;
    border: 1px solid var(--primary_color);
    text-transform: uppercase;
}
.mega-subcategory-item:hover {
    color: var(--highlight_color);
    text-decoration: underline;
}

@media (max-width: 900px) {
    .mega-menu-content {
        padding: 0 1rem;
    }
    .mega-subcategory-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .mega-menu-content {
        padding: 0 0.5rem;
    }
    .mega-subcategory-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide mega menu by default in other styles */
.mega-nav,
.mega-menu-dropdown {
    display: none !important;
}

/* Hide product dropdown by default to prevent FOUC */
.product-dropdown {
    display: none !important;
}

body.mega-style-active .mega-nav,
body.mega-style-active .mega-menu-dropdown {
    display: block !important;
}

body.mega-style-active .product-nav,
body.mega-style-active .product-dropdown,
body.mega-style-active .desktop-menu-overlay,
body.mega-style-active .desktop-menu-container {
    display: none !important;
}

/* Show product dropdown only when dropdown style is active AND JS is initialized */
body.js-initialized:not(.mega-style-active):not(.grid-style-active):not(.cascade-style-active):not(.slide-style-active):not(.drilldown-dropdown-style-active) .product-dropdown {
    display: block !important;
}

@media (min-width: 769px) {
  .mobile-menu-overlay {
    display: none !important;
  }
}

@media (max-width: 768px) {
    body.mega-style-active .mega-menu-dropdown,
    body.mega-style-active .mega-nav {
    display: none !important;
  }
  body.mega-style-active .product-nav {
    display: block !important;
  }
}
@media (min-width: 769px) {
  body.mega-style-active .product-nav {
    display: none !important;
  }
}

/* Show Mega More button only when mega style is active */
body.mega-style-active .mega-more-btn {
    display: inline-block !important;
}

/* Show mega menu only when JS is initialized */
.js-initialized .mega-nav {
    display: block !important;
} 