/* Mobile Responsive Styles for Digital Ashim */

@media (max-width: 768px) {
    /* Mobile Navigation Bar */
    .navbar-nav {
        flex-direction: column;
    }
    
    .navbar-collapse {
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background-color: #0A1845; /* Updated to dark blue */
        padding: 15px;
        z-index: 1000;
    }

    /* Mobile Sidebar */
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 80%;
        max-width: 300px;
        background-color: #0A1845; /* Updated to dark blue */
        z-index: 2000;
        overflow-y: auto;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .mobile-sidebar.show {
        transform: translateX(0);
    }

    .mobile-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background-color: #0D225A; /* Slightly lighter dark blue */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-sidebar-logo {
        display: flex;
        align-items: center;
        color: white;
        text-decoration: none;
    }

    .mobile-sidebar-logo i {
        font-size: 1.5rem;
        margin-right: 10px;
    }

    .mobile-sidebar-title {
        font-size: 1.2rem;
        font-weight: 600;
    }

    .mobile-sidebar-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .mobile-sidebar-body {
        padding: 15px;
    }

    .mobile-sidebar-tabs {
        display: flex;
        margin-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mobile-sidebar-tab {
        flex: 1;
        text-align: center;
        padding: 10px;
        color: rgba(255, 255, 255, 0.7);
        text-decoration: none;
        border-bottom: 3px solid transparent;
        transition: all 0.3s ease;
    }

    .mobile-sidebar-tab.active {
        color: white;
        border-bottom-color: #f39c12;
    }

    .mobile-sidebar-categories {
        margin-top: 15px;
    }

    .mobile-sidebar-category {
        display: flex;
        align-items: center;
        padding: 10px;
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        border-radius: 5px;
        margin-bottom: 5px;
        transition: all 0.3s ease;
    }

    .mobile-sidebar-category:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .mobile-sidebar-category i {
        margin-right: 10px;
        width: 20px;
        text-align: center;
    }

    /* Mobile Jumbotron */
    .jumbotron {
        padding: 30px 20px !important;
    }

    .jumbotron h1 {
        font-size: 1.75rem;
    }

    .jumbotron .lead {
        font-size: 1.1rem;
    }
    
    /* Adjust categories to show 3 per row on small screens, 3 on medium */
    @media (max-width: 575px) {
        .col-6.col-sm-4.col-md-3.col-lg-2.mb-4 {
            width: 33.333%;
            padding-left: 3px;
            padding-right: 3px;
            margin-bottom: 6px !important;
        }
        
        .game-info {
            padding: 5px;
        }
        
        .game-title {
            font-size: 0.7rem;
            margin-bottom: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .game-card {
            margin-bottom: 0;
        }
        
        .game-image-wrapper {
            padding-top: 80%; /* Slightly shorter aspect ratio */
        }
    }
    
    @media (min-width: 576px) and (max-width: 767px) {
        .col-6.col-sm-4.col-md-3.col-lg-2.mb-4 {
            width: 33.333%;
            padding-left: 5px;
            padding-right: 5px;
            margin-bottom: 10px !important;
        }
        
        .game-info {
            padding: 8px;
        }
    }

    /* Adjust main content to make room for bottom nav */
    main {
        padding-bottom: 20px;
    }

    /* Footer */
    footer {
        padding-bottom: 20px !important;
    }

    /* Product Cards for Mobile */
    .product-card {
        margin-bottom: 20px;
    }
    
    /* Category Card Styling for Mobile */
    .card {
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        height: 100%;
    }
    
    .card-body {
        padding: 15px 10px;
    }
    
    .card-title {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 5px;
    }
    
    .card-text {
        font-size: 0.8rem;
    }
    
    .card .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }

    /* Mobile Overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1500;
        display: none;
    }

    .mobile-overlay.show {
        display: block;
    }

    /* Mobile Chat Button */
    .mobile-chat-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        background-color: #9c27b0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }

    /* Admin Order Details Mobile View */
    .admin-order-details .table {
        font-size: 0.85rem;
    }

    .admin-order-details .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Special mobile overrides for very small screens */
@media (max-width: 375px) {
    .col-6.col-sm-4.col-md-3.col-lg-2.mb-4 {
        padding-left: 3px;
        padding-right: 3px;
    }
    
    .game-info {
        padding: 8px;
    }
    
    .game-title {
        font-size: 0.8rem;
    }
    
    .game-vendor {
        font-size: 0.7rem;
    }
}
