/* =========================================================
   HEADER MEGA MENU SAFE PATCH - FINAL
   Amaç:
   - Mega menu görünür ama tıklanmaz sorununu çözmek
   - Header / overlay / mega menu stacking sırasını düzeltmek
   - Alt kategori ve ürün kartlarının tıklanmasını garanti etmek
   ========================================================= */

/* temel katmanlar */
.site-header{
    position: sticky;
    top: 0;
    z-index: 1300;
    background: #fff;
}

.header-main{
    position: relative;
    z-index: 1300;
}

.header-nav{
    position: relative;
    z-index: 1301;
}

.mega-host{
    position: relative;
    z-index: 1302;
}

/* trigger */
.mega-trigger{
    appearance: none;
    border: 0;
    cursor: pointer;
    position: relative;
    z-index: 1303;
}

/* mega menu overlay */
.mega-menu-overlay{
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.18);
    opacity: 0;
    visibility: hidden;
    transition: .18s ease;
    z-index: 1190;
    pointer-events: none;
}

.mega-menu-overlay.active{
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* mega menu kutusu */
.mega-menu{
    position: absolute;
    top: 100%;
    left: 0;
    width: min(1280px, calc(100vw - 24px));
    background: #fff;
    border: 1px solid #e6ebf3;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 20px 48px rgba(16,24,40,.14);
    z-index: 1310;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .18s ease;
    overflow: hidden;
    pointer-events: none;
}

.mega-menu.active{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega-grid{
    display: grid;
    grid-template-columns: 260px minmax(0,1fr);
    min-height: 500px;
    position: relative;
    z-index: 1311;
}

/* sol alan */
.mega-left{
    position: relative;
    z-index: 1312;
    background: #f8fbff;
    border-right: 1px solid #e6ebf3;
    overflow-y: auto;
    max-height: 500px;
}

.mega-left-item{
    position: relative;
    z-index: 1313;
    width: 100%;
    min-height: 45px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: #315286;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}

.mega-left-item:hover,
.mega-left-item.active{
    background: #fff;
    color: #ff6000;
    border-left-color: #ff6000;
}

.mega-left-item-label{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.mega-left-item-label i{
    font-size: 14px;
    color: #7287ba;
}

/* sağ alan */
.mega-right{
    position: relative;
    z-index: 1312;
    background: #fff;
    padding: 26px 28px;
}

.mega-pane{
    display: none;
    position: relative;
    z-index: 1313;
}

.mega-pane.active{
    display: block;
}

.mega-pane-title{
    margin: 0 0 18px;
    font-size: 24px;
    color: #1f3f75;
    font-weight: 900;
    letter-spacing: -.02em;
}

.mega-pane-layout{
    display: grid;
    grid-template-columns: 320px minmax(0,1fr);
    gap: 28px;
    align-items: start;
}

.mega-subcats h4,
.mega-featured h4{
    margin: 0 0 16px;
    font-size: 14px;
    color: #344054;
    font-weight: 800;
}

.mega-subcat-list{
    display: grid;
    gap: 10px;
}

.mega-subcat-link{
    position: relative;
    z-index: 1315;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    text-decoration: none;
    color: #101828;
    font-size: 15px;
    font-weight: 600;
    transition: .15s ease;
}

.mega-subcat-link:hover{
    background: #f8fafc;
    color: #2563eb;
}

.mega-featured-grid{
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 14px;
}

.mega-product-card{
    position: relative;
    z-index: 1315;
    pointer-events: auto;
    text-decoration: none;
    color: #101828;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: .18s ease;
}

.mega-product-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(16,24,40,.08);
}

.mega-product-thumb{
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mega-product-thumb img{
    width: 82%;
    height: 82%;
    object-fit: contain;
}

.mega-product-body{
    padding: 10px 10px 12px;
}

.mega-product-title{
    font-size: 13px;
    line-height: 1.45;
    font-weight: 700;
    color: #344054;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.mega-product-brand{
    margin-top: 6px;
    font-size: 12px;
    color: #98a2b3;
    font-weight: 700;
}

.mega-empty{
    color: #667085;
    font-size: 14px;
    line-height: 1.7;
    background: #f8fafc;
    border: 1px dashed #dbe4f0;
    border-radius: 16px;
    padding: 18px;
}

/* search overlay koruma */
.search-overlay{
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.48);
    opacity: 0;
    visibility: hidden;
    transition: .18s ease;
    z-index: 1200;
}

.search-overlay.active{
    opacity: 1;
    visibility: visible;
}

/* ekstra güvenlik */
.hero-overlay{
    pointer-events: none !important;
}

.hero-slider-shell,
.hero-slider,
.hero-slide,
.hero-slide-bg{
    z-index: 1;
}

/* responsive */
@media (max-width: 1180px){
    .mega-pane-layout{
        grid-template-columns: 1fr;
    }

    .mega-featured-grid{
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (max-width: 768px){
    .mega-menu{
        width: calc(100vw - 12px);
        left: 6px;
        border-radius: 18px;
        position: fixed;
        top: 110px;
        max-height: calc(100vh - 130px);
        overflow: auto;
    }

    .mega-grid{
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .mega-left{
        border-right: 0;
        border-bottom: 1px solid #e6ebf3;
        max-height: none;
    }

    .mega-featured-grid{
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}
/* HEADER DROPDOWN Z-INDEX FIX */
.site-header{
    z-index: 5000 !important;
}

.header-main,
.header-main-inner,
.header-actions,
.header-user,
.header-mini-cart,
.dropdown-user{
    position: relative;
}

.header-main{
    z-index: 5001 !important;
}

.header-nav{
    z-index: 5000 !important;
}

.user-dropdown-menu,
.mini-cart-dropdown{
    z-index: 6000 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

.dropdown-user:hover .user-dropdown-menu,
.dropdown-user:hover .mini-cart-dropdown{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mini-cart-dropdown{
    right: 0;
    left: auto;
}

@media (max-width: 768px){
    .mini-cart-dropdown{
        right: auto;
        left: 0;
    }
}
.site-header{
    z-index: 5000 !important;
}

.header-nav{
    z-index: 5000 !important;
}

.user-dropdown-menu,
.mini-cart-dropdown{
    z-index: 6000 !important;
}

.search-panel{
    z-index: 1400 !important;
}

.search-overlay{
    z-index: 1200 !important;
}

.search-suggest-box{
    display:none !important;
}