/* --- TRENDYOL TARZI MEGA MENU CSS --- */

/* Masaüstü (Desktop) - 992px ve üzeri */
@media (min-width: 992px) {

    /* Ana Menü Kapsayıcısı (LI) */
    .b2b-dropdown-container {
        position: relative;
    }

    /* Açılır Menü (Sol Panel - Ana Kategoriler) */
    .b2b-main-menu {
        display: none;
        /* Hover ile açılacak */
        position: absolute;
        top: 100%;
        /* Tam altına */
        left: 0;
        width: 250px;
        background-color: #fff;
        border: 1px solid #e6e6e6;
        border-top: none;
        /* Nav ile bütünleşsin */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 4px 4px;
        z-index: 1000;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    /* "Kategoriler" Linkine Gelince Menüyü Aç */
    .b2b-dropdown-container:hover .b2b-main-menu {
        display: block;
    }

    /* Ana Kategori Satırı (LI) */
    .b2b-category-item {
        position: static;
        /* ÖNEMLİ: Mega panel tüm menüye göre hizalansın */
    }

    /* Ana Kategori Linki */
    .b2b-category-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        color: #333;
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
        border-bottom: 1px solid #f5f5f5;
        transition: all 0.1s;
    }

    .b2b-category-item:last-child .b2b-category-link {
        border-bottom: none;
    }

    .b2b-category-link:hover,
    .b2b-category-item:hover>.b2b-category-link {
        background-color: #fef4ec;
        /* Hafif turuncu/bej hover */
        color: #f27a1a;
        /* Trendyol Turuncusu */
    }

    .b2b-category-link::after {
        content: "›";
        font-size: 18px;
        line-height: 1;
        color: #999;
        font-weight: bold;
    }

    /* MEGA PANEL (Sağ Panel - Alt Kategoriler) */
    .b2b-mega-panel {
        display: none;
        /* Hover ile açılacak */
        position: absolute;
        top: 0;
        left: 250px;
        /* Sol panel genişliği kadar */
        width: 800px;
        /* Genişlik */
        min-height: 100%;
        /* Menü boyunda */
        height: auto;
        /* Uzayabilir */

        background-color: #fff;
        border: 1px solid #e6e6e6;
        border-left: 1px solid #f0f0f0;
        box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.05);
        padding: 25px;
        z-index: 1001;
        border-radius: 0 4px 4px 4px;

        /* Flexbox ile Sütunlama */
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
    }

    /* Hover Durumu - Mega Paneli Göster */
    .b2b-category-item:hover .b2b-mega-panel {
        display: flex;
    }

    /* Alt Link Başlığı (Tümü) */
    .b2b-sub-title {
        width: 100%;
        font-weight: 700;
        color: #333;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f27a1a;
        /* Turuncu çizgi */
        font-size: 16px;
    }

    .b2b-sub-title a {
        color: #333;
        text-decoration: none;
    }

    .b2b-sub-title a:hover {
        color: #f27a1a;
    }

    /* Alt Linkler (Liste Elemanları) */
    .b2b-sub-link {
        width: 30%;
        /* 3 Sütun */
        margin-right: 3%;
        margin-bottom: 8px;
        color: #666;
        text-decoration: none;
        font-size: 13px;
        display: block;
        padding: 4px 0;
        transition: color 0.2s;
    }

    .b2b-sub-link:hover {
        color: #f27a1a;
        /* Hover Rengi */
        text-decoration: underline;
    }
}

/* Mobil Görünüm (Tablet ve altı) */
@media (max-width: 991px) {
    .b2b-main-menu {
        display: none;
        background: #fff;
        border-top: 1px solid #eee;
        margin: 0;
        padding: 0;
        list-style: none;
        /* Scroll Eklendi */
        max-height: 65vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 2px solid #ddd;
    }

    /* ... diğerleri aynı ... */
    /* JS ile active class eklenince aç */
    .b2b-dropdown-container.active .b2b-main-menu {
        display: block;
    }

    .b2b-category-link {
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        color: #333;
        font-weight: 600;
        border-bottom: 1px solid #f0f0f0;
        text-decoration: none;
    }

    .b2b-mega-panel {
        display: none;
        padding: 10px 20px;
        background: #f9f9f9;
    }

    /* JS ile active class eklenince aç */
    .b2b-category-item.active .b2b-mega-panel {
        display: block;
    }

    .b2b-sub-title {
        margin-bottom: 10px;
        font-weight: bold;
    }

    .b2b-sub-link {
        display: block;
        padding: 8px 0;
        color: #555;
        text-decoration: none;
        border-bottom: 1px solid #eee;
    }

    .b2b-category-link::after {
        content: "▼";
        font-size: 10px;
        opacity: 0.5;
    }
}

/* --- YENİ GELEN ÜRÜNLER KART STİLLERİ --- */
.new-product-card {
    min-width: 200px;
    max-width: 200px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    /* Küçülmeyi engelle */
    position: relative;
    display: flex;
    flex-direction: column;
}

.new-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #f27a1a;
}

.new-product-image {
    height: 150px;
    width: 100%;
    object-fit: contain;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.new-product-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.new-product-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 36px;
    /* 2 satır yüksekliği */
    margin-bottom: 5px;
    text-align: center;
}

.new-product-price {
    font-size: 15px;
    font-weight: bold;
    color: #f27a1a;
    text-align: center;
    margin-bottom: 8px;
}

/* --- GRID ÜRÜN KARTLARI (YENİ TASARIM) --- */
.grid-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #f27a1a;
}

.grid-product-image-container {
    height: 180px;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.grid-product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    cursor: zoom-in;
}

.grid-product-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.grid-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 40px;
    /* 2 satır yüksekliği */
    margin-bottom: 8px;
    text-align: center;
}

.grid-product-price-block {
    text-align: center;
    margin-bottom: 12px;
}

.grid-product-price {
    font-size: 16px;
    font-weight: bold;
    color: #f27a1a;
}

.grid-product-badges {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 2;
    pointer-events: none;
    /* Badge'lerin lightgallery tıklamasını engellemesini önler */
}

.grid-product-badges .badge {
    pointer-events: auto;
    /* Tıklanabilir olmasını istediğimizde auto yaparız */
    font-size: 0.7rem;
    padding: 0.35rem 0.5rem;
}

/* Scrollbar Özelleştirme (Yatay Liste İçin) */
.new-products-wrapper::-webkit-scrollbar {
    height: 8px;
}

.new-products-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.new-products-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.new-products-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999;
}