/**
 * JetEngine Menu Meals Grid - Styles
 * Supports both RTL and LTR layouts
 * Version 2.0.0
 */

/* Import Almarai font from Google Fonts for Arabic */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');

/* Import Poppins font for English */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

.menu-meals-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* RTL Support */
.menu-meals-wrapper[dir="rtl"] {
    font-family: 'Almarai', sans-serif;
}

/* LTR Support */
.menu-meals-wrapper[dir="ltr"] {
    font-family: 'Poppins', sans-serif;
}

/* Category Tabs */
.menu-category-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.category-tab {
    padding: 12px 24px;
    background: #f5f5f5;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
	text-transform: capitalize !important;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.category-tab:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.category-tab.active {
    background: #1a5e3a;
    color: white;
}

.category-tab:focus {
    outline: 2px solid #1a5e3a;
    outline-offset: 2px;
}

.category-tab img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.tab-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Meals Grid */
.menu-meals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.meal-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 1;
}

.meal-card.hidden {
    display: none;
}

.meal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Meal Image */
.meal-image {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.meal-image img {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* RTL: Image positioned from right */
[dir="rtl"] .meal-image img {
    right: 0;
}

/* LTR: Image positioned from left */
[dir="ltr"] .meal-image img {
    left: 0;
}

.meal-calories {
    position: absolute;
    top: 15px;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* RTL: Calories badge on right */
[dir="rtl"] .meal-calories {
    right: 15px;
}

/* LTR: Calories badge on left */
[dir="ltr"] .meal-calories {
    left: 15px;
}

/* Meal Content */
.meal-content {
    padding: 20px;
}

.meal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.meal-description {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.6;
}

/* Nutrition Info */
.meal-nutrition {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.nutrition-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #555;
}

.nutrition-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.nutrition-item.protein .dot {
    background: #4a90e2;
}

.nutrition-item.carbs .dot {
    background: #f5a623;
}

.nutrition-item.fat .dot {
    background: #e94b3c;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .menu-meals-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .menu-meals-wrapper {
        padding: 15px;
    }
    
    .menu-category-tabs {
        gap: 10px;
        margin-bottom: 30px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .menu-category-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .menu-meals-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .category-tab {
        padding: 10px 18px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .meal-title {
        font-size: 16px;
    }
    
    .meal-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .menu-meals-grid {
        grid-template-columns: 1fr;
    }
    
    .category-tab {
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.meal-card {
    animation: fadeIn 0.3s ease;
}

/* Text Alignment */
[dir="rtl"] .meal-content,
[dir="rtl"] .meal-description,
[dir="rtl"] .meal-nutrition {
    text-align: right;
}

[dir="ltr"] .meal-content,
[dir="ltr"] .meal-description,
[dir="ltr"] .meal-nutrition {
    text-align: left;
}
