
/* =========================================================
   DG24 — Compact Premium Mobile Bottom Navigation
   Separate override file — app.css remains unchanged
   Theme: Burgundy #800020
   ========================================================= */

/* مخفی در دسکتاپ */
.dg24-mobile-nav {
    display: none;
}

@media (max-width: 767px) {

    /* فضای کافی برای نوار شناور در انتهای صفحه */
    .site-footer {
        padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important;
    }

    /* نوار اصلی */
    .dg24-mobile-nav {
        display: flex !important;
        position: fixed !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 8px !important;
        z-index: 99999 !important;

        flex-direction: column;
        gap: 0;

        padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) !important;

        background: rgba(255, 255, 255, 0.97) !important;
        border: 1px solid rgba(128, 0, 32, 0.14);
        border-radius: 20px !important;

        box-shadow:
            0 5px 22px rgba(35, 20, 25, 0.13),
            0 1px 4px rgba(128, 0, 32, 0.06) !important;

        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);

        box-sizing: border-box;
    }

    /* حذف برند و شعار از نوار */
    .dg24-mobile-brand {
        display: none !important;
    }

    /* چهار گزینه در یک ردیف */
    .dg24-mobile-nav-links {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        align-items: stretch;
        gap: 3px !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* هر گزینه */
    .dg24-mobile-nav-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        gap: 2px !important;
        min-width: 0;
        min-height: 50px !important;
        padding: 3px 2px !important;

        color: #5f5660;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 14px !important;

        text-align: center;
        text-decoration: none !important;
        line-height: 1.2;

        -webkit-tap-highlight-color: transparent;
        transition:
            color 0.18s ease,
            background-color 0.18s ease,
            border-color 0.18s ease;
    }

    /* آیکون */
    .dg24-mobile-nav-icon {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: relative;

        width: 25px;
        height: 25px;
        color: inherit;
        flex: 0 0 auto;
    }

    .dg24-mobile-nav-icon svg {
        display: block;
        width: 22px !important;
        height: 22px !important;
        stroke: currentColor;
        stroke-width: 1.8;
    }

    /* عنوان گزینه */
    .dg24-mobile-nav-label {
        display: block !important;
        max-width: 100%;
        overflow: hidden;

        color: inherit;
        font-size: 10px !important;
        font-weight: 600;
        line-height: 1.35;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* وضعیت فعال */
    .dg24-mobile-nav-item.active,
    .dg24-mobile-nav-item[aria-current="page"] {
        color: #800020 !important;
        background: rgba(128, 0, 32, 0.075) !important;
        border-color: rgba(128, 0, 32, 0.08);
    }

    .dg24-mobile-nav-item.active .dg24-mobile-nav-label,
    .dg24-mobile-nav-item[aria-current="page"] .dg24-mobile-nav-label {
        color: #800020 !important;
        font-weight: 800;
    }

    /* بازخورد لمسی */
    .dg24-mobile-nav-item:active {
        background: rgba(128, 0, 32, 0.11) !important;
    }

    /* شمارنده سبد خرید */
    .dg24-cart-badge {
        position: absolute;
        top: -4px;
        right: -7px;

        display: flex;
        align-items: center;
        justify-content: center;

        min-width: 16px;
        height: 16px;
        padding: 0 4px;

        color: #fff !important;
        background: #800020 !important;
        border: 2px solid #fff;
        border-radius: 999px;

        font-size: 9px !important;
        font-weight: 800;
        line-height: 1;
        white-space: nowrap;
    }

    /* موبایل‌های کوچک */
    @media (max-width: 380px) {
        .dg24-mobile-nav {
            left: 7px !important;
            right: 7px !important;
            padding-left: 4px !important;
            padding-right: 4px !important;
            border-radius: 17px !important;
        }

        .dg24-mobile-nav-links {
            gap: 1px !important;
        }

        .dg24-mobile-nav-item {
            min-height: 48px !important;
            padding: 2px 1px !important;
            border-radius: 12px !important;
        }

        .dg24-mobile-nav-icon {
            width: 23px;
            height: 23px;
        }

        .dg24-mobile-nav-icon svg {
            width: 21px !important;
            height: 21px !important;
        }

        .dg24-mobile-nav-label {
            font-size: 9px !important;
        }
    }
}

/* مخفی‌بودن قطعی نوار در دسکتاپ */
@media (min-width: 768px) {
    .dg24-mobile-nav {
        display: none !important;
    }
}

/* احترام به تنظیم کاهش حرکت دستگاه */
@media (prefers-reduced-motion: reduce) {
    .dg24-mobile-nav-item {
        transition: none !important;
    }
}