﻿/* ===========================================
   Carpeen Mobile Bottom Navigation
   =========================================== */

#carpeen-bottom-nav {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
    width: min(430px,calc(100% - 26px));
    height: 72px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 26px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    z-index: 999999;
    display: grid;
    grid-template-columns: 1fr 1fr 76px 1fr 1fr;
    align-items: center;
    padding: 0 6px;
    transition: .35s;
    border: 1px solid transparent;
    background: linear-gradient( 135deg, #ffffff, #fafbfd, #f4f7fb ) padding-box, linear-gradient( 135deg, #7ec8ff, #c3b5ff ) border-box;
}

/* ---------- آیتم ---------- */

.cb-item {
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    transition: .25s;
}

    .cb-item:hover {
        text-decoration: none;
    }

    .cb-item.active {
        color: #2563eb;
    }

        .cb-item.active i {
            transform: translateY(-2px);
        }

    .cb-item i {
        font-size: 21px;
        transition: .25s;
    }

/* ---------- آیکون ---------- */

.cb-icon {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Badge ---------- */

.cb-badge {
    position: absolute;
    right: -8px;
    top: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* ---------- ستون وسط ---------- */

.cb-middle {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---------- Floating Button ---------- */

.cb-fab {
    width: 64px;
    height: 64px;
    margin-top: -34px;
    border-radius: 50%;
    background: #164E63;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 26px;
    box-shadow: 0 12px 28px rgba(22,79,99,.38);
    transition: .25s;
}

    .cb-fab:hover {
        color: white;
        text-decoration: none;
    }

    .cb-fab:active {
        transform: scale(.92);
    }

/* ---------- متن ---------- */

.cb-item span {
    line-height: 1;
}

/* ---------- فقط موبایل ---------- */

@media (max-width:768px) {

    #carpeen-bottom-nav {
        display: grid;
    }

    body {
        padding-bottom: 92px;
    }
}

/* ---------- دسکتاپ ---------- */

@media (min-width:769px) {

    #carpeen-bottom-nav {
        display: none !important;
    }
    .mobile-menu-bar {
        display: none !important;
    }
}

/*=============================
 Ripple
==============================*/

#carpeen-bottom-nav a {
    position: relative;
    overflow: hidden;
}

.cb-ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(37,99,235,.35);
    border-radius: 50%;
    transform: translate(-50%,-50%);
    animation: cbRipple .6s linear;
    pointer-events: none;
}

@keyframes cbRipple {

    0% {
        width: 10px;
        height: 10px;
        opacity: .8;
    }

    100% {
        width: 140px;
        height: 140px;
        opacity: 0;
    }
}

/*=============================
 Compact Mode
==============================*/

#carpeen-bottom-nav.compact {
    height: 58px;
}

    #carpeen-bottom-nav.compact .cb-item span {
        display: none;
    }

    #carpeen-bottom-nav.compact .cb-item {
        height: 58px;
    }

    #carpeen-bottom-nav.compact .cb-fab {
        margin-top: -22px;
        transform: scale(.92);
    }

/* فقط روی موبایل */
@media (max-width: 767px) {

    /* حذف کامل منوی موبایل Midone */
    .mobile-menu,
    .mobile-menu-bar {
        display: none !important;
    }

    /* حذف فاصله بالای TopBar */
    .top-bar-boxed {
        margin-top: 0 !important;
    }
}