/* ============================================================================
   RESPONSIVE DESIGN - HEADER - TEMİZ VERSİYON
   ============================================================================

   BREAKPOINT YAPISI:
   - 0-360px:     Extra small mobile
   - 361-425px:   Small mobile
   - 426-480px:   Mobile (column layout, absolute buttons)
   - 481-1023px:  Tablet (row layout, flex buttons)
   - 1024px+:     Desktop (normal nav menu)

   ============================================================================ */

/* DEFAULT: Hide mobile elements on desktop (1024px+) */
.mobile-search-btn,
.hamburger-menu,
.mobile-suggest-store {
    display: none;
}

/* ============================================================================
   DESKTOP: 1024px+ (Normal navigation menu visible)
   ============================================================================ */
@media (min-width: 1024px) {
    /* Ensure mobile elements are hidden */
    .mobile-search-btn,
    .hamburger-menu,
    .mobile-suggest-store {
        display: none !important;
    }

    /* Container flex layout */
    .header .container {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1rem !important;
    }

    /* Logo on the left */
    .nav-brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }

    /* Show desktop navigation menu - center */
    .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: transparent !important;
        box-shadow: none !important;
        width: auto !important;
        gap: 1.5rem !important;
        order: 2 !important;
    }

    /* Show desktop suggest store button - right */
    .nav-actions.desktop-only {
        display: flex !important;
        margin-left: auto !important;
        order: 3 !important;
    }
}

/* ============================================================================
   MOBILE & TABLET: 0-1023px (All mobile/tablet devices)
   ============================================================================ */
@media (max-width: 1023px) {
    /* Genel mobile/tablet ayarlar */
    .header {
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
        background: #ffd602 !important;
        background-color: #ffd602 !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    .header .container {
        background: #ffd602 !important;
        background-color: #ffd602 !important;
    }

    /* Desktop navigation gizle */
    .desktop-only {
        display: none !important;
    }

    /* Hamburger ve search button göster */
    .mobile-search-btn {
        display: flex !important;
        cursor: pointer !important;
        background: none !important;
        border: none !important;
        font-size: 1.25rem !important;
        color: #333 !important;
        width: 40px !important;
        height: 40px !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .mobile-search-btn:hover {
        color: #D73535 !important;
    }

    .hamburger-menu {
        display: flex !important;
        cursor: pointer !important;
    }

    /* Hide hamburger when menu is active */
    .hamburger-menu.active {
        display: none !important;
    }

    /* Nav menu (hamburger açıldığında) */
    .nav-menu {
        display: none !important;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 999;
        padding: 1rem;
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        z-index: 999999 !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 1rem !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    }

    .menu-close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666;
        transition: all 0.2s;
        border-radius: 4px;
    }

    .menu-close-btn:hover {
        background: #f0f0f0;
        color: #000;
    }

    .nav-menu .nav-item {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        transition: background 0.2s;
    }

    .nav-menu .nav-item:hover {
        background-color: var(--bg-secondary);
    }
}

/* ============================================================================
   TABLET: 481-768px (Row layout: Search + Logo + Hamburger)
   ============================================================================ */
@media (min-width: 481px) and (max-width: 768px) {
    .header {
        margin: 0.5rem;
    }

    .header .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 1rem !important;
        gap: 1rem !important;
        position: relative;
    }

    /* Search button - sol taraf, flex item */
    .mobile-search-btn {
        position: static !important;
        order: 1;
        flex-shrink: 0;
    }

    /* Logo - ortada, flex: 1 ile genişler */
    .nav-brand {
        order: 2;
        flex: 1 !important;
        text-align: center !important;
        margin-bottom: 0 !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .nav-brand .logo {
        font-size: 1.25rem !important;
        gap: 0.3rem !important;
    }

    .nav-brand .tagline {
        font-size: 0.8rem !important;
    }

    /* Hamburger - sağ taraf, flex item */
    .hamburger-menu {
        position: static !important;
        order: 3;
        flex-shrink: 0;
    }

    /* Suggest store göster tablet'te - header altında, ayrı hero section gibi */
    .mobile-suggest-store {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        padding: 0.75rem 1rem !important;
        background: #FFFFFF !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important; /* İnce ayırıcı çizgi */
    }

    .mobile-suggest-store a {
        background: linear-gradient(135deg, #f0f4ff 0%, #fff5f5 50%, #fffbf0 100%) !important;
        border: 2px solid rgba(66, 133, 244, 0.2) !important;
        border-radius: 8px !important;
        padding: 0.5rem 1rem !important; /* Daha küçük padding */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; /* Daha hafif gölge */
        transition: all 0.2s ease !important;
    }

    .mobile-suggest-store a:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    }

    .mobile-suggest-store a p {
        font-size: 0.85rem !important; /* Daha küçük yazı */
        margin: 0 !important;
    }

    .mobile-suggest-store a .tagline {
        font-size: 0.7rem !important; /* Tagline daha küçük */
        margin-top: 0.15rem !important;
    }
}

