/* =============== منوی موبایل =============== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #8B5CF6;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
    transform-origin: center;
}

/* انیمیشن همبرگر به ضربدر */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.main-nav {
    display: flex;
}

/* استایل منوی موبایل */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        flex-direction: column;
        padding-top: 80px;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
    }
    
    .main-nav li {
        width: 100%;
        border-bottom: 1px solid #F3F4F6;
    }
    
    .main-nav a {
        display: block;
        padding: 16px 24px;
        color: #1F2937;
        text-decoration: none;
        font-size: 18px;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .main-nav a:hover,
    .main-nav a.active {
        background: #F9FAFB;
        color: #8B5CF6;
        padding-right: 32px;
    }
    
    /* هدر ثابت با گرادیان */
    .header.sticky {
        position: fixed;
        top: 0;
        width: 100%;
        background: linear-gradient(135deg, #8B5CF6, #7C3AED) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1002;
    }
    
    .header.sticky .header-content {
        padding: 12px 0;
    }
    
    /* رنگ سفید برای تمام عناصر هدر در حالت sticky */
    .header.sticky .logo a,
    .header.sticky .logo h1,
    .header.sticky .logo-icon,
    .header.sticky .logo-icon i,
    .header.sticky .search-btn,
    .header.sticky .search-btn i,
    .header.sticky .cart-btn,
    .header.sticky .cart-btn i,
    .header.sticky .user-btn,
    .header.sticky .user-btn i,
    .header.sticky .btn-sm,
    .header.sticky .btn-sm i {
        color: white !important;
    }
    
    /* عدد داخل سبد خرید */
    .header.sticky .cart-count {
        background: white !important;
        color: #8B5CF6 !important;
        border: 2px solid white !important;
    }
}
/* =============== پایان منوی موبایل =============== */

/* =============== بهبود تجربه موبایل =============== */
@media (max-width: 768px) {
    /* فرم‌ها */
    input, select, textarea {
        font-size: 16px !important;
        padding: 12px !important;
        min-height: 48px !important;
    }
    
    /* دکمه‌ها */
    .btn {
        min-height: 48px !important;
        padding: 12px 20px !important;
        font-size: 16px !important;
    }
    
    /* کارت‌های محصول */
    .product-card {
        padding: 15px !important;
    }
    
    .product-title {
        font-size: 16px !important;
    }
    
    /* سبد خرید */
    .cart-table td {
        padding: 12px 8px !important;
        font-size: 14px !important;
    }
    
    /* فوتر */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}
/* =============== پایان بهبود موبایل =============== */

/* =============== هدر هوشمند موبایل =============== */
@media (max-width: 992px) {
    .header {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .header.hide {
        transform: translateY(-100%);
        box-shadow: none;
    }
    
    .header.show {
        transform: translateY(0);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}
/* =============== پایان هدر هوشمند =============== */