/*
 * Header stilleri (Views/Shared/Header)
 * Bölümler: üst logo bandı, ana menü, sağ kontroller (dil, arama, butonlar), arama satırı
 */

/* =====================================================================
   Üst logo bandı (Navbar/_TopBarPartial)
   ===================================================================== */
.full-toplogo {
    height: auto !important;
    min-height: 20px;
}

    .full-toplogo .full-top-container {
        box-sizing: border-box;
        width: calc(100% - 252px) !important;
        max-width: 1544px !important;
        margin-right: auto;
        margin-left: auto;
        padding-right: 0 !important;
    }

    .full-toplogo .header-row {
        display: flex;
        align-items: center;
        width: 60%;
    }

    .full-toplogo .logo-column,
    .full-toplogo .header-right-column {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    /* Logo ve slogan */
    .full-toplogo .logo-column {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .full-toplogo .logo-stack {
        display: flex;
        width: 61%;
        max-width: 320px;
        margin: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

        .full-toplogo .logo-stack .logo {
            display: flex !important;
            float: none !important;
            width: 100%;
            margin: 0 !important;
            align-items: center;
            justify-content: center;
        }

            .full-toplogo .logo-stack .logo img {
                display: block;
                width: 80%;
                max-width: 100%;
                height: auto;
                margin: -17px auto 0 !important;
            }

    .full-toplogo .logo-slogan {
        display: block;
        width: 94%;
        margin: -11px 0 0;
        padding: 0;
        text-align: center !important;
    }

    /* Telefon / e-posta ve adres */
    .full-toplogo .header-right-items {
        display: flex;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 35px;
        width: 100%;
    }

        .full-toplogo .header-right-items .teaser {
            margin: 0;
        }

    .full-toplogo .contact-teaser {
        flex-shrink: 0;
    }

    .full-toplogo .phone-link,
    .full-toplogo .email-link {
        color: inherit;
        text-decoration: none;
    }

        .full-toplogo .phone-link:hover,
        .full-toplogo .phone-link:focus,
        .full-toplogo .email-link:hover,
        .full-toplogo .email-link:focus {
            color: inherit;
            text-decoration: none;
        }

    /* Adres ve sosyal medya */
    .full-toplogo .location-wrapper {
        display: flex;
        flex-shrink: 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .full-toplogo .location-teaser {
        margin: 0;
    }

    .full-toplogo .location-social {
        box-sizing: border-box;
        width: 97%;
        margin-top: 12px;
        line-height: 1;
    }

        .full-toplogo .location-social .page_social_icons {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 32px;
            margin: 0;
        }

        .full-toplogo .location-social .social-icon {
            float: none;
            margin: 0 !important;
        }

/* Tablet ve mobil: sadece ortalanmış logo + slogan */
@media (max-width: 991px) {
    .page_toplogo,
    .page_toplogo[style] {
        display: block !important;
        min-height: 0 !important;
        padding: 12px 0 !important;
    }

    .full-toplogo .full-top-container {
        width: 100% !important;
        padding: 0 15px !important;
    }

    .full-toplogo .header-row {
        display: block !important;
        text-align: center;
    }

    .full-toplogo .logo-column {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        float: none !important;
        text-align: center !important;
    }

    .full-toplogo .logo-stack {
        width: 70% !important;
        max-width: 350px;
        margin: 0 auto !important;
    }

        .full-toplogo .logo-stack .logo img {
            width: auto;
            height: 40px !important;
            margin-top: 8px !important;
        }

    .full-toplogo .logo-slogan {
        display: block !important;
        width: 100% !important;
        margin: 4px 0 0 !important;
        color: #fff !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        text-align: center !important;
    }

    .full-toplogo .header-right-column {
        display: none !important;
    }
}

/* =====================================================================
   Ana menü ve yerleşim (Navbar/_MainMenuPartial)
   ===================================================================== */

/*
 * Tema (main.css) menüye margin-bottom: -80px veriyor; main.js menüyü ancak sayfa tamamen
 * yüklendiğinde (window load, tüm görseller inince) kendi yüksekliğinde bir kutuya sarıyor.
 * O ana kadar altındaki içerik menünün altına kayıyor, sonra aşağı zıplıyordu (CLS).
 * JS sonrası görünüm aynı kaldığı için negatif boşluk kaldırıldı.
 */
.page_header.theme_header {
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .page_header .mainrow {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
    }

    .page_header .menu-column {
        width: auto;
        min-width: 0;
        float: none;
        flex: 1 1 auto;
    }

    .page_header .actions-column {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        float: none;
        flex: 0 0 auto;
        margin-left: auto;
    }
}

/* Geniş desktop */
@media (min-width: 1400px) {
    .page_header > .container {
        width: calc(100% - 220px) !important;
        max-width: 1480px !important;
    }
}

/* Orta desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
    .page_header > .container {
        width: calc(100% - 40px) !important;
        max-width: none !important;
    }
}

/* Küçük desktop ve tablet yatay */
@media (min-width: 992px) and (max-width: 1199px) {
    .page_header > .container {
        width: calc(100% - 30px) !important;
        max-width: none !important;
    }
}

/* Menü bağlantı boşlukları ekranla orantılı küçülür (tema 23px sabit veriyordu;
   1400-1600px arasında son menü öğesi dil seçicinin altına giriyordu) */
@media (min-width: 992px) {
    .page_header .mainmenu > li > a {
        padding-right: clamp(8px, 1.15vw, 23px) !important;
        padding-left: clamp(8px, 1.15vw, 23px) !important;
    }
}

/* Ürünler menüsü: alt kategorisi olan başlık link değildir */
.category-parent-link {
    cursor: default;
}

/* =====================================================================
   Sağ kontroller (Navbar/_HeaderActionsPartial)
   ===================================================================== */
.header-right-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

    .header-right-wrapper .inline-dropdown {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin: 0;
        padding: 0;
    }

        .header-right-wrapper .inline-dropdown > li {
            display: inline-flex;
            align-items: center;
            padding: 0;
        }

/* ── Arama ve telefon ikonları ── */
.page_header .header-icon-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: middle;
}

    .page_header .header-icon-button i {
        margin: 0 !important;
        line-height: 1 !important;
    }

/* ── Servis Talep ve Teklif Al butonları ── */
.page_header .header-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 16px !important;
    border: 1px solid #1f839f !important;
    line-height: 1 !important;
    text-decoration: none !important;
    vertical-align: middle;
}

.page_header .header-action-text {
    line-height: 1;
    white-space: nowrap;
}

.page_header .header-action-btn svg,
.page_header .header-action-btn i {
    display: block;
    flex-shrink: 0;
    margin: 0 !important;
    line-height: 1 !important;
}

.page_header .header-action-btn svg {
    width: 16px;
    height: 16px;
}

.page_header .service-btn {
    background: transparent !important;
    color: #1f839f !important;
}

    .page_header .service-btn svg {
        stroke: currentColor;
    }

    .page_header .service-btn:hover,
    .page_header .service-btn:focus {
        background: #1f839f !important;
        color: #fff !important;
    }

.page_header .teklif-btn {
    background: #1f839f !important;
    color: #fff !important;
}

    .page_header .teklif-btn i {
        color: #fff !important;
    }

    .page_header .teklif-btn:hover,
    .page_header .teklif-btn:focus {
        background: #166a82 !important;
        border-color: #166a82 !important;
        color: #fff !important;
    }

/* =====================================================================
   Dil seçici (Navbar/_LanguageSelectorPartial)
   ===================================================================== */
.lang-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #2a2a2a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

    .lang-dropdown-trigger:focus {
        outline: none;
    }

    .lang-dropdown-trigger .lang-globe,
    .lang-dropdown-trigger .lang-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .lang-dropdown-trigger .lang-arrow {
        opacity: 0.6;
        transition: transform 0.25s ease;
    }

    .lang-dropdown:hover .lang-dropdown-trigger,
    .lang-dropdown-trigger:hover {
        background: rgba(0, 0, 0, 0.06);
        border-color: rgba(0, 0, 0, 0.4);
        color: #2a2a2a;
    }

        .lang-dropdown:hover .lang-dropdown-trigger .lang-arrow {
            transform: rotate(180deg);
        }

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

    .lang-dropdown-menu::before {
        content: "";
        position: absolute;
        top: -6px;
        right: 22px;
        width: 12px;
        height: 12px;
        background: #fff;
        transform: rotate(45deg);
    }

.lang-dropdown:hover .lang-dropdown-menu,
.lang-dropdown:focus-within .lang-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown-menu li {
    margin: 0;
    list-style: none;
}

.lang-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #444;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}

    .lang-dropdown-menu a:hover {
        background: #f5f7f9;
        color: #1f839f;
        text-decoration: none;
    }

    .lang-dropdown-menu a.active {
        background: #1f839f;
        color: #fff;
    }

.lang-dropdown-menu .lang-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 24px;
    flex-shrink: 0;
    background: #f0f2f4;
    color: #555;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lang-dropdown-menu a.active .lang-code {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.lang-dropdown-menu .lang-name {
    flex: 1;
    line-height: 1;
}

.lang-dropdown-menu .lang-check {
    display: inline-flex;
    align-items: center;
    color: #fcca03;
}

.lang-dropdown-menu a.active .lang-check {
    color: #fff;
}

/* =====================================================================
   Sağ kontroller - responsive
   ===================================================================== */
@media (min-width: 1400px) {
    .lang-dropdown-trigger,
    .page_header .header-icon-button,
    .page_header .header-action-btn {
        height: 42px !important;
    }

    .page_header .header-icon-button {
        width: 42px !important;
    }

    .page_header .header-action-btn {
        padding-right: 6px !important;
        padding-left: 6px !important;
    }
}

/* 1350px altında buton yazıları gizlenir, sadece ikon kalır */
@media (max-width: 1350px) {
    .header-right-wrapper,
    .header-right-wrapper .inline-dropdown {
        gap: 4px;
    }

    .page_header .header-action-text {
        display: none !important;
    }

    .page_header .header-icon-button,
    .page_header .header-action-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }

        .page_header .header-action-btn svg {
            width: 15px;
            height: 15px;
        }

    .page_header .teklif-btn i {
        font-size: 14px !important;
    }
}

