body {
  touch-action: pan-x pan-y;
}
/* Menu Card Layout */
.menu-card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Image Container */
.menu-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
}

.menu-image {
   
    max-width: 200px;
 
    transition: transform 0.3s ease;
}

.menu-card:hover .menu-image {
    transform: scale(1.05);
}

/* Card Content */
.menu-details {
    padding: 1px;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title and Category */
.menu-name-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.menu-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
    flex: 1;
    line-height: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2em;
}
.rating {
    display: none;
    align-items: center;
    gap: 4px;
    color: #ffc107;
    font-size: 0.95rem;
    white-space: nowrap;
}
.rating-btn {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
  }
  @media (max-width: 576px) {
    .rating-btn {
      font-size: 12px;
      padding: 6px 12px;
    }
  
    .bi-chevron-left {
      display: block;
    }
  }
          /* Toast Styles */
          .toast-container {
            position: fixed;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1050;
        }
        .toast {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            min-width: 300px;
            margin-bottom: 10px;
        }
        .toast-header {
            border-bottom: none;
            background-color: transparent;
            padding: 12px 16px;
        }
        .toast-body {
            padding: 12px 16px;
            color: #333;
			z-index: 10000;
        }
        .toast.success .toast-header {
            color: #28a745;
        }
        .toast.error .toast-header {
            color: #CB202D;
        }
        .toast.info .toast-header {
            color: #17a2b8;
        }
        .toast.warning .toast-header {
            color: #ffc107;
        }
        .toast .btn-close {
            opacity: 0.5;
            transition: opacity 0.3s;
        }
        .toast .btn-close:hover {
            opacity: 1;
        }
        .toast-icon {
            margin-right: 8px;
            font-size: 1.2rem;
        }
        .toast .btn-danger {
            padding: 4px 12px;
            font-size: 0.9rem;
        }

        /* Disabled Menu Card Styles */
        .menu-card.disabled {
            opacity: 0.7;
            pointer-events: none;
            position: relative;
        }
        .menu-card.disabled .menu-image-container {
            position: relative;
        }
        .unavailable-overlay {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            text-align: center;
            padding: 10px;
            font-size: 0.9rem;
        }
        .menu-card.disabled .add-to-cart-btn {
            background-color: #ccc;
            cursor: not-allowed;
        }
        .menu-card.disabled .menu-price {
            color: #999;
        }
        .menu-card.disabled .menu-name {
            color: #999;
        }
        .availability-message {
            color: #CB202D;
            font-size: 0.8rem;
            margin-top: 5px;
            font-weight: 500;
        }
        .time-availability {
            color: #666;
            font-size: 0.8rem;
            margin-top: 5px;
        }

        /* Menu Card Styles */
        .menu-card {
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
            height: 100%;
            display: flex;
            flex-direction: column;
            background: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        /* Category Indicator Styles */
        .category-indicator {
            position: relative;
            margin-left: 8px;
            flex-shrink: 0;
        }
        .category-indicator .dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            border: 1px solid rgba(0, 0, 0, 0.1);
        }
        .category-indicator .dot.bg-success {
            background-color: #28a745;
        }
        .category-indicator .dot.bg-danger {
            background-color:#CB202D;
        }
        @media (max-width: 768px) {
            .category-indicator .dot {
                width: 10px;
                height: 10px;
            }
        }

        .menu-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        .menu-image-container {
            height: 180px;
            overflow: hidden;
        }
        .menu-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .menu-details {
            padding: 10px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }
     

        /* Fallback styles for browsers that don't support line-clamp */
        @supports not (display: -webkit-box) {
            .menu-name {
                position: relative;
            }
            
            .menu-name::after {
                content: "...";
                position: absolute;
                right: 0;
                bottom: 0;
                background: white;
                padding-left: 4px;
            }
        }
        .menu-price {
            font-size: 12px;
            font-weight: bold;
            color: #CB202D;
        }
        .add-to-cart-btn {
            width: 100%;
            padding: 10px;
            background-color: #CB202D;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            font-size: 14px;
            margin-top: auto;
        }
        .add-to-cart-btn:hover {
            background-color: #c82333;
        }
        .add-to-cart-btn:disabled {
            background-color: #6c757d;
            cursor: not-allowed;
        }
        .rating {
            color: #ffc107;
            font-size: 14px;
        }

        @media (max-width: 768px) {
            .menu-card {
                margin-bottom: 0;
            }
            .menu-image-container {
                height: 120px;
            }
            .menu-details {
                padding: 10px;
            }
            .menu-name {
                font-size: 12px;
                margin-bottom: 6px;
                height: 2.4em;
                -webkit-line-clamp: 2;
            }
            .menu-price {
                font-size: 8px;
            }
            .add-to-cart-btn {
                padding: 6px;
                font-size: 12px;
            }
            .rating {
                font-size: 11px;
            }
            
            .row {
     
                margin-right: -8px;
            }
      
              .fixed-cart-button {
                top:15px;
                right: 15px;
                padding: 8px 15px;
                display: none !important;
            }
            .cart-icon {
                font-size: 22px;
            }
            .cart-count {
                width: 20px;
                height: 20px;
                font-size: 12px;
            }
           
            
            /* Adjust restaurant header for mobile */
            #restaurantHeader h1 {
                font-size: 1.5rem;
            }
            #restaurantHeader p {
                font-size: 0.9rem;
            }
            
            /* Toast container adjustment for mobile */
            .toast-container {
                bottom: 70px;
                width: 90%;
            }
            .toast {
                min-width: auto;
                width: 100%;
            }
        }

        @media (max-width: 576px) {
            .col-6 {
                padding-left: 6px;
                padding-right: 6px;
            
            }
            .menu-image-container {
                height: 100px;
            }
            .unavailable-overlay {
                font-size: 0.7rem;
                padding: 4px;
            }
            /* Make the add button text smaller on very small screens */
            .add-to-cart-btn {
                font-size: 11px;
                padding: 5px;
            }
        }

        /* Fixed Cart Button Styles */
        .fixed-cart-button {
            position: fixed;
            top:16px;
            right: 20px;
           
            color: black;
            border-radius: 50px;
            padding: 12px 24px;
           
            display: flex;
            align-items: center;
            gap: 8px;
            z-index: 1000;
            transition: all 0.3s ease;
            text-decoration: none;
        }
        .cart-icon {
            font-size: 24px;
        }
        .cart-count {
      position: absolute;
      top: 0;
      right:15px;
      background-color: #CB202D;
      color: white;
      border-radius: 50%;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      font-weight: bold;
      transition: all 0.3s ease;
    }
        .cart-text {
            font-size: 16px;
            font-weight: 500;
        }
        @media (min-width: 768px) {
            .col-md-4 {
                width: 33.333333%;
            }
        }

        @media (min-width: 992px) {
            .col-lg-3 {
                width: 25%;
            }
            .container {
                padding: 0 24px;
            }
        }

        /* User name display styles */
        .user-name-display {
            font-size: 15px;
            font-weight: 600;
            color: #CB202D;
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            transition: all 0.2s ease;
        }
        
        a:hover .user-name-display {
            background-color: rgba(220, 53, 69, 0.1);
        }
        
        /* Cart badge styles */

        /* Search bar styles */
        .input-group {
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            border-radius: 8px;
            overflow: hidden;
        }
        .input-group-text {
            border: 1px solid #ced4da;
            border-right: none;
        }
        .input-group .form-control {
            border: 1px solid #ced4da;
            border-left: none;
            padding: 0.75rem 1rem;
        }
        .input-group .form-control:focus {
            box-shadow: none;
            border-color: #ced4da;
        }
        .input-group-text i {
            font-size: 1.1rem;
        }
        @media (max-width: 768px) {
            .col-md-6 {
                padding: 0 15px;
            }
            .input-group .form-control {
                padding: 0.5rem 0.75rem;
            }
        }

        /* Category Filter Styles */
        .category-filters {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }
        .category-filters .btn {
            border-radius: 20px;
            padding: 8px 20px;
            font-weight: 500;
            transition: all 0.3s ease;
        }
        .category-filters .btn:hover {
            transform: translateY(-2px);
        }
        .category-filters .btn.active {
            color: black;
			border:none;
        }
        .category-filters .btn-outline-success.active {
            background-color: #28a745;
            border-color: #28a745;
        }
        .category-filters .btn-outline-danger.active {
            background-color: #e2606d;
            border-color: #e2606d;
        }
        @media (max-width: 768px) {
            .category-filters {
                gap: 8px;
            }
            .category-filters .btn {
                padding: 6px 16px;
                font-size: 14px;
            }
        }

        /* Focused Card Modal Styles */
          /* Base modal styles - hidden state */
    .menu-modal {
        /* Instead of display: none, use visibility and opacity */
        visibility: hidden;
        opacity: 0;
        pointer-events: none; /* Prevent interaction when hidden */

        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        z-index: 1100; /* High z-index when active */
        /* overflow-y: auto; -- Moved to content for better scrolling */

        /* Transition for smooth show/hide */
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    /* Styles when modal is shown */
    .menu-modal.show {
        /* Display flex to center the content */
        display: flex;
        align-items: center; /* Center vertically */
        justify-content: center; /* Center horizontally */

        visibility: visible;
        opacity: 1;
        pointer-events: auto; /* Allow interaction when visible */
        /* z-index remains 1100 from base rule */
    }

    .menu-modal-content {
        background: white;
        width: 90%; 
        max-width: 600px;
        border-radius: 12px;
        position: relative; 
z-index: 1100;
        max-height: calc(100vh - 40px); 
        overflow-y: auto;
        transform: scale(0.95);
        transition: transform 0.3s ease;
    }
     .menu-modal.show {
            display: flex;
            opacity: 1;
			z-index: 1000;
        }
    .menu-modal.show .menu-modal-content {
        transform: scale(1); 
	
    }

    .menu-modal-image {
        width: 100%;
        height: 300px; /* Fixed height */
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }

    .menu-modal-details {
        padding: 24px; /* Add consistent padding inside details */
    }

    .menu-modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        background: white;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        z-index: 10; /* Ensure close button is above content */
        transition: background-color 0.2s ease;
    }

    .menu-modal-close:hover {
        background-color: #f0f0f0;
    }

    .menu-modal-close i {
        font-size: 18px; /* Adjust icon size if needed */
        color: #333;
    }


    .menu-modal-name {
        font-size: 24px;
        font-weight: bold;
        margin-bottom: 12px;
        color: #333;
    }

    .menu-modal-price {
        font-size: 20px;
        font-weight: bold;
        color: #CB202D;
        margin-bottom: 16px;
    }

    .menu-modal-rating {
        margin-bottom: 20px;
    }

    .menu-modal-add {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        background-color: #CB202D;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    .menu-modal-add:hover {
        background-color: #c82333;
    }

    /* Responsive Adjustments */
    @media (max-width: 768px) {
        .menu-modal-content {
             width: 95%; /* Slightly wider on smaller screens */
             /* margin: 20px auto; -- Removed, flexbox centers */
             max-height: calc(100vh - 20px); /* Reduce margin space */
        }

        .menu-modal-image {
            height: 200px; /* Shorter image height */
        }

        .menu-modal-details {
             padding: 16px; /* Reduce padding */
        }

        .menu-modal-name {
            font-size: 20px;
        }

        .menu-modal-price {
            font-size: 18px;
        }

        .menu-modal-close {
            top: 10px;
            right: 10px;
            width: 28px;
            height: 28px;
        }

         .menu-modal-close i {
             font-size: 16px;
         }
    }
@media (max-width: 768px) {
  .container .text-end {
    padding-top: 1rem;
  }
}

/* Price and Rating */
.price-rating-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.menu-price {
    font-weight: 500;
    color: #28a745;
    font-size: 1rem;
    white-space: nowrap;
}



.rating i {
    margin-right: 2px;
}

.rating-number {
    color: #6c757d;
    font-weight: 500;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background-color:#CB202D;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    width: 100%;
}

.add-to-cart-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

