/* ============================================
   MOBILE RESPONSIVE FIX - Tüm Sayfalara Eklenecek
   ============================================ */

/* Base Mobile Breakpoints */
@media (max-width: 768px) {
    
    /* ===== CONTAINER & LAYOUT ===== */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .section {
        padding-top: 16px !important;
    }
    
    /* ===== HEADER MOBILE FIXES ===== */
    .user-name-sm {
        display: none !important;
    }

    .user-menu-btn {
        padding: 4px 8px 4px 4px !important;
        gap: 4px !important;
    }

    .user-menu-btn .fa-chevron-down {
        font-size: .625rem !important;
    }

    /* Bildirim dropdown - header altında tam genişlik */
    .notification-dropdown.show {
        display: block !important;
        position: fixed !important;
        top: 56px !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100vh - 56px) !important;
        overflow-y: auto !important;
        border-radius: 0 0 12px 12px !important;
        z-index: 10001 !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
        animation: mobileSlideDown .2s ease-out;
    }

    /* Kullanıcı dropdown - header altında tam genişlik */
    .user-dropdown.show {
        display: block !important;
        position: fixed !important;
        top: 56px !important;
        bottom: auto !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100vh - 56px) !important;
        overflow-y: auto !important;
        border-radius: 0 0 12px 12px !important;
        z-index: 10001 !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
        animation: mobileSlideDown .2s ease-out;
    }

    /* Mobil dropdown backdrop */
    .mobile-dropdown-backdrop {
        display: block !important;
        position: fixed !important;
        top: 56px !important;
        left: fixed !important;
        right: fixed !important;
        bottom: fixed !important;
        background: rgba(0,0,0,0.4) !important;
        z-index: 10000 !important;
    }

    /* Body scroll kilitleme */
    body.dropdown-open {
        overflow: hidden !important;
    }

    .header-actions {
        gap: 4px !important;
        flex-shrink: 0 !important;
    }

    .header-inner {
        gap: 8px !important;
    }

   

    /* ===== SIDEBAR (Usta & Müşteri Paneli) ===== */
    .panel-wrap {
        flex-direction: column !important;
    }
    
    .panel-sidebar {
        position: fixed !important;
        top: 0;
        left: -280px;
        width: 280px !important;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .panel-sidebar.active {
        left: 0 !important;
    }
    
    .panel-content {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: var(--primary);
        color: white;
        border-radius: 50%;
        border: none;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        z-index: 999;
        cursor: pointer;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    /* ===== USTA DASHBOARD ===== */
    /* Son Tekliflerim + Hızlı Erişim iki kolonunu alt alta getir */
    .usta-dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* Stat kartları 2'li grid */
    .usta-stat-cards {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .usta-stat-cards > * {
        padding: 14px !important;
    }

    .usta-stat-cards > * > div:first-child {
        font-size: 1.5rem !important;
    }

    /* ===== GRID LAYOUTS ===== */
    .search-page-grid,
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Filter Sidebar */
    .filter-sidebar {
        position: fixed !important;
        top: 0;
        left: -100%;
        width: 90% !important;
        max-width: 320px;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .filter-sidebar.active {
        left: 0 !important;
    }
    
    .filter-toggle-btn {
        display: flex !important;
    }
    
    .filter-close-btn {
        display: block !important;
    }
    
    /* ===== TABLES ===== */
    .admin-table thead {
        display: none;
    }
    
    .admin-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        padding: 12px;
    }
    
    .admin-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 0 !important;
        border-bottom: 1px solid var(--gray-100);
    }
    
    .admin-table tbody td:last-child {
        border-bottom: none;
    }
    
    /* ===== BUTTONS ===== */
    .btn-group {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .btn-group .btn {
        width: 100% !important;
    }
    
    /* ===== FORMS ===== */
    .form-row {
        flex-direction: column !important;
    }
    
    /* ===== TYPOGRAPHY ===== */
    h1 {
        font-size: 1.25rem !important;
    }
    
    h2 {
        font-size: 1.125rem !important;
    }
    
    /* ===== HIDE ON MOBILE ===== */
    .hide-mobile {
        display: none !important;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Mobile dropdown animation */
@keyframes mobileSlideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Backdrop hidden by default */
.mobile-dropdown-backdrop {
    display: none;
}

/* Small Mobile */
@media (max-width: 480px) {
    .btn {
        padding: 10px 16px !important;
        font-size: 0.875rem !important;
    }

    /* Stat kartları küçük ekranda da 2'li */
    .usta-stat-cards {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
