/* Menu Page Specific Styles */

/* Menu Header */
.menu-header {
    padding: 120px 0 60px;
    background: #2C2C2C;
    color: white;
    text-align: center;
}

.menu-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.menu-header p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.menu-actions {
    margin-top: 2rem;
}

.order-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #2C2C2C;
    padding: 15px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #2C2C2C;
}

/* Menu Navigation */
.menu-nav {
    padding: 40px 0;
    background: #F5F3F0;
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-categories {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.category-btn {
    background: #f5f5f5;
    color: #666;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.category-btn:hover {
    background: #2C2C2C;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 44, 44, 0.3);
}

.category-btn.active {
    background: #2C2C2C;
    color: white;
}

.category-btn i {
    font-size: 1.1rem;
}

/* Menu Content */
.menu-content {
    padding: 60px 0;
    background: #F5F3F0;
}

.menu-category {
    display: none;
}

.menu-category.active {
    display: block;
}

.category-header {
    text-align: center;
    margin-bottom: 3rem;
}

.category-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2C2C2C;
    margin-bottom: 1rem;
}

.category-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #2C2C2C, #B8860B);
    margin: 0 auto;
    border-radius: 2px;
}

.category-note {
    color: #B8860B;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Mobile Navigation Overrides for Menu Page */
@media (max-width: 768px) {
    /* Language toggle positioning */
    .language-toggle {
        position: absolute;
        top: 15px;
        right: 20px;
        left: auto;
        margin: 0;
        z-index: 1001;
    }
    
    /* Arabic version - top left */
    html[dir="rtl"] .language-toggle {
        position: absolute;
        top: 15px;
        left: 20px;
        right: auto;
        margin: 0;
        z-index: 1001;
    }
    
    /* Mobile navigation panel */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        background-color: #F5F3F0;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    /* RTL Mobile Navigation Fix */
    html[dir="rtl"] .nav-menu {
        left: auto;
        right: -100%;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        text-align: center;
        transition: right 0.3s ease;
    }

    html[dir="rtl"] .nav-menu.active {
        left: auto;
        right: 0;
    }
    
    /* Hamburger button positioning */
    .hamburger {
        position: absolute !important;
        right: 20px;
        left: auto;
        top: 15px;
        z-index: 1002;
    }
    
    html[dir="rtl"] .hamburger {
        right: auto !important;
        left: 20px !important;
    }
}

/* Menu Items Grid */
.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.menu-item-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    position: relative;
}

.menu-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #B8860B;
}

.menu-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #B8860B, #2C2C2C);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-item-card:hover::before {
    opacity: 1;
}

.item-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #2C2C2C;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.item-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    flex: 1;
}

.item-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #B8860B;
    margin-bottom: 1.25rem;
    text-align: right;
    margin-top: auto;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.item-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: #2C2C2C;
    line-height: 1.3;
    flex: 1;
}

