/**
 * Amazon Style Mobile Optimization
 * High-performance responsive layouts for KitapSitesi
 */

/* 1. Global Reset for Mobile Overflow */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* 2. Responsive Containers */
.container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
}

@media (min-width: 1200px) {
    .container { max-width: 1320px !important; }
}

/* 3. Mobile Navigation Bar (Amazon Style App Bar) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #ffffff;
    display: none; /* Desktopta gizli */
    grid-template-columns: repeat(4, 1fr);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 10001;
    border-top: 1px solid #eee;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555;
    font-size: 10px;
    font-weight: 600;
}

.mobile-bottom-nav a i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-bottom-nav a.active {
    color: #ff9900;
}

@media (max-width: 991px) {
    .mobile-bottom-nav { display: grid; }
    body { padding-bottom: 60px; } /* Alttaki bar için boşluk */
    
    /* Desktop Header Hide elements */
    .ikx-header-standard .h-utility, 
    .ikx-header-standard .h-nav,
    .ikx-header-standard .h-promo { 
        display: none !important; 
    }
    
    .h-main {
        height: auto !important;
        flex-direction: column !important;
        padding: 10px 15px !important;
        gap: 10px !important;
    }
    
    .h-left, .h-right {
        width: 100%;
        justify-content: space-between;
        display: flex;
        align-items: center;
    }
    
    .h-center {
        display: block !important;
        width: 100%;
        margin: 5px 0;
    }
    
    .h-logo img { max-height: 40px !important; }
}

/* 4. Product Grid Optimization (2-Column Grid) */
@media (max-width: 767px) {
    /* Kitap kartlarını mobilde 2'li yap */
    .row.row-cols-2 > * {
        padding: 5px !important;
    }
    
    .book-card {
        margin-bottom: 10px;
    }
    
    .section-title { font-size: 1.2rem !important; margin-bottom: 15px !important; }
    
    /* Account Page Sidebar Scroll */
    .account-sidebar-minimal {
        display: flex !important;
        overflow-x: auto;
        white-space: nowrap;
        background: #fff;
        padding: 10px;
        margin-bottom: 20px;
        border-radius: 10px;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
    }
    .account-sidebar-minimal ul { display: flex; gap: 15px; margin-bottom: 0 !important; padding-left: 0; }
    .account-sidebar-minimal li { margin-bottom: 0 !important; border-bottom: 0 !important; padding-bottom: 0 !important; }
    
    /* Checkout/Cart Table Fix */
    .table-responsive {
        border: 0;
    }
}

/* 5. UI Spacing Improvements */
.card { border-radius: 12px !important; }
.btn { border-radius: 50px !important; }
.shadow-sm { box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important; }
