/* ==========================================================================
   WEBMALL KENYA — ENTERPRISE MOBILE FRONTEND OPTIMIZATION STYLESHEET
   Strictly targets mobile viewports (max-width: 768px) without altering desktop.
   ========================================================================== */

@media (max-width: 768px) {
    /* 1. Global Section Spacing & Soft Separation */
    body {
        background-color: #f4f6f8 !important;
        padding-bottom: 70px !important; /* Spacing for fixed bottom nav */
    }

    .mobile-section {
        background: #ffffff;
        border-radius: 16px;
        padding: 14px 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    }

    /* 2. Sticky Mobile Search Bar */
    .mobile-sticky-search-wrapper {
        position: sticky !important;
        top: 0 !important;
        z-index: 1030 !important;
        background: #ffffff !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
        padding: 8px 12px !important;
    }

    .mobile-sticky-search-wrapper .form-control {
        border-radius: 25px !important;
        font-size: 13px !important;
        padding: 8px 16px 8px 38px !important;
        border: 1.5px solid #ffc107 !important;
    }

    /* 3. Hero Carousel Banner (180px - 220px) */
    .mobile-hero-container {
        height: 195px !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        margin-bottom: 12px !important;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06) !important;
    }

    .mobile-hero-container .carousel,
    .mobile-hero-container .carousel-inner,
    .mobile-hero-container .carousel-item {
        height: 195px !important;
    }

    .mobile-hero-container img {
        height: 195px !important;
        width: 100% !important;
        object-fit: cover !important;
        border-radius: 14px !important;
    }

    /* 4. Horizontal Categories Scroll Bar */
    .mobile-categories-scroll {
        display: flex !important;
        overflow-x: auto !important;
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 12px !important;
        padding: 4px 2px 8px 2px !important;
    }

    .mobile-categories-scroll::-webkit-scrollbar {
        display: none !important;
    }

    .mobile-category-pill {
        flex: 0 0 auto !important;
        width: 68px !important;
        text-align: center !important;
        text-decoration: none !important;
    }

    .mobile-category-icon-wrapper {
        width: 54px !important;
        height: 54px !important;
        border-radius: 50% !important;
        background: #f8f9fa !important;
        border: 1.5px solid #e9ecef !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 auto 4px auto !important;
        overflow: hidden !important;
        transition: transform 0.2s ease !important;
    }

    .mobile-category-icon-wrapper img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .mobile-category-title {
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #212529 !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* 5. Compact Mobile Product Cards (Target Height: 260px - 290px) */
    .mobile-product-card {
        height: 280px !important;
        border-radius: 12px !important;
        border: 1px solid #f1f3f5 !important;
        background: #ffffff !important;
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        position: relative !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    }

    .mobile-product-card .img-container {
        height: 125px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
        border-radius: 8px !important;
        background: #ffffff !important;
    }

    .mobile-product-card .img-container img {
        max-height: 125px !important;
        max-width: 100% !important;
        object-fit: contain !important;
    }

    .mobile-product-title {
        font-size: 11.5px !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        height: 28px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        color: #212529 !important;
        margin-top: 4px !important;
        margin-bottom: 2px !important;
    }

    .mobile-product-price {
        font-size: 13px !important;
        font-weight: 800 !important;
        color: #0d6efd !important;
    }

    .mobile-product-old-price {
        font-size: 10px !important;
        color: #6c757d !important;
        text-decoration: line-through !important;
    }

    /* 6. Compact Coupon Centre */
    .mobile-coupon-card {
        max-height: 170px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #1e293b, #0f172a) !important;
        color: #ffffff !important;
        padding: 12px !important;
    }

    /* 7. Compact Install App Banner (140px - 160px) */
    .mobile-install-app-card {
        height: 150px !important;
        border-radius: 14px !important;
        background: linear-gradient(135deg, #ffc107, #ff9800) !important;
        color: #000000 !important;
        padding: 12px 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* 8. Fixed Bottom Navigation Bar with Animations */
    .mobile-bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: #ffffff !important;
        border-top: 1px solid #e2e8f0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        z-index: 1040 !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06) !important;
    }

    .mobile-bottom-nav-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-decoration: none !important;
        color: #64748b !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
        min-width: 54px !important;
        padding: 4px 0 !important;
    }

    .mobile-bottom-nav-item i {
        font-size: 19px !important;
        margin-bottom: 2px !important;
        transition: transform 0.2s ease, color 0.2s ease !important;
    }

    .mobile-bottom-nav-item.active {
        color: #e6a100 !important; /* WebMall Yellow Accent */
        transform: translateY(-2px) !important;
    }

    .mobile-bottom-nav-item.active i {
        color: #ffc107 !important;
        transform: scale(1.2) !important;
    }



    /* 10. Skeleton Shimmer Loaders */
    .skeleton-loader {
        background: #e2e8f0 !important;
        background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%) !important;
        background-size: 200% 100% !important;
        animation: shimmer 1.5s infinite !important;
        border-radius: 8px !important;
    }

    @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }
}