.item-price-inline {
    font-size: 1.3rem;
    font-weight: 700;
    color: #B8860B;
    white-space: nowrap;
    background: linear-gradient(135deg, #B8860B, #DAA520);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.add-to-cart-btn {
    width: 100%;
    background: #2C2C2C;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: #1A1A1A;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 44, 44, 0.3);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

/* Floating Cart */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.cart-toggle {
    width: 60px;
    height: 60px;
    background: #2C2C2C;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(44, 44, 44, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.cart-toggle:hover {
    background: #1A1A1A;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(44, 44, 44, 0.5);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 25px;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
}

.cart-header h3 {
    font-family: 'Playfair Display', serif;
    color: #2C2C2C;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-cart:hover {
    background: #eee;
    color: #2C2C2C;
}

.cart-items {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 3rem 1rem;
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.cart-item-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(135deg, #B8860B, #2C2C2C);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 1.2rem;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #B8860B;
    font-weight: 500;
    font-size: 0.9rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: #2C2C2C;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: #1A1A1A;
}

.quantity {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.remove-item {
    background: #dc3545;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.remove-item:hover {
    background: #c82333;
}

.cart-summary {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2C2C2C;
    border-top: 1px solid #ddd;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.cart-actions {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
}

.view-cart-btn,
.checkout-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-cart-btn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #ddd;
}

.view-cart-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #2C2C2C;
    color: #2C2C2C;
}

.checkout-btn {
    background: #2C2C2C;
    color: white;
}

.checkout-btn:hover:not(:disabled) {
    background: #1A1A1A;
    transform: translateY(-2px);
}

.view-cart-btn:disabled,
.checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .menu-items-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 1.25rem;
    }
    
    .cart-sidebar {
        width: 350px;
        right: -350px;
    }
    
    .item-content h3 {
        font-size: 1.3rem;
    }
    
    .item-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .menu-header {
        padding: 100px 0 40px;
    }
    
    .menu-header h1 {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .menu-header p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .menu-nav {
        padding: 15px 0;
        position: sticky;
        top: 60px;
        background: #F5F3F0;
        z-index: 100;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    /* Category tabs mobile optimization */
    .menu-categories {
        display: flex;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
        scrollbar-width: thin;
        scrollbar-color: #654321 #f0f0f0;
    }

    .menu-categories::-webkit-scrollbar {
        height: 4px;
    }

    .menu-categories::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 2px;
    }

    .menu-categories::-webkit-scrollbar-thumb {
        background: #654321;
        border-radius: 2px;
    }
    
    .category-btn {
        flex-shrink: 0;
        min-width: 90px;
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 40px;
        border-radius: 12px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .category-btn .category-text {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .category-btn i {
        font-size: 0.8rem;
        margin-right: 4px;
    }
    
    /* RTL adjustments for category tabs */
    html[dir="rtl"] .menu-categories {
        direction: rtl;
    }
    
    /* RTL adjustments for category buttons */
    html[dir="rtl"] .category-btn i {
        margin-right: 0;
        margin-left: 6px;
    }
    
    .menu-items-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 20px;
        padding-top: 10px;
    }
    
    .item-content {
        padding: 1.5rem;
    }
    
    .item-content h3 {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-price {
        font-size: 1.1rem;
        text-align: left;
        margin-top: 0;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .floating-cart {
        bottom: 20px;
        right: 20px;
    }
    
    .cart-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        min-width: 20px;
    }
}

/* Medium mobile devices (481px - 600px) */
@media (max-width: 600px) and (min-width: 481px) {
    .menu-header h1 {
        font-size: 2.2rem;
    }
    
    .menu-categories {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .category-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
        min-height: 40px;
        flex-shrink: 0;
        flex: none;
        min-width: 90px;
    }
    
    .category-btn .category-text {
        font-size: 0.75rem;
    }
    
    .menu-items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 15px;
        padding-top: 10px;
    }
    
    .category-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .menu-header {
        padding: 80px 0 30px;
    }
    
    .menu-header h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .menu-header p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .menu-nav {
        padding: 15px 0;
    }
    
    .menu-categories {
        display: flex;
        overflow-x: auto;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0 1rem;
        margin-bottom: 1rem;
        scrollbar-width: thin;
        scrollbar-color: #654321 #f0f0f0;
    }
    
    .menu-categories::-webkit-scrollbar {
        height: 4px;
    }

    .menu-categories::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 2px;
    }

    .menu-categories::-webkit-scrollbar-thumb {
        background: #654321;
        border-radius: 2px;
    }
    
    .category-btn {
        flex-shrink: 0;
        min-width: 80px;
        padding: 6px 8px;
        font-size: 0.7rem;
        min-height: 35px;
        justify-content: center;
        border-radius: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .category-btn .category-text {
        font-size: 0.7rem;
    }
    
    .category-btn i {
        font-size: 0.75rem;
        margin-right: 3px;
    }
    
    /* RTL adjustments for small screens */
    html[dir="rtl"] .menu-categories {
        direction: rtl;
    }
    
    html[dir="rtl"] .category-btn {
        justify-content: center;
    }
    
    html[dir="rtl"] .category-btn i {
        margin-right: 0;
        margin-left: 3px;
    }
    
    .category-header h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .menu-items-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .menu-item-card {
        margin-bottom: 1rem;
    }
    
    .item-content {
        padding: 1.2rem;
    }
    
    .item-content h3 {
        font-size: 1.1rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .item-content p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .item-price {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Menu categories already styled above with horizontal scroll */
    
    .category-btn i {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .quantity-controls {
        justify-content: center;
    }
    
    .quantity-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .quantity-display {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .add-to-cart-btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .menu-actions {
        margin-top: 1.5rem;
    }
    
    .order-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* Animation for cart updates */
@keyframes cartUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.cart-updated {
    animation: cartUpdate 0.3s ease;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #2C2C2C;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Custom scrollbar for cart */
.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #2C2C2C;
    border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #1A1A1A;
}

