/* ------------------------------------------------------------------
   Mega-menu redesign + header icon fixes (2026-07-09)
   Uses fully custom classes (.mega-*) so we don't collide with
   Bootstrap's .row/.col-* or admin-set decorative CMS classes.
------------------------------------------------------------------ */

/* ============ HEADER ICON SIZING ============ */
.cart-header-design > a > img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
}
.cart-header-design .login-btn-user svg {
    width: 24px !important;
    height: 24px !important;
    color: #fff;
}
.cart-header-design .cart-header p.quantity {
    font-size: 11px !important;
    line-height: 1 !important;
    min-width: 16px;
    height: 16px;
    padding: 2px 4px !important;
}

/* ============ MEGA-MENU PANEL ============ */
.mega-menu-panel {
    display: block;
    padding: 22px 26px !important;
    border-top: 3px solid #f5a623;
    box-shadow: 0 18px 44px rgba(20, 30, 60, .22);
    border-radius: 0 0 8px 8px;
    background: #fff;
    max-width: min(96vw, 1180px);
    box-sizing: border-box;
}
.mega-menu-panel.mega-groups-2 { width: 560px; }
.mega-menu-panel.mega-groups-3 { width: 820px; }
.mega-menu-panel.mega-groups-4 { width: 1060px; }

/* Hide any legacy decorative <img> that the CMS attached to menu items —
   these were floating outside the panel on the left with the new layout. */
.mega-menu-panel img,
.mega-menu-panel .mega-col-head img,
.mega-menu-panel .mega-link img,
.mega-menu-panel .mega-leaf-link img {
    display: none !important;
}

/* Flex row for columns. Explicit flex instead of Bootstrap .row to avoid
   fighting Bootstrap margins/padding. */
.mega-row {
    display: flex !important;
    flex-wrap: wrap;
    margin: 0 -8px !important;
}
.mega-row > .mega-group,
.mega-row > .mega-leaf {
    padding: 0 12px !important;
    box-sizing: border-box;
    margin-bottom: 8px;
}

/* Width per group count (mirrors Bootstrap grid widths but scoped to us) */
.mega-groups-2 .mega-row > .mega-group { flex: 0 0 50%; max-width: 50%; }
.mega-groups-3 .mega-row > .mega-group { flex: 0 0 33.333%; max-width: 33.333%; }
.mega-groups-4 .mega-row > .mega-group { flex: 0 0 25%; max-width: 25%; }

/* Leaf items always full-width (they get their own row) */
.mega-row > .mega-leaf {
    flex: 0 0 100%;
    max-width: 100%;
}

.mega-leaf-link {
    display: block;
    padding: 10px 12px;
    color: #1f2c50 !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none !important;
    border-radius: 6px;
    background: transparent;
}
.mega-leaf-link:hover {
    background: #fff6e8;
    color: #1f2c50 !important;
    text-decoration: none !important;
}

/* Column heading */
.mega-menu-panel p.mega-col-head,
.mega-col-head {
    font-size: 11px !important;
    letter-spacing: 1.3px !important;
    text-transform: uppercase !important;
    color: #f5a623 !important;
    font-weight: 700 !important;
    padding: 2px 10px 9px !important;
    border-bottom: 1px solid #ececec !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
}

/* Links list inside a column */
.mega-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mega-links li {
    display: block;
    margin: 0;
}
.mega-link {
    display: block !important;
    padding: 7px 10px !important;
    border-radius: 6px;
    line-height: 1.3;
    color: #2b2b2b !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    white-space: normal !important;
    transition: background .14s, color .14s;
}
.mega-link:hover {
    background: #fff6e8 !important;
    color: #1f2c50 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

/* Full-width promoted CTA button (e.g. "Shop All Products") */
.mega-menu-panel .mega-cta-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 16px !important;
    padding: 12px 14px !important;
    background: #f5a623 !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    border-radius: 7px !important;
    transition: background .18s ease;
}
.mega-menu-panel .mega-cta-button:hover {
    background: #e0951a !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Ensure the mega-menu-panel is positioned relative to its nav item,
   not a distant ancestor. This is what makes left: 0 (Bootstrap default)
   line up under the hovered nav link. */
li.nav-item.dropdown {
    position: relative;
}

/* ============ MOBILE ============ */
.mobile-mega-cta {
    display: block;
    margin: 14px 20px;
    padding: 12px;
    background: #f5a623;
    color: #fff !important;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 14.5px;
}
.mobile-mega-cta:hover,
.mobile-mega-cta:active {
    background: #e0951a;
    color: #fff !important;
}
.mobile-mega-group-head {
    color: #f5a623 !important;
    font-size: 11px !important;
    letter-spacing: 1.2px !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
}

/* Below 992px (Bootstrap lg breakpoint) — stack all columns */
@media (max-width: 991px) {
    .mega-menu-panel,
    .mega-menu-panel.mega-groups-2,
    .mega-menu-panel.mega-groups-3,
    .mega-menu-panel.mega-groups-4 {
        width: 100%;
        max-width: 100%;
    }
    .mega-groups-2 .mega-row > .mega-group,
    .mega-groups-3 .mega-row > .mega-group,
    .mega-groups-4 .mega-row > .mega-group {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