/* ============================================================================
   TABLET LARGE: 769-1023px (Logo + Hamburger, search icon GİZLİ)
   ============================================================================ */
@media (min-width: 769px) and (max-width: 1023px) {
    .header {
        margin: 0.5rem;
    }

    .header .container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 1rem !important;
        gap: 1rem !important;
        position: relative;
    }

    /* Search button GİZLE - aşağıda search bar var zaten */
    .mobile-search-btn {
        display: none !important;
    }

    /* Logo - ortada/solda */
    .nav-brand {
        order: 1;
        flex: 1 !important;
        text-align: left !important;
        margin-bottom: 0 !important;
        max-width: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    .nav-brand .logo {
        font-size: 1.25rem !important;
        gap: 0.3rem !important;
    }

    .nav-brand .tagline {
        font-size: 0.8rem !important;
    }

    /* Hamburger - sağ taraf */
    .hamburger-menu {
        position: static !important;
        order: 2;
        flex-shrink: 0;
    }

    /* Suggest store göster */
    .mobile-suggest-store {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        padding: 0.75rem 1rem !important;
        background: #FFFFFF !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
    }

    .mobile-suggest-store a {
        background: linear-gradient(135deg, #f0f4ff 0%, #fff5f5 50%, #fffbf0 100%) !important;
        border: 2px solid rgba(66, 133, 244, 0.2) !important;
        border-radius: 8px !important;
        padding: 0.5rem 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
        transition: all 0.2s ease !important;
    }

    .mobile-suggest-store a:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    }

    .mobile-suggest-store a p {
        font-size: 0.85rem !important;
        margin: 0 !important;
    }

    .mobile-suggest-store a .tagline {
        font-size: 0.7rem !important;
        margin-top: 0.15rem !important;
    }
}

/* ============================================================================
   MOBILE: 0-480px (Column layout: Logo üstte, buttons absolute)
   ============================================================================ */
@media (max-width: 480px) {
    .header {
        margin: 0.25rem;
    }

    .header .container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
        position: relative;
    }

    /* Search button - absolute left */
    .mobile-search-btn {
        position: absolute !important;
        left: 1rem !important;
        top: 1rem !important;
        z-index: 10001 !important;
    }

    /* Logo - ortada */
    .nav-brand {
        text-align: center;
        margin-bottom: 0.75rem;
    }

    .nav-brand .logo {
        font-size: 1.25rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        white-space: nowrap;
    }

    .nav-brand .logo img {
        width: 24px;
        height: 24px;
    }

    .nav-brand .tagline {
        font-size: 0.8rem !important;
        margin-top: 0.2rem;
    }

    /* Hamburger - absolute right */
    .hamburger-menu {
        position: absolute !important;
        right: 1rem !important;
        top: 1rem !important;
        z-index: 10001 !important;
    }

    /* Suggest store göster mobile'da - ayrı hero section gibi */
    .mobile-suggest-store {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        padding: 0.75rem 1rem !important;
        background: #FFFFFF !important;
        border-top: 1px solid rgba(0, 0, 0, 0.1) !important; /* İnce ayırıcı çizgi */
    }

    .mobile-suggest-store a {
        background: linear-gradient(135deg, #f0f4ff 0%, #fff5f5 50%, #fffbf0 100%) !important;
        border: 2px solid rgba(66, 133, 244, 0.2) !important;
        border-radius: 8px !important;
        padding: 0.5rem 1rem !important; /* Daha küçük padding */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important; /* Daha hafif gölge */
        transition: all 0.2s ease !important;
    }

    .mobile-suggest-store a:hover {
        transform: translateY(-1px) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
    }

    .mobile-suggest-store a p {
        font-size: 0.85rem !important; /* Daha küçük yazı */
        margin: 0 !important;
    }

    .mobile-suggest-store a .tagline {
        font-size: 0.7rem !important; /* Tagline daha küçük */
        margin-top: 0.15rem !important;
    }
}

/* ============================================================================
   SMALL MOBILE: 0-425px (Logo küçült, çakışma önleme)
   ============================================================================ */
@media (max-width: 425px) {
    .nav-brand .logo {
        font-size: 0.9rem !important;
        gap: 0.2rem;
    }

    .nav-brand .tagline {
        font-size: 0.65rem !important;
    }

    .nav-brand {
        max-width: calc(100% - 100px);
    }
}

/* ============================================================================
   EXTRA SMALL: 0-360px
   ============================================================================ */
@media (max-width: 360px) {
    .nav-brand {
        max-width: calc(100% - 50px);
    }

    .nav-brand .logo {
        font-size: 0.9rem !important;
        gap: 0.2rem;
    }

    .nav-brand .tagline {
        font-size: 0.6rem !important;
    }
}
