.menu-container {
    position: relative;
    width: 100%;
    height: 178px;
    padding: 32px 60px 0 60px;
    overflow: visible;

}

.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Prevent page scroll when mobile menus are open */
body.menu-open {
    overflow: hidden;
}



@media (max-width: 768px) {
    .menu-container {
        height: auto;
        padding: 0;
    }
}

.menu-header {

    background-color: #FFFFFF;
    padding: 30px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0px 16px 27px 0px rgba(0, 0, 0, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    z-index: 1000 !important;
    height: 120px;
}

.menu-header .logo-section{
    flex: 1 1 0;
    max-width: 402px;
    min-width: 170px;
}

@media (max-width: 768px) {
    .menu-header {
        flex-direction: column;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        gap: 0;
    }
}

.menu-button {
    display: none;
}

.header-logo {
    object-fit: contain;
    object-position: center;
}

@media screen and (max-width: 768px) {
    .header-logo {
        max-width: 272px;
        max-height: 46px;
    }

    .logo-section {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 8px 20px;
        border-bottom: 1px solid rgba(99, 39, 241, 0.10);
    }

    .menu-button {
        display: flex;
        width: 24px;
        height: 24px;
        border: none;
        background: transparent url('/assets/icons/menu.svg') no-repeat center center;
    }

    .menu-button.open {
        background: transparent url('/assets/icons/x-close.svg') no-repeat center center;
    }
}

.menu-header-content {
    width: 80%;
    max-width: 1280px;

    /* flex: 1 0 0; */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

@media (max-width: 768px) {
    .menu-header-content {
        flex-direction: column-reverse;
        width: 100%;
        padding: 12px 0px;
        gap: 24px;
    }
}

.search-container {
    width: 100%;
    max-width: 694px;
    min-width: 320px;

    display: flex;
    flex: 1 0 0;
    
    height: 55px;
    padding: 4px;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;

    border-radius: 100px;
    border: 3px solid #FFF;
    background: #FFF;
    box-shadow: 0 7px 20px 0 rgba(0, 0, 0, 0.12);
}


@media (max-width: 768px) {
    .search-container {
        width: calc(100% - 40px);
        height: 46px;
        margin: 0 20px;
    }
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    color: #46494f;
    font-size: 18px;
    font-weight: 600;
    text-align: right;
    width: 100%;
    padding: 0 16px;
}

.search-clear-button {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

/* Hide clear button when input is empty (placeholder is showing) */
.search-input:placeholder-shown+.search-clear-button {
    opacity: 0;
    pointer-events: none;
}

.search-clear-button:hover {
    opacity: 0.6 !important;
}

.search-clear-button svg {
    width: 12px;
    height: 12px;
}


.search-button {
    min-width: 46.333px;
    height: 46.333px;
    border: none;
    border-radius: 96.528px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 7.722px;
    background: #2020B3 url('/assets/icons/search-normal.svg') no-repeat center center;
    position: relative;
    overflow: hidden;
}

.search-button .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    pointer-events: none;
}

.search-button .ripple.animate {
    animation: ripple-animation 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Search Autocomplete Dropdown Styles */
.search-container {
    position: relative;
}

.autocomplete-suggestions {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #FFFFFF;
    border: 3px solid #FFF;
    border-radius: 12px;
    box-shadow: 0 7px 20px 0 rgba(0, 0, 0, 0.12);
    margin-top: 0;
    z-index: 1000;
    padding: 8px 0;
    direction: rtl;
}

/* Individual Suggestion Item */
.autocomplete-suggestion {
    padding: 12px 24px;
    cursor: pointer;
    color: #46494f;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px;
    text-align: right;
    transition: background-color 0.2s ease;
    border: none;
    background: transparent;
}

.autocomplete-suggestion:hover {
    background-color: rgba(32, 32, 179, 0.08);
    color: #2020B3;
}

/* Selected/Highlighted Suggestion */
.autocomplete-selected {
    background-color: rgba(32, 32, 179, 0.14) !important;
    color: #2020B3 !important;
    font-weight: 600;
}

.autocomplete-selected:hover {
    background-color: rgba(32, 32, 179, 0.2) !important;
}

/* Loading State */
.search-container.loading::after {
    content: '';
    position: absolute;
    left: 83px; /* Position next to clear button (8px margin + 20px button + 4px gap) */
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(32, 32, 179, 0.2);
    border-top-color: #2020B3;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 1;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* RTL Support */
.autocomplete-suggestions {
    text-align: right;
}

.autocomplete-suggestion strong {
    font-weight: 700;
    color: #2020B3;
}

/* Scrollbar styling for dropdown */
.autocomplete-suggestions::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .autocomplete-suggestions {
        max-height: 250px;
        font-size: 16px;
        border-radius: 12px;
    }

    .autocomplete-suggestion {
        padding: 10px 20px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {

    .search-button {
        min-width: 36px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
    }
}

.menus {
    display: none;
}

.login-section-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 42px;
}

.logged-in .my-corporate-section .cards-icon {
    display: none;
}

@media screen and (max-width: 768px) {
    header {
        z-index: 99999;
    }

    .menus {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        position: relative;
    }

    .menus-buttons-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 20px;
        gap: 20px;

        position: relative;
        z-index: 7777;
    }

    .menus-button {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2px;
        height: 40px;
        font-size: 13px;
        font-style: normal;
        font-weight: 600;
        line-height: 34.286px;
        padding: 12px 16px;
        border-radius: 6px;
        border: 1px solid var(--46494-f, #000);
        background: #FFF;
        box-shadow: 0 2.286px 7.429px 0 rgba(0, 0, 0, 0.16);
        transition: background-color 0.3s ease, color 0.3s ease;
        width: 100%;
    }

    .menus-button:after {
        content: '';
        background: transparent url('/assets/icons/menu-arrow.svg') no-repeat center center;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.5s ease;
    }

    .menus-button.open {
        background-color: #2020B3;
        color: #FFF;
    }

    .menus-button.open:after {
        background: transparent url('/assets/icons/menu-arrow-white.svg') no-repeat center center;
        transform: rotate(-180deg);
    }

    .menus-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0 20px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #FFFFFF;
        box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out, padding 0.4s ease-in-out;
    }

    .menus-dropdown.open {
        /* Keep the dropdown anchored; scroll inside it */
        max-height: var(--menus-dropdown-max-height, calc(100vh - 160px));
        opacity: 1;
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom)) 20px;
        /* iOS/Safari can be picky: use full overflow */
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        touch-action: pan-y;
    }

    @supports (height: 100dvh) {
        .menus-dropdown.open {
            max-height: var(--menus-dropdown-max-height, calc(100dvh - 160px));
        }
    }

    .menus-dropdown>div,
    .menus-dropdown a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        color: #46494F;
        font-size: 18px;
        font-style: normal;
        font-weight: 500;
        line-height: 44.509px;
        text-decoration: none;
        letter-spacing: 1.08px;
        padding: 12px 8px;
        width: 100%;
        border-bottom: 1px solid rgba(99, 39, 241, 0.10);
    }

    .menus-dropdown>div:last-child,
    .menus-dropdown a:last-child {
        border-bottom: none;
    }

    .menus-dropdown>div {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;

    }



    /* Categories dropdown specific styles */
    #categories-dropdown {
        list-style: none;

    }

    #categories-dropdown>div {
        padding: 0;
        gap: 0;
    }

    #categories-dropdown {
        >div.open .dropdown-item-container {
            background: rgba(242, 163, 71, 0.14);
        }


        .dropdown-item-container {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-direction: row;
            width: 100%;
            padding: 12px 8px;
            position: relative;

        }

        .dropdown-item-container::after {
            content: '';
            background: transparent url('/assets/icons/menu-arrow.svg') no-repeat center center;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            left: 0;
            transition: transform 0.3s ease-in-out;
        }

        >div.open .dropdown-item-container::after {
            transform: rotate(-90deg);
        }

        .dropdown-item-container img {
            width: 36px;
            height: 36px;
        }

        .dropdown-item-content {
            display: flex !important;
            flex-direction: row;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }





        .dropdown-nested-menu {
            display: flex;
            flex-direction: column;
            list-style: none;
            width: 100%;
            margin: 0;
            cursor: pointer;
            max-height: 0;
            overflow: hidden;
            opacity: 0;
            transition: max-height 0.3s ease-in-out, opacity 0.25s ease-in-out;
        }

        .dropdown-nested-menu.open {
            max-height: 400px;
            opacity: 1;
        }

        .dropdown-nested-menu a {
            display: block;
            padding: 12px 8px 12px 50px;
            font-size: 18px;
            color: #46494F;
            font-style: normal;
            font-weight: 500;
            line-height: 24px;
            letter-spacing: 1.08px;
            width: 100%;
            border-bottom: 1px solid rgba(99, 39, 241, 0.05);
        }



        .dropdown-nested-menu a:hover {
            background: linear-gradient(0deg, rgba(255, 161, 40, 0.05) 0%, rgba(255, 161, 40, 0.05) 100%), #FFF;
            border-radius: 4px;
        }

        a.open>.dropdown-item-container {
            background: rgba(242, 163, 71, 0.14);
            font-weight: 600;
        }
    }

}

