/* Megamenu — RTL / container-aligned */

.megamenu-enabled .container {
    position: relative;
}

.megamenu-enabled {
    overflow: visible;
}

.megamenu-wrap {
    display: block !important;
}

.megamenu-toggle {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    padding: 0;
    color: inherit;
}

.megamenu-toggle .nav-item-icon {
    width: 20px;
    height: 20px;
}

.megamenu {
    display: none;
    position: absolute;
    top: calc(100% + 13px);
    inset-inline: 0;
    width: 100%;
    min-height: 432px;
    background: #FFFFFF;
    border: none;
    box-shadow: none;
    border-radius: 0;
    z-index: 70;
    overflow: visible;
    direction: rtl;
}

.megamenu-enabled.megamenu-open .megamenu {
    display: block;
}

.megamenu-inner {
    display: flex;
    align-items: stretch;
    min-height: 432px;
}

/* Sidebar — inline-end (right in RTL), bordered box */
.megamenu-sidebar {
    position: relative;
    flex: 0 0 296px;
    width: 296px;
    min-height: 100%;
    margin-block: 20px 20px;
    margin-inline-end: 0;
    border: 1.5px solid #E8EAF0;
    border-radius: 16px;
    background: #FFFFFF;
    overflow: visible;
}

/* Tab pointer — two-border rotate + top-edge mask for seamless join */
.megamenu-sidebar::before {
    content: "";
    position: absolute;
    top: -11px;
    inset-inline-start: 79px;
    width: 18px;
    height: 18px;
    background: #FFFFFF;
    border-inline-start: 1.5px solid #E8EAF0;
    border-block-start: 1.5px solid #E8EAF0;
    border-radius: 0 6px 0 0;
    transform: rotate(-45deg);
    z-index: 3;
    pointer-events: none;
}

.megamenu-sidebar::after {
    content: "";
    position: absolute;
    top: -0.5px;
    inset-inline-start: 68px;
    width: 40px;
    height: 3px;
    background: #FFFFFF;
    z-index: 2;
    pointer-events: none;
}

.megamenu-sidebar-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-block: 38px 20px;
    padding-inline: 20px 16px;
    min-width: 0;
    height: 100%;
    overflow: visible;
}

/* Scroll area */
.megamenu-side-scroll {
    position: relative;
}

.megamenu-cats {

    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.megamenu-cats::-webkit-scrollbar {
    display: none;
}

.megamenu-scrollbar {
    position: absolute;
    inset-inline-start: -14px;
    width: 4px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 2;
}

.megamenu-scrollbar.is-visible {
    opacity: 1;
    visibility: visible;
}

.megamenu-scrollbar-track {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 50%;
    width: 1.5px;
    transform: translateX(-50%);
    background: #E1E1E1;
    border-radius: 1px;
}

.megamenu-scrollbar-thumb {
    position: absolute;
    inset-inline-start: 1.5px;
    width: 2px;
    height: 20px;
    max-height: 20px;
    transform: translateX(-50%);
    background: #2437AA;
    border-radius: 4px;
    pointer-events: auto;
    cursor: grab;
    top: 0;
}

.megamenu-scrollbar-thumb.is-dragging {
    cursor: grabbing;
    background: #2D45D2;
}

.megamenu-cat {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 23px;
    padding: 18px 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 13px;
    line-height: 23px;
    letter-spacing: -0.02em;
    color: #0A0B0F;
    text-align: start;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    direction: rtl;
}

.megamenu-cat-arrow {
    display: none;
    flex: 0 0 18px;
    width: 18px;
    font-size: 18px;
    line-height: 1;
    color: #838EAF;
    order: 3;
}

.megamenu-cat.active .megamenu-cat-arrow,
.megamenu-cat[aria-selected="true"] .megamenu-cat-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.megamenu-cat img {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: block;
}

.megamenu-cat span {
    flex: 1 1 auto;
    text-align: start;
}

.megamenu-cat:hover,
.megamenu-cat:focus {
    outline: none;
    color: #2437AA;
}

.megamenu-cat:hover img,
.megamenu-cat:focus img {
    filter: brightness(0) saturate(100%) invert(18%) sepia(52%) saturate(2452%) hue-rotate(214deg) brightness(92%) contrast(92%);
}

.megamenu-cat.active,
.megamenu-cat[aria-selected="true"] {
    min-height: 44px;
    padding-block: 18px;
    padding-inline: 15px;
    color: #2437AA;
    background: linear-gradient(to left, #F9F9FB 0%, #FFFFFF 100%);
}

.megamenu-cat.active .megamenu-cat-arrow,
.megamenu-cat[aria-selected="true"] .megamenu-cat-arrow {
    color: #838EAF;
}

.megamenu-cat.active img,
.megamenu-cat[aria-selected="true"] img {
    filter: brightness(0) saturate(100%) invert(18%) sepia(52%) saturate(2452%) hue-rotate(214deg) brightness(92%) contrast(92%);
}

.megamenu-sidebar-foot {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E8EAF0;
}

.megamenu-sale-link {
    font-weight: 600;
    font-size: 13px;
    line-height: 23px;
    letter-spacing: -0.02em;
    color: #2437AA;
    text-decoration: none;
}

.megamenu-sale-link:hover {
    color: #2D45D2;
}

.megamenu-products-tab {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 8px;
    min-width: 75px;
    font-weight: 400;
    font-size: 12px;
    line-height: 21px;
    letter-spacing: -0.02em;
    color: #3C445D;
    text-decoration: none;
    border-radius: 8px;
    margin-right: auto;
}


.megamenu-products-tab:hover {
    background: #F5F7FC;
}

/* Main area */
.megamenu-main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    padding-block: 38px 24px;
    padding-inline: 40px 32px;
    gap: 57px;
}

.megamenu-content {
    flex: 1 1 0;
    min-width: 0;
}

.megamenu-panel {
    display: none;
}

.megamenu-panel.active {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 40px;
}

.megamenu-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    flex: 0 0 auto;
    min-width: 126px;
}

