/* =============================================
   Makcubes Restaurant Menu - Public Styles
   ============================================= */

:root {
    --mcm-primary: #e67e22;
    --mcm-secondary: #2c3e50;
    --mcm-text: #555555;
}

/* Container */
.mcm-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
    background-size: var(--mcm-bg-size, cover);
    background-repeat: var(--mcm-bg-repeat, no-repeat);
    background-position: center center;
    border-radius: 12px;
}

/* RTL Support */
.mcm-rtl {
    direction: rtl;
}
.mcm-rtl .mcm-item-header {
    direction: rtl;
}
.mcm-rtl .mcm-item-description {
    direction: rtl;
    text-align: right;
}

/* Language Switcher */
.mcm-language-switcher {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}
.mcm-lang-btn {
    padding: 10px 24px;
    border: 2px solid var(--mcm-primary);
    background: white;
    color: var(--mcm-primary);
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
	font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}
.mcm-lang-btn.active {
    background: var(--mcm-primary);
    color: white;
}
.mcm-lang-btn:hover {
    background: var(--mcm-primary);
    color: white;
}

/* =============================================
   Categories - Horizontal Scroll
   ============================================= */
.mcm-categories-wrapper {
    margin-bottom: 30px;
}

.mcm-categories-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding-bottom: 15px;
    cursor: grab;
}

.mcm-categories-grid:active {
    cursor: grabbing;
}

.mcm-categories-grid::-webkit-scrollbar {
    display: none;
}

.mcm-category-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    min-width: 120px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    color: var(--mcm-text);
    white-space: nowrap;
    flex-shrink: 0;
    outline: none;
    text-decoration: none;
	font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

.mcm-category-btn:hover {
    border-color: var(--mcm-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mcm-category-btn.active {
    background: var(--mcm-primary);
    border-color: var(--mcm-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mcm-category-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.3);
}

.mcm-category-btn-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
}

.mcm-category-btn-icon {
    font-size: 40px;
    pointer-events: none;
}

.mcm-category-btn-name {
    font-size: 14px;
    text-align: center;
    pointer-events: none;
    font-weight: 600;
	font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

/* =============================================
   Sub Category Sections
   ============================================= */
.mcm-sub-category-section {
    margin-bottom: 40px;
}

.mcm-sub-category-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--mcm-secondary);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--mcm-primary);
    display: inline-block;
}

/* =============================================
   Menu Items Grid
   ============================================= */
.mcm-items-grid {
    display: grid;
    gap: 25px;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
}

/* Menu Item Card */
.mcm-menu-item {
    display: flex;
    flex-direction: row;
    gap: 18px;
    background: white;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.mcm-menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Item Image */
.mcm-item-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
}

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

/* Item Details */
.mcm-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Item Header */
.mcm-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.mcm-item-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--mcm-secondary);
    word-break: break-word;
}

.mcm-item-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--mcm-primary);
    white-space: nowrap;
}

/* Item Description */
.mcm-item-description {
    margin: 8px 0 10px 0;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.6;
    word-break: break-word;
}

/* Item Calories */
.mcm-item-calories {
    font-size: 11px;
    color: #95a5a6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 20px;
    width: fit-content;
    white-space: nowrap;
}

/* States */
.mcm-no-items {
    text-align: center;
    padding: 60px 20px;
    color: #95a5a6;
    font-size: 18px;
    grid-column: 1 / -1;
}

.mcm-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 18px;
    color: var(--mcm-primary);
    grid-column: 1 / -1;
}

.mcm-error {
    text-align: center;
    padding: 60px 20px;
    color: #e74c3c;
    grid-column: 1 / -1;
}

/* Category Title (for single category shortcode) */
.mcm-category-title {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    color: var(--mcm-secondary);
}

.mcm-category-menu {
    width: 100%;
}

/* =============================================
   Popup Styles
   ============================================= */
.mcm-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: mcmFadeIn 0.3s ease;
}

@keyframes mcmFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mcm-popup-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: mcmSlideUp 0.3s ease;
}

@keyframes mcmSlideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.mcm-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
    z-index: 10;
    line-height: 1;
    padding: 0;
}

.mcm-popup-close:hover {
    color: #333;
}