/* TR dışındaki dillerde buton yazıları uzun (ör. "Demande de service");
   1600px altında menüyle çakışmaması için bu dillerde sadece ikon gösterilir */
@media (min-width: 1351px) and (max-width: 1599px) {
    html:not([lang="tr"]) .page_header .header-action-text {
        display: none !important;
    }

    html:not([lang="tr"]) .page_header .header-action-btn {
        width: 42px !important;
        min-width: 42px !important;
        padding: 0 !important;
    }
}

@media (max-width: 1199px) {
    .lang-dropdown-trigger {
        height: 36px;
        padding-right: 10px;
        padding-left: 10px;
        font-size: 12px;
    }

        .lang-dropdown-trigger .lang-arrow {
            display: none;
        }
}

@media (max-width: 991px) {
    .page_header .actions-column {
        width: auto;
        float: right;
    }

    .header-right-wrapper {
        justify-content: flex-end;
    }
}

@media (max-width: 767px) {
    .page_header .header-right-wrapper .inline-dropdown {
        gap: 0 !important;
    }

        .page_header .header-right-wrapper .inline-dropdown > li {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin: 0 !important;
        }

    /* Mobilde tüm sağ ikonlar aynı ölçüde */
    .page_header .header-icon-button,
    .page_header .header-action-btn {
        width: 46px !important;
        min-width: 46px !important;
        height: 58px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .page_header .service-btn {
        background: transparent !important;
        border: 0 !important;
        color: #ffffff !important;
    }

        .page_header .service-btn svg {
            width: 17px !important;
            height: 17px !important;
            stroke: currentColor !important;
        }

    .page_header .teklif-btn {
        background: transparent !important;
        border: 0 !important;
        color: #1f839f !important;
    }

        .page_header .teklif-btn i {
            color: inherit !important;
        }

    /* İkonlar arasında ince ayırıcı */
    .page_header .inline-dropdown > li + li {
        border-left: 1px solid rgba(255, 255, 255, 0.18);
    }

    .page_header .header-icon-button:hover,
    .page_header .header-action-btn:hover,
    .page_header .header-icon-button:focus,
    .page_header .header-action-btn:focus {
        background: rgba(31, 131, 159, 0.15) !important;
    }
}

/* =====================================================================
   Arama satırı ve canlı arama sonuçları (Navbar/_HeaderSearchPartial)
   ===================================================================== */
.page_header .widget_search {
    position: relative;
    display: inline-block;
    width: 100%;
}

    .page_header .widget_search .form-group {
        position: relative;
        flex: 1;
    }

.desktop-ls-dropdown {
    display: none;
    position: fixed;
    z-index: 99999;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: left;
    animation: lsFadeIn 0.18s ease;
}

    .desktop-ls-dropdown.open {
        display: block;
    }

@keyframes lsFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.desktop-ls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.desktop-ls-header-label {
    color: #bbb;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.desktop-ls-header-count {
    color: #feb324;
    font-size: 11px;
    font-weight: 700;
}

.desktop-ls-list {
    max-height: 360px;
    overflow-y: auto;
}

.desktop-ls-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 16px;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease;
}

    .desktop-ls-item:last-child {
        border-bottom: none;
    }

    .desktop-ls-item:hover {
        background: #fff8ee;
        color: #333;
        text-decoration: none;
        transform: translateX(3px);
    }

        .desktop-ls-item:hover .desktop-ls-arrow {
            opacity: 1;
        }

