﻿/* ===========================================================
   HEADER
=========================================================== */
body {
    padding-top: 90px;
}

.mst-header {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,.06);
}

.topbar {
    height: 42px;
    background: #1f2937;
    color: #fff;
    font-size: 14px;
}

    .topbar .container {
        height: 42px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar a {
    color: #fff;
    text-decoration: none;
    transition: .25s;
}

    .topbar a:hover {
        color: #f58220;
    }

.divider {
    width: 1px;
    height: 16px;
    background: rgba(255,255,255,.25);
}

.navbar {
    background: #fff;
    min-height: 90px;
    transition: .30s;
    padding: 0;
}

    .navbar .container {
        min-height: 90px;
    }

.navbar-brand img {
    height: 58px;
    transition: .3s;
}

/* JS scroll'da .mst-header'a "active" class'ı ekliyordu ama daha önce
   hiçbir CSS karşılığı yoktu (görünürde etkisizdi). Artık aşağı
   kaydırıldığında header hafifçe incelip logo küçülüyor; masaüstünde
   daha kompakt/profesyonel bir his veriyor. */
.mst-header.active .navbar {
    min-height: 74px;
}

    .mst-header.active .navbar .container {
        min-height: 74px;
    }

.mst-header.active .navbar-brand img {
    height: 46px;
}

.navbar-nav {
    gap: 18px;
}

/* "Hırdavat" menüsü eklenince (9. üst menü öğesi) lg kırılım noktasında
   (992-1199px, Bootstrap container'ı yalnızca 960px) satır sıkışıyor ve
   sağdaki "Bayi Giriş" butonu küçülüp metni iki satıra bölünüyordu.
   Bu aralıkta menü boşluğunu daraltarak yer açıyoruz. */
@media (min-width: 992px) and (max-width: 1250px) {

    .navbar-nav {
        gap: 8px;
    }

    .nav-link {
        font-size: 14px;
    }

    .header-buttons {
        gap: 8px;
    }

    .b2b-btn {
        padding: 12px 16px;
    }
}

.nav-link {
    color: #1f2937;
    font-weight: 600;
    position: relative;
    padding: 32px 0;
    transition: .25s;
}

    .nav-link:hover {
        color: #f58220;
    }

    .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        /* bottom:22px, 32px'lik masaüstü padding'e göre hesaplanmıştı.
           Mobilde padding 12px'e düştüğünde bu sabit değer, çizginin
           metnin ÜSTÜNDE görünmesine (üstü çizili gibi durmasına) sebep
           oluyordu. Artık yüzde bazlı/aşağıdan hizalı, padding neyse
           ona göre otomatik doğru yerde duruyor. */
        bottom: 0;
        width: 0;
        height: 2px;
        background: #f58220;
        transition: .3s;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

.header-buttons {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.search-btn {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #f5f5f5;
    color: #333;
    transition: .3s;
}

    .search-btn:hover {
        background: #f58220;
        color: #fff;
    }

.b2b-btn {
    background: #f58220;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
    white-space: nowrap;
    flex-shrink: 0;
}

    .b2b-btn:hover {
        background: #d96b08;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(245,130,32,.35);
    }


.b2b-btn-login {
    background: #808080;
    color: #fff;
    padding: 2px 12px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 200;
    transition: .3s;
}

    .b2b-btn-login:hover {
        background: #908f8f;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 10px 25px rgba(245,130,32,.35);
    }

.navbar-toggler {
    border: none;
    box-shadow: none !important;
}

    .navbar-toggler i {
        font-size: 32px;
    }

/* Header/logo hiçbir zaman kırpılmasın (scroll sırasında logonun
   çeyreğinin gizlenmesi sorunu genelde bir üst elemanın overflow:hidden
   ya da sabit/yetersiz yükseklik taşımasından kaynaklanır). */
.mst-header,
.navbar,
.navbar .container {
    overflow: visible;
}

.brand-group {
    display: flex;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

/* Açılır menü (collapse) ve dropdown geçişleri gereğinden yavaş
   hissettiriyordu; süreleri kısaltıyoruz. */
.navbar-collapse.collapsing {
    transition-duration: .2s;
}


/*=========================================================
    ARAMA PANELİ
    Not: Arama ikonları daha önce sadece "#" işaretine gidiyordu ve
    hiçbir işlevi yoktu. Bu panel, projede zaten var olan
    Urunler(SearchText) action'ına GET ile istek atarak gerçek bir
    arama sağlıyor; backend'e dokunulmadı.
=========================================================*/

.mst-search-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 15px 35px rgba(0,0,0,.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .25s ease, padding .3s ease;
    z-index: 998;
}

    .mst-search-panel.show {
        max-height: 120px;
        opacity: 1;
        padding: 18px 0;
    }

.mst-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f5f5f5;
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
}

    .mst-search-form i.bi-search {
        color: #999;
        font-size: 18px;
    }

    .mst-search-form input {
        flex: 1;
        border: none;
        background: transparent;
        font-size: 15px;
        font-family: inherit;
        padding: 10px 0;
    }

        .mst-search-form input:focus {
            outline: none;
        }

    .mst-search-form button[type="submit"] {
        background: #f58220;
        color: #fff;
        border: none;
        padding: 10px 24px;
        border-radius: 50px;
        font-weight: 600;
        cursor: pointer;
        transition: .3s;
        flex-shrink: 0;
    }

        .mst-search-form button[type="submit"]:hover {
            background: #d96b08;
        }

    .mst-search-form .mst-search-close {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        color: #666;
        border: none;
        cursor: pointer;
        flex-shrink: 0;
        transition: .3s;
    }

        .mst-search-form .mst-search-close:hover {
            background: #ececec;
        }

@media(max-width:576px) {

    .mst-search-form {
        padding-left: 16px;
    }

        .mst-search-form button[type="submit"] {
            padding: 10px 16px;
        }
}

@media(max-width:991px) {

    .topbar {
        display: none;
    }

    .navbar {
        min-height: 72px;
    }

        .navbar .container {
            min-height: 72px;
        }

    /* Logo ile hamburger arasına, menüyü açmadan erişilebilen
       küçük bir arama ikonu (sadece mobilde görünür). */
    .mobile-icons {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-left: auto;
        margin-right: 10px;
    }

    .mobile-search-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f5f5f5;
        color: #333;
        font-size: 16px;
        flex-shrink: 0;
    }

        .mobile-search-btn:hover {
            background: #f58220;
            color: #fff;
        }

    /* Menü artık ekranın tamamını kaplamak yerine, hamburger'in
       altında sağa yaslı, daha dar bir panel gibi açılıyor. */
    .navbar-collapse {
        background: #fff;
        margin-top: 12px;
        margin-left: auto;
        padding: 18px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,.12);
        max-width: 320px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

    .nav-link {
        padding: 12px 0;
    }

    /* Mobilde arama zaten logonun yanındaki ikonla erişilebilir
       olduğundan, menü içindeki eski arama butonunu gizleyip
       "Bayi Başvurusu" + "Bayi Giriş" linklerini tam genişlikte,
       alt alta gösteriyoruz. */
    .header-buttons {
        margin-top: 15px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

        .header-buttons .search-btn {
            display: none;
        }

        .header-buttons .b2b-btn,
        .header-buttons .b2b-btn-mobile {
            width: 100%;
            text-align: center;
        }

    .b2b-btn-mobile {
        background: #f5f5f5;
        color: #1f2937;
        padding: 12px 24px;
        border-radius: 50px;
        text-decoration: none;
        font-weight: 600;
        text-align: center;
        transition: .3s;
    }

        .b2b-btn-mobile:hover {
            background: #ececec;
        }
}
