/* =========================================================
   YKT SITE ENGINE — ÜRÜN MEGA MENÜSÜ
========================================================= */

html body .ykt-header,
html body .ykt-header__inner,
html body .ykt-navigation {
    overflow: visible !important;
}

/*
 * Mevcut header, doğrudan navigasyon bağlantılarını ortalıyor.
 * Mega menü bir sarmalayıcı kullandığı için aynı eksene açıkça alınır.
 */
html body .ykt-navigation {
    align-items: center !important;
}

html body .ykt-navigation > .ykt-mega-menu {
    --ykt-mega-top: 84px;
    position: relative;
    z-index: 3400;
    display: inline-flex;
    width: auto;
    height: auto;
    min-height: 44px;
    flex: 0 0 auto;
    align-items: center;
    align-self: center !important;
    justify-self: center;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}

html body .ykt-mega-menu__trigger {
    position: relative;
    display: inline-flex;
    width: auto;
    height: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 7px;
    border: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}

html body .ykt-mega-menu__trigger::after {
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    opacity: 0;
    transform: scaleX(0.4);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

html body .ykt-mega-menu__trigger svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    transition: transform 180ms ease;
}

html body .ykt-mega-menu:hover
.ykt-mega-menu__trigger::after,
html body .ykt-mega-menu:focus-within
.ykt-mega-menu__trigger::after,
html body .ykt-mega-menu.is-current
.ykt-mega-menu__trigger::after {
    opacity: 0.85;
    transform: scaleX(1);
}

html body .ykt-mega-menu.is-open
.ykt-mega-menu__trigger svg {
    transform: rotate(180deg);
}

html body .ykt-mega-menu__dropdown {
    position: fixed;
    z-index: 3420;
    top: var(--ykt-mega-top);
    left: 50%;
    width: min(1180px, calc(100vw - 32px));
    max-height:
        calc(
            100dvh -
            var(--ykt-mega-top) -
            16px
        );
    overflow: hidden;
    border: 1px solid rgba(15, 41, 69, 0.1);
    border-radius: 0 0 20px 20px;
    background: #ffffff;
    box-shadow:
        0 28px 72px rgba(7, 29, 55, 0.2);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -9px);
    transition:
        opacity 180ms ease,
        visibility 180ms ease,
        transform 180ms ease;
}

html body .ykt-mega-menu.is-open
.ykt-mega-menu__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

html body .ykt-mega-menu__tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #e4eaf0;
    padding: 0 14px;
    background: #f8fafc;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
}

html body .ykt-mega-menu__tab {
    position: relative;
    flex: 0 0 auto;
    min-height: 54px;
    border: 0;
    padding: 14px 13px 12px;
    background: transparent;
    color: #687689;
    font: inherit;
    font-size: 12.5px;
    font-weight: 760;
    line-height: 1.25;
    white-space: nowrap;
    cursor: pointer;
}

html body .ykt-mega-menu__tab::after {
    position: absolute;
    right: 13px;
    bottom: 0;
    left: 13px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #126ac2;
    content: "";
    transform: scaleX(0);
    transition: transform 160ms ease;
}

html body .ykt-mega-menu__tab:hover,
html body .ykt-mega-menu__tab:focus-visible,
html body .ykt-mega-menu__tab.is-active {
    color: #126ac2;
    outline: none;
}

html body .ykt-mega-menu__tab.is-active::after {
    transform: scaleX(1);
}

html body .ykt-mega-menu__panels {
    min-height: 340px;
    background: #ffffff;
}

html body .ykt-mega-menu__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    min-height: 340px;
    max-height:
        min(
            430px,
            calc(
                100dvh -
                var(--ykt-mega-top) -
                112px
            )
        );
}

html body .ykt-mega-menu__panel[hidden] {
    display: none !important;
}

html body .ykt-mega-menu__products {
    min-width: 0;
    overflow-y: auto;
    padding: 22px 24px;
    scrollbar-width: thin;
}

html body .ykt-mega-menu__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

html body .ykt-mega-menu__panel-head h3 {
    margin: 0;
    color: #0b2744;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
}

html body .ykt-mega-menu__view-all,
html body .ykt-mega-menu__view-all:any-link {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    gap: 6px;
    color: #126ac2 !important;
    font-size: 13px;
    font-weight: 760;
    white-space: nowrap;
}

html body .ykt-mega-menu__product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

