/**
 * =============================================
 * HEADER STİLLERİ
 * =============================================
 * 
 * Sabit üst menü ve marka logosu stilleri.
 * Scroll durumuna göre slogan renk değişimi desteklenir.
 * 
 * @author Neredebuluruz.com
 * @version 2.0
 */

/* ========================================
   ANA HEADER CONTAINER
   ======================================== */
.c-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: #fff;
    border-bottom: 1px solid var(--nb-line);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease;
}

/* Header içerik sarmalayıcı */
.c-header__wrap {
    width: min(var(--container-max-width), var(--container-width));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Görseli */
.c-header__logo {
    height: 38px;
    width: auto;
    object-fit: contain;
}

/* ========================================
   MARKA LOGOSU
   ======================================== */
.c-header__brandStack {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    user-select: none;
    cursor: pointer;
}

/* Marka adı satırı */
.c-header__brandLine {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--nb-text);
}

/* Marka renkleri */
.c-header__brand {
    color: var(--nb-brand);
}

.c-header__dot {
    color: var(--nb-turq);
}

.c-header__com {
    color: var(--nb-turq);
    font-weight: var(--font-semibold);
}

/* ========================================
   SLOGAN (Scroll ile renk değişimi)
   ======================================== */
.c-header__slogan {
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    color: var(--nb-muted);
    margin-top: 2px;
    transition: color 0.4s ease;
}

/* Slogan içindeki span'lar */
.c-header__slogan span {
    transition: color 0.4s ease;
}

/* Scroll yapıldığında aktif olan slogan stili */
.c-header__slogan.is-active span {
    color: var(--nb-turq);
    font-weight: var(--font-semibold);
}

/* Kategoriye göre renkli kelime */
.c-header__highlight {
    color: #1aa0a3 !important;
    font-weight: 800 !important;
}

/* ========================================
   MENÜ BUTONU (Hamburger)
   ======================================== */
.c-header__menuBtn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.c-header__menuBtn:hover {
    background: #f6f6f6;
}

/* Hamburger ikon */
.nb-burger {
    width: 22px;
    height: 18px;
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2px 0;
}

/* Hamburger çizgileri */
.nb-burger i {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--nb-text);
    opacity: 0.85;
    border-radius: 2px;
    transition: transform 0.28s var(--nb-ease), opacity 0.22s ease, width 0.22s ease, background 0.3s ease;
    transform-origin: center;
}

/* Giriş yapmış kullanıcı - Turkuaz hamburger */
.c-header__menuBtn.is-logged-in .nb-burger i {
    background: var(--nb-turq);
    opacity: 1;
}

/* Hamburger X animasyonu (menü açıkken) */
.c-header__menuBtn.is-open .nb-burger i:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.c-header__menuBtn.is-open .nb-burger i:nth-child(2) {
    opacity: 0;
    width: 0;
}

.c-header__menuBtn.is-open .nb-burger i:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   MOBİL UYUMLULUK
   ======================================== */
/* Header sağ grup: sepet + hamburger */
.c-header__rightGroup {
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

/* Cart icon inside header */
#cartIconLink {
    flex-shrink: 0;
}

.c-header__menuBtn {
    position: static;
    transform: none;
    border: none;
    background: transparent;
    padding: 10px 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: 8px;
    flex-shrink: 0;
}

.c-header__menuBtn:hover {
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .c-header {
        justify-content: center;
        padding-left: 0;
    }

    .c-header__wrap {
        width: 100%;
        padding: 0 16px;
    }

    .c-header__logo {
        height: 30px;
    }

    .c-header__brandLine {
        font-size: 14px;
    }

    .c-header__slogan {
        display: block;
        font-size: 10px;
        margin-top: 1px;
    }
}

@media (max-width: 380px) {
    .c-header__brandLine {
        font-size: 13px;
        /* Slightly smaller to fit */
    }
}

/* ========================================
   BİLDİRİM ANİMASYONU (Kırmızı Yanıp Sönme)
   ======================================== */
@keyframes burgerBlinkRed {

    0%,
    100% {
        background-color: var(--nb-turq);
        opacity: 1;
    }

    50% {
        background-color: #ef4444;
        opacity: 1;
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    }
}

.nb-burger.has-unread i:nth-child(2) {
    animation: burgerBlinkRed 2s ease-in-out infinite;
    height: 2px !important;
    /* Make middle line thicker for visibility */
    opacity: 1 !important;
}