.megamenu-col-title {
    margin: 0;
    font-weight: 700;
    font-size: 14px;
    line-height: 25px;
    letter-spacing: -0.02em;
    color: #2D45D2;
    text-align: start;
}

.megamenu-col-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
}

.megamenu-col-list a {
    display: block;
    font-weight: 400;
    font-size: 13px;
    line-height: 23px;
    letter-spacing: -0.02em;
    color: #0A0B0F;
    text-decoration: none;
    text-align: start;
}

.megamenu-col-list a:hover {
    color: #2437AA;
}

/* Promo banners — inline-start (left in RTL) */
.megamenu-promos {
    flex: 0 0 288px;
    width: 288px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-block-start: 0;
}

.megamenu-promo-card {
    position: relative;
    width: 100%;
    border-radius: 13px;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.megamenu-promo-card--teal {
    background: #14DAC3;
    min-height: 157px;
}

.megamenu-promo-card--gray {
    background: #D6D6D6;
    min-height: 168px;
}

.megamenu-promo-card-inner {
    position: relative;
    width: 100%;
    min-height: inherit;
    padding: 22px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 157px;
}

.megamenu-promo-card--gray .megamenu-promo-card-inner {
    min-height: 168px;
}

.megamenu-promo-card-img {
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    max-width: 65%;
    max-height: 85%;
    object-fit: contain;
    object-position: left bottom;
    pointer-events: none;
}

.megamenu-promo-card--gray .megamenu-promo-card-img {
    max-width: 55%;
    inset-inline-start: -8px;
    bottom: -4px;
}

.megamenu-promo-card-title {
    position: relative;
    z-index: 1;
    margin: 0;
    max-width: 130px;
    font-weight: 400;
    font-size: 14px;
    line-height: 23px;
    letter-spacing: -0.02em;
    color: #000000;
    text-align: start;
}

.megamenu-promo-card-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #FFFFFF;
    border-radius: 22px;
    font-weight: 400;
    font-size: 9px;
    line-height: 15px;
    letter-spacing: -0.02em;
    color: #000000;
    white-space: nowrap;
    align-self: flex-start;
}

.megamenu-promo-foot {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 4px;
    font-weight: 500;
    font-size: 13px;
    line-height: 23px;
    letter-spacing: -0.02em;
    color: #091224;
    text-decoration: none;
    align-self: flex-start;
}

.megamenu-promo-foot img {
    width: 24px;
    height: 24px;
    display: block;
}

.megamenu-promo-foot:hover {
    color: #2437AA;
}

@media (max-width: 1200px) {
    .megamenu-panel.active {
        gap: 48px;
    }

    .megamenu-main {
        gap: 32px;
        padding-inline: 24px;
    }
}

@media (max-width: 992px) {
    .megamenu-promos {
        display: none;
    }

    .megamenu-panel.active {
        flex-wrap: wrap;
        gap: 32px 48px;
    }
}

/* Mobile bottom-sheet */
.megamenu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 11, 15, 0.45);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: none;
}

body.megamenu-mobile-open .megamenu-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

