/* ==========================================
   GENIENT PRODUCT MEGA MENU
========================================== */

.mega-menu-item {
    position: static !important;
}

.mega-menu-item>.nav-link {
    align-items: center;
    display: inline-flex;
    gap: 6px;
}

.mega-menu-wrapper {
    --mega-purple: var(--secondary-color, #760980);
    --mega-orange: var(--primary-color, #EF410E);
    --mega-soft: var(--bg-color, #F5F1F5);
    --mega-text: var(--text-color, #444);
    --mega-ink: var(--black, #2c2b2b);
    animation: megaFade .22s ease;
    background: #fff;
    border: 0 !important;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 24px 54px rgba(44, 43, 43, .14);
    left: 50% !important;
    margin-top: 0 !important;
    max-height: calc(100vh - 112px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 !important;
    top: 100% !important;
    transform: translateX(-50%);
    width: min(1120px, calc(100vw - 48px)) !important;
}

.mega-menu-wrapper::before {
    background: var(--gradient-left-to-right, linear-gradient(86deg, #76097F 22.66%, #EF410F 100%));
    content: "";
    display: block;
    height: 4px;
}

@keyframes megaFade {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mega-menu-wrapper>.container {
    max-width: none;
    padding: 0 22px 22px;
}

.mega-top-strip {
    align-items: center;
    background: linear-gradient(86deg, #76097F 0%, #EF410F 100%);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 18px 22px;
}

.mega-top-strip h4 {
    color: #fff;
    font-family: var(--font-weight-700);
    font-size: 20px;
    line-height: 1.2;
    margin: 0 0 4px;
}

.mega-top-strip p {
    color: rgba(255, 255, 255, .84) !important;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.mega-search {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 4px;
    color: var(--mega-ink);
    font-family: var(--font-weight-400);
    font-size: 14px;
    min-width: 260px;
    outline: none;
    padding: 11px 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.mega-search:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .26);
}

.mega-layout {
    display: grid;
    gap: 18px;
    grid-template-columns: 285px minmax(0, 1fr);
    padding-top: 20px;
}

.featured-products {
    background: var(--mega-soft);
    border: 1px solid rgba(118, 9, 128, .12);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.featured-card {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(118, 9, 128, .12);
    border-radius: 8px;
    color: var(--mega-ink);
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 70px;
    min-height: 96px;
    padding: 14px;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.featured-card:first-child {
    background: var(--gradient-top-to-bottom, linear-gradient(180deg, #760980 0%, #E83E16 100%));
    border-color: transparent;
    color: #fff;
}

.featured-card:hover {
    border-color: rgba(239, 65, 14, .34);
    box-shadow: 0 12px 24px rgba(118, 9, 128, .12);
    transform: translateY(-2px);
}

.featured-card img {
    background: rgba(255, 255, 255, .85);
    border-radius: 6px;
    height: 62px;
    justify-self: end;
    object-fit: contain;
    padding: 6px;
    width: 70px;
}

.featured-card strong {
    color: inherit;
    display: block;
    font-family: var(--font-weight-700);
    font-size: 14px;
    line-height: 1.25;
}

.featured-card em {
    color: currentColor;
    display: block;
    font-size: 12px;
    font-style: normal;
    line-height: 1.35;
    margin-top: 4px;
    opacity: .76;
}

.featured-label {
    color: var(--mega-orange);
    display: block;
    font-family: var(--font-weight-600);
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.featured-card:first-child .featured-label {
    color: rgba(255, 255, 255, .82);
}

#megaMenuContainer {
    align-content: start;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mega-column {
    background: #fff;
    border: 1px solid #f0e6f2;
    border-radius: 8px;
    min-width: 0;
    padding: 15px;
}

.mega-column h6 {
    align-items: flex-start;
    color: var(--mega-purple);
    display: flex;
    font-family: var(--font-weight-700);
    font-size: 13px;
    gap: 8px;
    line-height: 1.35;
    margin: 0 0 12px;
}

.mega-title-icon {
    align-items: center;
    background: rgba(239, 65, 14, .1);
    border-radius: 6px;
    color: var(--mega-orange);
    display: inline-flex;
    flex: 0 0 27px;
    height: 27px;
    justify-content: center;
    margin-top: -4px;
    width: 27px;
}

.mega-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-column li {
    margin: 0;
}

.mega-column a {
    align-items: flex-start;
    color: var(--mega-text);
    display: flex;
    font-size: 12px;
    gap: 8px;
    line-height: 1.35;
    padding: 5px 0;
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.mega-column a::before {
    background: var(--mega-orange);
    border-radius: 50%;
    content: "";
    flex: 0 0 5px;
    height: 5px;
    margin-top: 6px;
    opacity: .55;
    width: 5px;
}

.mega-column a:hover,
.mega-column a:focus {
    color: var(--mega-orange);
    transform: translateX(3px);
}

.mega-footer {
    border-top: 1px solid #f0e6f2;
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding: 16px 22px 0;
}

.mega-footer a {
    align-items: center;
    background: var(--mega-purple);
    border-radius: 4px;
    color: #fff;
    display: inline-flex;
    font-family: var(--font-weight-600);
    font-size: 14px;
    gap: 9px;
    line-height: 1;
    padding: 13px 16px;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.mega-footer a:hover,
.mega-footer a:focus {
    background: var(--mega-orange);
    color: #fff;
    transform: translateY(-1px);
}

.mega-empty-state {
    align-items: center;
    border: 1px dashed rgba(118, 9, 128, .28);
    border-radius: 8px;
    color: var(--mega-text);
    display: none;
    font-size: 14px;
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 96px;
    padding: 20px;
    text-align: center;
}

.mega-empty-state.is-visible {
    display: flex;
}

.product-mobile-menu {
    max-height: 70vh;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .mega-menu-item:hover .dropdown-menu.mega-menu-wrapper {
        display: block;
    }

    .product-mobile-menu {
        display: none !important;
    }
}

@media (max-width: 1199.98px) {
    .mega-menu-wrapper {
        width: min(960px, calc(100vw - 28px)) !important;
    }

    .mega-layout {
        grid-template-columns: 250px minmax(0, 1fr);
    }

    #megaMenuContainer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .mega-menu-item {
        position: relative !important;
    }

    .mega-menu-wrapper {
        display: none !important;
    }

    .product-mobile-menu {
        display: none;
    }

    .product-mobile-menu.show {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        display: block !important;
        float: none;
        margin: 8px 0 0 !important;
        max-height: calc(100vh - 178px);
        max-width: 100% !important;
        overflow-y: auto;
        padding: 0 !important;
        position: static !important;
        transform: none !important;
        width: 100%;
    }

    .product-mobile-menu li {
        width: 100%;
    }

    .mobile-product-group {
        background: #fff;
        border: 1px solid rgba(118, 9, 128, .14);
        border-radius: 8px;
        margin-bottom: 8px;
        overflow: hidden;
    }

    .mobile-category-toggle {
        align-items: center;
        background: #fff;
        border: 0;
        color: var(--mega-purple);
        display: flex;
        font-family: var(--font-weight-600);
        font-size: 14px;
        gap: 10px;
        justify-content: space-between;
        line-height: 1.3;
        padding: 12px 13px;
        text-align: left;
        width: 100%;
    }

    .mobile-category-toggle span {
        align-items: center;
        display: flex;
        gap: 9px;
        min-width: 0;
    }

    .mobile-category-toggle .fa-chevron-down {
        color: var(--mega-orange);
        flex: 0 0 auto;
        font-size: 12px;
        transition: transform .2s ease;
    }

    .mobile-category-toggle:hover,
    .mobile-category-toggle:focus {
        background: var(--mega-soft);
        outline: none;
    }

    .mobile-product-list {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0 12px 10px 39px;
    }

    .mobile-product-group.is-open .mobile-product-list {
        display: block;
    }

    .mobile-product-group.is-open .fa-chevron-down {
        transform: rotate(180deg);
    }

    .mobile-product-list a.dropdown-item {
        color: var(--mega-text);
        font-size: 13px;
        line-height: 1.35;
        margin: 0;
        padding: 7px 0;
        white-space: normal;
    }

    .mobile-product-list a.dropdown-item:hover,
    .mobile-product-list a.dropdown-item:focus {
        background: transparent;
        color: var(--mega-orange);
    }
}

@media (max-width: 575.98px) {
    .product-mobile-menu.show {
        max-height: calc(100vh - 155px);
    }
}
