/* ===============================
   PART 10
   Mobile Bottom Nav + Better Mobile Home
================================ */

/* Hide mobile bottom nav on desktop */
.mobile-bottom-nav {
    display: none;
}

/* Better global mobile spacing */
@media (max-width: 768px) {
    body {
        padding-bottom: 94px;
        overflow-x: hidden;
    }

    main {
        overflow-x: hidden;
    }

    .site-header {
        height: 78px;
        padding: 12px 16px !important;
        background: rgba(3, 8, 17, 0.96) !important;
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(0,157,255,0.15);
        position: sticky;
        top: 0;
        z-index: 900;
    }

    .brand {
        gap: 12px;
    }

    .logo-holder {
        width: 54px !important;
        height: 54px !important;
        border-radius: 14px !important;
        overflow: hidden;
    }

    .brand-logo-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .brand-name {
        font-size: 26px !important;
        letter-spacing: 4px;
    }

    .brand-tagline {
        display: none;
    }

    .mobile-menu-btn {
        width: 56px !important;
        height: 56px !important;
        border-radius: 18px !important;
        font-size: 30px !important;
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.14) !important;
        color: #fff !important;
    }

    .header-actions {
        display: none !important;
    }

    .main-nav {
        position: fixed;
        top: 82px;
        left: 14px;
        right: 14px;
        display: none;
        flex-direction: column;
        padding: 14px;
        border-radius: 20px;
        background: rgba(5, 12, 24, 0.98);
        border: 1px solid rgba(0,157,255,0.20);
        box-shadow: 0 20px 60px rgba(0,0,0,0.45);
        z-index: 1000;
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 14px 16px;
        border-radius: 14px;
        font-size: 16px;
    }

    /* Mobile Bottom Nav */
    .mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 86px;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,0.98);
        border-top: 1px solid rgba(0,0,0,0.08);
        display: grid;
        grid-template-columns: 1fr 1fr 1.35fr 1fr 1fr;
        align-items: center;
        gap: 4px;
        z-index: 1200;
        box-shadow: 0 -14px 36px rgba(0,0,0,0.18);
    }

    .mobile-bottom-nav a {
        text-decoration: none;
        color: #262626;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-width: 0;
        height: 68px;
        border-radius: 18px;
        position: relative;
        font-family: Arial, sans-serif;
    }

    .mobile-bottom-nav a b {
        font-size: 12px;
        line-height: 1;
        font-weight: 800;
        white-space: nowrap;
    }

    .mb-icon {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        position: relative;
    }

    .mb-icon svg {
        width: 31px;
        height: 31px;
        fill: #191919;
    }

    .mobile-bottom-nav a.active b,
    .mobile-bottom-nav a.active .mb-icon svg {
        color: #ee1748;
        fill: #ee1748;
    }

    .mobile-bottom-nav a.active .home-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        background: linear-gradient(135deg, #ff174d, #ff5c24);
        transform: rotate(-8deg);
        box-shadow: 0 8px 20px rgba(255,23,77,0.35);
    }

    .mobile-bottom-nav a.active .home-icon svg {
        width: 28px;
        height: 28px;
        fill: #fff;
        transform: rotate(8deg);
    }

    .cart-nav-icon em {
        position: absolute;
        top: -5px;
        right: -8px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        background: #ff174d;
        color: #fff;
        font-size: 10px;
        font-style: normal;
        font-weight: 900;
        display: grid;
        place-items: center;
    }

    .promo-nav {
        height: 62px !important;
        border-radius: 999px !important;
        background: linear-gradient(135deg, #0087ff, #0062ff) !important;
        color: #fff !important;
        box-shadow: 0 10px 24px rgba(0,98,255,0.35);
        margin-top: -8px;
    }

    .promo-nav strong {
        color: #fff;
        font-size: 15px;
        line-height: 1.05;
        text-align: center;
        font-weight: 900;
    }

    .promo-nav.active-promo {
        background: linear-gradient(135deg, #ff174d, #ff7a00) !important;
    }

    /* WhatsApp button not cover menu */
    .whatsapp-float {
        bottom: 104px !important;
        right: 18px !important;
        z-index: 1100 !important;
        padding: 13px 20px !important;
        border-radius: 999px !important;
        font-size: 15px !important;
    }

    /* Better home hero on mobile */
    .p8-hero-layout {
        display: grid !important;
        grid-template-columns: 1fr !important;
        padding: 14px !important;
        gap: 16px !important;
        min-height: auto !important;
        background:
            radial-gradient(circle at top, rgba(0,157,255,0.18), transparent 38%),
            linear-gradient(180deg, #06182b, #020711);
    }

    .p8-hero-visual {
        min-height: 450px !important;
        height: 450px !important;
        border-radius: 28px !important;
        border: 1px solid rgba(0,157,255,0.22) !important;
        box-shadow: 0 0 28px rgba(0,157,255,0.18) !important;
        overflow: hidden !important;
    }

    .p8-hero-visual > img,
    .p8-slide img {
        object-fit: cover !important;
        object-position: center !important;
        filter: brightness(0.82);
    }

    .p8-hero-visual::after {
        background:
            linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.52) 50%, rgba(0,0,0,0.80)),
            radial-gradient(circle at center, rgba(0,157,255,0.14), transparent 55%) !important;
    }

    .p8-hero-overlay {
        left: 26px !important;
        right: 26px !important;
        bottom: 28px !important;
        max-width: none !important;
    }

    .p8-hero-overlay span {
        font-size: 14px !important;
        padding: 10px 14px !important;
        margin-bottom: 14px !important;
        background: rgba(255,122,0,0.24) !important;
        border: 1px solid rgba(255,122,0,0.50) !important;
        backdrop-filter: blur(8px);
    }

    .p8-hero-overlay h1 {
        font-size: 42px !important;
        line-height: 0.98 !important;
        margin-bottom: 12px !important;
        letter-spacing: -1px;
        text-shadow: 0 8px 30px rgba(0,0,0,0.65);
    }

    .p8-hero-overlay p {
        font-size: 18px !important;
        line-height: 1.25 !important;
        margin-bottom: 18px !important;
        color: #e9f7ff !important;
    }

    .p8-hero-overlay a {
        padding: 16px 26px !important;
        border-radius: 18px !important;
        font-size: 18px !important;
        box-shadow: 0 12px 35px rgba(255,122,0,0.42);
    }

    .p8-slider-dots {
        left: 26px !important;
        bottom: 16px !important;
    }

    /* Trending mobile */
    .trending-panel {
        border-radius: 28px !important;
        padding: 20px !important;
        background: rgba(5, 13, 25, 0.94) !important;
        border: 1px solid rgba(0,157,255,0.22) !important;
    }

    .panel-header h3 {
        font-size: 24px !important;
    }

    .trend-item {
        grid-template-columns: 90px 1fr !important;
        gap: 14px !important;
        padding: 14px 0 !important;
    }

    .trend-img {
        width: 90px !important;
        height: 90px !important;
        border-radius: 18px !important;
    }

    .trend-info h4 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }

    .trend-info p {
        font-size: 14px !important;
    }

    .trend-info strong {
        font-size: 18px !important;
    }

    .offer-box {
        border-radius: 24px !important;
        padding: 20px !important;
    }

    .offer-box h3 {
        font-size: 22px !important;
    }

    /* Quick features */
    .quick-features {
        padding: 14px !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .quick-card {
        min-height: 118px !important;
        border-radius: 22px !important;
        padding: 16px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .quick-card span {
        font-size: 28px !important;
    }

    .quick-card h3 {
        font-size: 16px !important;
    }

    .quick-card p {
        font-size: 12px !important;
    }

    .quick-card b {
        position: absolute;
        right: 14px;
        bottom: 10px;
    }

    /* Featured products section */
    .products-section {
        padding: 14px !important;
    }

    .section-header {
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }

    .section-header h2 {
        font-size: 28px !important;
        line-height: 1.1 !important;
    }

    .section-header p {
        font-size: 15px !important;
    }

    .section-header a {
        font-size: 14px !important;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .product-card {
        border-radius: 20px !important;
        padding: 0 !important;
    }

    .product-card .product-image {
        height: 125px !important;
        padding: 12px !important;
    }

    .product-card h3 {
        font-size: 15px !important;
        line-height: 1.25 !important;
        margin: 10px 12px 4px !important;
    }

    .product-card p {
        font-size: 12px !important;
        margin: 0 12px 8px !important;
    }

    .product-price {
        margin: 0 12px 10px !important;
    }

    .product-price strong {
        font-size: 16px !important;
    }

    .product-bottom {
        margin: 0 12px 12px !important;
        gap: 8px !important;
    }

    .product-bottom .rating {
        font-size: 11px !important;
    }

    .cart-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 14px !important;
    }

    /* Business model */
    .business-model {
        padding: 14px !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .model-card {
        border-radius: 24px !important;
        padding: 22px !important;
    }

    .model-card h2 {
        font-size: 24px !important;
    }

    /* Footer hidden smaller because bottom menu exists */
    .site-footer {
        margin-bottom: 74px !important;
        padding: 26px 18px !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        gap: 8px !important;
        font-size: 13px !important;
    }
}

/* Very small phones */
@media (max-width: 390px) {
    .brand-name {
        font-size: 23px !important;
        letter-spacing: 3px;
    }

    .logo-holder {
        width: 48px !important;
        height: 48px !important;
    }

    .mobile-menu-btn {
        width: 50px !important;
        height: 50px !important;
    }

    .p8-hero-visual {
        min-height: 420px !important;
        height: 420px !important;
    }

    .p8-hero-overlay h1 {
        font-size: 36px !important;
    }

    .p8-hero-overlay p {
        font-size: 16px !important;
    }

    .mobile-bottom-nav a b {
        font-size: 11px;
    }

    .promo-nav strong {
        font-size: 14px;
    }
}