/**
 * Bottom Navigation Bar - Ultra Slim & Elegant Design
 * شريط التنقل السفلي - تصميم نحيف وأنيق للغاية
 */

/* ==================== Bottom Navigation Bar ==================== */
.bottom-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(124, 58, 237, 0.08);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0.25rem calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 1040;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.04);
}

/* ==================== Navigation Items ==================== */
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    padding: 0.375rem 0.5rem;
    text-decoration: none;
    color: #9CA3AF;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    max-width: 70px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bottom-nav-label {
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    opacity: 0.8;
}

/* ==================== Active State ==================== */
.bottom-nav-item.active {
    color: #7C3AED;
}

.bottom-nav-item.active .bottom-nav-icon {
    transform: translateY(-2px);
}

.bottom-nav-item.active .bottom-nav-label {
    opacity: 1;
    font-weight: 700;
}

/* Active Indicator - خط تحت العنصر النشط */
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: linear-gradient(90deg, #7C3AED, #A78BFA);
    border-radius: 0 0 2px 2px;
}

/* ==================== Hover Effect ==================== */
@media (hover: hover) {
    .bottom-nav-item:hover {
        color: #7C3AED;
    }

    .bottom-nav-item:hover .bottom-nav-icon {
        transform: translateY(-2px) scale(1.05);
    }

    .bottom-nav-item:hover .bottom-nav-label {
        opacity: 1;
    }
}

/* ==================== Badge (Cart Counter) ==================== */
.bottom-nav-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    font-size: 0.5rem;
    font-weight: 700;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.1875rem;
    border: 1.5px solid white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* ==================== FAB - Floating Action Button ==================== */
.bottom-nav-fab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 0 0 auto;
    -webkit-tap-highlight-color: transparent;
    margin-top: -1.25rem;
}

.bottom-nav-fab-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    color: white;
    font-size: 1.25rem;
    border: 2.5px solid white;
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-fab-label {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #7C3AED;
    opacity: 0.9;
}

.bottom-nav-fab.active .bottom-nav-fab-icon {
    background: linear-gradient(135deg, #6D28D9 0%, #8B5CF6 100%);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bottom-nav-fab.active .bottom-nav-fab-label {
    opacity: 1;
}

@media (hover: hover) {
    .bottom-nav-fab:hover .bottom-nav-fab-icon {
        transform: translateY(-3px) scale(1.05);
        box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35), 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .bottom-nav-fab:hover .bottom-nav-fab-label {
        opacity: 1;
    }
}

/* ==================== Body Padding ==================== */
body {
    padding-bottom: 70px;
}

/* ==================== Responsive Design ==================== */

/* Hide on Desktop */
@media (min-width: 769px) {
    .bottom-nav-bar {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}

/* Tablet */
@media (max-width: 768px) and (min-width: 481px) {
    .bottom-nav-icon {
        font-size: 1.375rem;
    }

    .bottom-nav-label {
        font-size: 0.625rem;
    }

    .bottom-nav-fab-icon {
        width: 52px;
        height: 52px;
        font-size: 1.375rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .bottom-nav-item {
        padding: 0.375rem 0.375rem;
    }

    .bottom-nav-icon {
        font-size: 1.125rem;
    }

    .bottom-nav-fab-icon {
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .bottom-nav-fab {
        margin-top: -1.125rem;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .bottom-nav-item {
        padding: 0.375rem 0.25rem;
        gap: 0.0625rem;
    }

    .bottom-nav-icon {
        font-size: 1rem;
    }

    .bottom-nav-label {
        font-size: 0.5rem;
    }

    .bottom-nav-fab-icon {
        width: 46px;
        height: 46px;
        font-size: 1rem;
        border-width: 2px;
    }

    .bottom-nav-fab {
        margin-top: -1rem;
    }

    .bottom-nav-badge {
        min-width: 12px;
        height: 12px;
        font-size: 0.4375rem;
    }
}

/* ==================== Animations ==================== */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bottom-nav-bar {
    animation: slideUp 0.3s ease-out;
}

/* ==================== Safe Area Support (iOS) ==================== */
@supports (padding: max(0px)) {
    .bottom-nav-bar {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
}

/* ==================== Smooth Transitions ==================== */
.bottom-nav-item,
.bottom-nav-fab {
    will-change: transform;
}

/* ==================== Active Touch Feedback - Clean & Professional ==================== */
.bottom-nav-item:active {
    opacity: 0.7;
}

.bottom-nav-item:active .bottom-nav-icon {
    transform: scale(0.95) translateY(-2px);
}

.bottom-nav-fab:active {
    opacity: 0.9;
}

.bottom-nav-fab:active .bottom-nav-fab-icon {
    transform: scale(0.97) translateY(-1px);
}

/* ==================== Print Styles ==================== */
@media print {
    .bottom-nav-bar {
        display: none;
    }

    body {
        padding-bottom: 0;
    }
}