/* ==========================================================
   AANYA ORGANICS
   ENTERPRISE MEGA MENU
========================================================== */

.mega-menu{

    position:absolute;

    top:100%;

    left:50%;

    transform:translate(-50%,20px);

    width:min(1180px,calc(100vw - 32px));

    background:#fff;

    border-radius:24px;

    border:1px solid #ECEFEC;

    box-shadow:0 25px 70px rgba(15,30,20,.08);

    opacity:0;

    visibility:hidden;

    pointer-events:none;

    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s ease;

    overflow:hidden;

    z-index:9999;

}

/*----------------------------------------------------------
OPEN
----------------------------------------------------------*/

.main-menu>li:hover>.mega-menu,
.main-menu>li:focus-within>.mega-menu{

    opacity:1;

    visibility:visible;

    pointer-events:auto;

    transform:translate(-50%,0);

}

/*----------------------------------------------------------
HEADER (heading + description + right-aligned browse-all action)
----------------------------------------------------------*/

.mega-menu-header{

    display:flex;

    align-items:flex-start;

    justify-content:space-between;

    gap:24px;

    padding:28px 36px 0;

}

.mega-menu-heading h3{

    margin:0 0 4px;

    font-size:18px;

    font-weight:700;

    color:#243026;

}

.mega-menu-heading p{

    margin:0;

    max-width:480px;

    font-size:13px;

    color:#7B877B;

}

.mega-menu-browse-all{

    display:inline-flex;

    align-items:center;

    gap:6px;

    flex-shrink:0;

    margin-left:auto;

    padding-top:4px;

    color:var(--color-brand-primary);

    text-decoration:none;

    font-size:14px;

    font-weight:600;

    white-space:nowrap;

}

.mega-menu-browse-all svg{

    width:15px;

    height:15px;

}

.mega-menu-browse-all:hover{

    text-decoration:underline;

}

.mega-menu-browse-all:focus-visible{

    outline:3px solid var(--color-brand-primary);

    outline-offset:3px;

    border-radius:4px;

}

/*----------------------------------------------------------
FOUR-COLUMN LAYOUT

Every panel (Products, Health Goals, Ingredients, Brands, Buying
Guides) renders exactly four equal columns here - a plain-link
column, a compact-card column, or the Editor's Choice column,
depending on what MegaMenuService decided for that panel. No
column is ever an oversized separate sidebar; all four share the
same grid track width.
----------------------------------------------------------*/

.mega-menu-columns{

    display:grid;

    grid-template-columns:repeat(4,minmax(0,1fr));

    gap:24px;

    padding:22px 36px 30px;

    align-items:start;

}

.mega-menu-column{

    position:relative;

    min-width:0;

}

.mega-menu-column:not(:last-child)::after{

    content:"";

    position:absolute;

    right:-12px;

    top:2px;

    width:1px;

    height:calc(100% - 4px);

    background:#EEF2EE;

}

/*----------------------------------------------------------
COLUMN TITLE (shared by "links" and "cards" columns)
----------------------------------------------------------*/

.mega-column-title{

    margin:0 0 12px;

    font-size:13px;

    font-weight:700;

    text-transform:uppercase;

    letter-spacing:.04em;

    color:#7B877B;

}

/*----------------------------------------------------------
LINKS COLUMN
----------------------------------------------------------*/

.mega-list{

    list-style:none;

    margin:0;

    padding:0;

}

.mega-list li{

    margin-bottom:8px;

}

.mega-link{

    display:flex;

    justify-content:space-between;

    align-items:center;

    gap:8px;

    padding:4px 0;

    color:#243026;

    text-decoration:none;

    font-size:14px;

    transition:.25s;

}

.mega-link:hover{

    color:var(--color-brand-primary);

    transform:translateX(4px);

}

.mega-link-title{

    font-weight:500;

}

.mega-count{

    font-size:12px;

    color:#7B877B;

}

/*----------------------------------------------------------
CARDS COLUMN (compact, stacked vertically - never a nested grid)
----------------------------------------------------------*/

