/* ═══════════════════════════════════════════════════
   FersaStore – Mobile Bottom Navigation
   Dosya: /site/assets/css/mobile-nav.css
   ═══════════════════════════════════════════════════ */

/* ── Varsayılan: masaüstünde gizli ── */
.mobile-bottom-nav {
    display: none;
}

/* ═══════════════════════════════════════════════════
   MOBİL GÖRÜNÜM
   ═══════════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Body'e alt boşluk – nav üstüne binmesin */
    body {
        padding-bottom: 64px;
    }

    /* ── Ana kapsayıcı ── */
    .mobile-bottom-nav {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99999;

        background: #ffffff;
        border-top: 1px solid #f0f0f0;

        /* Belirgin ama sert olmayan gölge */
        box-shadow:
            0 -1px 0 rgba(0, 0, 0, .04),
            0 -4px 24px rgba(0, 0, 0, .08);

        /* iPhone safe area (çentik desteği) */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* ── İtem satırı ── */
    .mbn-items {
        display: flex;
        align-items: flex-end;          /* sepet balonunu yukarı taşır */
        justify-content: space-around;
        height: 56px;
        padding: 0 4px;
        position: relative;
    }

    /* ── Tek item (bağlantı) ── */
    .mbn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: 100%;
        text-decoration: none;
        color: #9ca3af;
        font-size: 10px;
        font-weight: 600;
        font-family: 'Segoe UI', sans-serif;
        letter-spacing: .01em;
        position: relative;
        transition: color .18s ease;
        -webkit-tap-highlight-color: transparent;
        user-select: none;
    }

    /* ── İkon ── */
    .mbn-item i {
        font-size: 20px;
        transition: transform .2s cubic-bezier(.34, 1.56, .64, 1),
                    color .18s ease;
        display: block;
    }

    /* ── Aktif durum ── */
    .mbn-item.active {
        color: var(--primary, #ff7300);
    }

    .mbn-item.active i {
        transform: scale(1.15);
    }

    /* Aktif item üst çizgi göstergesi */
    .mbn-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 28px;
        height: 3px;
        background: var(--primary, #ff7300);
        border-radius: 0 0 4px 4px;
        animation: mbn-indicator .2s ease;
    }

    @keyframes mbn-indicator {
        from { width: 0; opacity: 0; }
        to   { width: 28px; opacity: 1; }
    }

    /* Dokunma ripple efekti */
    .mbn-item:active i {
        transform: scale(.88);
        transition-duration: .08s;
    }

    /* ════════════════════════════════
       SEPET – Yüksek öncelikli buton
       ════════════════════════════════ */
    .mbn-item.mbn-cart {
        /* Biraz daha büyük dokunma alanı */
        flex: 1.1;
    }

    /* Sepet balonu / kabarcık */
    .mbn-cart-bubble {
        position: relative;
        width: 44px;
        height: 44px;
        margin-top: -14px;              /* nav çizgisinin üstüne taşar */
        background: var(--primary, #ff7300);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow:
            0 4px 14px rgba(255, 115, 0, .40),
            0 1px 4px  rgba(255, 115, 0, .25);
        transition: transform .2s cubic-bezier(.34, 1.56, .64, 1),
                    box-shadow .2s ease;
        border: 2px solid #fff;
    }

    .mbn-cart-bubble i {
        font-size: 18px;
        color: #ffffff !important;
        transform: none !important;     /* parent'tan gelen scale'i iptal et */
    }

    /* Aktif/dokunma animasyonu */
    .mbn-item.mbn-cart.active .mbn-cart-bubble,
    .mbn-item.mbn-cart:active .mbn-cart-bubble {
        transform: scale(.90);
        box-shadow:
            0 2px 6px rgba(255, 115, 0, .35),
            0 1px 2px rgba(255, 115, 0, .20);
    }

    /* Sepet aktifken balonu biraz yukarıya taşıma */
    .mbn-item.mbn-cart.active .mbn-cart-bubble {
        transform: translateY(-2px) scale(1.06);
    }

    /* Aktif sepet yazısı rengi */
    .mbn-item.mbn-cart.active {
        color: var(--primary, #ff7300);
    }

    /* Aktif göstergesi yok – balon zaten öne çıkıyor */
    .mbn-item.mbn-cart.active::before {
        display: none;
    }

    /* ── Ürün sayısı badge ── */
    .mbn-badge {
        position: absolute;
        top: -3px;
        right: -3px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        background: #ef4444;
        color: #ffffff;
        font-size: 9px;
        font-weight: 800;
        line-height: 17px;
        text-align: center;
        border-radius: 50px;
        border: 2px solid #ffffff;
        font-family: 'Segoe UI', sans-serif;
        animation: mbn-badge-pop .25s cubic-bezier(.34, 1.56, .64, 1);
    }

    @keyframes mbn-badge-pop {
        from { transform: scale(0); }
        to   { transform: scale(1); }
    }

    /* ── Hover (pointer cihazlar) ── */
    @media (hover: hover) {
        .mbn-item:not(.mbn-cart):hover {
            color: var(--primary, #ff7300);
        }
        .mbn-item:not(.mbn-cart):hover i {
            transform: translateY(-2px);
        }
        .mbn-item.mbn-cart:hover .mbn-cart-bubble {
            transform: translateY(-3px) scale(1.06);
            box-shadow:
                0 6px 18px rgba(255, 115, 0, .45),
                0 2px 6px  rgba(255, 115, 0, .30);
        }
    }

} /* end @media */