/* Restaurant Menu Plugin Styles */

.restaurant-menu-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Vazir', Arial, sans-serif;
    direction: rtl;
    background-color: #f6f6f6;
}

/* منوی دسته‌بندی - اسکرول افقی قوی */
.restaurant-menu-categories {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 15px 5px !important;
    margin-bottom: 25px !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    
    /* اجبار به عدم wrap */
    flex-wrap: nowrap !important;
    width: 100% !important;
    max-width: 100% !important;
    
    /* حذف استایل‌های پیش‌فرض */
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    
    /* نمایش scrollbar موقت برای تست */
    scrollbar-width: thin !important;
    scrollbar-color: #ccc transparent !important;
}

/* scrollbar برای وب‌کیت */
.restaurant-menu-categories::-webkit-scrollbar {
    height: 6px !important;
    display: block !important;
}

.restaurant-menu-categories::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
}

.restaurant-menu-categories::-webkit-scrollbar-thumb {
    background: #ccc !important;
    border-radius: 3px !important;
}

.menu-category-btn {
    /* حذف تمام استایل‌های دکمه */
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    
    /* تنظیمات اساسی */
    padding: 8px 15px !important;
    margin: 0 10px 0 0 !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: normal !important;
    color: #666 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    
    /* تنظیمات فلکس */
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-width: 60px !important;
    width: auto !important;
    height: auto !important;
    
    /* تنظیمات انتقال */
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    outline: none !important;
    
    /* حذف float و position */
    float: none !important;
    position: static !important;
    display: inline-block !important;
}

.menu-category-btn:hover {
    color: #333 !important;
    background: rgba(0,0,0,0.05) !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.menu-category-btn.active {
    color: #007cba !important;
    font-weight: bold !important;
    background: rgba(0,124,186,0.1) !important;
    border: none !important;
    box-shadow: none !important;
}

.menu-category-btn.active:hover {
    color: #007cba !important;
    font-weight: bold !important;
    background: rgba(0,124,186,0.15) !important;
}

.menu-category-btn:focus {
    outline: none !important;
    color: #007cba !important;
    border: none !important;
    box-shadow: none !important;
}

/* اضافه کردن نشانگر اسکرول در موبایل */
@media (max-width: 768px) {
    .restaurant-menu-categories {
        position: relative;
    }
    
    .restaurant-menu-categories::before {
        content: '';
        position: absolute;
        right: -5px;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
        pointer-events: none;
        z-index: 2;
    }
    
    .restaurant-menu-categories::after {
        content: '';
        position: absolute;
        left: -5px;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, rgba(255,255,255,0.9), transparent);
        pointer-events: none;
        z-index: 2;
    }
    
    .menu-category-btn {
        font-size: 15px;
        padding: 6px 12px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .menu-category-btn {
        font-size: 14px;
        padding: 6px 10px;
    }
}

/* لودینگ */
.restaurant-menu-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* محصولات - طراحی مشابه تصویر */
.restaurant-menu-products {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.restaurant-menu-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #d0d0d0;
    transition: background-color 0.2s ease;
    direction: rtl;
}

.restaurant-menu-item:last-child {
    border-bottom: none;
}

.restaurant-menu-item:hover {
    background: #f9f9f9;
}

/* عکس محصول - سمت راست */
.menu-item-image {
    width: 80px;
    height: 100%;
    margin-left: 20px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    order: 2; /* عکس در سمت راست */
}

.menu-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* محتوای محصول - سمت چپ */
.menu-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
    order: 1; /* متن در سمت چپ */
}

/* نام محصول - بالا و بزرگ */
.menu-item-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1.3;
    text-align: right;
}

/* توضیحات محصول - وسط */
.menu-item-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 8px 0;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* قیمت محصول - پایین */
.menu-item-price {
    font-size: 16px;
    font-weight: normal;
    color: #333;
    margin-top: auto;
    text-align: right;
    padding-top: 5px;
}

.menu-item-price .amount {
    font-size: 16px;
    font-weight: normal;
}

/* پیام عدم وجود محصول */
.no-products-found {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
    background: #f8f9fa;
    border: 1px dashed #ccc;
    border-radius: 8px;
    margin: 20px 0;
}

/* خطا */
.restaurant-menu-error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #ffcdd2;
}

/* ریسپانسیو - موبایل */
@media (max-width: 768px) {
    .restaurant-menu-container {
        padding: 15px;
    }
    
    .restaurant-menu-categories {
        padding: 12px 0;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .menu-category-btn {
        font-size: 15px;
    }
    
    .restaurant-menu-item {
        padding: 15px;
        flex-direction: row;
    }
    
    .menu-item-image {
        width: 70px;
        height: 100%;
        margin-left: 12px;
    }
    
    .menu-item-title {
        font-size: 16px;
    }
    
    .menu-item-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .menu-item-price {
        font-size: 15px;
        margin-top: 5px;
    }
}

/* موبایل کوچک */
@media (max-width: 480px) {
    .restaurant-menu-container {
        padding: 10px;
    }
    
    .restaurant-menu-categories {
        gap: 18px;
        padding: 10px 0;
    }
    
    .menu-category-btn {
        font-size: 14px;
    }
    
    .restaurant-menu-item {
        padding: 12px;
    }
    
    .menu-item-image {
        width: 60px;
        height: 100%;
        margin-left: 10px;
    }
    
    .menu-item-title {
        font-size: 15px;
    }
    
    .menu-item-description {
        font-size: 12px;
    }
    
    .menu-item-price {
        font-size: 14px;
    }
}

/* انیمیشن ظاهر شدن - ساده و مناسب */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.restaurant-menu-products {
    animation: fadeInUp 0.4s ease-out;
}

.restaurant-menu-item {
    animation: fadeInUp 0.3s ease-out;
    animation-fill-mode: both;
}

.restaurant-menu-item:nth-child(1) { animation-delay: 0.05s; }
.restaurant-menu-item:nth-child(2) { animation-delay: 0.1s; }
.restaurant-menu-item:nth-child(3) { animation-delay: 0.15s; }
.restaurant-menu-item:nth-child(4) { animation-delay: 0.2s; }
.restaurant-menu-item:nth-child(5) { animation-delay: 0.25s; }
.restaurant-menu-item:nth-child(6) { animation-delay: 0.3s; }
