:root {
    --primary-color: #e74c3c;
    --secondary-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #fff7e6;
    --gray-color: #e0e0e0;
    --accent-color: #ffb142;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: var(--dark-color);
    background-image: url('https://www.transparenttextures.com/patterns/arches.png');
}

header {
    background: linear-gradient(135deg, var(--primary-color), #ff9a9e);
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
}

header h1 {
    font-size: 2.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    font-family: 'Kalam', cursive;
}

.restaurant-info {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.cart-icon {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    cursor: pointer;
    background-color: white;
    color: var(--primary-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.cart-icon:hover {
    transform: scale(1.05);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-color);
    color: var(--dark-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.search-container {
    padding: 1.25rem;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--gray-color);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    background-color: #f8f9fa;
    padding-left: 3rem;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
    background-color: white;
}

.search-icon {
    position: absolute;
    left: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.search-wrapper {
    position: relative;
}

.categories {
    display: flex;
    overflow-x: auto;
    padding: 1.25rem 1rem;
    gap: 0.75rem;
    background-color: white;
    margin-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.categories::-webkit-scrollbar {
    height: 4px;
}

.categories::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.categories::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
}

.category-btn {
    padding: 0.625rem 1.25rem;
    background-color: #f0f0f0;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.category-btn:hover {
    background-color: #e5e5e5;
    transform: translateY(-1px);
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.menu-container {
    padding: 1.5rem;
    max-width: 1300px;
    margin: 0 auto;
}

.category-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.category-title {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.75rem;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.menu-item {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.07);
    transition: all 0.3s;
    position: relative;
    border: 1px solid #f0f0f0;
}

.menu-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.item-image {
    height: 200px;
    background-position: center;
    background-size: cover;
    position: relative;
}

.item-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-color);
    color: var(--dark-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.item-info {
    padding: 1.5rem;
}

.item-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.item-description {
    color: #666;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-weight: bold;
    font-size: 1.35rem;
    color: var(--primary-color);
}

.add-item {
    display: flex;
    align-items: center;
}

.add-item input {
    margin-right: 0.5rem;
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.add-item label {
    cursor: pointer;
    font-weight: 500;
}

.cart-container {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: white;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border-radius: 20px 0 0 20px;
}

.cart-container.open {
    right: 0;
}

.cart-header {
    background: linear-gradient(135deg, var(--primary-color), #ff9a9e);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 0 0 0;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
}

.cart-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.close-cart:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.cart-items::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-color);
    position: relative;
    transition: background-color 0.3s;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.cart-item:hover {
    background-color: #f9f9f9;
}

.cart-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    margin-right: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-weight: bold;
    color: var(--primary-color);
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.cart-item-remove:hover {
    background-color: #ffebee;
    color: crimson;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #888;
    text-align: center;
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-color);
    background-color: #f9f9f9;
    border-radius: 0 0 0 20px;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.cart-tax {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #666;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    font-weight: bold;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 2px dashed #ddd;
}

.payment-methods {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.payment-method {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: white;
}

.payment-method:hover {
    transform: translateY(-2px);
}

.payment-method.active {
    border-color: var(--secondary-color);
    background-color: #fff7e0;
}

.payment-method i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}

.checkout-btn:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.4);
}

.checkout-btn:active {
    transform: translateY(0);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Add this CSS to your styles.css file */

/* Add this CSS to your styles.css file */

@media (max-width: 768px) {
    .menu-items {
        grid-template-columns: 1fr;
    }
    
    .cart-container {
        width: 100%;
        right: 0; /* Show the cart on smaller screens */
        border-radius: 0;
        height: 100vh; /* Make sure the cart takes the full height of the viewport */
        overflow-y: auto; /* Enable vertical scrolling */
        padding-bottom: 20px; /* Add padding to the bottom */
    }
    
    .cart-header, .cart-footer {
        border-radius: 0;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .payment-methods {
        flex-wrap: wrap;
    }
    
    .payment-method {
        min-width: 80px;
    }

    .cart-items {
        max-height: calc(100vh - 400px); /* Adjust the height based on the viewport */
        overflow-y: auto;
        margin-bottom: 10px; /* Add some space between the items and the subtotal */
    }

    .qr-section {
        text-align: center;
        margin-top: 15px;
    }

    .qr-section img {
        max-width: 200px;
        margin: 0 auto;
    }
}

/* Ensure these styles apply to larger screens as well */
.cart-items {
    max-height: 300px; /* Adjust the height as needed */
    overflow-y: auto;
    margin-bottom: 10px; /* Add some space between the items and the subtotal */
}

.qr-section {
    text-align: center;
    margin-top: 15px;
}

.qr-section img {
    max-width: 200px;
    margin: 0 auto;
}


/* Make sure these styles apply to larger screens as well */



.no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.25rem;
    color: #666;
    margin-top: 2rem;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
    display: block;
}

/* Quantity controls */
.quantity-control {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity-number {
    margin: 0 0.5rem;
    font-weight: 600;
    min-width: 25px;
    text-align: center;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, -10px);
}

.toast i {
    color: var(--accent-color);
}

.hidden {
    display: none;
}

/* Vegetarian indicator */
.veg-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid green;
    border-radius: 3px;
    position: relative;
    margin-right: 8px;
}

.veg-indicator::after {
    content: "";
    width: 8px;
    height: 8px;
    background-color: green;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.non-veg-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid red;
    border-radius: 3px;
    position: relative;
    margin-right: 8px;
}

.non-veg-indicator::after {
    content: "";
    width: 8px;
    height: 8px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spicy-level {
    color: #e67e22;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}