.mcm-popup-grid {
    display: flex;
    flex-direction: column;
}

.mcm-popup-image {
    flex-shrink: 0;
}

.mcm-popup-image img {
    width: 100%;
    /* max-height: 300px; */
    object-fit: cover;
    border-radius: 20px 20px 0 0;
}

.mcm-popup-details {
    padding: 25px;
}

.mcm-popup-title {
    margin: 0 0 15px 0;
    font-size: 28px;
    color: var(--mcm-secondary);
}

.mcm-popup-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mcm-popup-meta {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
}

.mcm-popup-meta > div {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.mcm-popup-meta > div:last-child {
    border-bottom: none;
}

.mcm-popup-meta .label {
    font-weight: 600;
    color: var(--mcm-secondary);
}

.mcm-popup-meta .value {
    color: var(--mcm-primary);
    font-weight: bold;
}

/* =============================================
   Popup RTL - Arabic
   ============================================= */
.mcm-rtl .mcm-popup-close {
    right: auto;
    left: 20px;
}

.mcm-rtl .mcm-popup-title {
    text-align: right;
    direction: rtl;
}

.mcm-rtl .mcm-popup-description {
    text-align: right;
    direction: rtl;
}

.mcm-rtl .mcm-popup-grid {
    direction: rtl;
}

.mcm-rtl .mcm-popup-image img {
    border-radius: 0 20px 20px 0;
}

.mcm-rtl .mcm-popup-meta > div {
    flex-direction: row;
    direction: rtl;
}

.mcm-rtl .mcm-popup-meta .label {
    text-align: right;
    direction: rtl;
    margin-left: auto;
}

.mcm-rtl .mcm-popup-meta .value {
    text-align: left;
    direction: ltr;
    margin-right: auto;
}

/* =============================================
   Single Item Shortcode
   ============================================= */
.mcm-single-item-shortcode {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 10px 0;
}

.mcm-single-item-inner {
    display: flex;
    flex-direction: column;
}

.mcm-single-item-image {
    width: 100%;
}

.mcm-single-item-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.mcm-single-item-info {
    padding: 15px;
}

.mcm-single-item-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: var(--mcm-secondary);
}

.mcm-single-item-description {
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.mcm-single-item-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.mcm-single-item-price {
    font-weight: bold;
    color: var(--mcm-primary);
    font-size: 16px;
}

.mcm-single-item-calories,
.mcm-single-item-time {
    font-size: 12px;
    color: #95a5a6;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

/* Mobile */
@media screen and (max-width: 768px) {
    .mcm-items-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
        grid-template-columns: none !important;
    }
    
    .mcm-items-grid .mcm-menu-item {
        display: flex !important;
        flex-direction: row !important;
        margin-bottom: 0;
        width: 100%;
    }

    .mcm-item-image {
        flex-shrink: 0;
        width: 100px;
        height: 100px;
    }

    .mcm-item-name {
        font-size: 16px;
    }

    .mcm-item-price {
        font-size: 16px;
    }

    .mcm-sub-category-title {
        font-size: 18px;
    }

    .mcm-category-btn {
        min-width: 85px;
        padding: 14px 18px;
    }

    .mcm-category-btn-img {
        width: 45px;
        height: 45px;
    }

    .mcm-category-btn-icon {
        font-size: 30px;
    }

    .mcm-category-btn-name {
        font-size: 12px;
    }
    
    .mcm-no-items,
    .mcm-loading,
    .mcm-error {
        grid-column: auto;
    }
}

/* Desktop */
@media (min-width: 600px) {
    .mcm-single-item-inner {
        flex-direction: row;
    }

    .mcm-single-item-image {
        width: 120px;
    }

    .mcm-single-item-image img {
        height: 100%;
    }

    .mcm-single-item-info {
        flex: 1;
    }

    .mcm-popup-grid {
        flex-direction: row;
    }

    .mcm-popup-image {
        flex: 1;
    }

    .mcm-popup-image img {
        height: 100%;
        border-radius: 20px 0 0 20px;
    }

    .mcm-popup-details {
        flex: 1;
    }
    
    .mcm-rtl .mcm-popup-image img {
        border-radius: 0 20px 20px 0;
    }
}