/* ==========================================================================
   نوار ناوبری چسبان پایین (Bottom Navigation Bar)
   مخصوص موبایل و تبلت - در دسکتاپ کاملاً مخفی است
   ========================================================================== */

.webapp-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #eef2f6;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px); /* سازگاری با آیفون و ژست‌های حرکتی */
    direction: rtl;
    -webkit-tap-highlight-color: transparent;
}

/* آیتم‌های ناوبری */
.webapp-bottom-nav .nav-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #94a3b8;
    text-decoration: none !important;
    font-size: 0.65rem;
    font-weight: 700;
    flex: 1;
    height: 100%;
    transition: color 0.2s ease, transform 0.15s ease;
    user-select: none;
}

.webapp-bottom-nav .nav-tab-item svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

/* حالت تب فعال */
.webapp-bottom-nav .nav-tab-item.active {
    color: #059669; /* رنگ سبز برند گودارو */
}

.webapp-bottom-nav .nav-tab-item.active svg {
    stroke-width: 2.2;
    transform: translateY(-1px);
}

/* افکت فشرده شدن هنگام لمس با انگشت */
.webapp-bottom-nav .nav-tab-item:active {
    transform: scale(0.92);
}

/* دکمه برجسته سبد خرید در وسط منو */
.webapp-bottom-nav .cart-highlight {
    position: relative;
    margin-top: -16px; /* بالا آمدن دکمه از نوار */
}

.webapp-bottom-nav .cart-icon-bubble {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
    border: 3px solid #ffffff;
    position: relative;
    transition: transform 0.2s ease;
}

.webapp-bottom-nav .cart-highlight:active .cart-icon-bubble {
    transform: scale(0.9);
}

.webapp-bottom-nav .cart-icon-bubble svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
}

/* نشانگر قرمز تعداد آیتم‌های سبد خرید */
.webapp-bottom-nav .cart-badge-count {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 900;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    font-family: inherit;
    line-height: 1;
}

/* مخفی‌سازی کامل در دسکتاپ و تبلت افقی */
@media (min-width: 768px) {
    .webapp-bottom-nav {
        display: none !important;
    }
}

/* نگهدارنده کلی نوار و بج */
.webapp-nav-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

/* نشان مینیاتوری سپر اعتماد بالای لبه منو */
.trust-badge-trigger {
    position: absolute;
    top: -24px;
    left: 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #475569;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, background-color 0.2s ease;
}

.trust-badge-trigger:active {
    transform: scale(0.94);
}

.trust-badge-trigger svg {
    width: 13px;
    height: 13px;
    color: #059669; /* سبز امنیتی */
}

/* پنجره کشویی نمادها (Bottom Sheet) */
.trust-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.trust-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.trust-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-radius: 20px 20px 0 0;
    padding: 14px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
    direction: rtl;
}

.trust-sheet.active {
    transform: translateY(0);
}

.trust-sheet-header {
    position: relative;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.trust-sheet-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 4px;
    margin: 0 auto 10px;
}

.trust-sheet-header h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
}

.trust-sheet-close {
    position: absolute;
    left: 0;
    top: 0;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #94a3b8;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.trust-sheet-body {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 16px 0 6px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    flex: 1;
    max-width: 140px;
}

.trust-item img {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

.trust-item span {
    font-size: 0.65rem;
    color: #64748b;
    font-weight: 700;
    text-align: center;
}


/* مخفی‌سازی کامل در دسکتاپ */
@media (max-width: 767px) {
    footer {
        display: none;
    }

}
@media (min-width: 768px) {
    .webapp-nav-wrapper,
    .trust-sheet,
    .trust-sheet-overlay {
        display: none !important;
    }

}


