/* ========================================
   Mobile Navigation Styles
   ======================================== */

/* --------------- Mobile Sidebar Menu --------------- */

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #434343;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item:active {
    background-color: #f5f5f5;
}

.mobile-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
}

.mobile-nav-text {
    flex: 1;
    font-weight: 600;
}

/* WP Menu items styling inside mobile sidebar */
.mobile-wp-menu li {
    list-style: none;
}

.mobile-wp-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #434343;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-wp-menu li a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.mobile-wp-menu li a:hover {
    background-color: #f5f5f5;
}

.mobile-wp-menu li a:hover::before {
    background: #98C2A9;
}

/* Scrollbar for mobile sidebar */
#mobile-menu-scroll::-webkit-scrollbar {
    width: 3px;
}

#mobile-menu-scroll::-webkit-scrollbar-track {
    background: transparent;
}

#mobile-menu-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}


/* --------------- Mobile Bottom Navigation --------------- */

#mobile-bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    min-width: 56px;
    border-radius: 12px;
    text-decoration: none;
    color: #9ca3af;
    transition: all 0.25s ease;
    position: relative;
}

.bottom-nav-item .bottom-nav-icon {
    font-size: 22px;
    transition: all 0.25s ease;
}

.bottom-nav-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    transition: all 0.25s ease;
    white-space: nowrap;
}

/* Active state */
.bottom-nav-item.active {
    color: #98C2A9;
}

.bottom-nav-item.active .bottom-nav-icon {
    font-variation-settings: 'FILL' 1;
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    border-radius: 0 0 4px 4px;
    background: #98C2A9;
}

/* Cart icon wrapper */
.bottom-nav-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-cart-badge {
    line-height: 1;
}


/* --------------- Mobile Search Bar --------------- */

#mobile-search-bar {
    will-change: max-height;
}

#mobile-search-field {
    font-family: 'IRANSansDN', sans-serif;
}

#mobile-search-field::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239ca3af'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") center/contain no-repeat;
    cursor: pointer;
}


/* --------------- Animations --------------- */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Staggered animation for menu items */
.mobile-nav-list li {
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

#mobile-sidebar.translate-x-0 .mobile-nav-list li:nth-child(1) {
    animation-delay: 0.05s;
}

#mobile-sidebar.translate-x-0 .mobile-nav-list li:nth-child(2) {
    animation-delay: 0.1s;
}

#mobile-sidebar.translate-x-0 .mobile-nav-list li:nth-child(3) {
    animation-delay: 0.15s;
}

#mobile-sidebar.translate-x-0 .mobile-nav-list li:nth-child(4) {
    animation-delay: 0.2s;
}

#mobile-sidebar.translate-x-0 .mobile-nav-list li:nth-child(5) {
    animation-delay: 0.25s;
}

#mobile-sidebar.translate-x-0 .mobile-nav-list li:nth-child(6) {
    animation-delay: 0.3s;
}

/* When sidebar is closed, reset animation */
#mobile-sidebar.translate-x-full .mobile-nav-list li {
    opacity: 0;
    animation: none;
}

/* Footer spacing for bottom nav */
@media (max-width: 1023px) {
    #footer-main {
        margin-bottom: 0 !important;
        padding-bottom: 0;
    }
}