@media (max-width: 320px) {
    .menus-button {

        height: 40px;
        font-size: 11px;
    }

    .menus-button:after {
        width: 10px;
        height: 10px;
    }
}

.my-corporate-section {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    height: 55px;
    padding: 12px 20px;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .my-corporate-section {
        display: none;
    }
}

.my-corporate-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.my-corporate-icon {
    width: 30px;
    height: 30px;
    background-color: #f3f3f3;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;

    transition: transform 0.2s ease;
}

.my-corporate-icon svg {
    transition: transform 0.2s ease;
}



#dropdown svg {
    transition: transform 0.2s ease;
    transform: rotate(0deg);
    transform-origin: center;
  }
  
  /* כשהתפריט פתוח */
  #dropdown.is-open svg {
    transform: rotate(180deg);
  }



/* 
.my-corporate-section:hover .my-corporate-icon svg {
    transform: rotate(180deg);
} */


.my-corporate-text {
    font-size: 18px;
    font-weight: 600;
    color: #0B0427;
    white-space: nowrap;
}

.account-section-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;

}

.account-section-wrapper .cart-section {
    position: relative;
}

.account-section-wrapper .cart-text {
    font-size: 21px;
    font-weight: 600;
    white-space: nowrap;
    height: 30px;
    min-width: 30px;
    padding: 0 10px 0 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: absolute;
    top: -10px;
    right: -16px;

    background-color: #2020B3;
    color: #FFFFFF;
    border-radius: 50%;
}