.mega-card-stack{

    display:flex;

    flex-direction:column;

    gap:6px;

}

.mega-card{

    display:flex;

    align-items:flex-start;

    gap:10px;

    padding:6px;

    border-radius:12px;

    color:inherit;

    text-decoration:none;

    transition:background .2s ease;

}

.mega-card:hover{

    background:#F5F8F5;

}

.mega-card:focus-visible{

    outline:3px solid var(--color-brand-primary);

    outline-offset:2px;

}

.mega-card-image{

    display:block;

    flex-shrink:0;

    width:40px;

    height:40px;

    border-radius:9px;

    overflow:hidden;

    background:#F4F7F2;

}

.mega-card-image img{

    width:100%;

    height:100%;

    object-fit:cover;

    display:block;

}

.mega-card-icon{

    display:flex;

    align-items:center;

    justify-content:center;

    flex-shrink:0;

    width:40px;

    height:40px;

    border-radius:9px;

    background:#EDF7E8;

    color:var(--color-brand-primary);

}

.mega-card-icon .aanya-icon{

    width:18px;

    height:18px;

}

.mega-card-body{

    display:flex;

    flex-direction:column;

    gap:1px;

    min-width:0;

    padding-top:2px;

}

.mega-card-title{

    font-size:13px;

    font-weight:600;

    color:#243026;

    line-height:1.3;

}

.mega-card-subtitle{

    font-size:11px;

    color:#7B877B;

}

.mega-card-meta{

    font-size:11px;

    font-weight:600;

    color:var(--color-brand-primary);

}

.mega-card-badges{

    display:flex;

    flex-wrap:wrap;

    gap:4px;

    margin:6px 0;

}

.mega-card-badge{

    font-size:10px;

    font-weight:600;

    padding:2px 7px;

    border-radius:999px;

    background:#EEF8EA;

    color:#2E6E32;

}

/*----------------------------------------------------------
EDITOR'S CHOICE COLUMN

Sized to the same quarter-width column track as its siblings -
a compact menu feature, not a large archive-style sidebar card.
----------------------------------------------------------*/

.mega-featured-card{

    display:flex;

    flex-direction:column;

    height:100%;

}

.mega-featured-image{

    display:block;

    margin-bottom:10px;

}

.mega-featured-image img{

    width:100%;

    height:110px;

    object-fit:cover;

    border-radius:12px;

    display:block;

}

.mega-badge{

    display:inline-flex;

    align-items:center;

    gap:5px;

    align-self:flex-start;

    padding:4px 10px;

    border-radius:999px;

    background:#E7F6E7;

    color:#2E7D32;

    font-size:11px;

    font-weight:700;

    margin-bottom:8px;

}

.mega-badge .aanya-icon{

    width:12px;

    height:12px;

}

.mega-featured-card h4{

    margin:0 0 6px;

    font-size:15px;

    line-height:1.35;

}

.mega-featured-card h4 a{

    color:#243026;

    text-decoration:none;

}

.mega-featured-card h4 a:hover{

    color:var(--color-brand-primary);

}

.mega-featured-card p{

    margin:0 0 10px;

    color:#667165;

    font-size:12px;

    line-height:1.55;

}

.mega-featured-card p.mega-featured-subtitle{

    margin:0 0 4px;

    color:#7B877B;

    font-size:12px;

    font-weight:600;

    line-height:1.4;

}

.mega-featured-card .btn{

    width:100%;

    justify-content:center;

    margin-top:auto;

}

/*----------------------------------------------------------
RESPONSIVE
----------------------------------------------------------*/

@media (max-width:1200px){

    .mega-menu{

        width:calc(100vw - 32px);

    }

    .mega-menu-columns{

        grid-template-columns:repeat(2,1fr);

        row-gap:24px;

    }

    .mega-menu-column:nth-child(2)::after{

        display:none;

    }

    .mega-menu-header{

        flex-wrap:wrap;

    }

}

@media (max-width:768px){

    .mega-menu{

        display:none;

    }

}
