/* ============================================================
   GENGE MOBILE FIX — Inarekebisha matatizo yote ya simu
   ============================================================ */

/* ---- DESKTOP (zaidi ya 768px): Header ina row moja ya logo+nav+cart, na search bar chini ---- */
@media (min-width: 769px) {
    .header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.9rem 5% !important;
        gap: 0.5rem !important;
    }
    .header-top-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    .search-bar-row {
        display: block !important;
        width: 100% !important;
    }
    .nav-links {
        display: flex !important;
    }
    .mobile-bottom-nav {
        display: none !important;
    }
    .hero-cta-desktop {
        display: block !important;
    }
    .hero-cta-mobile {
        display: none !important;
    }
}

/* ---- MOBILE (768px na chini): Header ina column layout ---- */
@media (max-width: 768px) {

    /* === 1. HEADER: Weka kama column, onyesha logo+cart na search bar ===  */
    .header {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0.75rem 4% !important;
        gap: 0.4rem !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
        transition: transform 0.35s ease !important;
    }

    .header.header-hidden {
        transform: translateY(-100%) !important;
    }

    .header-top-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Ficha nav links za desktop kwenye simu — bottom nav inachukua nafasi */
    .nav-links {
        display: none !important;
    }

    /* Onyesha search bar chini ya header row */
    .search-bar-row {
        display: block !important;
        width: 100% !important;
        margin-top: 0.2rem !important;
    }

    /* === 2. HERO SECTION ===  */
    .hero {
        padding: 0.5rem 3% 1rem !important;
        min-height: auto !important;
    }

    .hero-promo-card {
        flex-direction: column !important;
        padding: 1.2rem 1rem 1.2rem !important;
        text-align: center !important;
        gap: 0 !important;
    }

    .hero-content {
        max-width: 100% !important;
        order: 1 !important;
    }

    .hero-cta-desktop {
        display: none !important;
    }

    .delivery-badge {
        margin-bottom: 0.5rem !important;
    }

    .hero-image {
        order: 2 !important;
        position: relative !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        height: 220px !important;
        margin: 0.4rem auto 0.2rem !important;
    }

    .hero h2 {
        font-size: 1.75rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
    }

    .blob {
        position: absolute !important;
        width: 200px !important;
        height: 200px !important;
        z-index: 1 !important;
    }

    .hero-logo-img {
        position: absolute !important;
        width: 180px !important;
        height: 180px !important;
        object-fit: cover !important;
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50% !important;
        z-index: 2 !important;
        filter: drop-shadow(0 12px 25px rgba(16, 185, 129, 0.45)) !important;
        animation: floatImg 4s ease-in-out infinite alternate, morphImg 8s ease-in-out infinite alternate !important;
    }

    .hero-cta-mobile {
        order: 3 !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin-top: 0.8rem !important;
    }

    .hero-cta-mobile .cta-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        padding: 0.85rem 2.4rem !important;
        font-size: 1.05rem !important;
        font-weight: 700 !important;
        border-radius: 50px !important;
        box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4) !important;
    }

    /* === 3. BOTTOM NAVIGATION BAR === */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 62px !important;
        background: rgba(10, 18, 38, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-top: 1px solid rgba(16, 185, 129, 0.25) !important;
        z-index: 99999 !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0 !important;
    }

    /* Space kwa bottom nav */
    body {
        padding-bottom: 70px !important;
    }
}

/* ---- SIMU NDOGO ZAIDI (480px na chini) ---- */
@media (max-width: 480px) {
    .hero-image {
        height: 180px !important;
        margin: 0.3rem auto 0.1rem !important;
    }
    .blob {
        width: 165px !important;
        height: 165px !important;
    }
    .hero-logo-img {
        width: 145px !important;
        height: 145px !important;
    }
    .hero-cta-mobile {
        margin-top: 0.6rem !important;
    }
    .hero-cta-mobile .cta-btn {
        padding: 0.75rem 2rem !important;
        font-size: 0.95rem !important;
    }
    .hero h2 {
        font-size: 1.45rem !important;
        line-height: 1.25 !important;
    }
    .hero p {
        font-size: 0.88rem !important;
        line-height: 1.4 !important;
    }
    .hero-promo-card {
        padding: 1rem 0.75rem !important;
        border-radius: 16px !important;
    }
    .tag-badge {
        font-size: 0.72rem !important;
        padding: 0.25rem 0.6rem !important;
    }
    .delivery-badge {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.7rem !important;
    }
    /* Grid optimization for small mobile screens */
    .packages-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    .product-card-new {
        padding: 0.6rem !important;
        border-radius: 12px !important;
    }
    .prod-card-img-wrap {
        height: 85px !important;
    }
    .prod-card-name {
        font-size: 0.82rem !important;
    }
    .prod-card-price {
        font-size: 0.88rem !important;
    }
}
