/* ============================================
   MEGA MENU - SMOOTH SLIDE DOWN/UP
   ============================================ */

.aromaholik-mega-menu-container {
    position: relative;
    z-index: 999;
}

.aromaholik-mega-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aromaholik-mega-menu > li {
    position: relative;
}

.aromaholik-mega-menu > li.has-mega-menu {
    position: static;
}

.aromaholik-mega-menu > li > a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aromaholik-mega-menu > li > a:hover {
    color: #E1B998;
}

.menu-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aromaholik-mega-menu > li:hover > a .menu-arrow,
.aromaholik-mega-menu > li.mega-menu-open > a .menu-arrow {
    transform: rotate(180deg);
}

/* Standard dropdown */
.aromaholik-mega-menu .sub-menu:not(.mega-menu-dropdown) {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    margin: 0;
    padding: 0.5rem 0;
    background: #fff;
    border: 1px solid #EFEFEF;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.aromaholik-mega-menu > li:hover > .sub-menu:not(.mega-menu-dropdown) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.aromaholik-mega-menu .sub-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #202328;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.aromaholik-mega-menu .sub-menu a:hover {
    background: rgba(225, 185, 152, 0.1);
    color: #E1B998;
    padding-left: 1.5rem;
}

.aromaholik-mega-menu-container {
    position: relative;
}

.mega-menu-dropdowns-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1001;
    pointer-events: none;
}

.mega-menu-dropdown.mega-menu-elementor {
    position: absolute;
    background: #202328;
    border-top: 3px solid #E1B998;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow: hidden;
}

.mega-menu-dropdown.mega-menu-elementor.active {
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
}





/*!* Overlay *!*/
/*.mega-menu-overlay {*/
/*    position: fixed;*/
/*    top: 0;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    background: rgba(0, 0, 0, 0.5);*/
/*    opacity: 0;*/
/*    pointer-events: none;*/
/*    transition: opacity 0.3s ease;*/
/*    z-index: 1000;*/
/*}*/

/*.mega-menu-overlay.active {*/
/*    opacity: 1;*/
/*    pointer-events: auto;*/
/*}*/

/* Content wrapper - bez opacity */
.mega-menu-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 20px;
    transform: translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.aromaholik-mega-menu > li.has-mega-menu.mega-menu-open > .mega-menu-dropdown .mega-menu-inner {
    transform: translateY(0);
}

.mega-menu-inner .e-parent > .e-child {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aromaholik-mega-menu > li.has-mega-menu.mega-menu-open .mega-menu-inner .e-parent > .e-child {
    opacity: 1;
    transform: translateY(0);
}

.aromaholik-mega-menu > li.has-mega-menu.mega-menu-open .mega-menu-inner .e-parent > .e-child:nth-child(1) {
    transition-delay: 0.15s;
}

.aromaholik-mega-menu > li.has-mega-menu.mega-menu-open .mega-menu-inner .e-parent > .e-child:nth-child(2) {
    transition-delay: 0.25s;
}

.aromaholik-mega-menu > li.has-mega-menu.mega-menu-open .mega-menu-inner .e-parent > .e-child:nth-child(3) {
    transition-delay: 0.35s;
}

.aromaholik-mega-menu > li.has-mega-menu.mega-menu-open .mega-menu-inner .e-parent > .e-child:nth-child(4) {
    transition-delay: 0.45s;
}




/* Elementor styling */
.mega-menu-inner .elementor-container {
    max-width: 100% !important;
    padding: 0 !important;
}

.mega-menu-inner .elementor-section {
    max-width: 100% !important;
}

/* Ukryj standardowe submenu */
li.has-elementor-template > ul.sub-menu:not(.mega-menu-dropdown) {
    display: none !important;
}

/* Loading spinner */
.mega-menu-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.mega-menu-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #E1B998;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


.mega-menu-overlay.active {
    background: rgba(32, 35, 40, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    visibility: visible;
}

/* Responsive */
@media (max-width: 1024px) {
    .aromaholik-mega-menu-container {
        display: none;
    }
}

@media (max-width: 1200px) {
    .aromaholik-mega-menu {
        gap: 1.5rem;
    }

    .aromaholik-mega-menu > li > a {
        padding: 0.75rem 0;
    }

    .mega-menu-inner {
        max-width: 100%;
        padding: 1.5rem 15px;
    }
}