html body .ykt-navigation
.ykt-mega-menu__product,
html body .ykt-navigation
.ykt-mega-menu__product:any-link {
    display: flex;
    min-width: 0;
    min-height: 51px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 11px 13px;
    background: #ffffff;
    color: #193752 !important;
    font-size: 13px;
    font-weight: 680;
    line-height: 1.3;
    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

html body .ykt-navigation
.ykt-mega-menu__product::after,
html body .ykt-navigation
.ykt-mega-menu__view-all::after,
html body .ykt-navigation
.ykt-mega-menu__preview-link::after,
html body .ykt-navigation
.ykt-mega-menu__footer a::after {
    display: none !important;
    content: none !important;
}

html body .ykt-navigation
.ykt-mega-menu__product > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

html body .ykt-navigation
.ykt-mega-menu__product > span:last-child {
    flex: 0 0 auto;
    color: #126ac2;
    font-size: 18px;
    opacity: 0.7;
}

html body .ykt-navigation
.ykt-mega-menu__product:hover,
html body .ykt-navigation
.ykt-mega-menu__product:focus-visible,
html body .ykt-navigation
.ykt-mega-menu__product.is-active {
    border-color: rgba(18, 106, 194, 0.14);
    background: #eef6ff;
    color: #126ac2 !important;
    outline: none;
    transform: translateX(2px);
}

html body .ykt-mega-menu__preview {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-left: 1px solid #e4eaf0;
    padding: 21px;
    background:
        linear-gradient(
            145deg,
            #f1f7fd,
            #ffffff 70%
        );
}

html body .ykt-mega-menu__media {
    display: grid;
    height: 198px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #dfe7ef;
    border-radius: 15px;
    padding: 14px;
    background: #ffffff;
}

html body .ykt-mega-menu__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition:
        opacity 120ms ease,
        transform 180ms ease;
}

html body .ykt-mega-menu__preview:hover
.ykt-mega-menu__media img {
    transform: scale(1.025);
}

html body .ykt-mega-menu__placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-content: center;
    gap: 5px;
    border-radius: 10px;
    background:
        linear-gradient(
            145deg,
            #edf5ff,
            #f9fbfd
        );
    color: #173c60;
    text-align: center;
}

html body .ykt-mega-menu__placeholder strong {
    font-size: 29px;
    letter-spacing: -0.04em;
}

html body .ykt-mega-menu__placeholder small {
    color: #728196;
    font-size: 12px;
    font-weight: 700;
}

html body .ykt-mega-menu__eyebrow {
    margin-top: 16px;
    color: #126ac2;
    font-size: 11px;
    font-weight: 820;
    letter-spacing: 0.075em;
    line-height: 1.3;
    text-transform: uppercase;
}

html body .ykt-mega-menu__preview h4 {
    margin: 5px 0 0;
    color: #0b2744;
    font-size: 19px;
    font-weight: 820;
    line-height: 1.3;
}

html body .ykt-mega-menu__preview p {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 14px;
    color: #687689;
    font-size: 12.5px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

html body .ykt-navigation
.ykt-mega-menu__preview-link,
html body .ykt-navigation
.ykt-mega-menu__preview-link:any-link {
    display: inline-flex;
    min-height: 41px;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    border-radius: 10px;
    padding: 10px 14px;
    background: #0b2744;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 760;
    transition:
        background-color 160ms ease,
        transform 160ms ease;
}

html body .ykt-navigation
.ykt-mega-menu__preview-link:hover,
html body .ykt-navigation
.ykt-mega-menu__preview-link:focus-visible {
    background: #126ac2;
    outline: none;
    transform: translateY(-1px);
}

html body .ykt-mega-menu__footer {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border-top: 1px solid #e4eaf0;
    background: #fbfcfe;
}

html body .ykt-navigation
.ykt-mega-menu__footer a,
html body .ykt-navigation
.ykt-mega-menu__footer a:any-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    gap: 7px;
    color: #193752 !important;
    font-size: 13px;
    font-weight: 750;
}

html body .ykt-navigation
.ykt-mega-menu__footer a:hover {
    color: #126ac2 !important;
}

html body .ykt-mega-menu__backdrop {
    position: fixed;
    z-index: 3390;
    inset: var(--ykt-mega-top) 0 0;
    display: block;
    width: auto;
    height: auto;
    border: 0;
    padding: 0;
    background: rgba(4, 19, 35, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 180ms ease,
        visibility 180ms ease;
    backdrop-filter: blur(1px);
}

html body .ykt-mega-menu.is-open
.ykt-mega-menu__backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.ykt-mega-menu-open {
    overflow-x: hidden;
}

@media (max-width: 1120px) {
    html body .ykt-mega-menu__dropdown {
        width: calc(100vw - 24px);
    }

    html body .ykt-mega-menu__panel {
        grid-template-columns: minmax(0, 1fr) 300px;
    }

    html body .ykt-mega-menu__tab {
        padding-right: 11px;
        padding-left: 11px;
        font-size: 12px;
    }
}

@media (max-width: 1023px) {
    html body .ykt-navigation > .ykt-mega-menu {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body .ykt-mega-menu *,
    html body .ykt-mega-menu *::before,
    html body .ykt-mega-menu *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* JavaScript yüklenemezse ilk kategori yine kullanılabilir kalır. */
@media (min-width: 1024px) {
    html body .ykt-mega-menu:hover
    .ykt-mega-menu__dropdown,
    html body .ykt-mega-menu:focus-within
    .ykt-mega-menu__dropdown {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }
}