.desktop-ls-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    overflow: hidden;
    background: #f7f7f7;
    border-radius: 6px;
}

.desktop-ls-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.desktop-ls-no-image {
    color: #ccc;
    font-size: 20px;
}

.desktop-ls-info {
    flex: 1;
    min-width: 0;
}

.desktop-ls-name {
    overflow: hidden;
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.desktop-ls-code {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 7px;
    background: #feb324;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.desktop-ls-arrow {
    flex-shrink: 0;
    color: #feb324;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.desktop-ls-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #feb324 0%, #f5a800 100%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;
    transition: opacity 0.2s ease;
}

    .desktop-ls-footer:hover {
        color: #fff;
        text-decoration: none;
        opacity: 0.9;
    }

    .desktop-ls-footer i {
        font-size: 14px;
    }

.desktop-ls-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 16px;
    color: #aaa;
    font-size: 13px;
}

.desktop-ls-spinner {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border: 2px solid #eee;
    border-top-color: #feb324;
    border-radius: 50%;
    animation: lsSpin 0.7s linear infinite;
}

@keyframes lsSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobilde arama satırı menünün altında açılır kutu olarak gösterilir */
@media (max-width: 991px) {
    .page_header {
        position: relative;
    }

        .page_header .searchrow {
            display: none !important;
            position: absolute !important;
            top: 100% !important;
            left: 0 !important;
            right: 0 !important;
            z-index: 99998 !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 12px 15px !important;
            background: #ffffff !important;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            opacity: 0;
            visibility: hidden;
        }

            .page_header .searchrow.mobile-search-open {
                display: block !important;
                opacity: 1 !important;
                visibility: visible !important;
                /* main.css satırı height:0 ile gizler; transform verilirse sonuç listesi (position:fixed) satırın içine hapsolur */
                height: auto !important;
                overflow: visible !important;
            }

            .page_header .searchrow .col-sm-12 {
                width: 100% !important;
                padding: 0 !important;
            }

            .page_header .searchrow .widget_search {
                display: block !important;
                width: calc(100% - 45px) !important;
            }

            .page_header .searchrow .searchform {
                display: flex !important;
                width: 100% !important;
                margin: 0 !important;
            }

                .page_header .searchrow .searchform .form-group {
                    flex: 1 1 auto !important;
                    width: auto !important;
                    margin: 0 !important;
                }

                /* 16px'in altında telefon, kutuya dokununca ekranı yakınlaştırır */
                .page_header .searchrow .searchform input {
                    width: 100% !important;
                    font-size: 16px !important;
                }

            .page_header .searchrow .search_form_close {
                position: absolute;
                top: 50%;
                right: 0;
                margin: 0 !important;
                display: flex !important;
                align-items: center;
                justify-content: center;
                width: 35px;
                height: 35px;
                cursor: pointer;
                transform: translateY(-50%);
            }
}