@media (max-width: 768px) {
    body.megamenu-mobile-open {
        overflow: hidden;
    }

    .megamenu-enabled.megamenu-open .megamenu {
        display: none;
    }

    .megamenu {
        position: fixed;
        inset-inline: 0;
        top: 10px;
        bottom: 0;
        width: 100%;
        height: calc(100dvh - 10px);
        max-height: calc(100dvh - 10px);
        min-height: 0;
        margin: 0;
        background: #FFFFFF;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -10px 40px rgba(10, 11, 15, 0.12);
        z-index: 99;
        display: flex;
        flex-direction: column;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(105%);
        transition: none;
        overflow: hidden;
        padding-bottom: var(--megamenu-nav-offset, 78px);
        box-sizing: border-box;
    }

    body.megamenu-mobile-open .megamenu {
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
        transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1), visibility 0.38s ease;
    }

    .megamenu-inner {
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
        display: flex;
    }

    .megamenu-mobile-sheet-head {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 16px 4px;
        cursor: grab;
        touch-action: none;
    }

    .megamenu-mobile-sheet-head:active {
        cursor: grabbing;
    }

    .megamenu-mobile-grab {
        display: block;
        width: 20px;
        height: 4px;
        border-radius: 4px;
        background: #D5DAF6;
    }

    .megamenu-sidebar {
        flex: 0 0 auto;
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 0;
        background: transparent;
        min-height: 120px;
    }

    .megamenu-sidebar::before,
    .megamenu-sidebar::after {
        display: none;
    }

    .megamenu-sidebar-body {
        padding: 16px 0 12px;
    }

    .megamenu-side-scroll {
        margin: 0;
        padding: 0;
        border: none;
        max-height: none;
        overflow: visible;
    }

    .megamenu-scrollbar {
        display: none;
    }

    .megamenu-cats {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding-inline-start: 16px;
        padding-inline-end: 0;
        padding-bottom: 2px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .megamenu-cats::after {
        content: "";
        flex: 0 0 1px;
    }

    .megamenu-cats::-webkit-scrollbar {
        display: none;
    }

    .megamenu-cat {
        flex: 0 0 96px;
        width: 96px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 88px;
        padding: 10px 8px;
        border-radius: 12px;
        background: #F5F7FC;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: -0.02em;
        color: #3C445D;
        white-space: normal;
        text-align: center;
    }

    .megamenu-cat img {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
    }

    .megamenu-cat span {
        flex: 0 0 auto;
        text-align: center;
        width: 100%;
    }

    .megamenu-cat:hover,
    .megamenu-cat:focus {
        color: #3C445D;
        background: #EEF1FA;
    }

    .megamenu-cat.active,
    .megamenu-cat[aria-selected="true"] {
        min-height: 88px;
        padding: 10px 8px;
        color: #FFFFFF;
        background: #2437AA;
    }

    .megamenu-cat.active img,
    .megamenu-cat[aria-selected="true"] img,
    .megamenu-cat.active:hover img,
    .megamenu-cat[aria-selected="true"]:hover img {
        filter: brightness(0) invert(1);
    }

    .megamenu-cat-arrow {
        display: none !important;
    }

    .megamenu-sidebar-foot {
        display: none;
    }

    .megamenu-mobile-head {
        display: flex;
        align-items: center;
        padding: 10px 16px 14px;
    }

    .megamenu-mobile-title {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        font-weight: 600;
        line-height: 25px;
        color: #0A0B0F;
    }

    .megamenu-main {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        overflow: hidden;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-content {
        display: none !important;
    }

    .megamenu-mobile-body {
        display: none;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col {
        display: block;
        gap: 0;
        min-width: 0;
        width: 100%;
        margin: 0;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-accordion-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
        padding: 16px;
        border: none;
        border-bottom: 1px solid #E8EAF0;
        background: transparent;
        cursor: pointer;
        font-family: inherit;
        text-align: start;
        box-sizing: border-box;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-accordion-toggle .megamenu-col-title {
        display: block;
        flex: 1 1 auto;
        margin: 0;
        font-weight: 600;
        font-size: 14px;
        line-height: 25px;
        color: #0A0B0F;
        text-align: start;
    }
    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col:last-child .megamenu-accordion-toggle{
        border-bottom: none
    }
    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-accordion-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 32px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #F0F2F8;
        color: #3C445D;
        font-size: 14px;
        transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col.is-open .megamenu-accordion-icon {
        background: #0A0B0F;
        color: #FFFFFF;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col.is-open .megamenu-accordion-icon i {
        transform: rotate(180deg);
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-acc-body {
        display: none;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col.is-open .megamenu-acc-body {
        display: block;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col-list {
        list-style: none;
        margin: 0;
        padding: 4px 16px 12px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
        box-sizing: border-box;
    }

    body.megamenu-mobile-open .megamenu.is-mobile-built .megamenu-mobile-body .megamenu-col-list a {
        display: block;
        width: 100%;
        padding: 6px 0;
        font-size: 13px;
        line-height: 23px;
        color: #3C445D;
        text-align: start;
    }

    .megamenu-promos {
        display: block;
        flex: 0 0 auto;
        width: 100%;
        padding: 8px 16px 0;
        box-sizing: border-box;
    }

    .megamenu-promo-card {
        display: none;
    }

    .megamenu-promo-foot {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 12px 0 0;
        width: 100%;
        font-weight: 600;
        font-size: 13px;
        color: #2437AA;
    }

    body.megamenu-mobile-open .mobile-menu-sticky .megamenu-mobile-toggle {
        color: var(--color-dark);
        font-weight: 500;
    }
}

@media (min-width: 769px) {
    .megamenu-overlay,
    .megamenu-mobile-head,
    .megamenu-mobile-sheet-head,
    .megamenu-mobile-body {
        display: none;
    }
}