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

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

:root {
    --mcm-primary: #e67e22;
    --mcm-secondary: #2c3e50;
    --mcm-text: #555555;
    --mcm-bg: #ffffff;
    --mcm-card-bg: #ffffff;
    --mcm-card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --mcm-border: #f0f0f0;
    --mcm-section-bg: #f8f9fa;
    --mcm-header-bg: #ffffff;
    --mcm-cover-overlay: rgba(0,0,0,0.4);
    --mcm-btn-bg: #ffffff;
    --mcm-btn-text: var(--mcm-primary);
    --mcm-tab-border: #e0e0e0;
    --mcm-tab-text: var(--mcm-text);
    --mcm-tab-bg: var(--mcm-card-bg);
    --mcm-cat-btn-text: var(--mcm-text);
}

/* Dark Mode - Full Page */
body.mcm-dark-mode {
    --mcm-primary: #e67e22;
    --mcm-secondary: #e0e0e0;
    --mcm-text: #b0b0b0;
    --mcm-bg: #1a1a2e;
    --mcm-card-bg: #16213e;
    --mcm-card-shadow: 0 2px 12px rgba(0,0,0,0.4);
    --mcm-border: #0f3460;
    --mcm-section-bg: #16213e;
    --mcm-header-bg: #16213e;
    --mcm-cover-overlay: rgba(0,0,0,0.6);
    --mcm-btn-bg: #16213e;
    --mcm-btn-text: var(--mcm-primary);
    --mcm-tab-border: #0f3460;
    --mcm-tab-text: #b0b0b0;
    --mcm-tab-bg: #16213e;
    --mcm-cat-btn-text: #b0b0b0;
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.mcm-dark-mode * {
    scrollbar-color: #e67e22 #1a1a2e;
}

body.mcm-dark-mode .mcm-cover-section {
    background-color: #0f3460;
}

body.mcm-dark-mode .mcm-sticky-header.mcm-is-sticky {
    background: var(--mcm-header-bg);
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
}

body.mcm-dark-mode .mcm-popup-content {
    background: #16213e;
    color: #e0e0e0;
}

body.mcm-dark-mode .mcm-popup-description {
    color: #b0b0b0;
}

body.mcm-dark-mode .mcm-popup-meta {
    background: #1a1a2e;
}

body.mcm-dark-mode .mcm-popup-meta > div {
    border-bottom-color: #0f3460;
}

/* =============================================
   Remove WPBakery wrapper spacing
   ============================================= */
.wpb_wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.wpb_wrapper > .mcm-menu-wrapper:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wpb_wrapper .mcm-menu-wrapper {
    margin: 0 !important;
}

.vc_row,
.vc_column,
.wpb_content_element {
    margin-bottom: 0 !important;
}

/* Reset */
.mcm-menu-wrapper {
    margin-top: 0 !important;
}

.mcm-menu-wrapper * {
    box-sizing: border-box;
}

/* =============================================
   Cover Header Section
   ============================================= */
.mcm-cover-section {
    position: relative;
    width: 100%;
    height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #2c3e50;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
    margin-bottom: 0;
    margin-top: 0 !important;
}

.mcm-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--mcm-cover-overlay);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.mcm-cover-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: contain;
    background: transparent;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.mcm-cover-logo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
}

.mcm-cover-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.mcm-cover-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--mcm-btn-bg);
    color: var(--mcm-btn-text);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
    border: none;
    cursor: pointer;
}

.mcm-cover-btn i {
    font-size: 16px;
}

.mcm-cover-btn:hover {
    background: var(--mcm-primary);
    color: white;
    transform: translateY(-2px);
}

.mcm-cover-btn-whatsapp {
    background: #25D366;
    color: white;
}

.mcm-cover-btn-whatsapp:hover {
    background: #128C7E;
    color: white;
}

.mcm-cover-btn-call {
    background: var(--mcm-primary);
    color: white;
}

.mcm-cover-btn-call:hover {
    background: #d35400;
    color: white;
}

.mcm-cover-social {
    display: flex;
    gap: 12px;
    margin-top: 5px;
}

.mcm-cover-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
}

.mcm-cover-social a:hover {
    background: white;
    color: var(--mcm-primary);
    transform: translateY(-2px);
}

.mcm-cover-social a i {
    font-size: 18px;
}

/* =============================================
   Sticky Header Container
   ============================================= */
.mcm-sticky-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: transparent;
    box-shadow: none;
    transition: all 0.3s ease;
    padding: 10px 0 0 0;
}

