/* =========================================
   TAHA BAZAR - FOOTER TOOLBAR PRO
   ========================================= */

.taha-footer-toolbar {
    --taha-blue: #0F2267;
    --taha-blue-light: #F1F4FC;
    --taha-text: #252B3A;
    --taha-muted: #737B8C;
    --taha-border: #E8EBF2;

    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99990;

    width: 100%;
    min-height: 64px;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px 16px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom));

    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--taha-border);

    box-shadow:
        0 -4px 18px rgba(20, 32, 70, 0.055);

    direction: rtl;
    font-family: inherit;

    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.taha-footer-toolbar *,
.taha-footer-toolbar *::before,
.taha-footer-toolbar *::after {
    box-sizing: border-box;
}

.taha-footer-toolbar .toolbar-links {
    width: 100%;
    max-width: 620px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
    justify-items: center;

    gap: 4px;
    margin: 0 auto;
}

.taha-footer-toolbar .toolbar-item {
    position: relative;

    width: 100%;
    min-width: 0;
    min-height: 52px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;
    padding: 3px 2px;

    color: var(--taha-muted);
    background: transparent;

    border: 0;
    border-radius: 10px;

    text-decoration: none !important;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;

    -webkit-tap-highlight-color: transparent;
}

.taha-footer-toolbar .toolbar-item svg {
    display: block;

    width: 21px;
    height: 21px;
    flex: 0 0 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform 0.2s ease;
}

.taha-footer-toolbar .toolbar-item span {
    display: block;
    white-space: nowrap;
}

.taha-footer-toolbar .toolbar-item:hover,
.taha-footer-toolbar .toolbar-item:focus-visible {
    color: var(--taha-blue);
    background: var(--taha-blue-light);
    outline: none;
}

.taha-footer-toolbar .toolbar-item:hover svg {
    transform: translateY(-2px);
}

.taha-footer-toolbar .toolbar-item:active {
    transform: scale(0.96);
}

/* شمارنده سبد خرید */

.taha-footer-toolbar .toolbar-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.taha-footer-toolbar .cart-count {
    position: absolute;
    top: -6px;
    right: -9px;

    min-width: 17px;
    height: 17px;
    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    background: #E53935;

    border: 2px solid #fff;
    border-radius: 20px;

    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* حالت فوکوس برای دسترسی‌پذیری */

.taha-footer-toolbar a:focus-visible {
    outline: 2px solid var(--taha-blue);
    outline-offset: 2px;
}

/* منوهای تکمیلی */

.taha-footer-toolbar .toolbar-menu,
.taha-footer-toolbar .toolbar-categories {
    display: none;
}

/* موبایل کوچک */

@media (max-width: 480px) {
    .taha-footer-toolbar {
        min-height: 61px;
        padding: 4px 8px;
        padding-bottom: calc(4px + env(safe-area-inset-bottom));

        box-shadow:
            0 -3px 14px rgba(20, 32, 70, 0.065);
    }

    .taha-footer-toolbar .toolbar-links {
        gap: 2px;
    }

    .taha-footer-toolbar .toolbar-item {
        min-height: 51px;
        gap: 2px;
        border-radius: 8px;
        font-size: 10px;
    }

    .taha-footer-toolbar .toolbar-item svg {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
    }

    .taha-footer-toolbar .cart-count {
        top: -5px;
        right: -8px;
    }
}

/* موبایل بسیار کوچک */

@media (max-width: 350px) {
    .taha-footer-toolbar {
        padding-right: 4px;
        padding-left: 4px;
    }

    .taha-footer-toolbar .toolbar-item {
        font-size: 9px;
    }
}

/* کاهش حرکت برای کاربران حساس به انیمیشن */

@media (prefers-reduced-motion: reduce) {
    .taha-footer-toolbar *,
    .taha-footer-toolbar *::before,
    .taha-footer-toolbar *::after {
        transition: none !important;
        animation: none !important;
    }
}
