/* ==================================== */
/* COMPREHENSIVE RESPONSIVE DESIGN 2025 */
/* TÜM SAYFALAR İÇİN MOBİL UYUMLU      */
/* ==================================== */

/* ============================================
   1. RESPONSIVE BREAKPOINTS
   ============================================ */
/* 
   - Mobile Small: 0-480px
   - Mobile Large: 481px-768px
   - Tablet: 769px-992px
   - Desktop: 993px-1200px
   - Large Desktop: 1201px+
*/

/* ============================================
   2. HEADER RESPONSIVE - Hamburger Menu
   ============================================ */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem 0;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    /* Hamburger Menu Button */
    .mobile-menu-toggle {
        display: block;
        background: var(--mobile-toggle-bg);
        border: 2px solid var(--mobile-toggle-border);
        border-radius: 8px;
        padding: 0.5rem;
        cursor: pointer;
        z-index: 1001;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--mobile-toggle-bar);
        margin: 4px 0;
        border-radius: 2px;
        transition: all 0.3s;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--mobile-nav-bg);
        backdrop-filter: blur(20px);
        padding: 4rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav a {
        width: 100%;
        padding: 1rem;
        text-align: center;
        font-size: 1rem;
    }
    
    /* Bildirim butonu mobilde diğer butonlarla aynı boyutta olsun */
    .header-notifications-wrap {
        width: 100%;
    }
    
    #header-notifications-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .nav-overlay.active {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .nav-overlay {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .main-nav {
        width: 85%;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

/* ============================================
   3. CONTAINER & SPACING RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
        padding: 0 1.25rem;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .section-padding {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* ============================================
   4. TYPOGRAPHY RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    h1 { 
        font-size: clamp(2rem, 6vw, 3rem) !important; 
        line-height: 1.2;
    }
    h2 { 
        font-size: clamp(1.75rem, 5vw, 2.5rem) !important; 
        line-height: 1.3;
    }
    h3 { 
        font-size: clamp(1.5rem, 4vw, 2rem) !important; 
        line-height: 1.4;
    }
    h4 { 
        font-size: clamp(1.25rem, 3.5vw, 1.75rem) !important; 
    }
    
    .section-title {
        font-size: clamp(1.75rem, 5vw, 2.5rem) !important;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    h1 { 
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important; 
    }
    h2 { 
        font-size: clamp(1.5rem, 7vw, 2rem) !important; 
    }
    h3 { 
        font-size: clamp(1.25rem, 6vw, 1.75rem) !important; 
    }
    
    .section-title {
        font-size: clamp(1.5rem, 7vw, 2rem) !important;
        margin-bottom: 1.5rem;
    }
}

/* ============================================
   5. GRID & FLEX RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .featured-grid,
    .stat-grid,
    .menu-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .featured-grid,
    .stat-grid,
    .menu-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .flex-row {
        flex-direction: column !important;
    }
    
    .flex-row-reverse {
        flex-direction: column-reverse !important;
    }
}

@media (max-width: 480px) {
    .featured-grid,
    .stat-grid,
    .menu-grid {
        gap: 1rem;
    }
}

/* ============================================
   6. CARDS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .card {
        border-radius: var(--border-radius-small);
        margin-bottom: 1.5rem;
    }
    
    .card-content {
        padding: 1.25rem !important;
    }
}

@media (max-width: 480px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-content {
        padding: 1rem !important;
    }
}

/* ============================================
   7. BUTTONS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-full {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.85rem !important;
        letter-spacing: 0.5px !important;
    }
}

/* ============================================
   8. FORMS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-input,
    .form-select,
    textarea {
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
        min-height: 44px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-row .form-group {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .form-input,
    .form-select,
    textarea {
        padding: 0.75rem 0.875rem !important;
        font-size: 0.9rem !important;
    }
}

/* ============================================
   9. TABLES RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    thead {
        display: none;
    }
    
    tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius-small);
        padding: 1rem;
    }
    
    tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }
    
    tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--secondary-color);
    }
}

/* ============================================
   10. MODAL RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .modal-content {
        width: 95% !important;
        margin: 1rem auto !important;
        padding: 1.5rem !important;
        max-height: 90vh;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 1rem !important;
        max-height: 100vh;
    }
}

/* ============================================
   11. PANEL LAYOUT RESPONSIVE (Seller/Admin/Courier)
   ============================================ */
@media (max-width: 992px) {
    .panel-layout {
        flex-direction: column;
    }
    
    .panel-sidebar {
        width: 100%;
        position: static;
        height: auto;
        margin-bottom: 2rem;
    }
    
    .panel-content {
        width: 100%;
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .panel-sidebar {
        margin-bottom: 1.5rem;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .sidebar-menu a {
        flex: 1 1 auto;
        min-width: fit-content;
    }
}

/* ============================================
   12. CART & CHECKOUT RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cart-layout,
    .checkout-layout {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item-quantity {
        justify-content: center;
    }
    
    .order-summary {
        position: static;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .quantity-btn {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   13. SEARCH PAGE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .search-layout {
        flex-direction: column;
    }
    
    .search-filters {
        position: static;
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================================
   14. PROFILE PAGE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
    }
    
    .profile-sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }
    
    .profile-content {
        width: 100%;
    }
}

/* ============================================
   15. ORDERS PAGE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .orders-list {
        gap: 1rem;
    }
    
    .order-card {
        padding: 1rem;
    }
}

/* ============================================
   16. IMAGES RESPONSIVE
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

.responsive-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 768px) {
    .card-image-wrapper img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .card-image-wrapper img {
        height: 150px;
    }
}

/* ============================================
   17. UTILITY CLASSES
   ============================================ */
.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .text-center-mobile {
        text-align: center !important;
    }
    
    .text-left-mobile {
        text-align: left !important;
    }
}

/* ============================================
   18. TOUCH FRIENDLY (Mobil Dokunma)
   ============================================ */
@media (max-width: 768px) {
    a, button, .btn, input[type="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    input, select, textarea {
        min-height: 44px;
    }
}

/* ============================================
   19. LANDSCAPE ORIENTATION
   ============================================ */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 70vh;
        padding: 4rem 0;
    }
    
    .panel-sidebar {
        height: auto;
    }
}

/* ============================================
   20. PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .panel-sidebar,
    .btn,
    .main-nav,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .panel-content {
        padding: 0 !important;
    }
    
    body {
        background: white !important;
    }
}