/* When sticky header becomes fixed (on scroll) */
.mcm-sticky-header.mcm-is-sticky {
    background: var(--mcm-header-bg);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

/* =============================================
   Container
   ============================================= */
.mcm-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

/* =============================================
   Toolbar: Language + Dark Mode
   ============================================= */
.mcm-toolbar {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 0 15px 0;
}

.mcm-lang-btn {
    padding: 8px 20px;
    border: 2px solid var(--mcm-primary);
    background: transparent;
    color: var(--mcm-primary);
    border-radius: 30px;
    cursor: pointer;
    font-size: 13px;
    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;
}

.mcm-dark-toggle {
    padding: 8px 16px;
    border: 2px solid var(--mcm-secondary);
    background: transparent;
    color: var(--mcm-secondary);
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mcm-dark-toggle:hover {
    background: var(--mcm-secondary);
    color: white;
}

.mcm-dark-toggle i {
    font-size: 16px;
}

/* =============================================
   Categories Carousel
   ============================================= */
.mcm-categories-wrapper {
    padding-bottom: 10px;
}

.mcm-categories-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding: 5px 0 15px 0;
    scroll-behavior: smooth;
}

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

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

.mcm-category-btn:hover,
.mcm-category-btn.active {
    background: var(--mcm-primary);
    border-color: var(--mcm-primary);
    color: white;
    transform: translateY(-2px);
}

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

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

.mcm-category-btn-name {
    font-size: 12px;
    text-align: center;
    pointer-events: none;
    font-weight: 600;
}

/* =============================================
   Menu Items Area
   ============================================= */
.mcm-menu-grid {
    padding-top: 20px;
}

.mcm-category-section {
    margin-bottom: 50px;
    scroll-margin-top: 160px;
}

.mcm-category-section-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--mcm-secondary);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--mcm-primary);
    display: inline-block;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

.mcm-sub-category-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--mcm-primary);
    margin: 30px 0 15px 0;
    padding-left: 15px;
    border-left: 4px solid var(--mcm-primary);
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

.mcm-items-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
}

/* Menu Item Card */
.mcm-menu-item {
    display: flex;
    flex-direction: row;
    gap: 16px;
    background: var(--mcm-card-bg);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--mcm-card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--mcm-border);
    cursor: pointer;
    width: 100%;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

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

/* 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;
    overflow: hidden;
}

.mcm-item-name {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--mcm-secondary);
    word-break: break-word;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

.mcm-item-description {
    margin: 0 0 8px 0;
    color: #7f8c8d;
    font-size: 12px;
    line-height: 1.5;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
}

.mcm-item-price {
    font-weight: 700;
    font-size: 18px;
    color: var(--mcm-primary);
    margin-top: auto;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

.mcm-item-calories {
    font-size: 11px;
    color: #95a5a6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
}

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

/* =============================================
   Footer
   ============================================= */
.mcm-footer {
    text-align: center;
    padding: 30px 20px;
    background: var(--mcm-header-bg);
    color: var(--mcm-text);
    font-size: 14px;
    border-top: 1px solid var(--mcm-border);
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

.mcm-footer a {
    color: var(--mcm-primary);
    text-decoration: none;
    font-weight: 600;
}

.mcm-footer a:hover {
    text-decoration: underline;
}

/* =============================================
   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;
    font-family: 'Cairo', 'Tajawal', 'Almarai', sans-serif;
}

@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;
}

/* =============================================
   RTL Support
   ============================================= */
.mcm-rtl {
    direction: rtl;
}

.mcm-rtl .mcm-item-name,
.mcm-rtl .mcm-item-description {
    text-align: right;
}

.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;
}

.mcm-rtl .mcm-popup-meta .value {
    text-align: left;
}

.mcm-rtl .mcm-sub-category-title {
    padding-left: 0;
    padding-right: 15px;
    border-left: none;
    border-right: 4px solid var(--mcm-primary);
}

.mcm-rtl .mcm-cover-btn {
    direction: rtl;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media screen and (max-width: 768px) {
    .mcm-cover-section {
        height: 250px;
        border-radius: 0 0 20px 20px;
    }

    .mcm-cover-logo {
        width: 80px;
        height: 80px;
    }

    .mcm-cover-logo-placeholder {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }

    .mcm-cover-btn {
        padding: 10px 18px;
        font-size: 12px;
    }

    .mcm-cover-social a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .mcm-items-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px;
        grid-template-columns: none !important;
    }

    .mcm-menu-item {
        flex-direction: row;
    }

    .mcm-item-image {
        width: 80px;
        height: 80px;
    }

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

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

    .mcm-category-section-title {
        font-size: 20px;
    }

    .mcm-category-btn {
        min-width: 75px;
        padding: 10px 14px;
    }

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

    .mcm-category-btn-name {
        font-size: 10px;
    }

    .mcm-category-section {
        scroll-margin-top: 140px;
    }
}

@media (min-width: 600px) {
    .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;
    }
}

/* Remove WPBakery wrapper spacing */
.wpb_wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.wpb_wrapper > .mcm-menu-wrapper:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure the shortcode output takes full width with no gaps */
.wpb_wrapper .mcm-menu-wrapper {
    margin: 0 !important;
}

/* Fix any WPBakery row/column gaps */
.vc_row, .vc_column, .wpb_content_element {
    margin-bottom: 0 !important;
}