/* ============================================================
   MOBILE BOTTOM BAR — Ultra Modern Floating Design
   Sadece mobilde görünür. Floating pill, glassmorphism,
   micro-interactions. Site token'larıyla tam uyumlu.
   ============================================================ */

.mobile-bottom-bar {
    display: none;
}

@media (max-width: 991px) {

    /* İçerik barın altında kalmasın */
    body {
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    }

    /* ── Bar konteyneri — Floating Pill ──────────────────── */
    .mobile-bottom-bar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        z-index: 1050;
        display: flex;
        align-items: center;
        justify-content: space-around;
        height: 70px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: saturate(180%) blur(24px);
        -webkit-backdrop-filter: saturate(180%) blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow:
            0 10px 40px rgba(0, 0, 0, 0.10),
            0 4px 12px rgba(0, 0, 0, 0.05);
        font-family: var(--font-secondary, 'Inter', -apple-system, sans-serif);
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.3s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)),
                    opacity 0.3s ease;
        will-change: transform;
    }

    /* Scroll aşağı gidince gizlenme (JS ile .is-hidden class'ı eklenir) */
    .mobile-bottom-bar.is-hidden {
        transform: translateY(calc(100% + 24px));
        opacity: 0;
        pointer-events: none;
    }

    /* ── Sekmeler ─────────────────────────────────────────── */
    .mobile-bottom-bar__item {
        flex: 1;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 2px;
        text-decoration: none;
        color: rgba(0, 0, 0, 0.45);
        font-size: 10.5px;
        font-weight: 500;
        letter-spacing: 0.01em;
        line-height: 1;
        min-width: 0;
        border-radius: 14px;
        transition: color 0.25s ease,
                    background 0.3s ease,
                    transform 0.2s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1));
    }

    /* İkon */
    .mobile-bottom-bar__item svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
        transition: transform 0.3s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1)),
                    stroke-width 0.25s ease;
    }

    /* Basma efekti */
    .mobile-bottom-bar__item:active {
        transform: scale(0.92);
    }

    .mobile-bottom-bar__item:active svg {
        transform: scale(0.9);
    }

    /* ── Hover / Focus ────────────────────────────────────── */
    .mobile-bottom-bar__item:hover {
        color: rgba(0, 0, 0, 0.7);
    }

    /* ── Aktif sekme — Pill highlight ────────────────────── */
    .mobile-bottom-bar__item.is-active {
        color: #000000;
        background: rgba(0, 0, 0, 0.06);
    }

    .mobile-bottom-bar__item.is-active svg {
        stroke-width: 2;
        transform: translateY(-1px);
    }

    .mobile-bottom-bar__item.is-active::after {
        content: "";
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #000000;
        opacity: 0.8;
        animation: dotPulse 2s ease-in-out infinite;
    }

    .mobile-bottom-bar__item.is-active .mobile-bottom-bar__label {
        font-weight: 600;
        color: #000000;
    }

    /* ── Etiket ───────────────────────────────────────────── */
    .mobile-bottom-bar__label {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        opacity: 0.9;
        transition: opacity 0.2s ease, font-weight 0.2s ease;
        letter-spacing: -0.02em; /* Harfleri biraz sıkıştır — taşmayı önler */
    }

    /* ── Badge (sepet/favori sayısı) ──────────────────────── */
    .mobile-bottom-bar__badge {
        position: absolute;
        top: 2px;
        right: calc(50% - 20px);
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        background: #000000;
        color: #FFFFFF;
        font-size: 10px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
        border-radius: 9999px;
        box-sizing: border-box;
        pointer-events: none;
        letter-spacing: -0.02em;
        box-shadow: 0 2px 6px rgba(53, 53, 50, 0.2);
        transform: scale(1);
        transition: transform 0.3s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1));
    }

    /* Badge ekleme animasyonu */
    .mobile-bottom-bar__badge.is-bumped {
        animation: badgeBump 0.4s var(--ease-spring, cubic-bezier(0.16, 1, 0.3, 1));
    }

    /* 0 değerini gizle */
    .mobile-bottom-bar__badge:empty,
    .mobile-bottom-bar__badge[data-zero="1"] {
        display: none;
    }

    /* ── Animasyonlar ─────────────────────────────────────── */
    @keyframes dotPulse {
        0%, 100% { opacity: 0.8; transform: translateX(-50%) scale(1); }
        50% { opacity: 0.4; transform: translateX(-50%) scale(0.7); }
    }

    @keyframes badgeBump {
        0% { transform: scale(1); }
        40% { transform: scale(1.3); }
        70% { transform: scale(0.9); }
        100% { transform: scale(1); }
    }
}

/* ── Çok küçük ekranlar ───────────────────────────────────── */
@media (max-width: 360px) {
    .mobile-bottom-bar {
        left: 8px;
        right: 8px;
        height: 64px;
        border-radius: 18px;
    }

    .mobile-bottom-bar__item {
        font-size: 9.5px;
    }

    .mobile-bottom-bar__item svg {
        width: 22px;
        height: 22px;
    }
}

/* ── Dark mode override KALDIRILDI — bar her zaman beyaz kalır ── */