.account-section-wrapper .cart-text-description {
    display: none;
}

.categories-button {
    width: 48px;
    height: 48px;
}

.my-points {
    display: flex;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    height: 67px;
    width: 132px;

    border-radius: 12px;
    background: #F3F3FF;
}

.my-points .my-points-title {

    color: #0B0427;
    text-align: center;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.my-points .my-points-title::before {
    content: '';
    background: transparent url('/assets/icons/points.svg') no-repeat center center;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.my-points .my-points-value {
    color: #FFF;
    text-align: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;

    width: fit-content;
    display: flex;
    padding: 6px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    height: 20px;

    border-radius: 4px;
    background: #4138F2;
}

@media screen and (max-width: 768px) {
    .account-section-wrapper {
        display: flex;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 40px;
        padding: 0 20px;
    }

    .account-section-wrapper .cart-section {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .account-section-wrapper .cart-text {
        font-size: 14px;
        height: 20px;
        min-width: 20px;
        padding: 0 7px 0 6px;

        top: 2px;
        right: -4px;

        background-color: #2020B3;
        color: #FFFFFF;
        border-radius: 50%;
    }

    .account-section-wrapper .cart-text-description {
        display: block;
        color: #46494F;
        text-align: right;
        font-size: 18px;
        font-style: normal;
        font-weight: 500;
        line-height: 44.509px;
        letter-spacing: 1.08px;
    }

    .my-points {
        display: none;
    }
}

.login-section {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 8px; */
}

.login-content {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 5px;

    cursor: pointer;
}

.login-content i{
    font-size: 26px;
}
.login-icon {
    width: 30px;
    height: 30px;
    background-color: #f3f3f3;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s ease;
}

.login-icon svg {
    transition: transform 0.2s ease;
}

.login-section:hover .login-icon svg {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .login-section {
        flex-direction: row;
    }

    /* Desktop-only dropdown affordance */
    .login-icon {
        display: none;
    }
    .login-section{
        display: none;
    }

}



.login-text {
    font-size: 17px;
    font-weight: 600;
    color: #0B0427;
    white-space: nowrap;
    text-decoration: none;
}






.categories-button-wrapper {
    position: absolute;

    right: 60px;
    width: 308px;
    bottom: -24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .categories-button-wrapper {
        display: none;
    }
}

.categories-button {
    width: 100%;
    height: 70px;
    background-color: #2020B3;
    border: 3px solid #FFFFFF;
    border-radius: 12px;
    padding: 4px 30px;
    display: flex;
    box-shadow: 0 4px 13px 0 rgba(0, 0, 0, 0.16);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    gap: 14.4px;
    z-index: 99999999;
}

.categories-button::after {
    content: '';
    background: transparent url('/assets/icons/chevron-down.svg') no-repeat center center;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;

}

.categories-button:hover {
    background-color: #1a1a8f;
}

.categories-text {
    font-size: 24px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 60px;
    white-space: nowrap;
}

.chevron-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chevron-svg {
    width: 18px;
    height: 9px;
}

.menu-item-container {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Custom Tippy.js theme for dropdown */
.tippy-box[data-theme~='dropdown'] {
    background-color: transparent;
    box-shadow: none;
}

.tippy-box[data-theme~='dropdown'] .tippy-content {
    padding: 0;
}

.tippy-box[data-theme~='dropdown'] .tippy-arrow {
    color: #fff;
}

.tippy-box[data-theme~='dropdown']>.tippy-arrow::before {
    transform: scale(1.5);
}

















/* desktop resolutions */

/* 1599 */
@media screen and (min-width: 1024px) and (max-width: 1599px) {

    .categories-button-wrapper {
        width: 290px;
    }
    
    .categories-button-wrapper .categories-text {
        font-size: 23px;
    }

    
    .my-corporate-text {
        font-size: 18px;
    }
    
    .my-points .my-points-title {
        font-size: 13px;
    }
    
    .my-points .my-points-value {
        font-size: 12px;
    }
    
    .login-text {
        font-size: 16px;
    }
    
    .account-section-wrapper .cart-text {
        font-size: 21px;
        height: 30px;
        min-width: 30px;
    }
}

/* 1499 */
@media screen and (min-width: 1024px) and (max-width: 1499px) {

    .categories-button-wrapper {
        width: 270px;
    }

        
    .categories-button-wrapper .categories-text {
        font-size: 22px;
    }

    .my-corporate-text {
        font-size: 16px;
    }
        
    .my-points .my-points-title {
        font-size: 12px;
    }
        
    .my-points .my-points-value {
        font-size: 11px;
    }
        
    .login-text {
        font-size: 15px;
    }

        
    .account-section-wrapper .cart-text {
        font-size: 20px;
        height: 28px;
        min-width: 28px;
    }

}

/* 1399 */
@media screen and (min-width: 1024px) and (max-width: 1399px) {

    .categories-button-wrapper {
        width: 250px;
    }
    
    .categories-button-wrapper .categories-text {
        font-size: 21px;
    }
    
    .my-corporate-text {
        font-size: 14px;
    }
        
    .my-points .my-points-title {
        font-size: 11px;
    }
        
    .my-points .my-points-value {
        font-size: 10px;
    }
            
    .login-text {
        font-size: 14px;
    }
            
    .account-section-wrapper .cart-text {
        font-size: 19px;
        height: 26px;
        min-width: 26px;
    }
    
    .search-container {
        min-width: 300px;
    }

}

/* 1299 */
@media screen and (min-width: 1024px) and (max-width: 1299px) {

    .categories-button-wrapper {
        width: 250px;
    }
    
    .categories-button-wrapper .categories-text {
        font-size: 21px;
    }
    
    .my-corporate-text {
        font-size: 13px;
    }
        
    .my-points .my-points-title {
        font-size: 10px;
    }
        
    .my-points .my-points-value {
        font-size: 9px;
    }
            
    .login-text {
        font-size: 13px;
    }
                
    .account-section-wrapper .cart-text {
        font-size: 18px;
        height: 24px;
        min-width: 24px;
    }
        
    .search-container {
        min-width: 280px;
    }

}

/* 1199 */
@media screen and (min-width: 1024px) and (max-width: 1199px) {
 
    .my-corporate-text {
        font-size: 12px;
    }    
            
    .search-container {
        min-width: 260px;
    }

}
